cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to execute MI command load *.elf - NVIC - Error STM32G0B1?

RinGO
Associate II

Hello.
I encountered strange CubeIDE behavior on a customer board with an STM32G0B1CEU.

I've found similar glitches on this forum, but they mostly stemmed from fake HW.

I use all original STM from MOUSER.

If I enable PWM on TIM4 in MXcube, without NVIC, I generate the code, then using CubeIDE and stlink-v3e I upload the code to the MCU without problems, it works without problems, the oscilloscope shows what it has.

But as soon as I activate anything with NVIC (TIM PWM Interrupt, DMA interrupt, ...), I generate the code in CubeIDE, then when uploading the code to the MCU it terminates with an MI error message, see attachment.
Where is the problem?
Please help.

1 ACCEPTED SOLUTION

Accepted Solutions
RinGO
Associate II

Cause revealed.
Wrong setting in CubeProgrammer >>> Option bytes >>> "DUAL_BANK".
Still, I don't understand why CubeIDE generated an MI error when the project size was around 10kB, which is a hell of a long way from 256/512kB.

View solution in original post

3 REPLIES 3
TDK
Guru

Is this a custom board or known good hardware? I'd look for hardware issues first.

With the program running, can you connect with STM32CubeProgrammer? If not, SWCLK/SWDIO are probably being hijacked by the program, perhaps due to hardware issues.

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

Hi, this is a custom board.
Connect, upload code is hassle-free.
Once I activate TIM4, PWM mode, I upload the code to the MCU without problem. On the oscilloscope, the MCU generates PWM flawlessly.
But...
As soon as I activate the TIM interrupt or the DMA interrupt, the code cannot be uploaded. It will end with a message, see the attachment to the question.

So I cancel any interrupt in MXcube, generate the code again, and upload the code to the MCU via CubeIDE without any problems.

It looks like a *.elf build error for this type G0B1CEU
If I use the weaker brother NUCLEO-G071RBT, I can literally do dog pieces with it, without problems.

RinGO
Associate II

Cause revealed.
Wrong setting in CubeProgrammer >>> Option bytes >>> "DUAL_BANK".
Still, I don't understand why CubeIDE generated an MI error when the project size was around 10kB, which is a hell of a long way from 256/512kB.