Skip to main content
NEdom.1
Associate III
April 28, 2021
Question

Bug on STM32CubeIDE at Project->Properties->C/C++ General->Paths and Symbols

  • April 28, 2021
  • 4 replies
  • 3729 views

I have been using STM32CubeIDE for quite some time. It's a great tool. How ever, I have been experiencing a bug in project settings since I updated to 1.6.1.

Usually, I put my code in a separate folder, thus I could build up a project using existing code quickly based on another type of STM32 chip. In this way, I must add my source location and include DIRs in Project->Properties->C/C++ General->Paths and Symbols. In the Includes tab, there are two items under Languages, GNU C and Assembly. Since I use C/C++ for programming, I add the DIRs under the GNU C item. There is no items under the Assembly item.

I get used to manage FreeRTOS resource using CubeMX .ioc file. Whenever I changed FreeRTOS resource in the .ioc file, I re-generate the code and it does the work. But it happens that sometimes all the DIRs under the GNU C item are moved into the Assembly item after the code is re-generated. The GNU C item is left blank. So the code does not compile at all. I have to add all the include DIR and source back into GNU C item again one by one.

I could not upload the whole project or code for reference due to confidential issues. I tried to describe the problems as clear as I can.

4 replies

Radosław
Associate II
April 28, 2021

Strange, but You shouldn't edit this tab, more interesting is which provider causes this problem.

First check when this happens, include path in C/C++ Build -> Settings toll settings tab if include path are correct,

NEdom.1
NEdom.1Author
Associate III
April 29, 2021

Thanks for reply.

I will check C/C++ Build -> Settings tool settings tab if it happens next time.

Btw, we have been practiced by manage code source paths and include paths in this way for some time. In this way, This makes us changing MCU target in a very easy way. If we changed to another MCU target, we just need to pay attention to setup .ioc file, replacing/modifying main.c and stm32fxxx_it.c. 

Cartu38 OpenDev
Graduate II
April 28, 2021

Not able to reproduce myself.

Could you share target device you're woking on. Which setup udate are you doing to face such issue (which RTOS parameter) ?

Possibly share a project mockup leading to same trouble.

NEdom.1
NEdom.1Author
Associate III
April 29, 2021

Thanks for reply.

It's not reproducible myself either. But it did happen 3 or 5 times totally on the three projects using STM32F429 as target device.

I am using freeRTOS CMSIS_V2 with new lib support. (Add heap_useNewLib_ST.c, exclude sysmem.c and heap_4.c, add linker flag "-Xlinker --wrap=malloc

-Xlinker --wrap=_malloc_r")

I commit and push my code a lot since I experienced this the first time. If it happened again, I just pull the code of last commit and start over.

NEdom.1
NEdom.1Author
Associate III
August 5, 2021

I got this problem again.

I was doing experiment of using SDRAM in freeRTOS with heap5.

Trying to add a subdirectory and add the directory to project Paths and Symbols.

Operation steps:

New a directory.

New a source file in the directory just created.

New a header file in the directory just created.

Add to project Paths and Symbols, select All configurations, the choose and add from workspace.

Clean and build but failed. Report fatal error: main.h: No such file or directory. Happened almost all the headers.

Check the project Paths and Symbols setting. Then found that all the paths go to Assembly item. The GNU C item is left blank.

After adding back the Include paths to GNU C and remove those from Assembly, I could not managed to compile the project. I have to work on the project from the very beginning.

0693W00000D1ayBQAR.png

Visitor II
August 25, 2024

Uninstall VIATRA apps. 

Help->About STM32CubeIDE->Installation Details

Select VIATRA components and uninstall (one by one)