Stack_Fill, Stack_Pattern; Copy Code From Flash To I-Ram (I_Ram) - Fujitsu FR Series Application Note

32-bit microcontroller
Hide thumbs Also See for FR Series:
Table of Contents

Advertisement

all library functions and can be found in the Lib\911\ subdirectory of the Softune Workbench
installation.
If the support tool "C-Analyzer" is installed, the additional tool "Musc" is able to collect these
data and to calculate the minimum stack size for the whole application.
Available settings for STACK_RESERVE:
- ON
- OFF
Note: If STACK_RESERVE is ON, the sections USTACK and SSTACK are reserved in this
module. Otherwise, they have to be reserved in other modules. If STACK_RESERVE
is OFF, the size definitions STACK_SYS_SIZE and STACK_USR_SIZE have no
meaning.
Example:
A system stack size of 0x200-4 bytes and a user stack size of 0x400-4 bytes should be
reserved.
#set
STACK_RESERVE
;
#set
STACK_SYS_SIZE
#set
STACK_USR_SIZE

2.3.3 STACK_FILL, STACK_PATTERN

With theses settings the stacks can be filled with a specific pattern. Filling the stack with
pattern allows dynamically checking of the stack area, which had already been used.
Available settings for STACK_FILL:
- ON
- OFF
Note: If STACK_ STACK_FILL is OFF, the pattern definition STACK_PATTERN has no
meaning.
Example:
The stacks should be filled with the pattern 0x55AA6699.
#set
STACK_FILL
#set
STACK_PATTERN

2.4 Copy code from Flash to I-RAM (I_RAM)

If this option is activated code located in the section IRAM is copied during startup from the
ROM to the instruction RAM. The code is linked for the instruction RAM. This is for example
useful for flash routines, which must be executed in the instruction RAM or for routines,
which should be run in the instruction RAM to benefit from the shorter wait states of the
instruction RAM.
The segment CODE has to be renamed to IRAM for the code, which should be copied the
the instruction RAM during the startup. To rename the segment CODE to IRAM, the
following pragma instruction can be used.
MCU-AN-300021-E-V10
Start91460.asm
Chapter 2 Settings of the Start91460.asm
ON
0x200-4
0x400-4
ON
; <<< fills the stack area with pattern
0x55AA6699 ; <<< the pattern to write to stack
- 8 -
; <<< reserve stack area in
;
this module
; <<< byte size of System stack
; <<< byte size of User stack
© Fujitsu Microelectronics Europe GmbH

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mb91460 seriesStart91460.asm

Table of Contents