Failing to get ULP examples working on ESP32-S3

After failing misserably with this code:

I am now working with this code:

And specifically with the ulp-counter example code (unchanged from the example).

And referring to the patient work here:

It builds for env:ESP32 but when I try to go up to ESP32-S3, no joy.

my platformio.ini:

platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
;framework = espidf
monitor_speed = 115200
upload_speed = 921600
build_flags = 

lib_ldf_mode = deep
lib_extra_dirs = ~/Documents/Arduino/libraries
lib_deps =
extra_scripts =

Errors at build time:

In file included from src/ulp_counter.cpp:8:
.pio/libdeps/esp32-s3-devkitc-1/ulptool-pio/src/include/ulptool/ulptool.h: In function 'esp_err_t ulptool_load_binary(uint32_t, const uint8_t*, size_t)':
.pio/libdeps/esp32-s3-devkitc-1/ulptool-pio/src/include/ulptool/ulptool.h:29:25: error: 'CONFIG_ULP_COPROC_RESERVE_MEM' was not declared in this scope
   if (load_addr_bytes > CONFIG_ULP_COPROC_RESERVE_MEM) {
.pio/libdeps/esp32-s3-devkitc-1/ulptool-pio/src/include/ulptool/ulptool.h:29:25: note: suggested alternative: 'CONFIG_ESP32S3_ULP_COPROC_RESERVE_MEM'
   if (load_addr_bytes > CONFIG_ULP_COPROC_RESERVE_MEM) {
.pio/libdeps/esp32-s3-devkitc-1/ulptool-pio/src/include/ulptool/ulptool.h:33:46: error: 'CONFIG_ULP_COPROC_RESERVE_MEM' was not declared in this scope
   if (load_addr_bytes + program_size_bytes > CONFIG_ULP_COPROC_RESERVE_MEM) {
.pio/libdeps/esp32-s3-devkitc-1/ulptool-pio/src/include/ulptool/ulptool.h:33:46: note: suggested alternative: 'CONFIG_ESP32S3_ULP_COPROC_RESERVE_MEM'
   if (load_addr_bytes + program_size_bytes > CONFIG_ULP_COPROC_RESERVE_MEM) {
*** [.pio\build\esp32-s3-devkitc-1\src\ulp_counter.cpp.o] Error 1

Anyone been able to get the ULP examples working with S3 and have any advice?

Hi @petedd ! I’m not sure it’s possible with the Arduino framework. The latest Arduino core v2.0.7 is based on IDF v4.4 and according to this topic the ULP in ESP32-S3 was not supported at that moment.

Thank you Valeros. That is very unfortunate. I can try the idf framework but then I guess I will have to figure out what dependencies I have on Arduino.h and prepare a different .h to work with code I already have (big project).