2025-01-15 07:34 AM - last edited on 2025-01-15 07:40 AM by Andrew Neil
Originally a reply to this, but is a separate discussion.
I've been playing with build configurations, working set, etc, for a while.
I know it's Eclipse and CDT's fault, not STM's. But it's SOOOOOOOO confusing, and there must be a solution. So far, I've created "things", mostly empty, useless "things" : Build Targets, Working Sets, etc. None cause a build to behave as expected.
Which is : having multiple "thing" "target" "thingies", each one using its own linker script (and why not, later at some point, specific .h/.c files). And being able to build one, or another, to get different FWs, each one using its own FLASH ORIGIN settings. Better even would be : one build, multiple FWs, each one in its own folder using its own linker script.
What's behind : OTA. As far as I understood, the linker script is the only place where a FW get its boot address. So far, when I build a FW #2, flash it in the second flash bank, the MCU boots the FW #1 from the first flash bank as long as the linker script indicates
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K
I have to build FW #1 with this ORIGIN, then change ORIGIN by hand, then build FW #2. And not forget to copy FW #1 before build FW #2.
There must be a way to automate such builds ?
2025-01-15 07:49 AM
To answer your question, "Would it be possible to set one specific linker script per Build Configuration?" here:
Yes.
The Linker script is specified here - it is subject to the Configuration setting:
2025-01-15 08:01 AM
Oh yes, thanks, that does the job.
Well, can I add another level ? Is it possible to launch several builds with one click ?
2025-01-15 08:19 AM - edited 2025-01-15 08:20 AM
Not tried it myself, but:
I think this is all standard Eclipse stuff - so googling for general Eclipse documentation etc would probably be worthwhile...
PS:
The 'Build Selected...' goes to: