English
Language : 

UM0324 Datasheet, PDF (14/105 Pages) STMicroelectronics – This user manual describes
Getting started with tools
UM0324
The default extended linker file used in the standard library to configure the device for
internal flash based resident firmware is Inkarm_flash.xcl. an extract of this file
showing the definitions of heap and stack size is provided below. Depending on the project
requirements, it may be necessary to manually edit the segment sizes.
//************************************************************************
*
// Stack and heap segments.
//************************************************************************
// Add size >0 for ABT_Stack, UND_Stack if you need them.
// size must be 8 byte aligned.
-D_CSTACK_SIZE=0x200
-D_SVC_STACK_SIZE=0x20
-D_IRQ_STACK_SIZE=0x100
-D_FIQ_STACK_SIZE=0x40
-D_ABT_STACK_SIZE=0x0
-D_UND_STACK_SIZE=0x0
-D_HEAP_SIZE=0x400
Memory size modifications might also be necessary according to the MCU specifications.
Default settings are done for a 256KB embedded flash memory. If you use a different device,
you must edit the Inkarm_flash.xcl file as explained in Section 1.4.2.
Figure 4. Extended linker file Inkarm_flash.xcl, flash memory length definition
1.4.2
Extended linker file setting
As mentioned in the previous section, in the provided IAR workspace, the internal flash
extended linker file is set by default (Inkarm_flash.xcl).
To modify the linker file to be used (for example, Inkarm_ram.xcl or Inkarm_smi.xcl):
1. Open the IAR workspace by double-clicking on the \ FOC_AC_SR_v1.0 \ IAR \
IFOC.eww file.
2. Go to the Project menu, select Options... then Linker, and select the Config sub-
menu.
The dialog box shown in Figure 5 is displayed.
3. In the Override default field, type the name of the linker file you want to use, and then
click OK.
Selecting the Inkarm_ram.xcl file makes the IAR XLINK linker place the memory
segments on RAM memory, whereas selecting the Inkarm_smi.xcl file makes the
linker place the memory segments on an external memory.
14/105