Skip to main content
Associate II
January 15, 2025
Solved

Managing multiple configurations

  • January 15, 2025
  • 2 replies
  • 1238 views

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 ?

Best answer by Christophe Beugnet

Oh yes, thanks, that does the job.

Well, can I add another level ? Is it possible to launch several builds with one click ?

2 replies

Andrew Neil
Super User
January 15, 2025

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:

AndrewNeil_0-1736956125208.png

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Christophe BeugnetAuthorBest answer
Associate II
January 15, 2025

Oh yes, thanks, that does the job.

Well, can I add another level ? Is it possible to launch several builds with one click ?

Andrew Neil
Super User
January 15, 2025

Not tried it myself, but:

AndrewNeil_0-1736957873288.png

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:

AndrewNeil_1-1736958010788.png

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Associate II
January 16, 2025

OK, tested and working, thanks
I missed this one too

I also did search "The Internet" for eclipse + CDT + build configurations or targets, etc. But DuckDuckGo is not my friend ...