Electronic – Eclipse and OpenOCD works only, if I program the MCU on Discovery board

eclipseopenocdstm32stm32f0stm32f4

I'd like to program and debug an STM32F030 MCU with Eclipse, OpenOCD and ST-link. I have an STM32F4 Discovery board that includes an ST-link debugger.

Programming the STM32F4 MCU on the discovery board works very well. I use Eclipse, OpenOCD and the ST-link (ST-link is actually on the board). With this IDE configuration I believe I should be able to program other STM microcontrollers that are on a different PCBs (Of course after I connected them each other and turned off the jumpers to select the target)

My problem is: I'd like to program an STM32F030 MCU. When I connect this MCU to the ST-link, "STM32 ST-link Utility" says that the connection is fine, so I guess, I should be able to program it. But when I try to program it, Eclipse always shows the same error message: "Quit (Expected signal SIGINT when the program is resumed) – Exception condition detected on fd 0 – error detected on stdin"

Probably the problem is with the settings of my IDE, but I have no idea what it could be. How is it possible, that I can program the MCU of the discovery board but I can't do the same thing with another MCU?

Do you have any idea?

Best Answer

@Arsenal is right. OpenOCD requires a board-specific config file which is in your case is probably for an STM32F4. In Debug Configuration check the Debugger tab of your OpenOCD Debugger and change the config file at the Other options to match your board.

enter image description here

You can check the existing/available config files in the following directories:

\openocd-0.9.0\tcl\target

\openocd-0.9.0\tcl\board

For an STM32F030 the board/stm32f0discovery.cfg should work (for an STM32F303RET6 the board/stm32f3discovery.cfg worked fine for me), but there is an target/stm32f0x.cfg file too, if you want to give it a try.