Skip to main content
Associate III
April 4, 2025
Question

STM32WL5MOC Delevopment Issues

  • April 4, 2025
  • 4 replies
  • 973 views

Hello everyone,

 

I'm trying to setup a STL32CubeIDE project with a custom STM32WL5MOCH6 MCU. I managed to test if the board is alive with a simple hello world debug print on SWV and there's no issues.

 

The problem starts when I enable the LORAWAN middleware (EndNode Skeleton Application):

yaxsomo_0-1743808292364.png

For this i have to enable IPCC, ADC and RTC : 

yaxsomo_1-1743808352997.png

yaxsomo_2-1743808375160.pngyaxsomo_3-1743808396473.png

But when i generate the code and build the project i get those errors :

- CM4 : 

../Core/Src/usart_if.c:107:3: warning: implicit declaration of function 'MX_DMA_Init'; did you mean 'MX_RTC_Init'? [-Wimplicit-function-declaration]
 107 | MX_DMA_Init();
 | ^~~~~~~~~~~
 | MX_RTC_Init
../Core/Src/usart_if.c:108:3: warning: implicit declaration of function 'MX_USART1_UART_Init' [-Wimplicit-function-declaration]
 108 | MX_USART1_UART_Init();
 | ^~~~~~~~~~~~~~~~~~~
arm-none-eabi-gcc -o "aerosentinel_echo_CM4.elf" @"objects.list" -mcpu=cortex-m4 -T"C:\Users\Yassine DEHHANI\Documents\aerosentinel-echo\CM4\STM32WL5MOCHX_FLASH.ld" --specs=nosys.specs -Wl,-Map="aerosentinel_echo_CM4.map" -Wl,--gc-sections -static --specs=nano.specs -mfloat-abi=soft -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
C:/ST/STM32CubeIDE_1.15.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Core/Src/timer_if.o:C:/Users/Yassine DEHHANI/Documents/aerosentinel-echo/CM4/Debug/../Core/Src/timer_if.c:36: multiple definition of `hrtc'; ./Core/Src/main.o:C:/Users/Yassine DEHHANI/Documents/aerosentinel-echo/CM4/Debug/../Core/Src/main.c:48: first defined here
C:/ST/STM32CubeIDE_1.15.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Core/Src/usart_if.o: in function `vcom_Init':
C:/Users/Yassine DEHHANI/Documents/aerosentinel-echo/CM4/Debug/../Core/Src/usart_if.c:107: undefined reference to `MX_DMA_Init'
C:/ST/STM32CubeIDE_1.15.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/Yassine DEHHANI/Documents/aerosentinel-echo/CM4/Debug/../Core/Src/usart_if.c:108: undefined reference to `MX_USART1_UART_Init'
C:/ST/STM32CubeIDE_1.15.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Core/Src/usart_if.o: in function `vcom_Resume':
C:/Users/Yassine DEHHANI/Documents/aerosentinel-echo/CM4/Debug/../Core/Src/usart_if.c:217: undefined reference to `hdma_usart1_tx'
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:68: aerosentinel_echo_CM4.elf] Error 1
"make -j12 all" terminated with exit code 2. Build might be incomplete.


- CM0+: 

C:/Users/Yassine DEHHANI/Documents/aerosentinel-echo/Middlewares/Third_Party/LoRaWAN/Mac/LoRaMac.c:1650:40: error: 'McpsIndication_t' {aka 'struct sMcpsIndication'} has no member named 'ResponseTimeout'
 1650 | ( MacCtx.McpsIndication.ResponseTimeout > 0 ) )
 | ^
make: *** [Middlewares/Third_Party/LoRaWAN/subdir.mk:121: Middlewares/Third_Party/LoRaWAN/LoRaMac.o] Error 1
make: *** Waiting for unfinished jobs....
"make -j12 all" terminated with exit code 2. Build might be incomplete.

 

Can someone explain to me why is this happening ?

4 replies

STTwo-32
Technical Moderator
April 5, 2025

Hello @yaxsomo 

Have you tested this behavior using the STM32CubeMX V6.14.0, the STM32CubeIDE V1.18.0 and the STM32CubeWL V1.3.1. If so, could you please attach your .ioc file.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
yaxsomoAuthor
Associate III
April 7, 2025

Hello @STTwo-32 

 

Sorry for the late reply.
I've just migrated the project to the version you mentionned, but I have the same issues. I'll link the .ioc file below.

yaxsomoAuthor
Associate III
April 8, 2025

I have some updates! I managed to solve the errors that i got, but now when i launch a debug session I'm struggling to launch the M0+ core correctly. Here's my debug configurations:  

M4 : 

 

yaxsomo_0-1744144623774.png

yaxsomo_1-1744144635493.png

 

M0+:

 

yaxsomo_2-1744144656469.pngyaxsomo_3-1744144667466.png


So in my scenario, i launch the Debug session on the M4 Core first and click on Resume. The result on TeraTerm is the following :

 

4194303s999:
CM4: System Initialization started
4194303s999:CM4: System Initialization done: Wait for CM0PLUS

And here's the screenshot of CubeIDE : 

yaxsomo_4-1744144928212.png

 

Then i launch the Debug session on the M0+ core but I'm not able to click on the Resume button : 

yaxsomo_5-1744144944936.png

The only thing I can do is to click again the Resume button on CM4 but nothing else. I'll attach the new .ioc file for reference.

 

Can someone please help?

STTwo-32
Technical Moderator
May 5, 2025

Hello @yaxsomo 

This application note may help you for dual core debug. 

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Associate II
May 15, 2025

I am having the same compiler error:

LoRaMac.c:1650:40: error: 'McpsIndication_t' {aka 'struct sMcpsIndication'} has no member named 'ResponseTimeout'

while using STM32CubeIDE V1.17.0 and the STM32CubeWL V1.3.1.

Should I use the Cube IDE v1.18.0 ? How to fix this ?

Associate II
May 15, 2025

Ok, found the issue. The Lora link layers version must be v1.0.4 and not v1.0.3

lora_mac_version.png