Weird replacement of LV_CONF_PATH #187
-
I try to set up a very simple project, that just includes esp32_smartdisplay, without using it yet: #include <Arduino.h>
#include <esp32_smartdisplay.h>
void setup() {
#ifdef ARDUINO_USB_CDC_ON_BOOT
delay(5000);
#endif
Serial.begin(115200);
Serial.println("Hello World!");
}
void loop() {
} I like to use the board esp32-2432S032R. My [env:esp32-2432S032R]
platform = espressif32
board = esp32-2432S032R
framework = arduino
upload_speed = 460800
upload_port = COM12
monitor_speed = 115200
monitor_port = COM12
lib_deps =
rzeldent/esp32_smartdisplay
build_flags =
-Ofast
-Wall
-D LV_CONF_PATH="${PROJECT_DIR}/include/lv_conf.h" But this doesn't compile, I get a bunch of errors, all the same form: In file included from .pio/libdeps/esp32-2432S032R/lvgl/src/core/lv_obj.h:16,
from .pio/libdeps/esp32-2432S032R/lvgl/src/core/lv_event.c:9:
.pio/libdeps/esp32-2432S032R/lvgl/src/core/../lv_conf_internal.h:35:42: fatal error: D:/1/PlatformIO/Display-2432/include/lv_conf.h: No such file or directory
#include __LV_TO_STR(LV_CONF_PATH)
^
compilation terminated. The true project folder
Even if I give the full path, it is replaced. In my desperation, I created a folder Have any of you ever come across something like this, or have any idea where this |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
Sometimes it is helps to write about a problem. After some further investigation, I found the reason for this strange behavior. It is really unexpected for me. I found, that the definition created by the build flags is correct, but its expansion (nicely shown by IntelliSense) is wrong:
It seems that "ESP32" is replaced by "1". In a next step, I tried to find out, if "ESP32" also already has a definition, and what I found:
So parts of a folder path can be replaced by such definitions. This can lead to very unexpected results!