Skip to main content
KKjel.1
Senior
November 3, 2021
Question

How NOT to use newlib in STM32CubeMX GCC project

  • November 3, 2021
  • 2 replies
  • 1866 views

When I create a new STM32Cube IDE project with STM32CubeMX, it uses newlib.

The project uses freeRTOS. 

Is it possible to disable this, and make it use standard libs?

I can't find a flag anywhere, to do this.

When I create an MDK or EWARM project, they do not use newlib.

So why is the GCC / STM32Cube IDE use it?

Thanks !

br

Kaare

This topic has been closed for replies.

2 replies

KnarfB
Super User
November 3, 2021

newlib is a libc implementation used by gcc. So, it *is* the standard lib. If you don't want to link it, there are checkboxes in the Tool Settings under MCU Linker General. But, then you probably have to provide an alternative implementation or fiddle with the startup code. Don't see a reason for doing so.

hth

KnarfB

KKjel.1
KKjel.1Author
Senior
November 3, 2021

OK, thanks.

I am mostly used to use Crossstudio IDE, which also uses gcc.

But newlib is not part of a standard project in Crossstudio.

It's not that I really don't want to use it, but it causes me some struggle, when trying to import the eclipse project into Crossstudio.

What I hope for, is that it is possible to create an STM32Cube IDE eclipse project, that was easy to import into Rowley Crossstudio.

And I think that it is this newlib that makes a mess...

br

Kaare