fatal error: board.h: No such file or directory

pavepart
Posts: 9
Joined: Thu Jun 25, 2020 4:38 am

fatal error: board.h: No such file or directory

Postby pavepart » Sat Feb 20, 2021 2:09 am

I have my own "board.h" in my project.
kind a like 'project/test/components/my_board/board.h'
it's a customed esp32 board.

The only problem is, when I try build my project, there is an error like this.
compilation terminated.

[7/131] Building C object esp-idf/audio_hal/CMakeFiles/__idf_audio_hal.dir/driver/es8311/es8311.c.obj
FAILED: esp-idf/audio_hal/CMakeFiles/__idf_audio_hal.dir/driver/es8311/es8311.c.obj
ccache C:\Users\big\.espressif\tools\xtensa-esp32-elf\esp-2020r3-8.4.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe -DADF_VER=\"8d99ba5-dirty\" -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -Iconfig -ID:/esp32/adf/components/audio_hal/include -ID:/esp32/adf/components/audio_hal/driver/es8388 -ID:/esp32/adf/components/audio_hal/driver/es8374 -ID:/esp32/adf/components/audio_hal/driver/es8311 -ID:/esp32/adf/components/audio_hal/driver/es7243 -ID:/esp32/adf/components/audio_hal/driver/es7148 -ID:/esp32/adf/components/audio_hal/driver/tas5805m -ID:/esp32/adf/components/audio_hal/driver/zl38063 -ID:/esp32/adf/components/audio_hal/driver/zl38063/api_lib -ID:/esp32/adf/components/audio_hal/driver/zl38063/example_apps -ID:/esp32/adf/components/audio_hal/driver/zl38063/firmware -ID:/esp32/adf/components/audio_hal/driver/include -ID:/esp32/idf/components/newlib/platform_include -ID:/esp32/idf/components/freertos/include -ID:/esp32/idf/components/freertos/xtensa/include -ID:/esp32/idf/components/heap/include -ID:/esp32/idf/components/log/include -ID:/esp32/idf/components/lwip/include/apps -ID:/esp32/idf/components/lwip/include/apps/sntp -ID:/esp32/idf/components/lwip/lwip/src/include -ID:/esp32/idf/components/lwip/port/esp32/include -ID:/esp32/idf/components/lwip/port/esp32/include/arch -ID:/esp32/idf/components/soc/src/esp32/. -ID:/esp32/idf/components/soc/src/esp32/include -ID:/esp32/idf/components/soc/include -ID:/esp32/idf/components/esp_rom/include -ID:/esp32/idf/components/esp_common/include -ID:/esp32/idf/components/esp_system/include -ID:/esp32/idf/components/xtensa/include -ID:/esp32/idf/components/xtensa/esp32/include -ID:/esp32/idf/components/esp32/include -ID:/esp32/idf/components/driver/include -ID:/esp32/idf/components/driver/esp32/include -ID:/esp32/idf/components/esp_ringbuf/include -ID:/esp32/idf/components/efuse/include -ID:/esp32/idf/components/efuse/esp32/include -ID:/esp32/idf/components/espcoredump/include -ID:/esp32/idf/components/esp_timer/include -ID:/esp32/idf/components/esp_ipc/include -ID:/esp32/idf/components/soc/soc/esp32/include -ID:/esp32/idf/components/soc/soc/esp32/../include -ID:/esp32/idf/components/soc/soc/esp32/private_include -ID:/esp32/idf/components/vfs/include -ID:/esp32/idf/components/esp_wifi/include -ID:/esp32/idf/components/esp_wifi/esp32/include -ID:/esp32/idf/components/esp_event/include -ID:/esp32/idf/components/esp_netif/include -ID:/esp32/idf/components/esp_eth/include -ID:/esp32/idf/components/tcpip_adapter/include -ID:/esp32/idf/components/app_trace/include -ID:/esp32/adf/components/audio_sal/include -ID:/esp32/adf/components/audio_board/include -ID:/esp32/idf/components/mbedtls/port/include -ID:/esp32/idf/components/mbedtls/mbedtls/include -ID:/esp32/idf/components/mbedtls/esp_crt_bundle/include -ID:/esp32/adf/components/esp_peripherals/include -ID:/esp32/adf/components/esp_peripherals/lib/adc_button -ID:/esp32/adf/components/esp_peripherals/lib/gpio_isr -ID:/esp32/adf/components/esp_peripherals/lib/sdcard -ID:/esp32/adf/components/esp_peripherals/lib/touch -ID:/esp32/adf/components/esp_peripherals/lib/button -ID:/esp32/adf/components/esp_peripherals/lib/blufi -ID:/esp32/adf/components/esp_peripherals/lib/IS31FL3216 -ID:/esp32/adf/components/esp_peripherals/lib/aw2013 -ID:/esp32/adf/components/esp_peripherals/driver/i2c_bus -ID:/esp32/idf/components/esp_adc_cal/include -ID:/esp32/idf/components/fatfs/diskio -ID:/esp32/idf/components/fatfs/vfs -ID:/esp32/idf/components/fatfs/src -ID:/esp32/idf/components/wear_levelling/include -ID:/esp32/idf/components/spi_flash/include -ID:/esp32/idf/components/sdmmc/include -ID:/esp32/idf/components/console -ID:/esp32/adf/components/audio_pipeline/include -ID:/esp32/adf/components/esp-adf-libs/esp_audio/include -ID:/esp32/adf/components/esp-adf-libs/esp_codec/include/codec -ID:/esp32/adf/components/esp-adf-libs/esp_codec/include/processing -ID:/esp32/adf/components/esp-adf-libs/esp_upnp/include -ID:/esp32/adf/components/esp-adf-libs/esp_ssdp/include -ID:/esp32/adf/components/esp-adf-libs/recorder_engine/include -ID:/esp32/adf/components/esp-adf-libs/audio_misc/include -ID:/esp32/adf/components/esp-adf-libs/esp_sip/include -ID:/esp32/idf/components/spiffs/include -ID:/esp32/adf/components/display_service/include -ID:/esp32/adf/components/display_service/led_indicator/include -ID:/esp32/adf/components/display_service/led_bar/include -ID:/esp32/adf/components/esp_dispatcher/include -ID:/esp32/idf/components/bt/include -ID:/esp32/idf/components/bt/common/osi/include -ID:/esp32/idf/components/bt/host/bluedroid/api/include/api -ID:/esp32/idf/components/nvs_flash/include -ID:/esp32/idf/components/wpa_supplicant/include -ID:/esp32/idf/components/wpa_supplicant/port/include -ID:/esp32/idf/components/wpa_supplicant/include/esp_supplicant -mlongcalls -Wno-frame-address -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -ggdb -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw -Og -std=gnu99 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v4.2-dirty\" -DESP_PLATFORM -MD -MT esp-idf/audio_hal/CMakeFiles/__idf_audio_hal.dir/driver/es8311/es8311.c.obj -MF esp-idf\audio_hal\CMakeFiles\__idf_audio_hal.dir\driver\es8311\es8311.c.obj.d -o esp-idf/audio_hal/CMakeFiles/__idf_audio_hal.dir/driver/es8311/es8311.c.obj -c D:/esp32/adf/components/audio_hal/driver/es8311/es8311.c
D:/esp32/adf/components/audio_hal/driver/es8311/es8311.c:27:10: fatal error: board.h: No such file or directory
#include "board.h"
^~~~~~~~~

compilation terminated.
ninja: build stopped: subcommand failed.
ninja failed with exit code 1




It looks like adf componets can't find my own board.h file.
help me~

User avatar
ESP_krzychb
Posts: 400
Joined: Sat Oct 01, 2016 9:05 am
Contact:

Re: fatal error: board.h: No such file or directory

Postby ESP_krzychb » Sat Feb 20, 2021 6:12 am

Moderator note: moved topic to ESP-ADF forum

orbitcoms
Posts: 149
Joined: Fri Aug 03, 2018 10:08 pm
Location: Sydney, Australia

Re: fatal error: board.h: No such file or directory

Postby orbitcoms » Mon Feb 22, 2021 11:26 am

Hi I seem to have the same issue.

Code: Select all

C:/esp/esp-adf/components/esp_peripherals/lib/sdcard/sdcard.c:39:10: fatal error: board.h: No such file or directory
 #include "board.h"
          ^~~~~~~~~
compilation terminated.
It seems the failing file differs sometimes but always with board.h
issue occurs with both IDF V4.0 and 4.1
if a different board is selected it compiles but not with a custom board

Thanks in advance for your help

Regards

Dave

felixcollins
Posts: 125
Joined: Fri May 24, 2019 2:02 am

Re: fatal error: board.h: No such file or directory

Postby felixcollins » Mon Aug 01, 2022 4:25 am

Has anyone found a way around this without modifying the ADF?

I have a legacy app that works with ADF 1.6. To get it to work on our board we had to fork the ADF due to hardcoded GPIO configuration in the ADF code that assumed a supported board would be used. It seems like this behaviour of the ADF continues. I find this alarming and disturbing that the ADF implementers can not provide modular code that is reusable on a custom board.

I'm trying to get my code working with ADF 2.4 but all these files that I do not even want to use are being compiled and looking for board.h. I don't wish to use any of the modules that are including the board.h.

Code: Select all

Error    board.h: No such file or directory C:\SysGCC\esp32\esp-adf\v2.4\components\display_service\display_service.c          34  
Error    board.h: No such file or directory C:\SysGCC\esp32\esp-adf\v2.4\components\display_service\led_bar\led_bar_ws2812.c   27  
Error    board.h: No such file or directory C:\SysGCC\esp32\esp-adf\v2.4\components\audio_hal\driver\es7210\es7210.c           27  
Error    board.h: No such file or directory C:\SysGCC\esp32\esp-adf\v2.4\components\esp_peripherals\lib\tca9554\tca9554.c      28  
Error    board.h: No such file or directory C:\SysGCC\esp32\esp-adf\v2.4\components\audio_hal\driver\es8388\headphone_detect.c 35  
Error    board.h: No such file or directory C:\SysGCC\esp32\esp-adf\v2.4\components\audio_hal\driver\es7148\es7148.c           28  
Error    board.h: No such file or directory C:\SysGCC\esp32\esp-adf\v2.4\components\audio_hal\driver\es7243e\es7243e.c         27  
Error    board.h: No such file or directory C:\SysGCC\esp32\esp-adf\v2.4\components\audio_hal\driver\es8311\es8311.c           27  
Error    board.h: No such file or directory C:\SysGCC\esp32\esp-adf\v2.4\components\audio_hal\driver\es7243\es7243.c           28  
Error    board.h: No such file or directory C:\SysGCC\esp32\esp-adf\v2.4\components\audio_hal\driver\es8156\es8156.c           30  
Error    board.h: No such file or directory C:\SysGCC\esp32\esp-adf\v2.4\components\audio_hal\driver\tas5805m\tas5805m.c       26  
Error    board.h: No such file or directory C:\SysGCC\esp32\esp-adf\v2.4\components\audio_hal\driver\zl38063\zl38063.c         32  


This is exasperating!

Who is online

Users browsing this forum: No registered users and 25 guests