Is it possible to debug a Makefile project into STM32CubeIDE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-06-19 2:07 AM
Hello,
as the title suggests I would like to do step-by-step debugging on Makefile projects using STM32CubeIDE, however when I try to create the debug configuration it keeps showing an error message:
Not able to get mcu target
Reason:
Build configuration is not valide. Described mcu target is not supported
I'm on windows 10 and the target device is a nucleo L053R8. I created the Makefile project with CubeMX and imported with "Makefile project with existing code" into Eclipse.
Compilation works without problems but debugging blocks as described.
Then, is it possible to do debugging through ST-LINK in CubeIDE with Makefile projects?
Otherwise I could use plain Eclipse, but the only GDB server I found (github.com:texane/stlink.git) does not work on my computer/os/devkit combination. Is there any other solution?
Thank you,
Davide.
Solved! Go to Solution.
- Labels:
-
STM32CubeIDE
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-12-14 6:33 AM
The way you did it is possible. But in CubeIDE 1.9.x and later you can use the
- File > New Makefile project with existing code
- Open the Build settings > MCU Settings and select which MCU the project/build configuration is targetting.
When this is done, the normal debugger solution the STM32 C/C++ Application debug type will work for you...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-06-19 5:15 AM
So, if I manually start the ST-Link server and I create a GDB Hardware Debugging configuration it works.
So now I just need a way to automatically start the ST-Link server when I launch that debug configuration. I'll report progresses here, but I'm still open to suggestions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-06-20 8:49 AM
Solved by using openOCD.
Just for completeness, I had to install openOCD first, then install the openOCD plugin for Eclipse (or for CubeIDE, it makes no difference). Then after playing a bit with the configuration (openocd command and options, .cfg file, etc) I managed to make it work both on Linux and also on Windows.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-02-08 9:03 AM
A long shot, as this is 2 years old - but are you still here, and do you still have details of those openOCD commands, options, or .cfg file, etc?
See: https://community.st.com/s/question/0D53W00000Y2lIsSAJ/cant-usecreate-debug-config-for-oss7-stack
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-03-13 12:28 PM
@Andrew Neil​
Hi Andrew, were you able to get this resolved?
I have a segger jlink and noticed that if I don't have the "Generate Makefiles automatically" in project Properties -> C/C++ Build settings, then I get an error that the mcu is not defined in the typical STM32 Cortex-M C/C++ Application debug configuration.
I have an older (more complex build procedure) project with its own makefile I'm using so trying to get that to build in cubeIDE AND debug...but not working out right.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-03-15 7:42 AM
Temporarily enabling 'Generate Makefiles automatically' seems to be the only option at the moment - with STM32 CubeIDE v1.6.0
See the post by @mattias norlander​ on March 4, 2021 at 3:30 PM in this thread:
(stupid forum won't allow linking to a specific post in a thread).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-12-14 6:33 AM
The way you did it is possible. But in CubeIDE 1.9.x and later you can use the
- File > New Makefile project with existing code
- Open the Build settings > MCU Settings and select which MCU the project/build configuration is targetting.
When this is done, the normal debugger solution the STM32 C/C++ Application debug type will work for you...
