cancel
Showing results for 
Search instead for 
Did you mean: 

Cube IDE v2 migration of C++ and linker errors (with workaround)

NickO
Associate III

Hi

When I migrated by project to ST Cube IDE v2 this morning, my CM4 project would not link. I had to right-click the project and "convert to C++"  (even though I had been using C++ for months with previous versions).

Using a Nucleo STM32H755 as a target (dual core), my project is configured as follows:

  • CM4 is using C++, and using Free RTOS
  • CM7 is using C, and only using the HAL

 

Steps Taken

Upgrade the IDE from v1.19 to 2.0

Install latest Cube MX

Open my workspace, and chose to "migrate" when prompted

Double click the .ioc file, fix an issue (related to CAN which I am not using) and re-generate the code

Return to the IDE, and try to clean and build the CM4 project. I get linker errors.

 

Resolution

Right-click the CM4 project and select "Convert to C++". (In v.19 the only available option was "Convert to C")

Clean and build.

 

Maybe this is a bug in the project migration process? Could it be specific to dual-core, where only the CM was configured for C++?

 

Cheers

Nick Outram

 

4 REPLIES 4
Ghofrane GSOURI
ST Employee

Hello @NickO 

I'm currently checking this. I will get back to you asap.

I would appreciate it if you could share your project before  migration to STM32CubeIDE 2.0.0 , so that I can attempt to reproduce the issue.

THX

Ghofrane

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Let me check - I might have one I can share.

NickO
Associate III

When I click  "Generate Code" in Cube MX, it displays a dialog (see attached) which indicates this is a C project.

It says "Project Language : C"

  • For starters, this is in the singular, when in fact there are two projects.
  • One of my projects is C++
  • Looking at the available build options before and after, it is after code generation that the project becomes incorrectly configured as a C project 

Hello @NickO 

Thank you for your valuable contribution.

Issue has been escalated to dev team for further investigation under internal ticket number  222113

I will keep you posted with updates.

THX

Ghofrane

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.