cancel
Showing results for 
Search instead for 
Did you mean: 

Project build fails after update to CubeMX 6.1.1

vasilevskialeksandar
Associate III

Probably related to gnu-tools-for-stm32.9-2020-q2-update

 746 | _ptr = _REENT;

   |     ^~~~~~

c:\st\stm32cubeide_1.4.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_1.5.0.202011040924\tools\arm-none-eabi\include\stdio.h:746:9: note: each undeclared identifier is reported only once for each function it appears in

c:\st\stm32cubeide_1.4.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_1.5.0.202011040924\tools\arm-none-eabi\include\stdio.h: In function '_putchar_unlocked':

c:\st\stm32cubeide_1.4.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_1.5.0.202011040924\tools\arm-none-eabi\include\stdio.h:755:9: error: '_REENT' undeclared (first use in this function)

 755 | _ptr = _REENT;

   |     ^~~~~~

make: *** [Core/Src/subdir.mk:130: Core/Src/syscalls.o] Error 1

"make all" terminated with exit code 2. Build might be incomplete.

7 REPLIES 7
Khouloud ZEMMELI
ST Employee

Hello @vasilevskialeksandar​ 

Thanks for your feedback,

Could you please check with the latest CubeMX and CubeIDE versions (6.2.0 and 1.6.0)?

If problem still appears, please share your ioc file to check more your case.

Thanks, Khouloud

vasilevskialeksandar
Associate III

Checked now with STM32CubeIDE Version: 1.6.0 Build: 9614_20210223_1703 (UTC) and

CubeIDE versions 6.2.0 and same error appears.

Little bit history:

Project started as SW4STM project then one colleague updated it to CubeIDE project using CubeIDE 6.0.1 and we developed it further using CubeIDE 6.0.1 .

When on mine machine I updated Cube ide to 6.1.1 this build error appeared and is persistent even updating with latest versions(updated today).

I tried to start similar new project for Nucleo Board and CubeIDE 6.2.0 and build works.

Seems when updating older projects some additional configuration switch is needed but I can't find which one.

Hello @vasilevskialeksandar​ 

I have checked with your ioc file and I have not faced any compilation error, seems there's a problem of tools installation (maybe occurred during the upgrade).

Could you please re-install CubeIDE and CubeMX from site then re-check?

I'll be waiting for your feedback :)

Thanks, Khouloud

DavidAlfa
Senior II

It causes havoc too often. Last time it randomly deleted my files, corrupted few projects and almost lost the local git repository.

Phew. Now I don't even think on doing that again without making a backup first!

So, backup your workspace, delete all stmcube stuff, and reinstall. Next time, think twice before updating.

If you are in active development, and not having issues, you know what they say, if it works, don't touch it.

Anyways, I never ever had such issues with other IDEs.

AA.10
Associate III

Hi

I upgraded my IDE to STM32IDE 1.9.0, and CubeMX to version 6.5.0 in order to develop on U5 familiy.

I know the ST does not include freertos lib on CubeMX 6.5.0 any more.. but, since I allready working with it in other projects I would to keep it instead of integrating ThreadX OS..

so, I downloaded from GIT the portable source files (https://github.com/STMicroelectronics/stm32_mw_freertos/tree/master/Source/portable) and I tried to compile it.

I have the same errors compilation releated to _REENT alltought I set configUSE_NEWLIB_REENTRANT to 0 as you described in this case.

what do you think may cause this errors and how can i fix it?

thanks, Avi

vasilevskialeksandar
Associate III

It was long time ago and I don't remember all the details how exactly I solved this.

In my project I was using code from libraries developed 20 years ago on some compiler (toy) CCS for Microchip PIC. Developers at that time used their own files assert.h trace.h dbg.h that today are not compliant with latest GCC that is used in CubeMX. So I removed our own custom files and used what is offered from CubeMX. Be aware that DBG macro that is used to build build with logging info on some compiler but now DBG is hardware register on some ST micros.

Other thing to check is that in some point ST decided to move some functions from/to syscalls.c and sysmem.c and some manual moving is needed and also check which files are included.

Check those points and write here the results. Maybe I will remember something else if needed. This is from quick scanning from git patch that I produced at that time.

Reghards,

Aleksandar.

Jonathan Goldberg
Associate

I had this same error. The problem for me was there was a project file named "Assert.h". There is also the standard header "assert.h", which was taking precedence. I simply renamed the project's "Assert.h" to something else, like "MyAssert.h" and then refactored all the instances of #include "Assert.h" to #include "MyAssert.h".