2021-06-04 08:51 PM
Our project firmware is build using cmake. Cmake is used to create Eclipse project like this
cmake ..\Firmware -G"Eclipse CDT4 - Ninja" -DCMAKE_ECLIPSE_VERSION=4.16
I can import project to CubeIde without proplems and buid it there. Proplem is that CubeIde debugger configuration does seems to accept project as valid project for debuged in stm32.
I have also created bootloader using CubeIde and that I can use for debugging and I have attached Firmware elf to be loaded when BL is debugged. This is workaround to make possible to use CubeIde debugging our firmware.
I attach photo Eclipse error message when configuring debugger
How I should modify our Firmware project so that CubeIde can use it directly to debugging?
Solved! Go to Solution.
2021-06-06 12:39 AM
As far as I'm aware no STM32CubeIDE is not open source.
Myself I would submit "So my improvement idea would be that CubeIde debugger configuration could have own settings for MCU. Then it could be used to debug what ever project." to Idea Zone (st.com) who knows you may win a new feature in coming releases
2021-06-04 10:00 PM
What does the Debugger and Startup tabs look like?
2021-06-04 11:38 PM
At that time STM32CubeIDE only support STM32Cube debug facilities if you're relying on STM32 toolchain.
Maybe you can mix following setup to your cmake project .... all such is just about project .metadata (i.e. .cproject file content).
Here you're: you have a STM32 target device defined and so full access to STM32Cube debug facilities.
Nobody is forcing you to use CDT managed build setup ... just rely on cmake to build but debug is available to you once your binary file is availabe thru cmake
2021-06-04 11:52 PM
Thank you both. Thank for tip about .cproject. I try to look what my bootloader .cproject contains and maybe I extend cmake system so that it will modificate firmware.cproject so that it will fill MCU information to there. Maybe that will help debugger to use project.
2021-06-05 12:05 AM
Let us know if working fiinally.
Small extra note ... myself I would be worried a bit by the fact your project name is including some special char like '@' ... may work but always some software failure risk related to such practice
2021-06-05 12:08 AM
Still extra tip if you have already a STM32CubeIDE boot loader project ... just rely on such to debug your cmake based binary ...
Based on bootloader project debug launch configuration you can add as many binaries as you want ...
See https://www.st.com/resource/en/user_manual/dm00629856-stm32cubeide-user-guide-stmicroelectronics.pdf page 113 load list is your best friend !
2021-06-05 12:41 AM
And after playing some time with project files I realised that debugger configuration has dependency that system is built in CubeIde. I think that using my CubeIde bootloader project as engine to debug Firmware is now cleanest solution for using CubeIde to debug Firmware. Only problem is that it may feel little bit weird at first. And it requires some amount configuration time to new team member to get working workspace for debugging.
So my improvement idea would be that CubeIde debugger configuration could have own settings for MCU. Then it could be used to debug what ever project.
2021-06-05 07:37 PM
Yes. This extra binary is exactly my system to use BL for debugging Firmware.
2021-06-05 07:48 PM
@ is generated by Cmake. At least building is working fine.
I tuned some time project files manually and I got strong feeling that debugger configuration is depending on build configuration and that's why I cannot make externally build elf file to be debugged.
My target would be that cmake can generate that kind project files what can be easily build and debug in some Ide.
When big teams work with same project then Eclipse project files are not optimal maintain because those will create bad conflicts in merge. Cmake project files are much easier to handle when multiple people develop.
2021-06-05 07:50 PM
Is CubeIde debugger system open source? One option could be that I modify programmer so that it can use external configuration file to read debugging settings.