-
Notifications
You must be signed in to change notification settings - Fork 13
Remove sw isr table #237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Remove sw isr table #237
Conversation
Update nrf to include no sw isr table changes. Signed-off-by: Bjarki Arge Andreasen <[email protected]>
The software isr table is not needed for bare metal. To avoid using it, all interrupts must be placed directly in the vector table, which is done using IRQ_DIRECT_CONNECT(). Update all in tree uses and disable GEN_SW_ISR_TABLE by default. Signed-off-by: Bjarki Arge Andreasen <[email protected]>
The following west manifest projects have changed revision in this Pull Request:
⛔ DNM label due to: 1 project with PR revision Note: This message is automatically posted and updated by the Manifest GitHub Action. |
@@ -6,13 +6,20 @@ | |||
|
|||
#include <zephyr/sys/printk-hooks.h> | |||
#include <zephyr/sys/libc-hooks.h> | |||
#include <zephyr/irq.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commit needs <blah>: <blah>
format
@@ -19,6 +19,14 @@ void relocate_vector_table(void) | |||
/* Empty, but needed */ | |||
} | |||
|
|||
#ifdef CONFIG_NRF5_SDK_IRQ_CONNECT_GPIOTE | |||
ISR_DIRECT_DECLARE(gpiote0_isr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bjarki-andreasen Why is this needed instead of providing nrfx_gpiote_0_irq_handler
directly in IRQ_DIRECT_CONNECT
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the macro ISR_DIRECT_DECLARE() adds required header and footer to the function, its not as simple as a void fn(void)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SoftDevice interrupt forwarding is missing ISR_DIRECT_DECLARE(). Is that different or is this required there as well?
See
sdk-nrf-bm/subsys/softdevice_handler/irq_connect.c
Lines 42 to 48 in afea614
extern void CLOCK_POWER_IRQHandler(void); | |
extern void RADIO_0_IRQHandler(void); | |
extern void TIMER10_IRQHandler(void); | |
extern void GRTC_3_IRQHandler(void); | |
extern void ECB00_IRQHandler(void); | |
extern void AAR00_CCM00_IRQHandler(void); | |
extern void SWI00_IRQHandler(void); |
sdk-nrf-bm/subsys/softdevice_handler/irq_connect.c
Lines 73 to 79 in afea614
IRQ_DIRECT_CONNECT(CLOCK_POWER_IRQn, PRIO_LOW, CLOCK_POWER_IRQHandler, IRQ_ZERO_LATENCY); | |
IRQ_DIRECT_CONNECT(RADIO_0_IRQn, PRIO_HIGH, RADIO_0_IRQHandler, IRQ_ZERO_LATENCY); | |
IRQ_DIRECT_CONNECT(TIMER10_IRQn, PRIO_HIGH, TIMER10_IRQHandler, IRQ_ZERO_LATENCY); | |
IRQ_DIRECT_CONNECT(GRTC_3_IRQn, PRIO_HIGH, GRTC_3_IRQHandler, IRQ_ZERO_LATENCY); | |
IRQ_DIRECT_CONNECT(ECB00_IRQn, PRIO_LOW, ECB00_IRQHandler, IRQ_ZERO_LATENCY); | |
IRQ_DIRECT_CONNECT(AAR00_CCM00_IRQn, PRIO_LOW, AAR00_CCM00_IRQHandler, IRQ_ZERO_LATENCY); | |
IRQ_DIRECT_CONNECT(SWI00_IRQn, PRIO_LOW, SWI00_IRQHandler, IRQ_ZERO_LATENCY); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If TIMER10_IRQHandler
etc. declare the appropriate attributes, like __attribute__((interrupt))
etc. then its no problem, especially given they are zero latency. But in general, the ISR_DIRECT_DECLARE macro should be used as it wraps the function in these attributes automatically
Adapt code to allow removing sw isr table, saving 2K ROM