-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
The hal library contains code for lots of peripherals that can be driven by interrupts like gpio edge events, spi slaves (spis), etc. Since the compiler does not know that the application does not use the peripheral all the ISR functions and their call tree are included in the final binary making even a simple hello world application quite bloated.
This is most evident in the bootstrap that does not need much code but is huge owing to the bloat in the hal lib.
Some solutions off the top of my head are:
- add some defines in the C code so that the ISR is only defined when the application requires it (ie #ifdef GPIO_EXTI) but this seems messy.
- make a tiny-hal lib which contains only the bare minimum for the bootstrap and the main app will just have to fit (this is not nice either as it kind of hinders little micros)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels