2026-05-25 11:26 AM - last edited on 2026-05-25 12:34 PM by mƎALLEm
Hi,
Usually I code in a terminal text editor, compile and flash my code in the command line.
I used CubeMX to create a makefile, then modified the makefile to include certain commands I can run from the command line. I used OpenOCD and GDB to debug code from the command line.
It is becoming a mission to do intense debugging where I can see the values of registers all at the same time.
I would like the option to if required switch to STM32CubeIDE only for intense Debugging and do my normal coding with my current setup.
I'm on Linux, I imported a Makefile project without being presented with the option of choosing the part.
Now My project doesn't know which target I am compiling for. Is there any way to change these settings in CubeIDE ? It seems grayed out for me... Here is the error I'm getting
Thanks,
DJ
Solved! Go to Solution.
2026-05-25 7:06 PM - edited 2026-05-25 7:25 PM
CubeIDE can do what you want, but in a bit counter-intuitive way.
In the CubeIDE User manual (UM2609) please see 3.1.9 Import Cortex-M executable.
This procedure will create a new unmanaged Eclipse project, based on your existing elf file. This project will be added in the active CubeIDE workspace.
In the settings of this project, specify the target STM32 MCU, set up the debugger and enjoy your intense debugging.
The debugger will prompt for location of source files when it stops on breakpoints.
Note that gdb comes from the CubeIDE toolchain that is specified in the project settings: inherited from the workspace, or selected per project. OpenOCD comes from the CubeIDE installation.
Later you can improve this project: rename, add your makefile as the build command, and so on.
2026-05-25 7:06 PM - edited 2026-05-25 7:25 PM
CubeIDE can do what you want, but in a bit counter-intuitive way.
In the CubeIDE User manual (UM2609) please see 3.1.9 Import Cortex-M executable.
This procedure will create a new unmanaged Eclipse project, based on your existing elf file. This project will be added in the active CubeIDE workspace.
In the settings of this project, specify the target STM32 MCU, set up the debugger and enjoy your intense debugging.
The debugger will prompt for location of source files when it stops on breakpoints.
Note that gdb comes from the CubeIDE toolchain that is specified in the project settings: inherited from the workspace, or selected per project. OpenOCD comes from the CubeIDE installation.
Later you can improve this project: rename, add your makefile as the build command, and so on.
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.