stable_2.6.x branch
Linux host
I recompiled an application currently working on a NUCLEO-L152RE board to work on a NUCLEO-F401RE board (with appropriate changes to the Makefile, mcuconf.h, etc.) and got the following compile-time error:
Code: Select all
make -k
Compiling ext_lld_isr.c
/home/pauba/ChibiOS-RT/os/hal/platforms/STM32F4xx/ext_lld_isr.c: In function 'ext_lld_exti_irq_enable':
/home/pauba/ChibiOS-RT/os/hal/platforms/STM32F4xx/ext_lld_isr.c:320:20: error: 'ETH_WKUP_IRQn' undeclared (first use in this function)
nvicEnableVector(ETH_WKUP_IRQn,
^
/home/pauba/ChibiOS-RT/os/hal/platforms/STM32F4xx/ext_lld_isr.c:320:20: note: each undeclared identifier is reported only once for each function it appears in
/home/pauba/ChibiOS-RT/os/hal/platforms/STM32F4xx/ext_lld_isr.c: In function 'ext_lld_exti_irq_disable':
/home/pauba/ChibiOS-RT/os/hal/platforms/STM32F4xx/ext_lld_isr.c:349:21: error: 'ETH_WKUP_IRQn' undeclared (first use in this function)
nvicDisableVector(ETH_WKUP_IRQn);
^
/home/pauba/ChibiOS-RT/os/ports/GCC/ARMCMx/rules.mk:183: recipe for target 'build/obj/ext_lld_isr.o' failed
make: *** [build/obj/ext_lld_isr.o] Error 1
make: Target 'all' not remade because of errors.
Compilation exited abnormally with code 2 at Wed Jul 9 11:13:53
I haven't studied the internals of ChibiOS yet but I made the following changes to get things to work:
Code: Select all
diff --git a/os/hal/platforms/STM32F4xx/ext_lld_isr.c b/os/hal/platforms/STM32F4xx/ext_lld_isr.c
index 64731b4..0a04911 100644
--- a/os/hal/platforms/STM32F4xx/ext_lld_isr.c
+++ b/os/hal/platforms/STM32F4xx/ext_lld_isr.c
@@ -317,9 +317,9 @@ void ext_lld_exti_irq_enable(void) {
CORTEX_PRIORITY_MASK(STM32_EXT_EXTI17_IRQ_PRIORITY));
nvicEnableVector(OTG_FS_WKUP_IRQn,
CORTEX_PRIORITY_MASK(STM32_EXT_EXTI18_IRQ_PRIORITY));
+#if !defined(STM32F401xx)^M
nvicEnableVector(ETH_WKUP_IRQn,
CORTEX_PRIORITY_MASK(STM32_EXT_EXTI19_IRQ_PRIORITY));
-#if !defined(STM32F401xx)
nvicEnableVector(OTG_HS_WKUP_IRQn,
CORTEX_PRIORITY_MASK(STM32_EXT_EXTI20_IRQ_PRIORITY));
nvicEnableVector(TAMP_STAMP_IRQn,
@@ -346,8 +346,8 @@ void ext_lld_exti_irq_disable(void) {
nvicDisableVector(PVD_IRQn);
nvicDisableVector(RTC_Alarm_IRQn);
nvicDisableVector(OTG_FS_WKUP_IRQn);
- nvicDisableVector(ETH_WKUP_IRQn);
#if !defined(STM32F401xx)
+ nvicDisableVector(ETH_WKUP_IRQn);^M
nvicDisableVector(OTG_HS_WKUP_IRQn);
nvicDisableVector(TAMP_STAMP_IRQn);
#endif /* !defined(STM32F401xx) */
Please let me know if this solution is incorrect.
Thanks!