cancel
Showing results for 
Search instead for 
Did you mean: 

Flashing issue using Zephyr & STLink

vividhadhengre
Associate II

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.

3 REPLIES 3

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

 

Sarra.S
ST Employee

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.

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