ESP32 custom component with ULP code link failure

cbaurtx
Posts: 14
Joined: Sun May 10, 2020 9:24 am

ESP32 custom component with ULP code link failure

Postby cbaurtx » Fri Apr 09, 2021 5:24 pm

I wrote a custom component (keypad_rotdecode) which also uses some ULP code (debounce_decode.S).
This is the directory structure:

build
components
____ keypad_rotdecode
________ include
________ ulp
main

The project root has this CMakeLists.txt

Code: Select all

cmake_minimum_required(VERSION 3.5)

set(SUPPORTED_TARGETS esp32)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(keypad_rotdecode)
The /components/keypad_rotdecode/ directory has this CMakeLists.txt

Code: Select all

idf_component_register(SRCS "keypad_rotdecode.c"
                    INCLUDE_DIRS "include"
                    REQUIRES ulp)

set(ulp_app_name "ulp_debounce_decode")
set(ulp_s_sources "ulp/debounce_decode.S")
set(ulp_exp_dep_srcs "keypad_rotdecode.c")
ulp_embed_binary(${ulp_app_name} "${ulp_s_sources}" "${ulp_exp_dep_srcs}")
When building the project I get the following error:
[3/4] Linking CXX executable keypad_rotdecode.elf
FAILED: keypad_rotdecode.elf

and later:
undefined reference to `reg_wait_task'
and more like this. These functions are defined in the C code residing in
/components/keypad_rotdecode/

This seems to be similar to the issue reported here:
https://forums.freertos.org/t/integrati ... rtos/11822

Any ideas?

cbaurtx
Posts: 14
Joined: Sun May 10, 2020 9:24 am

Re: ESP32 custom component with ULP code link failure

Postby cbaurtx » Thu Apr 15, 2021 4:30 pm

i was able to fix that myself.
The working code is here:
https://github.com/cbaurtx/ESP32_keypad_rotdecode

Who is online

Users browsing this forum: atx823, brushlow18, Google [Bot] and 232 guests