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 failures 'SemaphoreHandle_t' does not name a type #36

Open
cprasmu opened this issue Nov 30, 2024 · 16 comments
Open

Build failures 'SemaphoreHandle_t' does not name a type #36

cprasmu opened this issue Nov 30, 2024 · 16 comments

Comments

@cprasmu
Copy link

cprasmu commented Nov 30, 2024

I'm guessing this is due to the boad api changes over time but I'm getting error: 'SemaphoreHandle_t' does not name a type. when trying to build. I also found that the AsyncElegantOTA library has been deprecated for ElegantOTA - I'm not sure if any code changes are required to move to this library?

@lefty01
Copy link
Owner

lefty01 commented Nov 30, 2024

Hrmm...good point. Since my device works pretty well there was not much need to keep track of lib updates. But I'll check if switching ota lib could be done without too much effort.

@cprasmu
Copy link
Author

cprasmu commented Nov 30, 2024 via email

@lefty01
Copy link
Owner

lefty01 commented Dec 2, 2024

for which board are you compiling? what is your pio run command look like?

@cprasmu
Copy link
Author

cprasmu commented Dec 2, 2024 via email

@lefty01
Copy link
Owner

lefty01 commented Dec 2, 2024

I tried switching to ElegantOTA here
https://github.com/lefty01/ESP32_TTGO_FTMS/tree/libupdate_dev
for me I think the targets are at least compiling. maybe you could try checkout that branch.
but you probably need to remove .pio completly (at least libdeps)
there's some issue with ESPAsyncWebServer-esphome vs ESPAsyncWebServer (not sure why we had -esphome version in the first place maybe I wanted homeassitant mqtt config or something like that???) if ESPAsyncWebServer-esphome is used then I think ESPAsyncWebServer is still downloaded as dependency and that cause error that some stuff is defined twice.
but I have not flashed anything and therefore not tested ota or if it works at all

Environment                  Status    Duration
---------------------------  --------  ------------
ESP32_TTGO_DISPLAY           SUCCESS   00:00:32.024
ESP32_TTGO_DISPLAY_SSL       SUCCESS   00:00:32.767
ESP32_WT32-SC01              SUCCESS   00:00:32.779
ESP32_WT32-SC01_OLD_TFT_GUI  SUCCESS   00:00:25.911
ESP32_TTGO_T4                SUCCESS   00:00:49.079
ESP32_WROOMD_HEADLESS        SUCCESS   00:00:18.313

@lefty01
Copy link
Owner

lefty01 commented Dec 2, 2024

if you see the SemaphoreHandle_t build error can you paste the complete compile output?

@cprasmu
Copy link
Author

cprasmu commented Dec 3, 2024

I'm not sure if I have something wrong on my machine, but this is the output of just trying to build the ESP32_TTGO_DISPLAY target. building in vscode on macos Sequoia 15.0.1, 3.7 GHz 6-Core Intel Core i5

  • Executing task: platformio run --environment ESP32_TTGO_DISPLAY

Processing ESP32_TTGO_DISPLAY (platform: espressif32; board: esp32dev; framework: arduino)

Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (2023.12.10) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) 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.0.0
  • tool-cmake @ 3.21.3
  • tool-esptoolpy @ 1.40700.0+dev4 (4.7.0)
  • tool-mklittlefs @ 3.2.0
  • tool-mkspiffs @ 2.230.0 (2.30)
  • tool-ninja @ 1.9.0
  • tool-riscv32-esp-elf-gdb @ 12.1.0+20221002
  • tool-xtensa-esp-elf-gdb @ 12.1.0+20221002
  • toolchain-esp32ulp @ 1.23500.220830 (2.35.0)
  • toolchain-xtensa-esp32 @ 12.2.0+20230208
    LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 35 compatible libraries
    Scanning dependencies...
    Dependency Graph
    |-- NimBLE-Arduino @ 1.4.3
    |-- PubSubClient @ 2.8.0
    |-- ArduinoJson @ 6.21.5
    |-- Button2 @ 2.3.3
    |-- Time @ 1.6.1
    |-- MPU6050_light @ 1.1.0
    |-- ESPAsyncWiFiManager @ 0.31.0+sha.3b9a58a
    |-- ElegantOTA @ 3.1.6
    |-- LovyanGFX @ 1.2.0
    |-- lvgl @ 8.4.0
    |-- ESPAsyncWebServer @ 3.3.23
    |-- AsyncTCP @ 3.2.14
    |-- LittleFS @ 2.0.0
    |-- Preferences @ 2.0.0
    |-- SPI @ 2.0.0
    |-- Wire @ 2.0.0
    |-- DNSServer @ 2.0.0
    |-- WiFi @ 2.0.0
    Building in release mode
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/Fonts/IPA/lgfx_font_japan.c.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/Fonts/efont/lgfx_efont_cn.c.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/Fonts/efont/lgfx_efont_ja.c.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/Fonts/efont/lgfx_efont_kr.c.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/Fonts/efont/lgfx_efont_tw.c.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/utility/lgfx_miniz.c.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/utility/lgfx_pngle.c.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/utility/lgfx_qoi.c.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/utility/lgfx_qrcode.c.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/utility/lgfx_tjpgd.c.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/LGFXBase.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/LGFX_Button.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/LGFX_Sprite.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/lgfx_fonts.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/misc/DividedFrameBuffer.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/misc/SpriteBuffer.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/misc/common_function.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/misc/pixelcopy.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/panel/Panel_Device.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/panel/Panel_FlexibleFrameBuffer.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/panel/Panel_FrameBufferBase.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/panel/Panel_GDEW0154M09.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/panel/Panel_HUB75.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/panel/Panel_HasBuffer.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/panel/Panel_ILI9225.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/panel/Panel_IT8951.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/panel/Panel_LCD.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/panel/Panel_M5HDMI.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/panel/Panel_M5UnitGLASS.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/panel/Panel_M5UnitLCD.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/panel/Panel_NT35510.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/panel/Panel_RA8875.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/panel/Panel_RM68120.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/panel/Panel_SSD1306.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/panel/Panel_SSD1327.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/panel/Panel_SSD1331.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/panel/Panel_SSD1351.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/panel/Panel_SSD1963.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/arduino_default/Bus_SPI.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/arduino_default/Bus_Stream.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/arduino_default/common.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/esp32/Bus_HUB75.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/esp32/Bus_I2C.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/esp32/Bus_Parallel8.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/esp32/Bus_SPI.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/esp32/Light_PWM.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/esp32/Panel_CVBS.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/esp32/common.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/esp32c3/Bus_Parallel8.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/esp32s2/Bus_Parallel16.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/esp32s2/Bus_Parallel8.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/esp32s3/Bus_Parallel16.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/esp32s3/Bus_Parallel8.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/esp32s3/Bus_RGB.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/esp32s3/Panel_RGB.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/esp8266/Bus_I2C.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/esp8266/Bus_SPI.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/esp8266/common.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/framebuffer/Panel_fb.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/framebuffer/common.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/opencv/Panel_OpenCV.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/opencv/common.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/rp2040/Bus_I2C.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/rp2040/Bus_SPI.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/rp2040/Light_PWM.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/rp2040/common.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/samd21/Bus_I2C.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/samd21/Bus_SPI.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/samd21/common.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/samd51/Bus_I2C.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/samd51/Bus_SPI.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/samd51/common.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/sdl/Panel_sdl.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/sdl/common.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/spresense/Bus_SPI.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/spresense/common.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/stm32/Bus_SPI.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/platforms/stm32/common.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/touch/Touch_CST816S.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/touch/Touch_FT5x06.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/touch/Touch_GSLx680.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/touch/Touch_GT911.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/touch/Touch_NS2009.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/touch/Touch_RA8875.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/touch/Touch_STMPE610.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/touch/Touch_TT21xxx.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/lib62e/LovyanGFX/lgfx/v1/touch/Touch_XPT2046.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/src/ESP32_TTGO_FTMS.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/src/config.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/src/display.cpp.o
    src/ESP32_TTGO_FTMS.cpp:66:2: warning: #warning todo cs:putback gfxlogtext [-Wcpp]
    66 | #warning todo cs:putback gfxlogtext
    | ^~~~~~~
    Compiling .pio/build/ESP32_TTGO_DISPLAY/src/gui-LVGL.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/src/gui-tft.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/src/hardware.cpp.o
    In file included from src/display.cpp:2:
    include/common.h:75:6: error: variable or field 'logText' declared void
    75 | void logText(std::string text);
    | ^~~~~~~
    include/common.h:75:19: error: 'string' is not a member of 'std'
    75 | void logText(std::string text);
    | ^~~~~~
    include/common.h:1:1: note: 'std::string' is defined in header ''; did you forget to '#include '?
    +++ |+#include
    1 | #ifndef ESP32_TTGO_FTMS_H
    src/ESP32_TTGO_FTMS.cpp: In function 'void speedUp()':
    src/ESP32_TTGO_FTMS.cpp:113:5: error: 'handleEvent' was not declared in this scope
    113 | handleEvent(EventType::TREADMILL_SPEED_UP);
    | ^~~~~~~~~~~
    src/ESP32_TTGO_FTMS.cpp: In function 'void speedDown()':
    src/ESP32_TTGO_FTMS.cpp:128:5: error: 'handleEvent' was not declared in this scope
    128 | handleEvent(EventType::TREADMILL_SPEED_DOWN);
    | ^~~~~~~~~~~
    src/ESP32_TTGO_FTMS.cpp: In function 'void inclineUp()':
    src/ESP32_TTGO_FTMS.cpp:143:5: error: 'handleEvent' was not declared in this scope
    143 | handleEvent(EventType::TREADMILL_INC_UP);
    | ^~~~~~~~~~~
    src/ESP32_TTGO_FTMS.cpp: In function 'void inclineDown()':
    src/ESP32_TTGO_FTMS.cpp:160:5: error: 'handleEvent' was not declared in this scope
    160 | handleEvent(EventType::TREADMILL_INC_DOWN);
    | ^~~~~~~~~~~
    src/ESP32_TTGO_FTMS.cpp: In function 'void showInfo()':
    src/ESP32_TTGO_FTMS.cpp:213:50: error: 'GPIOExtender' was not declared in this scope
    213 | String(" GPIOExtender(AW9523): ") + GPIOExtender.isAvailable() + String("\n");
    | ^~~~~~~~~~~~
    src/ESP32_TTGO_FTMS.cpp: In function 'void setup()':
    src/ESP32_TTGO_FTMS.cpp:237:3: error: 'initButton' was not declared in this scope; did you mean 'initMqtt'?
    237 | initButton();
    | ^~~~~~~~~~
    | initMqtt
    src/ESP32_TTGO_FTMS.cpp:240:3: error: 'initHardware' was not declared in this scope; did you mean 'MockHardware'?
    240 | initHardware();
    | ^~~~~~~~~~~~
    | MockHardware
    src/ESP32_TTGO_FTMS.cpp: In function 'void loop()':
    src/ESP32_TTGO_FTMS.cpp:261:3: error: 'loopHandleHardware' was not declared in this scope
    261 | loopHandleHardware();
    | ^~~~~~~~~~~~~~~~~~
    src/hardware.cpp:249:2: warning: #warning todo cs: add gxloop handler again. [-Wcpp]
    249 | #warning todo cs: add gxloop handler again.
    | ^~~~~~~
    src/hardware.cpp:406:2: warning: #warning check out if this must be here ****************** [-Wcpp]
    406 | #warning check out if this must be here ******************
    | ^~~~~~~
    src/hardware.cpp:416:2: warning: #warning cs todo remove this [-Wcpp]
    416 | #warning cs todo remove this
    | ^~~~~~~
    src/hardware.cpp:448:2: warning: #warning remove this constant to some config/file [-Wcpp]
    448 | #warning remove this constant to some config/file
    | ^~~~~~~
    src/hardware.cpp:604:2: warning: #warning Remove delay and schedule last part later in some way and go back to "main" loop mode. [-Wcpp]
    604 | #warning Remove delay and schedule last part later in some way and go back to "main" loop mode.
    | ^~~~~~~
    src/hardware.cpp:620:2: warning: #warning Remove delay and schedule last part later in some way and go back to "main" loop mode. [-Wcpp]
    620 | #warning Remove delay and schedule last part later in some way and go back to "main" loop mode.
    | ^~~~~~~
    src/ESP32_TTGO_FTMS.cpp:262:3: error: 'loopHandleButton' was not declared in this scope; did you mean 'loopHandleBLE'?
    262 | loopHandleButton();
    | ^~~~~~~~~~~~~~~~
    | loopHandleBLE
    src/ESP32_TTGO_FTMS.cpp:268:7: error: 'timer_tick' was not declared in this scope; did you mean 'timer_t'?
    268 | if (timer_tick == true) {
    | ^~~~~~~~~~
    | timer_t
    src/ESP32_TTGO_FTMS.cpp:274:17: error: 'getIncline' was not declared in this scope; did you mean 'readIncline'?
    274 | incline = getIncline(); // sets global 'angle' and 'incline' variable
    | ^~~~~~~~~~
    | readIncline
    src/ESP32_TTGO_FTMS.cpp:289:21: error: 'calculateRPM' was not declared in this scope
    289 | float rpm = calculateRPM();
    | ^~~~~~~~~~~~
    Compiling .pio/build/ESP32_TTGO_DISPLAY/src/net-control.cpp.o
    src/ESP32_TTGO_FTMS.cpp:292:25: error: 'workoutDistance' was not declared in this scope
    292 | totalDistance = workoutDistance / 1000; // conv mm to meter
    | ^~~~~~~~~~~~~~~
    Building .pio/build/ESP32_TTGO_DISPLAY/bootloader.bin
    esptool.py v4.7-dev
    Creating esp32 image...
    Merged 1 ELF section
    Successfully created esp32 image.
    Generating partitions .pio/build/ESP32_TTGO_DISPLAY/partitions.bin
    *** [.pio/build/ESP32_TTGO_DISPLAY/src/ESP32_TTGO_FTMS.cpp.o] Error 1
    *** [.pio/build/ESP32_TTGO_DISPLAY/src/display.cpp.o] Error 1
    In file included from src/gui-LVGL.cpp:3:
    include/common.h:75:6: error: variable or field 'logText' declared void
    75 | void logText(std::string text);
    | ^~~~~~~
    include/common.h:75:19: error: 'string' is not a member of 'std'
    75 | void logText(std::string text);
    | ^~~~~~
    include/common.h:14:1: note: 'std::string' is defined in header ''; did you forget to '#include '?
    13 | #include <Arduino.h>
    +++ |+#include
    14 |
    In file included from src/hardware.cpp:28:
    include/common.h:75:6: error: variable or field 'logText' declared void
    75 | void logText(std::string text);
    | ^~~~~~~
    include/common.h:75:19: error: 'string' is not a member of 'std'
    75 | void logText(std::string text);
    | ^~~~~~
    include/common.h:1:1: note: 'std::string' is defined in header ''; did you forget to '#include '?
    +++ |+#include
    1 | #ifndef ESP32_TTGO_FTMS_H
    In file included from .pio/libdeps/ESP32_TTGO_DISPLAY/NimBLE-Arduino/src/NimBLEDevice.h:18,
    from src/net-control.cpp:26:
    .pio/libdeps/ESP32_TTGO_DISPLAY/NimBLE-Arduino/src/nimconfig.h:154: warning: "CONFIG_BT_NIMBLE_ROLE_CENTRAL" redefined
    154 | #define CONFIG_BT_NIMBLE_ROLE_CENTRAL
    |
    In file included from /Users/userx/.platformio/packages/framework-arduinoespressif32@src-cdf0adb896be2b73de7b8a8d60c8dc56/tools/esp32-arduino-libs/esp32/include/newlib/platform_include/assert.h:12,
    from /Users/userx/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/sys-include/sys/reent.h:503,
    from /Users/userx/.platformio/packages/framework-arduinoespressif32@src-cdf0adb896be2b73de7b8a8d60c8dc56/tools/esp32-arduino-libs/esp32/include/newlib/platform_include/sys/reent.h:9,
    from /Users/userx/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/sys-include/wchar.h:6,
    from /Users/userx/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/12.2.0/cwchar:44,
    from /Users/userx/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/12.2.0/bits/postypes.h:40,
    from /Users/userx/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/12.2.0/iosfwd:40,
    from /Users/userx/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/12.2.0/ios:38,
    from /Users/userx/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/12.2.0/ostream:38,
    from /Users/userx/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/12.2.0/bits/unique_ptr.h:41,
    from /Users/userx/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/12.2.0/memory:76,
    from /Users/userx/.platformio/packages/framework-arduinoespressif32@src-cdf0adb896be2b73de7b8a8d60c8dc56/libraries/FS/src/FS.h:24,
    from /Users/userx/.platformio/packages/framework-arduinoespressif32@src-cdf0adb896be2b73de7b8a8d60c8dc56/libraries/LittleFS/src/LittleFS.h:17,
    from src/net-control.cpp:7:
    /Users/userx/.platformio/packages/framework-arduinoespressif32@src-cdf0adb896be2b73de7b8a8d60c8dc56/tools/esp32-arduino-libs/esp32/dio_qspi/include/sdkconfig.h:314: note: this is the location of the previous definition
    314 | #define CONFIG_BT_NIMBLE_ROLE_CENTRAL 1
    |
    .pio/libdeps/ESP32_TTGO_DISPLAY/NimBLE-Arduino/src/nimconfig.h:158: warning: "CONFIG_BT_NIMBLE_ROLE_OBSERVER" redefined
    158 | #define CONFIG_BT_NIMBLE_ROLE_OBSERVER
    |
    /Users/userx/.platformio/packages/framework-arduinoespressif32@src-cdf0adb896be2b73de7b8a8d60c8dc56/tools/esp32-arduino-libs/esp32/dio_qspi/include/sdkconfig.h:317: note: this is the location of the previous definition
    317 | #define CONFIG_BT_NIMBLE_ROLE_OBSERVER 1
    |
    .pio/libdeps/ESP32_TTGO_DISPLAY/NimBLE-Arduino/src/nimconfig.h:162: warning: "CONFIG_BT_NIMBLE_ROLE_PERIPHERAL" redefined
    162 | #define CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
    |
    /Users/userx/.platformio/packages/framework-arduinoespressif32@src-cdf0adb896be2b73de7b8a8d60c8dc56/tools/esp32-arduino-libs/esp32/dio_qspi/include/sdkconfig.h:315: note: this is the location of the previous definition
    315 | #define CONFIG_BT_NIMBLE_ROLE_PERIPHERAL 1
    |
    .pio/libdeps/ESP32_TTGO_DISPLAY/NimBLE-Arduino/src/nimconfig.h:166: warning: "CONFIG_BT_NIMBLE_ROLE_BROADCASTER" redefined
    166 | #define CONFIG_BT_NIMBLE_ROLE_BROADCASTER
    |
    /Users/userx/.platformio/packages/framework-arduinoespressif32@src-cdf0adb896be2b73de7b8a8d60c8dc56/tools/esp32-arduino-libs/esp32/dio_qspi/include/sdkconfig.h:316: note: this is the location of the previous definition
    316 | #define CONFIG_BT_NIMBLE_ROLE_BROADCASTER 1
    |
    .pio/libdeps/ESP32_TTGO_DISPLAY/NimBLE-Arduino/src/nimconfig.h:234: warning: "CONFIG_BT_NIMBLE_ACL_BUF_COUNT" redefined
    234 | #define CONFIG_BT_NIMBLE_ACL_BUF_COUNT 12
    |
    /Users/userx/.platformio/packages/framework-arduinoespressif32@src-cdf0adb896be2b73de7b8a8d60c8dc56/tools/esp32-arduino-libs/esp32/dio_qspi/include/sdkconfig.h:783: note: this is the location of the previous definition
    783 | #define CONFIG_BT_NIMBLE_ACL_BUF_COUNT CONFIG_BT_NIMBLE_TRANSPORT_ACL_FROM_LL_COUNT
    |
    .pio/libdeps/ESP32_TTGO_DISPLAY/NimBLE-Arduino/src/nimconfig.h:237: warning: "CONFIG_BT_NIMBLE_ACL_BUF_SIZE" redefined
    237 | #define CONFIG_BT_NIMBLE_ACL_BUF_SIZE 255
    |
    /Users/userx/.platformio/packages/framework-arduinoespressif32@src-cdf0adb896be2b73de7b8a8d60c8dc56/tools/esp32-arduino-libs/esp32/dio_qspi/include/sdkconfig.h:784: note: this is the location of the previous definition
    784 | #define CONFIG_BT_NIMBLE_ACL_BUF_SIZE CONFIG_BT_NIMBLE_TRANSPORT_ACL_SIZE
    |
    .pio/libdeps/ESP32_TTGO_DISPLAY/NimBLE-Arduino/src/nimconfig.h:243: warning: "CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE" redefined
    243 | # define CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE 70
    |
    /Users/userx/.platformio/packages/framework-arduinoespressif32@src-cdf0adb896be2b73de7b8a8d60c8dc56/tools/esp32-arduino-libs/esp32/dio_qspi/include/sdkconfig.h:785: note: this is the location of the previous definition
    785 | #define CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE CONFIG_BT_NIMBLE_TRANSPORT_EVT_SIZE
    |
    .pio/libdeps/ESP32_TTGO_DISPLAY/NimBLE-Arduino/src/nimconfig.h:247: warning: "CONFIG_BT_NIMBLE_HCI_EVT_HI_BUF_COUNT" redefined
    247 | #define CONFIG_BT_NIMBLE_HCI_EVT_HI_BUF_COUNT 30
    |
    /Users/userx/.platformio/packages/framework-arduinoespressif32@src-cdf0adb896be2b73de7b8a8d60c8dc56/tools/esp32-arduino-libs/esp32/dio_qspi/include/sdkconfig.h:786: note: this is the location of the previous definition
    786 | #define CONFIG_BT_NIMBLE_HCI_EVT_HI_BUF_COUNT CONFIG_BT_NIMBLE_TRANSPORT_EVT_COUNT
    |
    .pio/libdeps/ESP32_TTGO_DISPLAY/NimBLE-Arduino/src/nimconfig.h:250: warning: "CONFIG_BT_NIMBLE_HCI_EVT_LO_BUF_COUNT" redefined
    250 | #define CONFIG_BT_NIMBLE_HCI_EVT_LO_BUF_COUNT 8
    |
    /Users/userx/.platformio/packages/framework-arduinoespressif32@src-cdf0adb896be2b73de7b8a8d60c8dc56/tools/esp32-arduino-libs/esp32/dio_qspi/include/sdkconfig.h:787: note: this is the location of the previous definition
    787 | #define CONFIG_BT_NIMBLE_HCI_EVT_LO_BUF_COUNT CONFIG_BT_NIMBLE_TRANSPORT_EVT_DISCARD_COUNT
    |
    src/hardware.cpp:122:1: error: 'GPIOExtenderAW9523' does not name a type
    122 | GPIOExtenderAW9523 GPIOExtender(I2C_0);
    | ^~~~~~~~~~~~~~~~~~
    src/hardware.cpp: In function 'void reedSwitch_ISR()':
    src/hardware.cpp:319:5: warning: '++' expression of 'volatile'-qualified type is deprecated [-Wvolatile]
    319 | revCount++;
    | ^~~~~~~~
    src/hardware.cpp:320:21: warning: compound assignment with 'volatile'-qualified left operand is deprecated [-Wvolatile]
    320 | workoutDistance += configTreadmill.belt_distance;
    | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    src/hardware.cpp:321:25: warning: compound assignment with 'volatile'-qualified left operand is deprecated [-Wvolatile]
    321 | accumulatorInterval += test_elapsed;
    | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
    src/hardware.cpp: In function 'void loopHandleHardware()':
    src/hardware.cpp:432:3: error: 'GPIOExtender' was not declared in this scope
    432 | GPIOExtender.scanButtons();
    | ^~~~~~~~~~~~
    src/hardware.cpp:456:27: warning: using value of simple assignment with 'volatile'-qualified left operand is deprecated [-Wvolatile]
    456 | t1_valid = t2_valid = false;
    | ~~~~~~~~~^~~~~~~
    src/hardware.cpp: In function 'void handleEvent(EventType)':
    src/hardware.cpp:474:7: error: 'GPIOExtender' was not declared in this scope
    474 | if (GPIOExtender.pressEvent(event)) return;
    | ^~~~~~~~~~~~
    src/hardware.cpp: In function 'void initGPIOExtender()':
    src/hardware.cpp:503:11: error: 'GPIOExtender' was not declared in this scope; did you mean 'initGPIOExtender'?
    503 | while (!GPIOExtender.begin())
    | ^~~~~~~~~~~~
    | initGPIOExtender
    src/hardware.cpp: At global scope:
    src/hardware.cpp:512:6: error: 'GPIOExtenderAW9523' has not been declared
    512 | void GPIOExtenderAW9523::scanButtons(void)
    | ^~~~~~~~~~~~~~~~~~
    src/hardware.cpp: In function 'void scanButtons()':
    src/hardware.cpp:514:7: error: 'enabled' was not declared in this scope
    514 | if (enabled) {
    | ^~~~~~~
    src/hardware.cpp:516:21: error: 'getPins' was not declared in this scope
    516 | uint16_t pins = getPins();
    | ^~~~~~~
    src/hardware.cpp:523:17: error: 'AW9523_KEY_UP' was not declared in this scope
    523 | if ((keys & AW9523_KEY_UP) && AW9523_KEY_UP) {
    | ^~~~~~~~~~~~~
    src/hardware.cpp:528:17: error: 'AW9523_KEY_LEFT' was not declared in this scope
    528 | if ((keys & AW9523_KEY_LEFT) && AW9523_KEY_LEFT) {
    | ^~~~~~~~~~~~~~~
    src/hardware.cpp:533:17: error: 'AW9523_KEY_DOWN' was not declared in this scope
    533 | if ((keys & AW9523_KEY_DOWN) && AW9523_KEY_DOWN) {
    | ^~~~~~~~~~~~~~~
    src/hardware.cpp:538:17: error: 'AW9523_KEY_RIGHT' was not declared in this scope
    538 | if ((keys & AW9523_KEY_RIGHT) && AW9523_KEY_RIGHT) {
    | ^~~~~~~~~~~~~~~~
    *** [.pio/build/ESP32_TTGO_DISPLAY/src/gui-LVGL.cpp.o] Error 1
    src/hardware.cpp:543:17: error: 'AW9523_KEY_OK' was not declared in this scope
    543 | if ((keys & AW9523_KEY_OK) && AW9523_KEY_OK) {
    | ^~~~~~~~~~~~~
    src/hardware.cpp:548:17: error: 'AW9523_KEY_BACK' was not declared in this scope
    548 | if ((keys & AW9523_KEY_BACK) && AW9523_KEY_BACK) {
    | ^~~~~~~~~~~~~~~
    src/hardware.cpp: At global scope:
    src/hardware.cpp:560:6: error: 'GPIOExtenderAW9523' has not been declared
    560 | void GPIOExtenderAW9523::logPins(void)
    | ^~~~~~~~~~~~~~~~~~
    src/hardware.cpp: In function 'void logPins()':
    src/hardware.cpp:562:7: error: 'enabled' was not declared in this scope
    562 | if (enabled) {
    | ^~~~~~~
    src/hardware.cpp:563:28: error: 'INPUT_PORT0' was not declared in this scope
    563 | uint8_t port0 = read(INPUT_PORT0);
    | ^~~~~~~~~~~
    src/hardware.cpp:564:28: error: 'INPUT_PORT1' was not declared in this scope
    564 | uint8_t port1 = read(INPUT_PORT1);
    | ^~~~~~~~~~~
    src/hardware.cpp: At global scope:
    src/hardware.cpp:570:6: error: 'GPIOExtenderAW9523' has not been declared
    570 | bool GPIOExtenderAW9523::pressEvent(EventType eventButton)
    | ^~~~~~~~~~~~~~~~~~
    src/hardware.cpp: In function 'bool pressEvent(EventType)':
    src/hardware.cpp:573:7: error: 'enabled' was not declared in this scope
    573 | if (enabled) {
    | ^~~~~~~
    src/hardware.cpp:578:52: error: 'AW9523_TREADMILL_START' was not declared in this scope
    578 | case EventType::TREADMILL_START: line = AW9523_TREADMILL_START; break;
    | ^~~~~~~~~~~~~~~~~~~~~~
    src/hardware.cpp:579:52: error: 'AW9523_TREADMILL_SPEED_DOWN' was not declared in this scope
    579 | case EventType::TREADMILL_SPEED_DOWN: line = AW9523_TREADMILL_SPEED_DOWN; break;
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    src/hardware.cpp:580:52: error: 'AW9523_TREADMILL_INC_DOWN' was not declared in this scope
    580 | case EventType::TREADMILL_INC_DOWN: line = AW9523_TREADMILL_INC_DOWN; break;
    | ^~~~~~~~~~~~~~~~~~~~~~~~~
    src/hardware.cpp:581:52: error: 'AW9523_TREADMILL_STOP' was not declared in this scope
    581 | case EventType::TREADMILL_STOP: line = AW9523_TREADMILL_STOP; break;
    | ^~~~~~~~~~~~~~~~~~~~~
    src/hardware.cpp:582:52: error: 'AW9523_TREADMILL_SPEED_UP' was not declared in this scope
    582 | case EventType::TREADMILL_SPEED_UP: line = AW9523_TREADMILL_SPEED_UP; break;
    | ^~~~~~~~~~~~~~~~~~~~~~~~~
    src/hardware.cpp:583:52: error: 'AW9523_TREADMILL_INC_UP' was not declared in this scope
    583 | case EventType::TREADMILL_INC_UP: line = AW9523_TREADMILL_INC_UP; break;
    | ^~~~~~~~~~~~~~~~~~~~~~~
    src/hardware.cpp:600:18: error: 'CONFIG_PORT0' was not declared in this scope
    600 | if (!write(CONFIG_PORT0,~port0Bit)) return false; //0-output 1-input
    | ^~~~~~~~~~~~
    src/hardware.cpp:602:18: error: 'OUTPUT_PORT0' was not declared in this scope
    602 | if (!write(OUTPUT_PORT0,~port0Bit)) return false; //0-low 1-high
    | ^~~~~~~~~~~~
    src/hardware.cpp:605:13: error: 'TREADMILL_BUTTON_PRESS_SIGNAL_TIME_MS' was not declared in this scope
    605 | delay(TREADMILL_BUTTON_PRESS_SIGNAL_TIME_MS);
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    src/hardware.cpp:608:18: error: 'OUTPUT_PORT0' was not declared in this scope
    608 | if (!write(OUTPUT_PORT0,0xff)) return false; //0-low 1-high
    | ^~~~~~~~~~~~
    src/hardware.cpp:610:18: error: 'CONFIG_PORT0' was not declared in this scope
    610 | if (!write(CONFIG_PORT0,0xff)) return false; //0-output 1-input
    | ^~~~~~~~~~~~
    src/hardware.cpp:616:18: error: 'CONFIG_PORT1' was not declared in this scope
    616 | if (!write(CONFIG_PORT1,~port1Bit)) return false; //0-output 1-input
    | ^~~~~~~~~~~~
    src/hardware.cpp:618:18: error: 'OUTPUT_PORT1' was not declared in this scope
    618 | if (!write(OUTPUT_PORT1,port1Bit)) return false; //0-low 1-high
    | ^~~~~~~~~~~~
    src/hardware.cpp:621:13: error: 'TREADMILL_BUTTON_PRESS_SIGNAL_TIME_MS' was not declared in this scope
    621 | delay(TREADMILL_BUTTON_PRESS_SIGNAL_TIME_MS);
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    src/hardware.cpp:624:18: error: 'OUTPUT_PORT1' was not declared in this scope
    624 | if (!write(OUTPUT_PORT1,0xff)) return false; //0-low 1-high
    | ^~~~~~~~~~~~
    src/hardware.cpp:626:18: error: 'CONFIG_PORT1' was not declared in this scope
    626 | if (!write(CONFIG_PORT1,0xff)) return false; //0-output 1-input
    | ^~~~~~~~~~~~
    src/hardware.cpp: At global scope:
    src/hardware.cpp:633:9: error: 'GPIOExtenderAW9523' has not been declared
    633 | uint8_t GPIOExtenderAW9523::read(uint8_t reg, bool i2cHandled)
    | ^~~~~~~~~~~~~~~~~~
    src/hardware.cpp: In function 'uint8_t read(uint8_t, bool)':
    src/hardware.cpp:640:3: error: 'wire' was not declared in this scope; did you mean 'Wire'?
    640 | wire->beginTransmission(AW9523_ADDR);
    | ^~~~
    | Wire
    src/hardware.cpp:640:27: error: 'AW9523_ADDR' was not declared in this scope
    640 | wire->beginTransmission(AW9523_ADDR);
    | ^~~~~~~~~~~
    src/hardware.cpp: At global scope:
    src/hardware.cpp:652:9: error: 'GPIOExtenderAW9523' has not been declared
    652 | uint8_t GPIOExtenderAW9523::read(uint8_t reg)
    | ^~~~~~~~~~~~~~~~~~
    src/hardware.cpp:657:6: error: 'GPIOExtenderAW9523' has not been declared
    657 | bool GPIOExtenderAW9523::write(uint8_t reg, uint8_t data)
    | ^~~~~~~~~~~~~~~~~~
    src/hardware.cpp: In function 'bool write(uint8_t, uint8_t)':
    src/hardware.cpp:662:3: error: 'wire' was not declared in this scope; did you mean 'Wire'?
    662 | wire->beginTransmission(AW9523_ADDR);
    | ^~~~
    | Wire
    src/hardware.cpp:662:27: error: 'AW9523_ADDR' was not declared in this scope
    662 | wire->beginTransmission(AW9523_ADDR);
    | ^~~~~~~~~~~
    src/hardware.cpp: At global scope:
    src/hardware.cpp:674:6: error: 'GPIOExtenderAW9523' has not been declared
    674 | bool GPIOExtenderAW9523::begin()
    | ^~~~~~~~~~~~~~~~~~
    src/hardware.cpp: In function 'bool begin()':
    src/hardware.cpp:676:3: error: 'enabled' was not declared in this scope
    676 | enabled = false;
    | ^~~~~~~
    src/hardware.cpp:677:3: error: 'isInterrupted' was not declared in this scope; did you mean 'noInterrupts'?
    677 | isInterrupted = false;
    | ^~~~~~~~~~~~~
    | noInterrupts
    src/hardware.cpp:678:21: error: 'ID' was not declared in this scope; did you mean 'id'?
    678 | uint8_t id = read(ID);
    | ^

    | id
    src/hardware.cpp:681:13: error: 'ID_AW9523' was not declared in this scope
    681 | if (id != ID_AW9523) {
    | ^~~~~~~~~
    src/hardware.cpp:685:14: error: 'OUTPUT_PORT0' was not declared in this scope
    685 | if (!write(OUTPUT_PORT0,0xff)) return false; //0-low 1-high
    | ^~~~~~~~~~~~
    src/hardware.cpp:686:14: error: 'OUTPUT_PORT1' was not declared in this scope
    686 | if (!write(OUTPUT_PORT1,0xff)) return false; //0-low 1-high
    | ^~~~~~~~~~~~
    src/hardware.cpp:689:14: error: 'CONFIG_PORT0' was not declared in this scope
    689 | if (!write(CONFIG_PORT0,0xff)) return false; //0-output 1-input
    | ^~~~~~~~~~~~
    src/hardware.cpp:690:14: error: 'CONFIG_PORT1' was not declared in this scope
    690 | if (!write(CONFIG_PORT1,0xff)) return false; //0-output 1-input
    | ^~~~~~~~~~~~
    src/hardware.cpp:692:14: error: 'CTL' was not declared in this scope
    692 | if (!write(CTL,0x08)) return false; //0000x000 0-Open Drain 1-Push-Pull
    | ^~~
    src/hardware.cpp:694:14: error: 'INT_PORT0' was not declared in this scope
    694 | if (!write(INT_PORT0,0xff)) return false; //0-enable 1-disable
    | ^~~~~~~~~
    src/hardware.cpp:695:14: error: 'INT_PORT1' was not declared in this scope
    695 | if (!write(INT_PORT1,0xff)) return false; //0-enable 1-disable
    | ^~~~~~~~~
    src/hardware.cpp:697:14: error: 'LED_MODE_SWITCH0' was not declared in this scope
    697 | if (!write(LED_MODE_SWITCH0,0xff)) return false; //0-LED mode 1-GPIO mode
    | ^~~~~~~~~~~~~~~~
    src/hardware.cpp:698:14: error: 'LED_MODE_SWITCH1' was not declared in this scope
    698 | if (!write(LED_MODE_SWITCH1,0xff)) return false; //0-LED mode 1-GPIO mode
    | ^~~~~~~~~~~~~~~~
    src/hardware.cpp:700:3: error: 'getPins' was not declared in this scope
    700 | getPins();
    | ^~~~~~~
    src/hardware.cpp: At global scope:
    src/hardware.cpp:704:6: error: 'GPIOExtenderAW9523' has not been declared
    704 | bool GPIOExtenderAW9523::isAvailable()
    | ^~~~~~~~~~~~~~~~~~
    src/hardware.cpp: In function 'bool isAvailable()':
    src/hardware.cpp:706:10: error: 'enabled' was not declared in this scope
    706 | return enabled;
    | ^~~~~~~
    src/hardware.cpp: At global scope:
    src/hardware.cpp:709:10: error: 'GPIOExtenderAW9523' has not been declared
    709 | uint16_t GPIOExtenderAW9523::getPins(void)
    | ^~~~~~~~~~~~~~~~~~
    src/hardware.cpp: In function 'uint16_t getPins()':
    src/hardware.cpp:711:7: error: 'enabled' was not declared in this scope
    711 | if (enabled) {
    | ^~~~~~~
    src/hardware.cpp:712:5: error: 'isInterrupted' was not declared in this scope; did you mean 'noInterrupts'?
    712 | isInterrupted = false;
    | ^~~~~~~~~~~~~
    | noInterrupts
    src/hardware.cpp:717:26: error: 'INPUT_PORT0' was not declared in this scope
    717 | uint8_t port0 = read(INPUT_PORT0,true);
    | ^~~~~~~~~~~
    src/hardware.cpp:718:26: error: 'INPUT_PORT1' was not declared in this scope
    718 | uint8_t port1 = read(INPUT_PORT1,true);
    | ^~~~~~~~~~~
    src/hardware.cpp: At global scope:
    src/hardware.cpp:726:6: error: 'GPIOExtenderAW9523' has not been declared
    726 | bool GPIOExtenderAW9523::checkInterrupt(void)
    | ^~~~~~~~~~~~~~~~~~
    src/hardware.cpp: In function 'bool checkInterrupt()':
    src/hardware.cpp:728:11: error: 'enabled' was not declared in this scope
    728 | return (enabled && isInterrupted);
    | ^~~~~~~
    src/hardware.cpp:728:22: error: 'isInterrupted' was not declared in this scope; did you mean 'noInterrupts'?
    728 | return (enabled && isInterrupted);
    | ^~~~~~~~~~~~~
    | noInterrupts
    src/net-control.cpp: In function 'void setupDeviceID()':
    src/net-control.cpp:166:3: error: 'esp_efuse_mac_get_default' was not declared in this scope
    166 | esp_efuse_mac_get_default(macAddr);
    | ^~~~~~~~~~~~~~~~~~~~~~~~~
    src/net-control.cpp: In function 'bool mqttConnect()':
    src/net-control.cpp:422:65: error: 'reset_reason' was not declared in this scope; did you mean 'esp_reset_reason'?
    422 | rc |= client.publish(getTopic(MQTT_TOPIC_RST), getRstReason(reset_reason), true);
    | ^~~~~~~~~~~~
    | esp_reset_reason
    src/net-control.cpp:422:52: error: 'getRstReason' was not declared in this scope
    422 | rc |= client.publish(getTopic(MQTT_TOPIC_RST), getRstReason(reset_reason), true);
    | ^~~~~~~~~~~~
    src/net-control.cpp: In function 'String processor(const String&)':
    src/net-control.cpp:461:25: error: 'reset_reason' was not declared in this scope; did you mean 'esp_reset_reason'?
    461 | return getRstReason(reset_reason);
    | ^~~~~~~~~~~~
    | esp_reset_reason
    src/net-control.cpp:461:12: error: 'getRstReason' was not declared in this scope
    461 | return getRstReason(reset_reason);
    | ^~~~~~~~~~~~
    *** [.pio/build/ESP32_TTGO_DISPLAY/src/hardware.cpp.o] Error 1
    *** [.pio/build/ESP32_TTGO_DISPLAY/src/net-control.cpp.o] Error 1
    =========================================================================================================================== [FAILED] Took 30.42 seconds ===========================================================================================================================

Environment Status Duration


ESP32_TTGO_DISPLAY FAILED 00:00:30.420
====================================================================================================================== 1 failed, 0 succeeded in 00:00:30.420 ======================================================================================================================

  • The terminal process "platformio 'run', '--environment', 'ESP32_TTGO_DISPLAY'" terminated with exit code: 1.
  • Terminal will be reused by tasks, press any key to close it.

@lefty01
Copy link
Owner

lefty01 commented Dec 3, 2024

indeed strange ...

let me for comparison paste beginning of my output that show some difference in pio related version (looks deps pkgs are same version numbers which makes sense )

$ platformio run --environment ESP32_TTGO_DISPLAY

Processing ESP32_TTGO_DISPLAY (platform: espressif32; board: esp32dev; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Tool Manager: Installing platformio/framework-arduinoespressif32 @ ~3.20017.0
Downloading  [####################################]  100%          
Unpacking  [####################################]  100%          
Tool Manager: framework-arduinoespressif32@3.20017.0 has been installed!
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (6.9.0) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) 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.20017.0 (2.0.17) 
 - tool-esptoolpy @ 1.40501.0 (4.5.1) 
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 45 compatible libraries
Scanning dependencies...
Dependency Graph
|-- NimBLE-Arduino @ 1.4.3
|-- PubSubClient @ 2.8.0
|-- ArduinoJson @ 6.21.5
|-- Button2 @ 2.3.3
|-- Time @ 1.6.1
|-- MPU6050_light @ 1.1.0
|-- ESPAsyncWiFiManager @ 0.31.0+sha.3b9a58a
|-- ElegantOTA @ 3.1.6
|-- LovyanGFX @ 1.2.0
|-- lvgl @ 8.4.0
|-- ESPAsyncWebServer @ 3.3.23
|-- AsyncTCP @ 3.2.14
|-- LittleFS @ 2.0.0
|-- Preferences @ 2.0.0
|-- SPI @ 2.0.0
|-- Wire @ 2.0.0
|-- WiFiClientSecure @ 2.0.0

|-- DNSServer @ 2.0.0
|-- WiFi @ 2.0.0
Building in release mode

@lefty01
Copy link
Owner

lefty01 commented Dec 3, 2024

are you able to run without vscode, or from cmdline check the version:
$ pio --version
PlatformIO Core, version 6.1.15
al@fedora:~/Development/github.com/lefty01/ESP32_TTGO_FTMS (lefty01)(libupdate_dev) [20:52:42]
$ pio upgrade
Please wait while upgrading PlatformIO Core ...

[notice] A new release of pip is available: 24.2 -> 24.3.1
[notice] To update, run: python -m pip install --upgrade pip
PlatformIO has been successfully upgraded to 6.1.16

@lefty01
Copy link
Owner

lefty01 commented Dec 3, 2024

did I quick test based on the first error
compiling this with: ~/.platformio/packages/toolchain-xtensa-esp32/bin/xtensa-esp32-elf-g++ (8.4.0) without the Arduino.h
gives the same error

//#include <Arduino.h>

void logText(String text);
void logText(std::string text);


int main(void)
{
}

test.C:4:14: error: variable or field 'logText' declared void
void logText(String text);
^~~~~~
test.C:4:14: error: 'String' was not declared in this scope
test.C:5:19: error: variable or field 'logText' declared void
void logText(std::string text);
^~~~~~
test.C:5:19: error: 'string' is not a member of 'std'
test.C:5:19: note: 'std::string' is defined in header ''; did you forget to '#include '?
test.C:1:1:
+#include
//#include <Arduino.h>
test.C:5:19:
void logText(std::string text);
^~~~~~

including the Arduino.h seems to resolve this ...

need to think about it, I guess I had seen issues like this before

@lefty01
Copy link
Owner

lefty01 commented Dec 3, 2024

somehow the toolchains behave a bit different.
I had commented the sting.h include as I thought it might not be needed ... now uncommted again can you do a git pull on the branch and re-try ?

diff --git a/include/config.h b/include/config.h
index 04ee29f..2b53fe7 100644
--- a/include/config.h
+++ b/include/config.h
@@ -3,7 +3,7 @@
 
 #include <Arduino.h>   //  for string type
 //#warning fix include error for string type remove arduino (use std:string?? it might be faster)
-//#include <string.h>
+#include <string.h>
 

@cprasmu
Copy link
Author

cprasmu commented Dec 6, 2024

Failed again,

Processing ESP32_TTGO_DISPLAY (platform: espressif32; board: esp32dev; framework: arduino)

Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (2023.12.10) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) 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.0.0
  • tool-cmake @ 3.21.3
  • tool-esptoolpy @ 1.40700.0+dev4 (4.7.0)
  • tool-mklittlefs @ 3.2.0
  • tool-mkspiffs @ 2.230.0 (2.30)
  • tool-ninja @ 1.9.0
  • tool-riscv32-esp-elf-gdb @ 12.1.0+20221002
  • tool-xtensa-esp-elf-gdb @ 12.1.0+20221002
  • toolchain-esp32ulp @ 1.23500.220830 (2.35.0)
  • toolchain-xtensa-esp32 @ 12.2.0+20230208
    LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 35 compatible libraries
    Scanning dependencies...
    Dependency Graph
    |-- NimBLE-Arduino @ 1.4.3
    |-- PubSubClient @ 2.8.0
    |-- ArduinoJson @ 6.21.5
    |-- Button2 @ 2.3.3
    |-- Time @ 1.6.1
    |-- MPU6050_light @ 1.1.0
    |-- ESPAsyncWiFiManager @ 0.31.0+sha.3b9a58a
    |-- ElegantOTA @ 3.1.6
    |-- LovyanGFX @ 1.2.0
    |-- lvgl @ 8.4.0
    |-- ESPAsyncWebServer @ 3.3.23
    |-- AsyncTCP @ 3.2.14
    |-- LittleFS @ 2.0.0
    |-- Preferences @ 2.0.0
    |-- SPI @ 2.0.0
    |-- Wire @ 2.0.0
    |-- DNSServer @ 2.0.0
    |-- WiFi @ 2.0.0
    Building in release mode
    Compiling .pio/build/ESP32_TTGO_DISPLAY/src/ESP32_TTGO_FTMS.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/src/display.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/src/gui-LVGL.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/src/hardware.cpp.o
    Compiling .pio/build/ESP32_TTGO_DISPLAY/src/net-control.cpp.o
    Building .pio/build/ESP32_TTGO_DISPLAY/bootloader.bin
    src/ESP32_TTGO_FTMS.cpp:66:2: warning: #warning todo cs:putback gfxlogtext [-Wcpp]
    66 | #warning todo cs:putback gfxlogtext
    | ^~~~~~~
    src/hardware.cpp:249:2: warning: #warning todo cs: add gxloop handler again. [-Wcpp]
    249 | #warning todo cs: add gxloop handler again.
    | ^~~~~~~
    src/hardware.cpp:406:2: warning: #warning check out if this must be here ****************** [-Wcpp]
    406 | #warning check out if this must be here ******************
    | ^~~~~~~
    src/hardware.cpp:416:2: warning: #warning cs todo remove this [-Wcpp]
    416 | #warning cs todo remove this
    | ^~~~~~~
    src/hardware.cpp:448:2: warning: #warning remove this constant to some config/file [-Wcpp]
    448 | #warning remove this constant to some config/file
    | ^~~~~~~
    src/hardware.cpp:604:2: warning: #warning Remove delay and schedule last part later in some way and go back to "main" loop mode. [-Wcpp]
    604 | #warning Remove delay and schedule last part later in some way and go back to "main" loop mode.
    | ^~~~~~~
    src/hardware.cpp:620:2: warning: #warning Remove delay and schedule last part later in some way and go back to "main" loop mode. [-Wcpp]
    620 | #warning Remove delay and schedule last part later in some way and go back to "main" loop mode.
    | ^~~~~~~
    In file included from src/display.cpp:2:
    include/common.h:75:6: error: variable or field 'logText' declared void
    75 | void logText(std::string text);
    | ^~~~~~~
    include/common.h:75:19: error: 'string' is not a member of 'std'
    75 | void logText(std::string text);
    | ^~~~~~
    include/common.h:1:1: note: 'std::string' is defined in header ''; did you forget to '#include '?
    +++ |+#include
    1 | #ifndef ESP32_TTGO_FTMS_H
    In file included from src/hardware.cpp:28:
    include/common.h:75:6: error: variable or field 'logText' declared void
    75 | void logText(std::string text);
    | ^~~~~~~
    include/common.h:75:19: error: 'string' is not a member of 'std'
    75 | void logText(std::string text);
    | ^~~~~~
    include/common.h:1:1: note: 'std::string' is defined in header ''; did you forget to '#include '?
    +++ |+#include
    1 | #ifndef ESP32_TTGO_FTMS_H
    src/net-control.cpp:23:10: fatal error: wifi_mqtt_creds.h: No such file or directory


23 | #include "wifi_mqtt_creds.h"
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pio/build/ESP32_TTGO_DISPLAY/src/net-control.cpp.o] Error 1
esptool.py v4.7-dev
Creating esp32 image...
Merged 1 ELF section
Successfully created esp32 image.
In file included from src/gui-LVGL.cpp:3:
include/common.h:75:6: error: variable or field 'logText' declared void
75 | void logText(std::string text);
| ^~~~~~~
include/common.h:75:19: error: 'string' is not a member of 'std'
75 | void logText(std::string text);
| ^~~~~~
include/common.h:14:1: note: 'std::string' is defined in header ''; did you forget to '#include '?
13 | #include <Arduino.h>
+++ |+#include
14 |
src/ESP32_TTGO_FTMS.cpp: In function 'void speedUp()':
src/ESP32_TTGO_FTMS.cpp:113:5: error: 'handleEvent' was not declared in this scope
113 | handleEvent(EventType::TREADMILL_SPEED_UP);
| ^~~~~~~~~~~
src/ESP32_TTGO_FTMS.cpp: In function 'void speedDown()':
src/ESP32_TTGO_FTMS.cpp:128:5: error: 'handleEvent' was not declared in this scope
128 | handleEvent(EventType::TREADMILL_SPEED_DOWN);
| ^~~~~~~~~~~
src/ESP32_TTGO_FTMS.cpp: In function 'void inclineUp()':
src/ESP32_TTGO_FTMS.cpp:143:5: error: 'handleEvent' was not declared in this scope
143 | handleEvent(EventType::TREADMILL_INC_UP);
| ^~~~~~~~~~~
src/ESP32_TTGO_FTMS.cpp: In function 'void inclineDown()':
src/ESP32_TTGO_FTMS.cpp:160:5: error: 'handleEvent' was not declared in this scope
160 | handleEvent(EventType::TREADMILL_INC_DOWN);
| ^~~~~~~~~~~
src/hardware.cpp:122:1: error: 'GPIOExtenderAW9523' does not name a type
122 | GPIOExtenderAW9523 GPIOExtender(I2C_0);
| ^~~~~~~~~~~~~~~~~~
src/hardware.cpp: In function 'void reedSwitch_ISR()':
src/hardware.cpp:319:5: warning: '++' expression of 'volatile'-qualified type is deprecated [-Wvolatile]
319 | revCount++;
| ^~~~~~~~
src/hardware.cpp:320:21: warning: compound assignment with 'volatile'-qualified left operand is deprecated [-Wvolatile]
320 | workoutDistance += configTreadmill.belt_distance;
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/hardware.cpp:321:25: warning: compound assignment with 'volatile'-qualified left operand is deprecated [-Wvolatile]
321 | accumulatorInterval += test_elapsed;
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
src/ESP32_TTGO_FTMS.cpp: In function 'void showInfo()':
src/ESP32_TTGO_FTMS.cpp:213:50: error: 'GPIOExtender' was not declared in this scope
213 | String(" GPIOExtender(AW9523): ") + GPIOExtender.isAvailable() + String("\n");
| ^~~~~~~~~~~~
src/ESP32_TTGO_FTMS.cpp: In function 'void setup()':
src/ESP32_TTGO_FTMS.cpp:237:3: error: 'initButton' was not declared in this scope; did you mean 'initMqtt'?
237 | initButton();
| ^~~~~~~~~~
| initMqtt
src/hardware.cpp: In function 'void loopHandleHardware()':
src/hardware.cpp:432:3: error: 'GPIOExtender' was not declared in this scope
432 | GPIOExtender.scanButtons();
| ^~~~~~~~~~~~
src/hardware.cpp:456:27: warning: using value of simple assignment with 'volatile'-qualified left operand is deprecated [-Wvolatile]
456 | t1_valid = t2_valid = false;
| ~~~~~~~~~^~~~~~~
src/ESP32_TTGO_FTMS.cpp:240:3: error: 'initHardware' was not declared in this scope; did you mean 'MockHardware'?
240 | initHardware();
| ^~~~~~~~~~~~
| MockHardware
src/hardware.cpp: In function 'void handleEvent(EventType)':
src/hardware.cpp:474:7: error: 'GPIOExtender' was not declared in this scope
474 | if (GPIOExtender.pressEvent(event)) return;
| ^~~~~~~~~~~~
*** [.pio/build/ESP32_TTGO_DISPLAY/src/display.cpp.o] Error 1
src/ESP32_TTGO_FTMS.cpp: In function 'void loop()':
src/ESP32_TTGO_FTMS.cpp:261:3: error: 'loopHandleHardware' was not declared in this scope
261 | loopHandleHardware();
| ^~~~~~~~~~~~~~~~~~
src/hardware.cpp: In function 'void initGPIOExtender()':
src/hardware.cpp:503:11: error: 'GPIOExtender' was not declared in this scope; did you mean 'initGPIOExtender'?
503 | while (!GPIOExtender.begin())
| ^~~~~~~~~~~~
| initGPIOExtender
src/hardware.cpp: At global scope:
src/hardware.cpp:512:6: error: 'GPIOExtenderAW9523' has not been declared
512 | void GPIOExtenderAW9523::scanButtons(void)
| ^~~~~~~~~~~~~~~~~~
src/hardware.cpp: In function 'void scanButtons()':
src/hardware.cpp:514:7: error: 'enabled' was not declared in this scope
514 | if (enabled) {
| ^~~~~~~
src/hardware.cpp:516:21: error: 'getPins' was not declared in this scope
516 | uint16_t pins = getPins();
| ^~~~~~~
src/ESP32_TTGO_FTMS.cpp:262:3: error: 'loopHandleButton' was not declared in this scope; did you mean 'loopHandleBLE'?
262 | loopHandleButton();
| ^~~~~~~~~~~~~~~~
| loopHandleBLE
src/ESP32_TTGO_FTMS.cpp:268:7: error: 'timer_tick' was not declared in this scope; did you mean 'timer_t'?
268 | if (timer_tick == true) {
| ^~~~~~~~~~
| timer_t
src/ESP32_TTGO_FTMS.cpp:274:17: error: 'getIncline' was not declared in this scope; did you mean 'readIncline'?
274 | incline = getIncline(); // sets global 'angle' and 'incline' variable
| ^~~~~~~~~~
| readIncline
src/hardware.cpp:523:17: error: 'AW9523_KEY_UP' was not declared in this scope
523 | if ((keys & AW9523_KEY_UP) && AW9523_KEY_UP) {
| ^~~~~~~~~~~~~
src/ESP32_TTGO_FTMS.cpp:289:21: error: 'calculateRPM' was not declared in this scope
289 | float rpm = calculateRPM();
| ^~~~~~~~~~~~
src/hardware.cpp:528:17: error: 'AW9523_KEY_LEFT' was not declared in this scope
528 | if ((keys & AW9523_KEY_LEFT) && AW9523_KEY_LEFT) {
| ^~~~~~~~~~~~~~~
src/ESP32_TTGO_FTMS.cpp:292:25: error: 'workoutDistance' was not declared in this scope
292 | totalDistance = workoutDistance / 1000; // conv mm to meter
| ^~~~~~~~~~~~~~~
src/hardware.cpp:533:17: error: 'AW9523_KEY_DOWN' was not declared in this scope
533 | if ((keys & AW9523_KEY_DOWN) && AW9523_KEY_DOWN) {
| ^~~~~~~~~~~~~~~
src/hardware.cpp:538:17: error: 'AW9523_KEY_RIGHT' was not declared in this scope
538 | if ((keys & AW9523_KEY_RIGHT) && AW9523_KEY_RIGHT) {
| ^~~~~~~~~~~~~~~~
src/hardware.cpp:543:17: error: 'AW9523_KEY_OK' was not declared in this scope
543 | if ((keys & AW9523_KEY_OK) && AW9523_KEY_OK) {
| ^~~~~~~~~~~~~
src/hardware.cpp:548:17: error: 'AW9523_KEY_BACK' was not declared in this scope
548 | if ((keys & AW9523_KEY_BACK) && AW9523_KEY_BACK) {
| ^~~~~~~~~~~~~~~
src/hardware.cpp: At global scope:
src/hardware.cpp:560:6: error: 'GPIOExtenderAW9523' has not been declared
560 | void GPIOExtenderAW9523::logPins(void)
| ^~~~~~~~~~~~~~~~~~
src/hardware.cpp: In function 'void logPins()':
src/hardware.cpp:562:7: error: 'enabled' was not declared in this scope
562 | if (enabled) {
| ^~~~~~~
src/hardware.cpp:563:28: error: 'INPUT_PORT0' was not declared in this scope
563 | uint8_t port0 = read(INPUT_PORT0);
| ^~~~~~~~~~~
src/hardware.cpp:564:28: error: 'INPUT_PORT1' was not declared in this scope
564 | uint8_t port1 = read(INPUT_PORT1);
| ^~~~~~~~~~~
src/hardware.cpp: At global scope:
src/hardware.cpp:570:6: error: 'GPIOExtenderAW9523' has not been declared
570 | bool GPIOExtenderAW9523::pressEvent(EventType eventButton)
| ^~~~~~~~~~~~~~~~~~
src/hardware.cpp: In function 'bool pressEvent(EventType)':
src/hardware.cpp:573:7: error: 'enabled' was not declared in this scope
573 | if (enabled) {
| ^~~~~~~
*** [.pio/build/ESP32_TTGO_DISPLAY/src/ESP32_TTGO_FTMS.cpp.o] Error 1
*** [.pio/build/ESP32_TTGO_DISPLAY/src/gui-LVGL.cpp.o] Error 1
src/hardware.cpp:578:52: error: 'AW9523_TREADMILL_START' was not declared in this scope
578 | case EventType::TREADMILL_START: line = AW9523_TREADMILL_START; break;
| ^~~~~~~~~~~~~~~~~~~~~~
src/hardware.cpp:579:52: error: 'AW9523_TREADMILL_SPEED_DOWN' was not declared in this scope
579 | case EventType::TREADMILL_SPEED_DOWN: line = AW9523_TREADMILL_SPEED_DOWN; break;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/hardware.cpp:580:52: error: 'AW9523_TREADMILL_INC_DOWN' was not declared in this scope
580 | case EventType::TREADMILL_INC_DOWN: line = AW9523_TREADMILL_INC_DOWN; break;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
src/hardware.cpp:581:52: error: 'AW9523_TREADMILL_STOP' was not declared in this scope
581 | case EventType::TREADMILL_STOP: line = AW9523_TREADMILL_STOP; break;
| ^~~~~~~~~~~~~~~~~~~~~
src/hardware.cpp:582:52: error: 'AW9523_TREADMILL_SPEED_UP' was not declared in this scope
582 | case EventType::TREADMILL_SPEED_UP: line = AW9523_TREADMILL_SPEED_UP; break;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
src/hardware.cpp:583:52: error: 'AW9523_TREADMILL_INC_UP' was not declared in this scope
583 | case EventType::TREADMILL_INC_UP: line = AW9523_TREADMILL_INC_UP; break;
| ^~~~~~~~~~~~~~~~~~~~~~~
src/hardware.cpp:600:18: error: 'CONFIG_PORT0' was not declared in this scope
600 | if (!write(CONFIG_PORT0,~port0Bit)) return false; //0-output 1-input
| ^~~~~~~~~~~~
src/hardware.cpp:602:18: error: 'OUTPUT_PORT0' was not declared in this scope
602 | if (!write(OUTPUT_PORT0,~port0Bit)) return false; //0-low 1-high
| ^~~~~~~~~~~~
src/hardware.cpp:605:13: error: 'TREADMILL_BUTTON_PRESS_SIGNAL_TIME_MS' was not declared in this scope
605 | delay(TREADMILL_BUTTON_PRESS_SIGNAL_TIME_MS);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/hardware.cpp:608:18: error: 'OUTPUT_PORT0' was not declared in this scope
608 | if (!write(OUTPUT_PORT0,0xff)) return false; //0-low 1-high
| ^~~~~~~~~~~~
src/hardware.cpp:610:18: error: 'CONFIG_PORT0' was not declared in this scope
610 | if (!write(CONFIG_PORT0,0xff)) return false; //0-output 1-input
| ^~~~~~~~~~~~
src/hardware.cpp:616:18: error: 'CONFIG_PORT1' was not declared in this scope
616 | if (!write(CONFIG_PORT1,~port1Bit)) return false; //0-output 1-input
| ^~~~~~~~~~~~
src/hardware.cpp:618:18: error: 'OUTPUT_PORT1' was not declared in this scope
618 | if (!write(OUTPUT_PORT1,port1Bit)) return false; //0-low 1-high
| ^~~~~~~~~~~~
src/hardware.cpp:621:13: error: 'TREADMILL_BUTTON_PRESS_SIGNAL_TIME_MS' was not declared in this scope
621 | delay(TREADMILL_BUTTON_PRESS_SIGNAL_TIME_MS);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/hardware.cpp:624:18: error: 'OUTPUT_PORT1' was not declared in this scope
624 | if (!write(OUTPUT_PORT1,0xff)) return false; //0-low 1-high
| ^~~~~~~~~~~~
src/hardware.cpp:626:18: error: 'CONFIG_PORT1' was not declared in this scope
626 | if (!write(CONFIG_PORT1,0xff)) return false; //0-output 1-input
| ^~~~~~~~~~~~
src/hardware.cpp: At global scope:
src/hardware.cpp:633:9: error: 'GPIOExtenderAW9523' has not been declared
633 | uint8_t GPIOExtenderAW9523::read(uint8_t reg, bool i2cHandled)
| ^~~~~~~~~~~~~~~~~~
src/hardware.cpp: In function 'uint8_t read(uint8_t, bool)':
src/hardware.cpp:640:3: error: 'wire' was not declared in this scope; did you mean 'Wire'?
640 | wire->beginTransmission(AW9523_ADDR);
| ^~~~
| Wire
src/hardware.cpp:640:27: error: 'AW9523_ADDR' was not declared in this scope
640 | wire->beginTransmission(AW9523_ADDR);
| ^~~~~~~~~~~
src/hardware.cpp: At global scope:
src/hardware.cpp:652:9: error: 'GPIOExtenderAW9523' has not been declared
652 | uint8_t GPIOExtenderAW9523::read(uint8_t reg)
| ^~~~~~~~~~~~~~~~~~
src/hardware.cpp:657:6: error: 'GPIOExtenderAW9523' has not been declared
657 | bool GPIOExtenderAW9523::write(uint8_t reg, uint8_t data)
| ^~~~~~~~~~~~~~~~~~
src/hardware.cpp: In function 'bool write(uint8_t, uint8_t)':
src/hardware.cpp:662:3: error: 'wire' was not declared in this scope; did you mean 'Wire'?
662 | wire->beginTransmission(AW9523_ADDR);
| ^~~~
| Wire
src/hardware.cpp:662:27: error: 'AW9523_ADDR' was not declared in this scope
662 | wire->beginTransmission(AW9523_ADDR);
| ^~~~~~~~~~~
src/hardware.cpp: At global scope:
src/hardware.cpp:674:6: error: 'GPIOExtenderAW9523' has not been declared
674 | bool GPIOExtenderAW9523::begin()
| ^~~~~~~~~~~~~~~~~~
src/hardware.cpp: In function 'bool begin()':
src/hardware.cpp:676:3: error: 'enabled' was not declared in this scope
676 | enabled = false;
| ^~~~~~~
src/hardware.cpp:677:3: error: 'isInterrupted' was not declared in this scope; did you mean 'noInterrupts'?
677 | isInterrupted = false;
| ^~~~~~~~~~~~~
| noInterrupts
src/hardware.cpp:678:21: error: 'ID' was not declared in this scope; did you mean 'id'?
678 | uint8_t id = read(ID);
| ^

| id
src/hardware.cpp:681:13: error: 'ID_AW9523' was not declared in this scope
681 | if (id != ID_AW9523) {
| ^~~~~~~~~
src/hardware.cpp:685:14: error: 'OUTPUT_PORT0' was not declared in this scope
685 | if (!write(OUTPUT_PORT0,0xff)) return false; //0-low 1-high
| ^~~~~~~~~~~~
src/hardware.cpp:686:14: error: 'OUTPUT_PORT1' was not declared in this scope
686 | if (!write(OUTPUT_PORT1,0xff)) return false; //0-low 1-high
| ^~~~~~~~~~~~
src/hardware.cpp:689:14: error: 'CONFIG_PORT0' was not declared in this scope
689 | if (!write(CONFIG_PORT0,0xff)) return false; //0-output 1-input
| ^~~~~~~~~~~~
src/hardware.cpp:690:14: error: 'CONFIG_PORT1' was not declared in this scope
690 | if (!write(CONFIG_PORT1,0xff)) return false; //0-output 1-input
| ^~~~~~~~~~~~
src/hardware.cpp:692:14: error: 'CTL' was not declared in this scope
692 | if (!write(CTL,0x08)) return false; //0000x000 0-Open Drain 1-Push-Pull
| ^~~
src/hardware.cpp:694:14: error: 'INT_PORT0' was not declared in this scope
694 | if (!write(INT_PORT0,0xff)) return false; //0-enable 1-disable
| ^~~~~~~~~
src/hardware.cpp:695:14: error: 'INT_PORT1' was not declared in this scope
695 | if (!write(INT_PORT1,0xff)) return false; //0-enable 1-disable
| ^~~~~~~~~
src/hardware.cpp:697:14: error: 'LED_MODE_SWITCH0' was not declared in this scope
697 | if (!write(LED_MODE_SWITCH0,0xff)) return false; //0-LED mode 1-GPIO mode
| ^~~~~~~~~~~~~~~~
src/hardware.cpp:698:14: error: 'LED_MODE_SWITCH1' was not declared in this scope
698 | if (!write(LED_MODE_SWITCH1,0xff)) return false; //0-LED mode 1-GPIO mode
| ^~~~~~~~~~~~~~~~
src/hardware.cpp:700:3: error: 'getPins' was not declared in this scope
700 | getPins();
| ^~~~~~~
src/hardware.cpp: At global scope:
src/hardware.cpp:704:6: error: 'GPIOExtenderAW9523' has not been declared
704 | bool GPIOExtenderAW9523::isAvailable()
| ^~~~~~~~~~~~~~~~~~
src/hardware.cpp: In function 'bool isAvailable()':
src/hardware.cpp:706:10: error: 'enabled' was not declared in this scope
706 | return enabled;
| ^~~~~~~
src/hardware.cpp: At global scope:
src/hardware.cpp:709:10: error: 'GPIOExtenderAW9523' has not been declared
709 | uint16_t GPIOExtenderAW9523::getPins(void)
| ^~~~~~~~~~~~~~~~~~
src/hardware.cpp: In function 'uint16_t getPins()':
src/hardware.cpp:711:7: error: 'enabled' was not declared in this scope
711 | if (enabled) {
| ^~~~~~~
src/hardware.cpp:712:5: error: 'isInterrupted' was not declared in this scope; did you mean 'noInterrupts'?
712 | isInterrupted = false;
| ^~~~~~~~~~~~~
| noInterrupts
src/hardware.cpp:717:26: error: 'INPUT_PORT0' was not declared in this scope
717 | uint8_t port0 = read(INPUT_PORT0,true);
| ^~~~~~~~~~~
src/hardware.cpp:718:26: error: 'INPUT_PORT1' was not declared in this scope
718 | uint8_t port1 = read(INPUT_PORT1,true);
| ^~~~~~~~~~~
src/hardware.cpp: At global scope:
src/hardware.cpp:726:6: error: 'GPIOExtenderAW9523' has not been declared
726 | bool GPIOExtenderAW9523::checkInterrupt(void)
| ^~~~~~~~~~~~~~~~~~
src/hardware.cpp: In function 'bool checkInterrupt()':
src/hardware.cpp:728:11: error: 'enabled' was not declared in this scope
728 | return (enabled && isInterrupted);
| ^~~~~~~
src/hardware.cpp:728:22: error: 'isInterrupted' was not declared in this scope; did you mean 'noInterrupts'?
728 | return (enabled && isInterrupted);
| ^~~~~~~~~~~~~
| noInterrupts
*** [.pio/build/ESP32_TTGO_DISPLAY/src/hardware.cpp.o] Error 1
================================================================================= [FAILED] Took 11.61 seconds =================================================================================

Environment Status Duration


ESP32_TTGO_DISPLAY FAILED 00:00:11.608
============================================================================ 1 failed, 0 succeeded in 00:00:11.608 ============================================================================

  • The terminal process "platformio 'run', '--environment', 'ESP32_TTGO_DISPLAY'" terminated with exit code: 1.
  • Terminal will be reused by tasks, press any key to close it.

@cprasmu
Copy link
Author

cprasmu commented Dec 6, 2024

not sure why mine would behave differently?

@lefty01
Copy link
Owner

lefty01 commented Dec 13, 2024

I had little more time ... now my compile fails as well after changing from NimBLE-Arduino to esp-nimble-cpp (that was some suggestion somewhere ;) )

for me looks like this now

Building in release mode
Compiling .pio/build/ESP32_TTGO_DISPLAY/src/net-control.cpp.o
Compiling .pio/build/ESP32_TTGO_DISPLAY/libcb3/esp-nimble-cpp/NimBLEUtils.cpp.o
Archiving .pio/build/ESP32_TTGO_DISPLAY/libb48/libButton2.a
Indexing .pio/build/ESP32_TTGO_DISPLAY/libb48/libButton2.a
Archiving .pio/build/ESP32_TTGO_DISPLAY/lib6ab/libTime.a
Indexing .pio/build/ESP32_TTGO_DISPLAY/lib6ab/libTime.a
Archiving .pio/build/ESP32_TTGO_DISPLAY/libabc/libWire.a
Indexing .pio/build/ESP32_TTGO_DISPLAY/libabc/libWire.a
Archiving .pio/build/ESP32_TTGO_DISPLAY/liba74/libMPU6050_light.a
.pio/libdeps/ESP32_TTGO_DISPLAY/esp-nimble-cpp/src/NimBLEUtils.cpp:31:43: error: 'CONFIG_NIMBLE_CPP_FREERTOS_TASK_BLOCK_BIT' was not declared in this scope
   31 | constexpr uint32_t TASK_BLOCK_BIT = (1 << CONFIG_NIMBLE_CPP_FREERTOS_TASK_BLOCK_BIT);
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Indexing .pio/build/ESP32_TTGO_DISPLAY/liba74/libMPU6050_light.a
Compiling .pio/build/ESP32_TTGO_DISPLAY/lib521/AsyncUDP/AsyncUDP.cpp.o
*** [.pio/build/ESP32_TTGO_DISPLAY/libcb3/esp-nimble-cpp/NimBLEUtils.cpp.o] Error 1
src/net-control.cpp: In function 'void setupDeviceID()':
src/net-control.cpp:166:3: error: 'esp_efuse_mac_get_default' was not declared in this scope
  166 |   esp_efuse_mac_get_default(macAddr);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~
src/net-control.cpp: In function 'void initBLE()':
src/net-control.cpp:198:17: error: 'class NimBLEAdvertising' has no member named 'setScanResponse'; did you mean 'setScanResponseData'?
  198 |   pAdvertising->setScanResponse(true);
      |                 ^~~~~~~~~~~~~~~
      |                 setScanResponseData
*** [.pio/build/ESP32_TTGO_DISPLAY/src/net-control.cpp.o] Error 1
======================================================================================== [FAILED] Took 6.13 seconds ========================================================================================

@lefty01
Copy link
Owner

lefty01 commented Dec 13, 2024

will need some more time on this later ... sorry not much help so far

@cprasmu
Copy link
Author

cprasmu commented Dec 13, 2024 via email

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

2 participants