How to customize startup file?


The default startup file generated by CubeMX initializes SRAM appropriately and uses the _sdata and similar variables. For example, here is an excerpt:

TDK_0-1722189601254.png

The startup file is typically named startup_stm32*.s

 

You can, of course, modify the startup file however you want as long as you do the necessary things inside of it.

 

Edit:

The _sdata and similar get defined in the linker file, which depend on the sections you define in there. Maybe that’s what you’re missing. You’ll have to ensure the sections for each program do not overlap at all, then it should just work.

Seems a whole lot easier to make one program rather than 3. But the scheme is certainly doable.

If you feel a post has answered your question, please click “Accept as Solution”.



Source link

Leave a Comment