-
Hello folks, I've generated 2 separate modm builds - first call 'bootloader', second called 'app'.
I've pulled across uncommitted updates to CMake from @Jasa - which is quite neat #568
This generates a bootloader_lib.a
(there are better ways - find_library() etc, but I just want to see it working before the tidy up) From the *.map file below, obviously, it's not worked.. I've come from IAR hence my appaling use of CMake! For what it's worth I've included the projects files - (working using VisualGDB and not included *.sln dir)
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
I'm not sure you want to have one big hex/binary file, since the bootloader is probably not 128kB large, so if you want to have one continuous binary, there'll be a lot of zeros in there until the application starts. You could however call OpenOCD manually and program both ELFs in one go:
I'm not sure about debugging both apps at the same time, it would be really neat if you made that work though. |
Beta Was this translation helpful? Give feedback.
-
Just FYI: there's an option for flash offsets so you don't have to create your own application linkerfile. |
Beta Was this translation helpful? Give feedback.
-
The CMake scripts is not relying on start-group and end-group linker flags, so creating static libraries containing modm itself is dangerous. Unreferenced objects might disappear since "used" attribute is not specified in the source and linker tables is also a problem. (eg. hardware init and assert) |
Beta Was this translation helpful? Give feedback.
-
Thanks for all your advice guys..
|
Beta Was this translation helpful? Give feedback.
-
I'm closing this as this solution is not something we can integrate into modm. |
Beta Was this translation helpful? Give feedback.
Thanks for all your advice guys..
In the end.. I created a new sector in the application link script called vector_bootloader and merged boot binary into it.