Skip to content

Commit

Permalink
boards/esp32c3-legacy: Add missing include to esp32c3_boot.c
Browse files Browse the repository at this point in the history
`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
```
  • Loading branch information
no1wudi authored and xiaoxiang781216 committed Nov 11, 2024
1 parent 56c920c commit 52b0df1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
****************************************************************************/

#include <nuttx/config.h>
#include <nuttx/arch.h>
#include <nuttx/board.h>

/****************************************************************************
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
****************************************************************************/

#include <nuttx/config.h>
#include <nuttx/arch.h>
#include <nuttx/board.h>

/****************************************************************************
* Pre-processor Definitions
Expand Down

0 comments on commit 52b0df1

Please sign in to comment.