Nxp Semiconductors OM13012,598 数据表
NXP Semiconductors
LPCXpresso
Getting started with NXP LPCXpresso
LPCXpresso
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2012. All rights reserved.
User guide
Rev. 11.2 — 11 July 2012
25 of 48
The printf implementation in Redlib is about half the size of the implementation in Newlib.
A smaller printf library can be used in Redlib if floating point formatting strings are not
used. To select this smaller library, define the symbol CR_INTEGER_PRINTF to the
compiler (i.e. -DCR_INTEGER_PRINTF). To save even more space, avoid using printf or
any C standard library functions and select Redlib (none). Depending on your printf
settings and code, this could free up 10K to 20K of flash memory.
A smaller printf library can be used in Redlib if floating point formatting strings are not
used. To select this smaller library, define the symbol CR_INTEGER_PRINTF to the
compiler (i.e. -DCR_INTEGER_PRINTF). To save even more space, avoid using printf or
any C standard library functions and select Redlib (none). Depending on your printf
settings and code, this could free up 10K to 20K of flash memory.
6.4.2 Optimization
Optimization can do a lot to save flash memory. It can be configured in the same dialog
as the C standard library. Choose “Optimization” under “MCU C Compiler” in the “Tool
Settings” tab. Higher levels of optimization will typically result in higher performance, but
may result in larger code size. It is best to use –O0 for debugging and higher levels for
Release. For best code size try –Os –mword-relocations. To further reduce code, add
--gc-sections to the project linker flags. This causes the linker to remove unused
functions from the compiled code. --gc-sections is enabled by default in new projects
created by the project wizard. If you are working with an existing project, you may need
to manually add this option to your project. --gc-sections is safe to use in both Release
and Debug builds. There are many optimization options available for GCC. Visit
as the C standard library. Choose “Optimization” under “MCU C Compiler” in the “Tool
Settings” tab. Higher levels of optimization will typically result in higher performance, but
may result in larger code size. It is best to use –O0 for debugging and higher levels for
Release. For best code size try –Os –mword-relocations. To further reduce code, add
--gc-sections to the project linker flags. This causes the linker to remove unused
functions from the compiled code. --gc-sections is enabled by default in new projects
created by the project wizard. If you are working with an existing project, you may need
to manually add this option to your project. --gc-sections is safe to use in both Release
and Debug builds. There are many optimization options available for GCC. Visit
6.5 Showing hidden views
A view is an on-screen representation of something in the IDE. A view can be source
code, the project tree, or a debug window. If you accidentally close a view, you can open
it again by going to the Window menu and choosing Show View and Other. It is a good
idea to browse through the Show View window to see what is available.
code, the project tree, or a debug window. If you accidentally close a view, you can open
it again by going to the Window menu and choosing Show View and Other. It is a good
idea to browse through the Show View window to see what is available.
Fig 29. Show view window
This will present a dialog allowing you to pick a view and display it.