Skip to main content
Associate II
December 20, 2024
Question

Flashing issue using Zephyr & STLink

Hello,

We are migrating to zephyr, the board which is supported by zephyr is nucleo_g0b1re, but out actual controller is stm32g0c1ret3. Both are of same family, have same memory and all. I have just made changes in the overlay file for my application, have not touched anything in .dtsi or .dts file. I am facing issue when i try to dump code my my led which i have added in the overlay file. The error says "[stm32g0x.cpu] halted due to breakpoint, current mode: Handler HardFault". Can anyone tell what the possible ways can be due to which this error is occurring while flashing.

I have attached the screenshot of error.

This topic has been closed for replies.

3 replies

Andrew Neil
Super User
December 20, 2024

What development host platform?

What tools & versions?

https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/ta-p/575228

Can you program anything else using this environment? eg, an out-of-the-box example?

Can you program using STM32CubeProgrammer?

Have you tried asking at a Zephyr-specific forum?

 


@vividhadhengre wrote:

I have attached the screenshot of error.


It would be more helpful to post it as text - see:

https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/tac-p/725146/highlight/true#M54

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
ST Employee
December 23, 2024

Hello @vividhadhengre, 

According to the provided screenshot, you have a Hardfault probably due to mismatch between your .dts files and the actual layout of the STM32G0. Could you share your modified overlay files? 

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
December 23, 2024

Hello Sarra,

///////////////////////////////////////////////////////////////////////////////////////////////////////////
My nucleo_g0b1re.overlay /{

gpio_interface {
compatible = "gpio-keys";
mechsensor_set_pin_portd5_pin55: PortPinPD5_Pin55 {
gpios = <&gpiod 5 GPIO_ACTIVE_HIGH>;
status = "okay";
};
}; //////////////////////////////////////////////////////////////////////////////////////////////};

 

Formatting edited - see: https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/tac-p/725146/highlight/true#M54