Skip to main content
Shin-H
Associate
Question

Is it possible to use the standard library of the toolchain "GNU Tools for STM32" without using the heap area?

We are developing "STM32F769-Discovery Kit" using STM32Cube IDE.

The toolchain is "GNU Tools for STM32".

Functions such as printf call malloc_r and use the heap area.

_Puts_r ()

  __sinit ()

  __sfp ()

  __sfmorgelue

  _malloc_r

In our development project, we want to proceed with development without using the heap area.

Is there a way to use the standard library without using the heap area?

This topic has been closed for replies.

2 replies

Javier1
Principal

i dont know if this is obvious or not but what if you dont use printf?

hit me up in https://www.linkedin.com/in/javiermuñoz/
Shin-H
Shin-HAuthor
Associate

Thanks Reply!

Malloc_r is called twice only for the first printf.

It will not be called in the second and subsequent printf.

When using "GNU Tools for STM32", can we conclude that it is inevitable to use the heap area in the standard library?