cancel
Showing results for 
Search instead for 
Did you mean: 

Nucleo STM32WL33 CMake

Jdescot
Associate II

Board: NUCLEO-WL33 Toolchain: CMake + arm-none-eabi-gcc CubeMX version: 6.17.0 STM32CubeIDE version: 2.1.1

I am trying to run a basic STM32WL33 project generated by STM32CubeMX using the CMake toolchain instead of the native STM32CubeIDE project format.

The same CubeMX configuration, when generated as a native STM32CubeIDE project, works correctly and reaches HAL_Init() in main.c without any issue.

However, when using the CMake-based output, the firmware crashes during startup and

never reaches main().


Symptoms

  • Debugger halts inside SystemInit() at line 200 (system_stm32wl3x.c), or jumps to an address outside valid memory (0x100004ee — inside the ROM region 0x10000000–0x100017FF)

 


Is there a known-good CMake startup/linker reference for the STM32WL33?

1 ACCEPTED SOLUTION

Accepted Solutions
ncdanie
Associate

I was running into the same issue when choosing Makefile as my Toolchain in CubeMX. I noticed that the Makefile uses options and defines for Cortex-M4 instead of Cortex-M0. When I updated the Makefile, the issue was resolved.

View solution in original post

5 REPLIES 5
Mahmoud Ben Romdhane
ST Employee

Hello @Jdescot 

Let me thank you for posting.

I am currently checking this behavior, and I will get back to you ASAP.

Thanks.

Mahmoud

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.

Jdescot
Associate II

Hi Mahmoud Ben Romdhane,

I am using ST-LINK_gdbserver from STM32CubeIDE (v2.1.1), as well as CubeProgrammer from the same version. I am running a very basic project generated by STM32CubeMX, with no modifications after generation.

Feel free to ask any further questions.

Are you able to reproduce the issue?

Thank you,
Joël

P.S. I was unable to reply via private message, as it is refusing to let me respond.

Jdescot
Associate II

Hi @Mahmoud Ben Romdhane ,

My situation is almost the same. I am also getting stuck at this point (SystemInit).

Are you waiting for feedback from your internal team?

 

Thanks for sharing,

Joël

Hello @Jdescot 

Let me thank you for bringing this issue to our attention.

The issue has been escalated to dev team under internal ticket : CDM0061429

I'll let you know as soon as the issue is fixed.

Thanks.

Mahmoud

 

 

 

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.

ncdanie
Associate

I was running into the same issue when choosing Makefile as my Toolchain in CubeMX. I noticed that the Makefile uses options and defines for Cortex-M4 instead of Cortex-M0. When I updated the Makefile, the issue was resolved.