Hello Rik,
If you use MCUXpresso IDE, there is a note in User Guide :
• A value of 0 can be entered to prevent any heap use by an application.
• Note: For semihosted printf to operate without any heap space, you must enable the
“character only” version. For Redlib, define the symbol “CR_PRINTF_CHAR” (at the
project level) and remove other semhosting defines such as CR_INTEGER_PRINTF.
Character only semihosted printf is significantly slower than the default version and may
display differently depending on your debug solution.