Quantcast
Viewing all articles
Browse latest Browse all 5402

SDK • Static library not statically linking pico_stdlib

Hello,

I'm trying to make bindings to this project https://github.com/raspberrypi/pico-tflmicro. The issue is that linking fails because the pico_stdlib's symbols aren't also getting linked in.

I can tell this because upon doing...

Code:

nm libpico-tflmicro.a | grep " U "
I get the following results, showing that this are all unlinked symbols. And they are all defined within pico_stdlib

Code:

         U stdio_uart_init         U strlen         U time_us_64         U vfctprintf         U vprintf         U gpio_set_function         U stdio_set_driver_enabled         U uart_char_to_line_feed         U uart_init         U __StackOneBottom         U __assert_func         U at_the_end_of_time         U hw_claim_lock         U hw_claim_unlock         U irq_init_priorities         U irq_is_enabled         U irq_set_enabled         U irq_set_exclusive_handler         U mutex_enter_block_until         U mutex_exit         U mutex_init         U time_us_64
Here is the CMakelists

Code:

cmake_minimum_required(VERSION 3.12)# Pull in PICO SDK (must be before project)include(pico_sdk_import.cmake)project(pico-tflmicro C CXX ASM)set(CMAKE_C_STANDARD 11)set(CMAKE_CXX_STANDARD 11)pico_sdk_init()add_library(pico-tflmicro STATIC)target_include_directories(pico-tflmicro  PUBLIC  ${CMAKE_CURRENT_LIST_DIR}/src/  ${CMAKE_CURRENT_LIST_DIR}/src/third_party/ruy  ${CMAKE_CURRENT_LIST_DIR}/src/third_party/gemmlowp  ${CMAKE_CURRENT_LIST_DIR}/src/third_party/kissfft  ${CMAKE_CURRENT_LIST_DIR}/src/third_party/flatbuffers  ${CMAKE_CURRENT_LIST_DIR}/src/third_party/cmsis/CMSIS/Core/Include  ${CMAKE_CURRENT_LIST_DIR}/src/third_party/flatbuffers/include  ${CMAKE_CURRENT_LIST_DIR}/src/third_party/cmsis_nn/Include)target_compile_definitions(  pico-tflmicro  PUBLIC  COMPILE_DEFINITIONS TF_LITE_DISABLE_X86_NEON=1  COMPILE_DEFINITIONS TF_LITE_STATIC_MEMORY=1  COMPILE_DEFINITIONS TF_LITE_USE_CTIME=1  COMPILE_DEFINITIONS CMSIS_NN=1  COMPILE_DEFINITIONS ARDUINO=1  COMPILE_DEFINITIONS TFLITE_USE_CTIME=1)set_target_properties(  pico-tflmicro  PROPERTIES  COMPILE_FLAGS -Os  COMPILE_FLAGS -fno-rtti  COMPILE_FLAGS -fno-exceptions  COMPILE_FLAGS -fno-threadsafe-statics  COMPILE_FLAGS -nostdlib)target_link_libraries(  pico-tflmicro  pico_stdlib  pico_multicore)target_sources(pico-tflmicro  PRIVATE  ${CMAKE_CURRENT_LIST_DIR}/wrapped/src/wrapped.cpp  ${CMAKE_CURRENT_LIST_DIR}/wrapped/src/wrapped.h...  ${CMAKE_CURRENT_LIST_DIR}/src/signal/micro/kernels/delay.cpp  ${CMAKE_CURRENT_LIST_DIR}/src/signal/micro/kernels/delay_flexbuffers_generated_data.h)
Is there any way to fix this issue? Does anyone have any clues? I would greatly appreciate any help!

Statistics: Posted by BjornTheProgrammer — Tue Apr 23, 2024 9:52 am



Viewing all articles
Browse latest Browse all 5402

Trending Articles