ESP32 custom component with ULP: Link failure

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

ESP32 custom component with ULP: Link failure

Postby cbaurtx » Fri Apr 09, 2021 9:33 pm

I created a custom ESP32 component to poll some buttons and a knob with a rotary encoder. Polling and debouncing and decoding is carried out by the ULP. Unfortunately my codes does not link.
https://github.com/cbaurtx/ESP32_keypad_rotdecode

The directory structure is like this:
main
components/keypad_rotdecode
components/keypad_rotdecode/include
components/keypad_rotdecode/ulp
build

Root 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)
components/keypad_rotdecode/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 this as first error:
Linking CXX executable keypad_rotdecode.elf
FAILED: keypad_rotdecode.elf
and later missing symbols defined in the header of the component include file.

This may be a similar case:
https://forums.freertos.org/t/integrati ... rtos/11822

I am clueless....

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

Re: ESP32 custom component with ULP: Link failure

Postby cbaurtx » Sat Apr 10, 2021 6:51 pm

I did some digging...
It seems that the command ulp_embed_binary creates executables only. So no code for libraries :cry:

Who is online

Users browsing this forum: No registered users and 292 guests