STMicroelectronics / STM32CubeMP13

Other
18 stars 6 forks source link

Problems compiling CMSIS-RTOS library in ARM A7 firmware #3

Closed SteMMo33 closed 2 months ago

SteMMo33 commented 4 months ago

Hi all, I'm writing a firmware for STM32MP135 A7 ARM micro. I'd like to include CMSIS-RTOS2 libraries and compile a simple basic program (to blink 2 LEDS in 2 different threads) by gcc cross toolchain and Eclipse IDE. To include CMSIS library I downloaded the STM32CubeMP13-main.zip from the actual repo and extracted the folders:

Middlewares/ST/cmsis_rtos_threadx/* (for cmsis_os2.c file)
Middlewares/ST/threadx/common/*
Middlewares/ST/threadx/ports/cortex_a7/gnu/*

The compilation is globally correct; but while linking I have 3 problems I'm not able to solve:

  undefined reference to `_tx_initialize_low_level' - if I add the file cortex_a7/example_build/tx_initialize_low_level.S I have the error: multiple definition of `__tx_swi_interrupt';
 undefined reference to '__get_IPSR'
 undefined reference to `SystemCoreClockUpdate'

The source code wa writtin for other STM32 micro so I can expect that some symbols/function could not be compatible with STM32MP1 family, but the first two symbols in the error list are entered by the library, not by the main() function. I'm wondering if SystemCoreClockUpdate call is really needed.

Should the _tx_initialize_low_level function present is my custom source file?

Thanks

SteMMo33 commented 2 months ago

Solved with STM32Cube set