11.07.2015 Views

MSP430 IAR C/C++ Compiler reference guide - Rice University

MSP430 IAR C/C++ Compiler reference guide - Rice University

MSP430 IAR C/C++ Compiler reference guide - Rice University

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The CLIB runtime environmentmeet your requirements, and the compiled module inserted into the library in place ofthe original file; see Overriding library modules, page 53.FORMATTERS USED BY SCANF AND SSCANFSimilar to the printf and sprintf functions, scanf and sscanf use a commonformatter, called _formatted_read. The full version of _formatted_read is verylarge, and provides facilities that are not required in many embedded applications. Toreduce the memory consumption, an alternative smaller version is also provided._medium_readThe _medium_read formatter has the same functions as the full version, except thatfloating-point numbers are not supported. _medium_read is considerably smaller thanthe full version.Specifying the scanf formatter in the <strong>IAR</strong> Embedded WorkbenchIDE1 Choose Project>Options and select the General Options category. Click the Libraryoptions tab.2 Select the appropriate Scanf formatter option, which can be either Medium or Large.Specifying the read formatter from the command lineTo use the _medium_read formatter, add the following line in the linker command file:-e_medium_read=_formatted_readTo use the full version, remove the line.System startup and terminationThis section describes the actions the runtime environment performs during startup andtermination of applications.The code for handling startup and termination is located in the source filescstartup.s43 and low_level_init.c located in the 430\src\lib directory.Note: Normally, there is no need for customizing the file cstartup.s43.SYSTEM STARTUPWhen an application is initialized, a number of steps are performed:●The stack pointer (SP) is initializedPart 1. Using the compiler79

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!