You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I tried hard to understand the elua build system and activate a prog action to my build to run the genprog function to strip a binary from the elf file. I didn't get it working yet. Below you can see my conf.lua, I expect that the line tools.bonfire.prog_flist = { output .. ".bin"} will create a dependency to build the bin file. But it is not working. What am I missing?
-- Configuration file for the RV32IM on bonfire Platform-- Intended to run standaloneifcomp.cpu:lower()=="bonfire_arty_10" thenspecific_files=sf( "start.S platform.c stubs.c uart.c systimer.c console.c platform_int.c mod_riscv.c xil_etherlite.c", comp.cpu:lower() )
elsespecific_files=sf( "start.S platform.c stubs.c uart.c systimer.c console.c platform_int.c mod_riscv.c", comp.cpu:lower() )
end--local ldscript = "src/platform/bonfire/riscv_local.ld"localldscript=sf( "src/platform/%s/%s", platform, "riscv_local.ld" )
-- Override default optimize settingsdelcf{ "-Os", "-fomit-frame-pointer" }
addcf{"-g", "-O2","-fomit-frame-pointer"}
-- Prepend with pathspecific_files=utils.prepend_path( specific_files, sf( "src/platform/%s", platform ) )
-- Standard GCC flagsaddcf{ '-march=rv32im' ,'-mabi=ilp32' }
addcf{ '-ffunction-sections', '-fdata-sections', '-fno-strict-aliasing', '-Wall'}
addlf{ '-nostartfiles', '-nostdlib', '-T', ldscript, '-Wl,--gc-sections', '-Wl,--allow-multiple-definition' }
addlib{ 'c','gcc','m' }
localgcc_version=utils.exec_capture(comp.CC.." -dumpversion")
print(string.format("Found %s version %s",comp.CC, gcc_version))
ifgcc_version:sub(1,1)>="7" then-- For RISCV gcc version >= 7print("Configuring for gcc Version >= 7")
addcf{'-mstrict-align','-mbranch-cost=6'}
elseprint("Configuring for gcc Version < 7")
end-- Also tell the builder that we don't need dependency checks for assembler files--builder:set_asm_dep_cmd( false )-- Toolset datatools.bonfire= {}
tools.bonfire.prog_flist= { output..".bin"}
-- Programming function for i386 (not needed, empty function)--tools.bonfire.progfunc = function( target, deps )--print "bonfire.progfunc"--return 0--end-- Add the programming function explicitly for this target--tools.bonfire.pre_build = function()--local t = builder:target( "#phony:prog", { exetarget }, tools.bonfire.progfunc )--builder:add_target( t, "build eLua firmware image", { "prog" } )--end
The text was updated successfully, but these errors were encountered:
Hi, I want exactly what you describe: That a bin file is generated from the elf.
In the next step (optionally) I may also add other steps like uploading the bin file, but this is was not my question yet.
Hi,
I tried hard to understand the elua build system and activate a prog action to my build to run the genprog function to strip a binary from the elf file. I didn't get it working yet. Below you can see my conf.lua, I expect that the line
tools.bonfire.prog_flist = { output .. ".bin"}
will create a dependency to build the bin file. But it is not working. What am I missing?The text was updated successfully, but these errors were encountered: