idf_component_register( INCLUDE_DIRS
SRCS
"main.cpp"
"application/application.cpp"
)
# The ULP app name must be unique (if multiple components use ULP).
set(ulp_app_name ulp_main)
# Specify all assembly source files.
# Files should be placed into a separate directory (in this case, ulp/), which should not be added to COMPONENT_SRCS.
set(ulp_s_sources "../ulp/ulp.S")
# List all the component source files which include automatically generated ULP export file, ${ulp_app_name}.h:
set(ulp_exp_dep_srcs "main.cpp")
# Call function to build ULP binary and embed in project using the argument values above.
ulp_embed_binary(${ulp_app_name} ${ulp_s_sources} ${ulp_exp_dep_srcs})
Processing debug (board: esp32dev; platform: espressif32; framework: arduino, espidf)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (3.1.0) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (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 0.0.0+sha.d011dd7
- framework-espidf 3.40001.200521 (4.0.1)
- tool-cmake 3.16.4
- tool-esptoolpy 1.30000.201119 (3.0.0)
- tool-idf 1.0.1
- tool-mconf 1.4060000.20190628 (406.0.0)
- tool-ninja 1.9.0
- toolchain-esp32ulp 1.22851.191205 (2.28.51)
- toolchain-xtensa32 2.80400.210211 (8.4.0)
Reading CMake configuration...
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 1 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <MCCI LoRaWAN LMIC library> 3.3.0
Building in debug mode
Generating ULP configuration
CMake Error at C:/.../.platformio/packages/tool-cmake/share/cmake-3.16/Modules/CMakeDetermineSystem.cmake:99 (message):
Could not find toolchain file:
C:\...\.platformio\packages\framework-espidf\components\ulp\cmake\toolchain-esp32-ulp.cmake
Call Stack (most recent call first):
CMakeLists.txt:4 (project)
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_ASM_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
Compiling .pio\build\debug\app_trace\host_file_io.o
Compiling .pio\build\debug\app_trace\gcov\gcov_rtio.o
Compiling .pio\build\debug\app_update\esp_ota_ops.o
Compiling .pio\build\debug\app_update\esp_app_desc.o
Compiling .pio\build\debug\asio\asio\asio\src\asio.o
Compiling .pio\build\debug\bootloader_support\src\bootloader_clock.o
Compiling .pio\build\debug\bootloader_support\src\bootloader_common.o
*** [.pio\build\debug\esp-idf\src\ulp_main\build.ninja] Error 1
Edit
It is working with espressif32@1.12.4. The difference between both releases is that 1.12.4 is using tool-esptoolpy 1.20600.0 (2.6.0) and toolchain-xtensa32 2.80200.200827 (8.2.0). So the issue comes from one of these tools.
I try to add a ULP code to my existing PlattformIO project. I do the following steps:
ulp
in the root of my project directoryulp.S
to that directorymenuconfig
CMakeLists.txt
in thesrc
directorymain.cpp
to load the ULP codeulp.S (no function yet)
CMakeLists.txt (root directory)
CMakeLists.txt (
src
directory)main.cpp
plattformio.ini
I got the following message during compilation:
Edit
It is working with
espressif32@1.12.4
. The difference between both releases is that1.12.4
is usingtool-esptoolpy 1.20600.0 (2.6.0)
andtoolchain-xtensa32 2.80200.200827 (8.2.0)
. So the issue comes from one of these tools.What´s wrong here?