Skip to content

Commit 52b0df1

Browse files
no1wudixiaoxiang781216
authored andcommitted
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 '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' 27 | #include <nuttx/board.h> +++ |+#include <stddef.h> 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 ```
1 parent 56c920c commit 52b0df1

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

boards/risc-v/esp32c3-legacy/esp32c3-devkit-rust-1/src/esp32c3_boot.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
****************************************************************************/
2424

2525
#include <nuttx/config.h>
26+
#include <nuttx/arch.h>
2627
#include <nuttx/board.h>
2728

2829
/****************************************************************************

boards/risc-v/esp32c3-legacy/esp32c3-devkit/src/esp32c3_boot.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
****************************************************************************/
2424

2525
#include <nuttx/config.h>
26+
#include <nuttx/arch.h>
27+
#include <nuttx/board.h>
2628

2729
/****************************************************************************
2830
* Pre-processor Definitions

0 commit comments

Comments
 (0)