You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/01/05 22:07:30 UTC
[incubator-nuttx] branch master updated: Fixed a compilation error,
with irq debugging for stm32f7 and stm32h7 archs.
This is an automated email from the ASF dual-hosted git repository.
gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 00df2f0 Fixed a compilation error, with irq debugging for stm32f7 and stm32h7 archs.
new 5d5897c Merge pull request #41 from wingunder/wingunder_fix_compilation_bug_irq_f7_h7
00df2f0 is described below
commit 00df2f0fe2d6d5d900a5f73c0254288e2929e90b
Author: Pieter du Preez <pd...@gmail.com>
AuthorDate: Sun Jan 5 21:24:16 2020 +0000
Fixed a compilation error, with irq debugging for stm32f7 and stm32h7 archs.
This commit fixes a compilation error that occurs when enabling the
following configuration items for stm32f7 and stm32h7 architectures:
CONFIG_DEBUG_FEATURES=y
CONFIG_DEBUG_ERROR=y
CONFIG_DEBUG_WARN=y
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_IRQ=y
CONFIG_DEBUG_IRQ_ERROR=y
CONFIG_DEBUG_IRQ_WARN=y
CONFIG_DEBUG_IRQ_INFO=y
The compiler error for stm32f7:
make[1]: Entering directory '/home/pdupreez/dev/wingunder/nuttx/arch/arm/src'
CC: chip/stm32_irq.c
chip/stm32_irq.c: In function 'up_irqinitialize':
chip/stm32_irq.c:497:29: error: 'STM32_IRQ_NIRQS' undeclared (first use in this function); did you mean 'STM32_IRQ_FIRST'?
stm32_dumpnvic("initial", STM32_IRQ_NIRQS);
^~~~~~~~~~~~~~~
STM32_IRQ_FIRST
chip/stm32_irq.c:497:29: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [Makefile:172: stm32_irq.o] Error 1
make[1]: Leaving directory '/home/pdupreez/dev/wingunder/nuttx/arch/arm/src'
And the compiler error for stm32h7:
make[1]: Entering directory '/home/pdupreez/dev/wingunder/nuttx/arch/arm/src'
CC: chip/stm32_irq.c
chip/stm32_irq.c: In function 'stm32_dumpnvic':
chip/stm32_irq.c:164:4: warning: #warning Missing logic [-Wcpp]
# warning Missing logic
^~~~~~~
chip/stm32_irq.c: In function 'up_irqinitialize':
chip/stm32_irq.c:522:29: error: 'STM32_IRQ_NIRQS' undeclared (first use in this function); did you mean 'STM32_IRQ_CRS'?
stm32_dumpnvic("initial", STM32_IRQ_NIRQS);
^~~~~~~~~~~~~~~
STM32_IRQ_CRS
chip/stm32_irq.c:522:29: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [Makefile:172: stm32_irq.o] Error 1
make[1]: Leaving directory '/home/pdupreez/dev/wingunder/nuttx/arch/arm/src'
This commit replaces all STM32_IRQ_NIRQS defines with the NR_IRQS
define, which seems to be consistent with the rest of the code in
Nuttx.
---
arch/arm/include/stm32f7/stm32f76xx77xx_irq.h | 1 -
arch/arm/src/stm32f7/stm32_irq.c | 2 +-
arch/arm/src/stm32h7/stm32_irq.c | 2 +-
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/arm/include/stm32f7/stm32f76xx77xx_irq.h b/arch/arm/include/stm32f7/stm32f76xx77xx_irq.h
index 5d5f8d2..fc6c6d1 100644
--- a/arch/arm/include/stm32f7/stm32f76xx77xx_irq.h
+++ b/arch/arm/include/stm32f7/stm32f76xx77xx_irq.h
@@ -179,7 +179,6 @@
#define STM32_IRQ_MDIOS (STM32_IRQ_FIRST + 109) /* 109: MDIO slave global interrupt */
#define STM32_IRQ_NEXTINTS 110
-#define STM32_IRQ_NIRQS (STM32_IRQ_FIRST + 110)
/* EXTI interrupts (Do not use IRQ numbers) */
diff --git a/arch/arm/src/stm32f7/stm32_irq.c b/arch/arm/src/stm32f7/stm32_irq.c
index b43b36f..aea4de9 100644
--- a/arch/arm/src/stm32f7/stm32_irq.c
+++ b/arch/arm/src/stm32f7/stm32_irq.c
@@ -494,7 +494,7 @@ void up_irqinitialize(void)
irq_attach(STM32_IRQ_RESERVED, stm32_reserved, NULL);
#endif
- stm32_dumpnvic("initial", STM32_IRQ_NIRQS);
+ stm32_dumpnvic("initial", NR_IRQS);
/* If a debugger is connected, try to prevent it from catching hardfaults.
* If CONFIG_ARMV7M_USEBASEPRI, no hardfaults are expected in normal
diff --git a/arch/arm/src/stm32h7/stm32_irq.c b/arch/arm/src/stm32h7/stm32_irq.c
index 0e878c9..b050e3c 100644
--- a/arch/arm/src/stm32h7/stm32_irq.c
+++ b/arch/arm/src/stm32h7/stm32_irq.c
@@ -519,7 +519,7 @@ void up_irqinitialize(void)
irq_attach(STM32_IRQ_RESERVED, stm32_reserved, NULL);
#endif
- stm32_dumpnvic("initial", STM32_IRQ_NIRQS);
+ stm32_dumpnvic("initial", NR_IRQS);
/* If a debugger is connected, try to prevent it from catching hardfaults.
* If CONFIG_ARMV7M_USEBASEPRI, no hardfaults are expected in normal