Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error #2

Open
g7kse opened this issue May 24, 2023 · 6 comments
Open

Build error #2

g7kse opened this issue May 24, 2023 · 6 comments

Comments

@g7kse
Copy link

g7kse commented May 24, 2023

I'm pretty sure its something I've done as I'm not familiar with PlatformIO. But, I thought I faithfully followed the instructions but it looks like I've come unstuck here and after a bit of going round in circles I thought I'd check the instructions.Particularly around the lv_conf.h note in issue#1

Screen looks a bit like this...

image

I would appreciate a bit of guidance to help cure the problems. Terminal output seems to have a few errors.

Looks o me that DateTime library and lvgl libraries are not being pulled in. I did add them to the .ini but that didn't fix it entirely but did get rid of a couple.

for reference I used this modified ini file

[env:esp32-s3-devkitc-1]
platform = platformio/espressif32
board = esp32-s3-devkitc-1
framework = arduino
build_flags = 
	-DARDUINO_USB_MODE=1
	-DARDUINO_USB_CDC_ON_BOOT=1
	-DBOARD_HAS_PSRAM

board_build.cpu = esp32s3
board_build.arduino.memory_type = qio_opi
lib_deps = 
        IanH/TRGBArduinoSupport
        mcxiaoke/ESPDateTime@^1.0.4
        lvgl/lvgl@^8.3.7

The leftover errors are:

#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (/home/alex/Documents/PlatformIO/Projects/TRGB Clock/src/main.cpp).

and

cannot open source file "../../lv_conf.h" (dependency of "TRGBSuppport.h")

The full output from the terminal is:

 *  Executing task: platformio run 

Processing esp32-s3-devkitc-1 (platform: platformio/espressif32; board: esp32-s3-devkitc-1; framework: arduino)
-------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32-s3-devkitc-1.html
PLATFORM: Espressif 32 (6.3.0) > Espressif ESP32-S3-DevKitC-1-N8 (8 MB QD, No PSRAM)
HARDWARE: ESP32S3 240MHz, 320KB RAM, 8MB Flash
DEBUG: Current (esp-builtin) On-board (esp-builtin) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: 
 - framework-arduinoespressif32 @ 3.20009.0 (2.0.9) 
 - tool-esptoolpy @ 1.40501.0 (4.5.1) 
 - toolchain-riscv32-esp @ 8.4.0+2021r2-patch5 
 - toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 35 compatible libraries
Scanning dependencies...
Dependency Graph
|-- TRGBArduinoSupport @ 0.0.3
|-- WiFi @ 2.0.0
|-- lvgl @ 8.3.7
Building in release mode
Compiling .pio/build/esp32-s3-devkitc-1/src/main.cpp.o
Compiling .pio/build/esp32-s3-devkitc-1/src/ui.c.o
Building .pio/build/esp32-s3-devkitc-1/bootloader.bin
Generating partitions .pio/build/esp32-s3-devkitc-1/partitions.bin
In file included from .pio/libdeps/esp32-s3-devkitc-1/lvgl/src/misc/lv_log.h:16,
                 from .pio/libdeps/esp32-s3-devkitc-1/lvgl/lvgl.h:25,
                 from src/ui.h:9,
                 from src/ui.c:1:
.pio/libdeps/esp32-s3-devkitc-1/lvgl/src/misc/../lv_conf_internal.h:35:42: fatal error: /home/alex/Documents/PlatformIO/Projects/TRGB: No such file or directory
         #include __LV_TO_STR(LV_CONF_PATH)
                                          ^
compilation terminated.
Compiling .pio/build/esp32-s3-devkitc-1/lib4ae/lvgl/core/lv_disp.c.o
esptool.py v4.5.1
Creating esp32s3 image...
Merged 1 ELF section
Successfully created esp32s3 image.
Compiling .pio/build/esp32-s3-devkitc-1/lib4ae/lvgl/core/lv_event.c.o
In file included from .pio/libdeps/esp32-s3-devkitc-1/lvgl/src/core/../hal/../draw/lv_draw.h:16,
                 from .pio/libdeps/esp32-s3-devkitc-1/lvgl/src/core/../hal/lv_hal_disp.h:21,
                 from .pio/libdeps/esp32-s3-devkitc-1/lvgl/src/core/../hal/lv_hal.h:16,
                 from .pio/libdeps/esp32-s3-devkitc-1/lvgl/src/core/lv_disp.h:16,
                 from .pio/libdeps/esp32-s3-devkitc-1/lvgl/src/core/lv_disp.c:9:
.pio/libdeps/esp32-s3-devkitc-1/lvgl/src/core/../hal/../draw/../lv_conf_internal.h:35:42: fatal error: /home/alex/Documents/PlatformIO/Projects/TRGB: No such file or directory
         #include __LV_TO_STR(LV_CONF_PATH)
                                          ^
compilation terminated.
Compiling .pio/build/esp32-s3-devkitc-1/lib4ae/lvgl/core/lv_group.c.o
In file included from .pio/libdeps/esp32-s3-devkitc-1/lvgl/src/core/lv_obj.h:16,
                 from .pio/libdeps/esp32-s3-devkitc-1/lvgl/src/core/lv_event.c:9:
.pio/libdeps/esp32-s3-devkitc-1/lvgl/src/core/../lv_conf_internal.h:35:42: fatal error: /home/alex/Documents/PlatformIO/Projects/TRGB: No such file or directory
         #include __LV_TO_STR(LV_CONF_PATH)
                                          ^
compilation terminated.
*** [.pio/build/esp32-s3-devkitc-1/src/ui.c.o] Error 1
Compiling .pio/build/esp32-s3-devkitc-1/lib4ae/lvgl/core/lv_indev.c.o
*** [.pio/build/esp32-s3-devkitc-1/lib4ae/lvgl/core/lv_disp.c.o] Error 1
*** [.pio/build/esp32-s3-devkitc-1/lib4ae/lvgl/core/lv_event.c.o] Error 1
In file included from .pio/libdeps/esp32-s3-devkitc-1/lvgl/src/core/lv_group.h:17,
                 from .pio/libdeps/esp32-s3-devkitc-1/lvgl/src/core/lv_group.c:11:
.pio/libdeps/esp32-s3-devkitc-1/lvgl/src/core/../lv_conf_internal.h:35:42: fatal error: /home/alex/Documents/PlatformIO/Projects/TRGB: No such file or directory
         #include __LV_TO_STR(LV_CONF_PATH)
                                          ^
compilation terminated.
*** [.pio/build/esp32-s3-devkitc-1/lib4ae/lvgl/core/lv_group.c.o] Error 1
In file included from .pio/libdeps/esp32-s3-devkitc-1/lvgl/src/core/lv_obj.h:16,
                 from .pio/libdeps/esp32-s3-devkitc-1/lvgl/src/core/lv_indev.h:16,
                 from .pio/libdeps/esp32-s3-devkitc-1/lvgl/src/core/lv_indev.c:9:
.pio/libdeps/esp32-s3-devkitc-1/lvgl/src/core/../lv_conf_internal.h:35:42: fatal error: /home/alex/Documents/PlatformIO/Projects/TRGB: No such file or directory
         #include __LV_TO_STR(LV_CONF_PATH)
                                          ^
compilation terminated.
*** [.pio/build/esp32-s3-devkitc-1/lib4ae/lvgl/core/lv_indev.c.o] Error 1
In file included from .pio/libdeps/esp32-s3-devkitc-1/lvgl/src/misc/lv_log.h:16,
                 from .pio/libdeps/esp32-s3-devkitc-1/lvgl/lvgl.h:25,
                 from .pio/libdeps/esp32-s3-devkitc-1/TRGBArduinoSupport/src/TRGBSuppport.h:18,
                 from src/main.cpp:1:
.pio/libdeps/esp32-s3-devkitc-1/lvgl/src/misc/../lv_conf_internal.h:35:42: fatal error: /home/alex/Documents/PlatformIO/Projects/TRGB: No such file or directory
         #include __LV_TO_STR(LV_CONF_PATH)
                                          ^
compilation terminated.
*** [.pio/build/esp32-s3-devkitc-1/src/main.cpp.o] Error 1
============================================== [FAILED] Took 7.03 seconds ==============================================

 *  The terminal process "platformio 'run'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it.
@SpaceTeddy
Copy link

Hi,
same error here. :(

@osugiw
Copy link

osugiw commented Sep 22, 2023

Hi @SpaceTeddy @g7kse, I managed to solve the problems by declaring explicit path of the lv_conf.h. Please see the picture below:
image

Hope you find it helpful, Thanks!

@g7kse
Copy link
Author

g7kse commented Sep 24, 2023

Its still a full on complain from my system. There must be some other issues with paths in there somewhere.

I'd pretty much given up on this before so thanks for the clarification.

@euphi
Copy link
Member

euphi commented Sep 24, 2023

lvgl uses some weird automatic to find the lv_conf.h include.

I also use a manual definition:

build_flags =
        -DBOARD_HAS_PSRAM
        -DLV_CONF_PATH=${platformio.include_dir}/lv_conf.h
        -DASYNCWEBSERVER_REGEX
        -DTRGB_ROUND

@extremerotary
Copy link

extremerotary commented Oct 5, 2023

I had the same error, but was able to do it by manually writing the path. I will say though, that at first, even though I fully wrote out the path, it was being truncated and STILL couldn't find the file. So I went ahead and moved the file into c:/users/me/ directory and manually wrote that in, and THEN it was able to compile. I don't think I had any other issues that I can recall, but I'll be happy to help if you're still unable to compile it.
I would also note that in your output, you're only doing a run and not a run upload.

  • Executing task: C:\Users\extre.platformio\penv\Scripts\platformio.exe run --target upload
    I'm not clear if that makes a difference in how it resolves dependencies and such, but wanted to point it out.

@AbidingOhmsLaw
Copy link

AbidingOhmsLaw commented Nov 22, 2023

For me the issue seemed to be with the macro replacement
in the line:

 -DLV_CONF_PATH=${platformio.include_dir}/lv_conf.h

was getting replaced by C:UsersMikeDocumentsvscode-projectsTRGB-exampleinclude/lv_conf.h and was missing all of the slashes
The solution was to replace ${platformio.include_dir} with the full path

 -DLV_CONF_PATH=C:/Users/Mike/Documents/vscode-projects/TRGB-example/include/lv_conf.h

EDIT: also note that PlatformIO did not seem to like a directory paths with spaces in it, I originally had the projects folder named "vscode projects" but the macro seemed to stop at the space and would get replaced by "C:UsersMikeDocumentsvscode" still no slashes but it did show that there is and issue with spaces in the path as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants