Hi Gibson,
Sorry for the delay in getting back to you.
gibson12345 wrote: ↑Tue Aug 27, 2019 11:54 pm
Code: Select all
C:\Users\lachlan\.espressif\tools\xtensa-esp32-elf\esp32-2019r1-8.2.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe -Iconfig -IC:/esp/esp-idf/components/newlib/platform_include -IC:/esp/esp-idf/components/freertos/include -IC:/esp/esp-idf/components/heap/include -IC:/esp/esp-idf/components/log/include -IC:/esp/esp-idf/components/soc/esp32/include -IC:/esp/esp-idf/components/soc/include -IC:/esp/esp-idf/components/esp_rom/include -IC:/esp/esp-idf/components/esp_common/include -IC:/esp/esp-idf/co
mponents/xtensa/include -IC:/esp/esp-idf/components/xtensa/esp32/include -IC:/esp/esp-idf/components/esp32/include -IC:/esp/esp-idf/components/driver/include -IC:/esp/esp-idf/components/esp_ringbuf/include -IC:/esp/esp-idf/components/esp_event/include -IC:/esp/esp-idf/components/tcpip_adapter/include -IC:/esp/esp-idf/components/lwip/include/apps -IC:/esp/esp-idf/components/lwip/include/apps/sntp -IC:/esp/esp-idf/components/lwip/lwip/src/include -IC:/esp/esp-idf/components/lwip/port/esp32/include
-IC:/esp/esp-idf/components/lwip/port/esp32/include/arch -IC:/esp/esp-idf/components/vfs/include -IC:/esp/esp-idf/components/esp_wifi/include -IC:/esp/esp-idf/components/esp_wifi/esp32/include -IC:/esp/esp-idf/components/esp_eth/include -IC:/esp/esp-idf/components/efuse/include -IC:/esp/esp-idf/components/efuse/esp32/include -IC:/esp/esp-idf/components/app_trace/include -mlongcalls -Wno-frame-address -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -nostdlib -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 -Og -std=gnu99 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v4.0-dev-1443-g39f090a4f-dirty\" -DGCC_NOT_5_2_0 -DESP_PLATFORM -MD -MT esp-idf/lis3dh/CMakeFiles/__idf_lis3dh.dir/lis3dh.c.obj -MF esp-idf\lis3dh\CMakeFiles\__idf_lis3dh.dir\lis3dh.c.obj.d -o esp-idf/lis3dh/CMakeFiles/__idf_lis3dh.dir/lis3dh.c.obj -c .
./components/lis3dh/lis3dh.c
In file included from ../components/lis3dh/lis3dh.h:94,
from ../components/lis3dh/lis3dh.c:53:
../components/lis3dh/lis3dh_platform.h:52:10: fatal error: esp8266_wrapper.h: No such file or directory
#include "esp8266_wrapper.h"
^~~~~~~~~~~~~~~~~~~
compilation terminated.
For this to work the component "lis3dh" needs to declare that it REQUIRES the component that contains the esp8266_wrapper.h header. Here's an example of how this looks when registering the component in ESP-IDF V4.0:
https://github.com/espressif/esp-idf/bl ... sts.txt#L4
Also, the component that contains esp8266_wrapper.h must have that directory in its INCLUDE_DIRS list so that the build system knows there are headers in there.
gibson12345 wrote: ↑Tue Aug 27, 2019 11:54 pm
Code: Select all
C:\Users\lachlan\.espressif\tools\xtensa-esp32-elf\esp32-2019r1-8.2.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe -DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -Iconfig -I../main/. -IC:/esp/esp-idf/components/newlib/platform_include -IC:/esp/esp-idf/components/freertos/include -IC:/esp/esp-idf/components/heap/include -IC:/esp/esp-idf/components/log/include -IC:/esp/esp-idf/components/soc/esp32/include -IC:/esp/esp-idf/components/soc/includ
e -IC:/esp/esp-idf/components/esp_rom/include -IC:/esp/esp-idf/components/esp_common/include -IC:/esp/esp-idf/components/xtensa/include -IC:/esp/esp-idf/components/xtensa/esp32/include -IC:/esp/esp-idf/components/esp32/include -IC:/esp/esp-idf/components/driver/include -IC:/esp/esp-idf/components/esp_ringbuf/include -IC:/esp/esp-idf/components/esp_event/include -IC:/esp/esp-idf/components/tcpip_adapter/include -IC:/esp/esp-idf/components/lwip/include/apps -IC:/esp/esp-idf/components/lwip/include
/apps/sntp -IC:/esp/esp-idf/components/lwip/lwip/src/include -IC:/esp/esp-idf/components/lwip/port/esp32/include -IC:/esp/esp-idf/components/lwip/port/esp32/include/arch -IC:/esp/esp-idf/components/vfs/include -IC:/esp/esp-idf/components/esp_wifi/include -IC:/esp/esp-idf/components/esp_wifi/esp32/include -IC:/esp/esp-idf/components/esp_eth/include -IC:/esp/esp-idf/components/efuse/include -IC:/esp/esp-idf/components/efuse/esp32/include -IC:/esp/esp-idf/components/app_trace/include -IC:/esp/esp-i
df/components/mbedtls/port/include -IC:/esp/esp-idf/components/mbedtls/mbedtls/include -IC:/esp/esp-idf/components/wpa_supplicant/include -IC:/esp/esp-idf/components/wpa_supplicant/port/include -IC:/esp/esp-idf/components/wpa_supplicant/include/esp_supplicant -IC:/esp/esp-idf/components/bootloader_support/include -IC:/esp/esp-idf/components/app_update/include -IC:/esp/esp-idf/components/spi_flash/include -IC:/esp/esp-idf/components/nvs_flash/include -IC:/esp/esp-idf/components/smartconfig_ack/in
clude -IC:/esp/esp-idf/components/pthread/include -IC:/esp/esp-idf/components/espcoredump/include -IC:/esp/esp-idf/components/asio/asio/asio/include -IC:/esp/esp-idf/components/asio/port/include -IC:/esp/esp-idf/components/bt/include -IC:/esp/esp-idf/components/bt/common/osi/include -IC:/esp/esp-idf/components/bt/host/bluedroid/api/include/api -IC:/esp/esp-idf/components/coap/port/include -IC:/esp/esp-idf/components/coap/port/include/coap -IC:/esp/esp-idf/components/coap/libcoap/include -IC:/esp
/esp-idf/components/coap/libcoap/include/coap2 -IC:/esp/esp-idf/components/console/. -IC:/esp/esp-idf/components/nghttp/port/include -IC:/esp/esp-idf/components/nghttp/nghttp2/lib/includes -IC:/esp/esp-idf/components/esp-tls/. -IC:/esp/esp-idf/components/esp-tls/PRIVATE_INCLUDE_DIRS -IC:/esp/esp-idf/components/esp-tls/private_include -IC:/esp/esp-idf/components/esp_adc_cal/include -IC:/esp/esp-idf/components/esp_gdbstub/include -IC:/esp/esp-idf/components/tcp_transport/include -IC:/esp/esp-idf/c
omponents/tcp_transport/PRIVATE_INCLUDE_DIRS -IC:/esp/esp-idf/components/tcp_transport/private_include -IC:/esp/esp-idf/components/esp_http_client/include -IC:/esp/esp-idf/components/esp_http_server/include -IC:/esp/esp-idf/components/esp_https_ota/include -IC:/esp/esp-idf/components/protobuf-c/protobuf-c -IC:/esp/esp-idf/components/protocomm/include/common -IC:/esp/esp-idf/components/protocomm/include/security -IC:/esp/esp-idf/components/protocomm/include/transports -IC:/esp/esp-idf/components/
mdns/include -IC:/esp/esp-idf/components/esp_local_ctrl/include -IC:/esp/esp-idf/components/esp_websocket_client/include -IC:/esp/esp-idf/components/expat/expat/expat/lib -IC:/esp/esp-idf/components/expat/port/include -IC:/esp/esp-idf/components/wear_levelling/include -IC:/esp/esp-idf/components/sdmmc/include -IC:/esp/esp-idf/components/fatfs/diskio -IC:/esp/esp-idf/components/fatfs/vfs -IC:/esp/esp-idf/components/fatfs/src -IC:/esp/esp-idf/components/freemodbus/common/include -IC:/esp/esp-idf/c
omponents/idf_test/include -IC:/esp/esp-idf/components/jsmn/include -IC:/esp/esp-idf/components/json/cJSON -IC:/esp/esp-idf/components/libsodium/libsodium/src/libsodium/include -IC:/esp/esp-idf/components/libsodium/port_include -IC:/esp/esp-idf/components/mqtt/esp-mqtt/include -IC:/esp/esp-idf/components/openssl/include -IC:/esp/esp-idf/components/spiffs/include -IC:/esp/esp-idf/components/ulp/include -IC:/esp/esp-idf/components/unity/include -IC:/esp/esp-idf/components/unity/unity/src -IC:/esp/
esp-idf/components/wifi_provisioning/include -mlongcalls -Wno-frame-address -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -nostdlib -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 -Og -std=gnu99 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v4.0-dev-1443-g39f090a4f-dirty\" -DGCC_NOT_5_2_0 -DESP_PLATFORM -MD -MT esp-idf/main
/CMakeFiles/__idf_main.dir/accelerometer.c.obj -MF esp-idf\main\CMakeFiles\__idf_main.dir\accelerometer.c.obj.d -o esp-idf/main/CMakeFiles/__idf_main.dir/accelerometer.c.obj -c ../main/accelerometer.c
In file included from ../main/accelerometer.c:1:
../main/accelerometer.h:6:10: fatal error: lis3dh.h: No such file or directory
#include "lis3dh.h"
^~~~~~~~~~
This one is different because the "main" component automatically sees all the components in the project, so you don't need to give a REQUIRES list for "main" component.
Suggest checking that the component that provides "lis3dh.h" has this directory in its INCLUDE_DIRS list in CMakeLists.txt
If you're still stuck and it's not working, is it possible to give us the full contents of the relevant CMakeLists.txt files?