AnsweredAssumed Answered

Remove std_error_buff, CW 10.7, 56F8037

Question asked by j... on Jul 3, 2018
Latest reply on Jul 9, 2018 by ZhangJennie

I generated a project for the 56F8037 with the CW 10.7 "New MCU Project" tool. It does NOT have an OS.

 

The generated project had support for console output with the following:

 

/* here we test the thinner console print */
/* printf is too large for MC56F8037 */
//#include "console.h"

 

//__ConsoleWrite(0,test_string,6);
//fflush_console();

 

I don't need the console (and it is too slow) so, I commented out those lines. However, I still see the following in the .xMap file:

  000004B4 00000080 .bss    Fstderr_buff    (MSL C 56800E smm.lib ansi_files.o   )
  00000534 00000080 .bss    Fstdout_buff    (MSL C 56800E smm.lib ansi_files.o   )
  000005B4 00000080 .bss    Fstdin_buff (MSL C 56800E smm.lib ansi_files.o   )
  00000634 00000001 .bss    Ferrno  (MSL C 56800E smm.lib errno.o        )
  00000635 00000001 .bss    F__dbg_io_ready (MSL C 56800E smm.lib hostio.o       )
  00000636 00000001 .bss    FtxtbinFlag (MSL C 56800E smm.lib hostio.o       )

 

For example, stderr_buff is located at:

C:\Freescale\CW MCU v10.7\MCU\M56800E Support\msl\MSL_C\MSL_Common\Include\ansi_files.h

C:\Freescale\CW MCU v10.7\MCU\M56800E Support\msl\MSL_C\MSL_Common\Src\ansi_files.c

 

ansi_files.h is used in:

C:\Freescale\CW MCU v10.7\MCU\M56800E Support\msl\MSL_C\MSL_Common\Include\file_io.h

C:\Freescale\CW MCU v10.7\MCU\M56800E Support\msl\MSL_C\MSL_Common\Src\ansi_files.c

C:\Freescale\CW MCU v10.7\MCU\M56800E Support\msl\MSL_C\MSL_Common\Src\char_io.c

C:\Freescale\CW MCU v10.7\MCU\M56800E Support\msl\MSL_C\MSL_Common\Src\direct_io.c

C:\Freescale\CW MCU v10.7\MCU\M56800E Support\msl\MSL_C\MSL_Common\Src\file_io.c

C:\Freescale\CW MCU v10.7\MCU\M56800E Support\msl\MSL_C\MSL_Common\Src\file_pos.c

C:\Freescale\CW MCU v10.7\MCU\M56800E Support\msl\MSL_C\MSL_Common\Src\misc_io.c

C:\Freescale\CW MCU v10.7\MCU\M56800E Support\msl\MSL_C\MSL_Common\Src\wchar_io.c

C:\Freescale\CW MCU v10.7\MCU\M56800E Support\msl\MSL_C\MSL_Common\Src\wfile_io.c

 

How can I get rid of these buffers?

Fstderr_buff
Fstdout_buff
Fstdin_buff

These are using precious RAM that I need to recover.

 

Regards...

Outcomes