RoboticsBrno / Logic_library

🪛 Library for Logic board designed by Renata Zemanová.
https://roboticsbrno.github.io/Logic_library/
MIT License
0 stars 2 forks source link

Not able to build the examples on Windows #15

Open JarekParal opened 1 year ago

JarekParal commented 1 year ago

I tried to build buzzer example with VS Code and PlatformIO, but I got a compilation error: undefined reference to 'logicMain()'

Do I miss any setting in the PlatformIO or CMake options? Should I be able to build the examples directly from examples folder via PlatformIO plugin in VS Code @Tasssadar?

Whole compilation log:

 *  Executing task: C:\Users\paral\.platformio\penv\Scripts\platformio.exe run --environment logic_1_1 

Processing logic_1_1 (board: esp32dev; platform: espressif32@6.3.2; framework: espidf)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (6.3.2) > 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-espidf @ 3.50002.230601 (5.0.2)
 - tool-cmake @ 3.16.4
 - tool-esptoolpy @ 1.40501.0 (4.5.1)
 - tool-idf @ 1.0.1
 - tool-mconf @ 1.4060000.20190628 (406.0.0)
 - tool-ninja @ 1.9.0
 - toolchain-esp32ulp @ 1.23500.220830 (2.35.0)
 - toolchain-xtensa-esp32 @ 11.2.0+2022r1
Reading CMake configuration...
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 2 compatible libraries
Scanning dependencies...
Dependency Graph
|-- SmartLeds @ 3.1.2
|-- eventpp @ 0.1.1
Building in debug mode
Linking .pio\build\logic_1_1\firmware.elf
c:/users/paral/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/11.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\logic_1_1\src\Logic.o:(.literal.app_main+0x4): undefined reference to `logicMain()'
c:/users/paral/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/11.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\logic_1_1\src\Logic.o: in function `app_main':
C:\sandbox\Track\_RoboticsBrno.github.com\Logic_library/src/Logic.cpp:79: undefined reference to `logicMain()'
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\logic_1_1\firmware.elf] Error 1
================================================================================================== [FAILED] Took 11.52 seconds ==================================================================================================
Environment    Status    Duration
-------------  --------  ------------
logic_1_1      FAILED    00:00:11.520
============================================================================================= 1 failed, 0 succeeded in 00:00:11.520 =============================================================================================
 *  The terminal process "C:\Users\paral\.platformio\penv\Scripts\platformio.exe 'run', '--environment', 'logic_1_1'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 
Tasssadar commented 1 year ago

Are you opening the right folder? You need to open each example's folder separetly in VSCode, not the root of the repo - ie. Click "open folder" and go to <root of this repo>/examples/buzzer and build that.