cancel
Showing results for 
Search instead for 
Did you mean: 

Issue Building CM0Plus project

lame_stmr
Associate

Hello,

Context: New to stm and HAL. Creating a new dual-core STM32 project on a NUCLEO-WL55JC1 board. Starting from cubeMX generated code with basically only RTC initialized on Core M4. Using STM32CubeWL Firmware package v1.3.1 . M4 builds and loads good.

Issue: M0 does not build and I get these errors and warnings:

1. C:/Users/Person/Documents/STM32CubeIDE/workspace_LoRaWPC/noTomorrow/Drivers/STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_uart.c: In function 'HAL_UART_Transmit_IT':
../../Drivers/CMSIS/Device/ST/STM32WLxx/Include/stm32wlxx.h:209:13: warning: implicit declaration of function '__LDREXW' [-Wimplicit-function-declaration]
209 | val = __LDREXW((__IO uint32_t *)&(REG)) | (BIT); \
| ^~~~~~~~
C:/Users/Person/Documents/STM32CubeIDE/workspace_LoRaWPC/noTomorrow/Drivers/STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_uart.c:1373:7: note: in expansion of macro 'ATOMIC_SET_BIT'

I get a similar warning for '__STREXW'

2. Then 9 of these type errors:

C:/Users/Person/Documents/STM32CubeIDE/workspace_LoRaWPC/noTomorrow/Drivers/STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_uart.c:3468:(.text.UART_WaitOnFlagUntilTimeout+0x36): undefined reference to `__LDREXW'

C:/ST/STM32CubeIDE_1.19.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/Person/Documents/STM32CubeIDE/workspace_LoRaWPC/noTomorrow/Drivers/STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_uart.c:3468:(.text.UART_WaitOnFlagUntilTimeout+0x50): undefined reference to `__STREXW'

Could anyone please help me? Is there a problem with my toolchain or configuration or something? Also, why would these issues be coming from the hal uart c file if im only using RTC in M4? I'd really appreciate a clarification. Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions

The CM0 core is reserved for the wireless firmware, which is provided by ST in binary form. Yes, it does accept commands from the user firmware running on the CM4 core.

Please use your time and read the getting started & product info documentation for this chip.

If you need immediate help with coding or hardware design, it may be found here.

 

View solution in original post

4 REPLIES 4
Pavel A.
Super User

Why are you writing code for the CM0 core? Are you trying to customize or hack the wireless part?

If not - just use the CM4 core. It is intended for general purpose programming.

 

lame_stmr
Associate

Hi,

There is no code written on M0 except for the cube MX auto gen stuff. Either way, I should at the very least be able to build it right? Idk why I'm getting these errors.

My ultimate goal was to design a system that hosts the radio app and traffic control directly on M0 while the M4 core does some other tasks, one of which would be signaling M0 to send packets, sleep, etc. Is this feasible? I'm still getting into things and trying to figure what I can do. 

I'm using the SubGHz_Phy_PingPong_DualCore application example given in the firmware package as reference. However, this project hosts the radio app on M4 while M0 manages the traffic.

For my purposes, have I made a mistake in my understanding of how to program the chip? Thank you for the reply!

TDK
Super User

HAL libraries for that chip are meant for the M4 core--the LDREX/STREX instructions don't exist on the M0+ core. I don't believe the M0+ core is available to the user in any real capacity.

If you feel a post has answered your question, please click "Accept as Solution".

The CM0 core is reserved for the wireless firmware, which is provided by ST in binary form. Yes, it does accept commands from the user firmware running on the CM4 core.

Please use your time and read the getting started & product info documentation for this chip.

If you need immediate help with coding or hardware design, it may be found here.