2.2.3 Using an Existing IAR V1.x/V2.x Project
2.2.4 Stack Management and .xcl Files
2.2.5 How to Generate Texas Instruments .TXT (and Other Format) Files
2.2.6 Overview of Example Programs
Using KickStart
It is possible to use an existing project from an IAR V1.x/V2.x system with the new IAR V3.x system; see
the IAR document Step by Step Migration for EW430 x.xx. This document is in
<Installation Root>\Embedded Workbench x.x\430\doc\migration.htm.
The reserved stack size can be configured through either the project options dialog (General Options →
Stack/Heap) or through direct modification of the .xcl linker control files. These files are input to the linker
and contain statements that control the allocation of device memory (RAM, Flash). See the IAR XLINK
documentation for a complete description of these files. The .xcl files provided with the FET (<Installation
Root>\Embedded Workbench x.x\430\config\lnk430xxxx.xcl) define a relocatable segment (RSEG) called
CSTACK. CSTACK is used to define the region of RAM that is used for the system stack within C
programs. CSTACK can also be used in assembler programs ( MOV.W #SFE(CSTACK), SP). CSTACK is
defined to extend from the last location of RAM for 50 bytes (i.e., the stack extends downwards through
RAM for 50 bytes).
Other statements in the .xcl file define other relocatable regions that are allocated from the first location of
RAM to the bottom of the stack. It is critical to note that:
• The supplied .xcl files reserve 50 bytes of RAM for the stack, regardless if this amount of stack
is actually required (or if it is sufficient).
• There is no runtime checking of the stack. The stack can overflow the 50 reserved bytes and
possibly overwrite the other segments. No error is output.
The supplied .xcl files can be modified to tune the size of the stack to the needs of the application; edit
-D_STACK_SIZE=xx to allocate xx bytes for the stack. Note that the .xcl file also reserves 50 byes for the
heap if required (for example, by malloc()).
The KickStart linker can be configured to output objects in TI .TXT format for use with the GANG430 and
PRGS430 programmers. Click Project → Options → Linker → Output → Format → Other → msp430-txt.
Intel™ and Motorola™ formats can also be selected.
For more information, see FAQ Program Development #6 .
Example programs for MSP430 devices are provided in <Installation Root>\Embedded Workbench
x.x\430\FET_examples. Each tool folder contains folders that contain the assembler and C sources.
<Installation Root>\Embedded Workbench\x.x\430\FET_examples\Flashing the LED.eww conveniently
organizes the FET_1 demonstration code into a workspace. The workspace contains assembler and C
projects of the code for each of the MSP430 device families. Debug and Release versions are provided for
each of the projects.
<Installation Root>\Embedded Workbench x.x\430\FET_examples\contents.htm conveniently organizes
and documents the examples.
Additional code examples can be found on the MSP430 home page under Code Examples.
Note: Some example programs require a 32-kHz crystal on LFXT1, and not all FETs are
supplied with a 32-kHz crystal.
SLAU138F – June 2004 – Revised March 2007 Development Flow 19
Submit Documentation Feedback