ALTracer commented on PR #8040:
URL: https://github.com/apache/nuttx/pull/8040#issuecomment-1493500471
Why does this PR break my build when enabling CONFIG_SCHED_IRQMONITOR? This
looks like a regression from 12.0.0, it used to work and show somewhat true
numbers in `ps`. I was building for stm32f411-minimum with modified config.
```
chip/stm32_start.c: In function '__start':
chip/stm32_start.c:161:24: error: 'STM32_SYSCLK_FREQUENCY' undeclared (first
use in this function)
161 | up_perf_init((void *)STM32_SYSCLK_FREQUENCY);
| ^~~~~~~~~~~~~~~~~~~~~~
chip/stm32_start.c:161:24: note: each undeclared identifier is reported only
once for each function it appears in
make[1]: *** [Makefile:157: stm32_start.o] Error 1
```
For example,
https://github.com/apache/nuttx/blob/1f7b49d7003c9bf27ade13be6fcd177b4352299d/boards/arm/stm32h7/nucleo-h743zi2/src/stm32_boot.c#L53-L55
had `#include <arch/board/board.h>` which provides STM32_SYSCLK_FREQUENCY
macro, visible in this translation unit. Most STM32 boards simply use
`DWT_CYCCNT` (see `arch/arm/src/armv7-m/arm_perf.c`) and thus need to know MCU
frequency.
_Does CI check builds for configs with IRQMONITOR, like nucleo-h743zi2:jumbo
in arm-12.dat? Yes, it does._
`arch/arm/src/stm32/stm32_start.c` doesn't have this #include, but
`arch/arm/src/stm32h7/stm32_start.c` does, hence no CI build failure.
```patch
diff --git a/arch/arm/src/stm32/stm32_start.c
b/arch/arm/src/stm32/stm32_start.c
index 08b7d21f0..72332d731 100644
--- a/arch/arm/src/stm32/stm32_start.c
+++ b/arch/arm/src/stm32/stm32_start.c
@@ -29,6 +29,7 @@
#include <debug.h>
#include <nuttx/init.h>
+#include <arch/board/board.h>
#include "arm_internal.h"
#include "nvic.h"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]