2019-08-06 02:29 AM
Hello,
We are using application with stm32, and all works well.
But we now want to divide it into: bsp HAL library and an application.
The issue is that we are not sure where the interrupt files should be inserted and the start assembly files.
Does anyone knows if it is possible to divide the big application like this , and where to put the interrupts and assemble files ?
Thanks,
ran
Solved! Go to Solution.
2019-08-06 11:31 PM
Hi,
I've found it is possible using --whole-archive and --no-remove
see here:
Thanks
2019-08-06 05:30 AM
The heavy use of weak linkage makes creating a "ROMed" library rather problematic.
You might consider your own OS with an API and ability to load EXE/DLL like modules into it.
2019-08-06 05:39 AM
I just noticed now that stm32h7xx_it.c must be compiled with application in order to get interrupts, as required.
I also see that, as you said, the interrupt routines are used with "weak" attribute.
Why does it make such mess, and does copying the interrupt handlers file to application project is a suitable solution when we need to make a library ?
Thanks,
2019-08-06 11:31 PM
Hi,
I've found it is possible using --whole-archive and --no-remove
see here:
Thanks
2019-08-07 12:08 AM
The weak linkage allows for placeholding functions to be replaced by custom code. Obviously if you commit a specific set of functions in a given build you can't replace them with a different set later as all the associations have already been fixed.