Is it possible to create HAL library (later linked with application)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-08-06 2: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.
- Labels:
-
IAR
-
STM32H7 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-08-06 11:31 PM
Hi,
I've found it is possible using --whole-archive and --no-remove
see here:
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-08-06 5: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.​
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-08-06 5: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,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-08-06 11:31 PM
Hi,
I've found it is possible using --whole-archive and --no-remove
see here:
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
Up vote any posts that you find helpful, it shows what's working..
