From 52b0df1ce6cdcc99b44700b20a2bc3351285eee0 Mon Sep 17 00:00:00 2001 From: Huang Qi Date: Mon, 11 Nov 2024 16:42:58 +0800 Subject: [PATCH] boards/esp32c3-legacy: Add missing include to esp32c3_boot.c `up_perf_init` defined in `nuttx/arch.h`, if CONFIG_ARCH_PERF_EVENTS enabled the compiler will raise a error: ``` board/esp32c3_boot.c:55:3: error: implicit declaration of function 'up_perf_init' [-Wimplicit-function-declaration] 55 | up_perf_init(NULL); | ^~~~~~~~~~~~ board/esp32c3_boot.c:55:16: error: 'NULL' undeclared (first use in this function) 55 | up_perf_init(NULL); | ^~~~ board/esp32c3_boot.c:28:1: note: 'NULL' is defined in header ''; this is probably fixable by adding '#include ' 27 | #include +++ |+#include 28 | board/esp32c3_boot.c:55:16: note: each undeclared identifier is reported only once for each function it appears in 55 | up_perf_init(NULL); | ^~~~ make[1]: *** [/home/huang/Work/nx/nuttx/boards/Board.mk:83: esp32c3_boot.o] Error 1 ``` --- .../esp32c3-legacy/esp32c3-devkit-rust-1/src/esp32c3_boot.c | 1 + boards/risc-v/esp32c3-legacy/esp32c3-devkit/src/esp32c3_boot.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-devkit-rust-1/src/esp32c3_boot.c b/boards/risc-v/esp32c3-legacy/esp32c3-devkit-rust-1/src/esp32c3_boot.c index 6ab7c136f9d..ec6495b0165 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-devkit-rust-1/src/esp32c3_boot.c +++ b/boards/risc-v/esp32c3-legacy/esp32c3-devkit-rust-1/src/esp32c3_boot.c @@ -23,6 +23,7 @@ ****************************************************************************/ #include +#include #include /**************************************************************************** diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-devkit/src/esp32c3_boot.c b/boards/risc-v/esp32c3-legacy/esp32c3-devkit/src/esp32c3_boot.c index 4605b870c76..b3c16746178 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-devkit/src/esp32c3_boot.c +++ b/boards/risc-v/esp32c3-legacy/esp32c3-devkit/src/esp32c3_boot.c @@ -23,6 +23,8 @@ ****************************************************************************/ #include +#include +#include /**************************************************************************** * Pre-processor Definitions