platform-xxxxx
is there a solution how to run multiple builders in sequence
with different settings and linker scripts
example:
Build Stage 1
some OBJs, ELF -> BIN
Build Stage 2
some libraries, some tools
Build Main
main builder script - use data from upper builders
main_elf = env.BuildProgram() <-- is only one task
bin = env.ElfToBin( join("$BUILD_DIR", "${PROGNAME}"), main_elf )
main_bin = env.HeaderToBin( join("$BUILD_DIR", "${PROGNAME}"), bin )
AlwaysBuild( ... )
yep … but not work
I’ve been experimenting for a few days
Stage:2 is normal evb
Stage:1 is cloned evb
#### main.py
env = DefaultEnvironment()
env['BOOT'] = env.Clone()
ENV_BOOT = env['BOOT']
boot_elf = ENV_BOOT.BuildProgram()
# Error: Nothing to build. Please put your source codes...
# if skip this, next work
# ENV_BOOT.BuildSources( .... ,bootloader.c) is set for cloned evb
...
main_elf = env.BuildProgram()
cloned_env = env.Clone() work only for compiler settings CPPPATH, LINKFLAGS etc,
but not for nodes
or I don’t know how to work with Clone()
cloned_env.BuildSources() it does not add files to cloned_env.PIOBUILDFILES
cloned_env.BuildProgram() say: Error: Nothing to build. Please put your… if PIOBUILDFILES is empty
if I add file to cloned_env.PIOBUILDFILES
PIO say: Two environments with different… for (main.c)
but cloned_env not have (main.c) … have only (boot.S) <— not exist in PIOBUILDFILES
BuildProgram() always add PROJECT/src/*.c no matter env