AnsweredAssumed Answered

Flash/debug configurations with separate linker maps

Question asked by David Sherman on Oct 24, 2016
Latest reply on Nov 2, 2016 by Alice_Yang

I have a question, probably kind of an advanced thing for KDS.  Here's the lowdown.  We use LOTS of different build configurations, but they all have similar post-build steps.  We split off a separate memory region and generate two S-records, one with the Kinetis flash and one with an external EEPROM region.  As we found out recently, when we added a second external EEPROM region, the debugger had problems with these "fake" memory regions appearing in the ELF.  One easy solution is make a separate debug configuration which uses a different linker map which has these memory regions set to NOLOAD.  That still works, and there are no crashes.

 

The downside to making the separate debug/flash configurations is if any settings have to change, we would have to make sure the settings match exactly between the two.  The other problem we've noticed is keeping the .cproject file in sync as build configurations are added.

 

Is there a nice way (without writing out all the command line switches manually) of invoking the linker in the post-build steps and just having it re-link with a different linker map?  That way, we could have one build configuration which could still generate all the S-records we need, but it could create a different ELF in the end with the "debug" linker map?

Outcomes