Skip to main content
Associate III
November 27, 2025
Solved

undefined reference to `ExitRun0Mode'

  • November 27, 2025
  • 4 replies
  • 512 views

Hi,

I've installed the CubeIDe rel 2.0.0 and the CubeMX rel 6.16.0; when I build my project this error appears: undefined reference to `ExitRun0Mode'.

 

May you help me ?

 

Thank you, CarloV

Best answer by mƎALLEm

I think my previous replies answer that question.

- You need to remove the old "system_stm32h7xx.c" file.

- Generate the code with CubeMx by pointing to the latest CubeH7 version: the new updated system_stm32h7xx.c containing ExitRun0Mode() will be generated and added to your project.

- Remove HAL_PWREx_ConfigSupply() if you have its call in SystemClock_Config() in your previous implementation.

4 replies

TDK
Super User
November 27, 2025

Here is a definition of that file. Maybe it's the one you want.

https://github.com/STMicroelectronics/STM32CubeH7/blob/46631c3dab1edbe412c613add345bfbf1d2c5e2e/Projects/STM32H7B3I-DK/Examples/BSP/Src/system_stm32h7xx.c#L359

 

Would be better for you to provide your IOC or explain how you project was created. If the function is there, it should be found.

"If you feel a post has answered your question, please click ""Accept as Solution""."
carloVAuthor
Associate III
November 27, 2025

Thank you, I build my project using the 1.9.0 CubeIde release, including the IOC file, and worked good. The issue appeared after the 1.2.0, it requires the CubeMX to build the IOC; I imported the old project.

 

CarloV

mƎALLEm
Technical Moderator
November 27, 2025

Hello,

ExitRun0Mode() was introduced (if I'm not mistaken) in V1.7.0. So please update your CubeHAL repositry folder to the latest version.

 

"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."
carloVAuthor
Associate III
November 27, 2025

sorry....I built with the 1.19.0 release...

 

CarloV

carloVAuthor
Associate III
November 27, 2025

I checked my "system_stm32h7xx.c" file and I haven't find the "ExitRun0Mode" function...

 

CarloV

mƎALLEm
Technical Moderator
November 27, 2025

@carloV wrote:

I checked my "system_stm32h7xx.c" file and I haven't find the "ExitRun0Mode" function...

 

CarloV


Try to remove system_stm32h7xx.c and re-generate the code again in CubeMx. But be sure you are pointing to the latest CubeH7 version:

mALLEm_0-1764257967697.png

 

"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."
mƎALLEm
Technical Moderator
November 27, 2025

And please remove HAL_PWREx_ConfigSupply() if you have its call in SystemClock_Config(). Setting the power in SystemClock_Config() is an old implementation.

"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."
TDK
Super User
November 27, 2025

If I open your IOC and generate code and compile the project, it (mostly) works.

Except that you have do not generate main checked, so it doesn't generate that.

TDK_0-1764258378645.png

 

If I add main(), it compiles.

Finished building target: SpectrumAna.elf
 
arm-none-eabi-size SpectrumAna.elf 
arm-none-eabi-objdump -h -S SpectrumAna.elf > "SpectrumAna.list"
 text	 data	 bss	 dec	 hex	filename
 9396	 8	 2112	 11516	 2cfc	SpectrumAna.elf
Finished building: default.size.stdout
 
Finished building: SpectrumAna.list

 

ExitRun0Mode is generated and present in system_stm32*.c

TDK_1-1764258454476.png

 

 

I wonder if you are not regenerating code.

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