cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to debug unmanaged makefile project

FS.1
Associate III

We have a project created in CubeMX (inside CubeIDE) and developed in CubeIDE. Everything works fine.

However, we wanted to use a Makefile so we could have the same build process on our CI server and within CubeIDE.

So we now generated a Makefile from stand-alone CubeMX with the same IOC file and imported the result as an unmanaged Makefile project into CubeIDE.

This works fine for development and building but debugging is not possible. When we try to debug, an error message dialog comes up, saying: "Not able to get mcu target. " See attached image.

Can anyone tell me what I am missing?

Thanks

5 REPLIES 5
FS.1
Associate III

I just confirmed this behaviour with just a NUCLEO-F401RE and an unmodified CubeMX config.

So, I:

  • start CubeIDE
  • create a new STM32 project
  • select the NUCLEO board in the integrated CubeMX and generate the code (no manual configuration done)
  • click Project -> Build All ---> success
  • click Run -> Debug ---> success

Then I copy the IOC file from the project to another folder and open it with a stand-alone CubeMX with the same version number as the one integrated into CubeIDE and

  • generate the code for a Makefile project (no other manual configuration done)
  • open CubeIDE
  • click New -> makefile Project with Existing Code
  • within the dialog select the folder containing the generated code, uncheck C++ and select MCU ARM GCC as Toolchain for Indexer
  • Then in the opened project, I clock Project -> Build All ---> success
  • click Run -> Debug ---> fails saying that there is no configuration
  • when trying to create a new debug configuration, the message shown in the screenshot above comes up

So the problem is not caused by anything coming from our project. It's plain CubeMX code that does not work in CubeIDE when created as unmanaged Makefile project.

Still, I hope I just have to tick one checkbox or something to get it working.

Any hints?

Thanks.

FS.1
Associate III

A few more observations.

  1. Just opening an IOC file from the integrated CubeMX in the stand-alone CubeMX (same version), changing the target toolchain and then generating code changes 137 lines in that file and adds one line. Many lines have probably just changed places but it's hard to figure out.
  2. The following files are created for the CubeIDE toolchain but not for the Makefile toolchain:
  • Core/Src/syscalls.c
  • Core/Src/sysmem.c
  • STM32F401RETX_RAM.ld

3. The file STM32F401RETX_FLASH.ld is different in the two toolchains

4. The startup file has stayed the same but has a different name and location: Core/Startup/startup_stm32f401retx.s -> startup_stm32f401xe.s

Not sure if these are related to the issue I observe but they sure seem weird.

I also found differences in the CubeIDE settings and project files but those are unsurprising. They are also extensive so I will go through them now and add anything I can find there later.

FS.1
Associate III

When building, the Error Log view complains about the toolchain plugin.

Any idea where these "empty" entries are and what to put into them?

FS.1
Associate III

Over a year later, the problem remains.

Pavel A.
Evangelist III

Over a year, we have CubeIDE v 1.7 which supports quick creation of unmanaged project from a bare ELF file and debugging it.

But it still cannot cast the debugging magic on existing CubeIDE unmanaged makefile projects, or generic Eclipse CDT projects.

This is a pity.