Telink TLSR8232 BLE SDK Developer Handbook
AN-19112700-E1
22
Ver.1.0.0
stack
0x808000
ram_code
128K/512K
Sram
Flash
0real_ramcode_size
Cache
2.25K
vector
_ramcode_size_
ram_code
vector
0real_ramcode_size
unused area
……
0x80C000
text
real_ramcode_size
……
rodata & data
init value
data + bss
Firmware
power on
load
0x00000
wasted Sram area
Figure 2-2 SRAM and Firmware Space
In SDK, files related to SRAM space allocation include
“boot.link” and “cstartup_5316.s”.
Firmware in Flash includes vector, ramcode, text, rodata, and data initial value. SRAM
includes vector, ramcode, cache, data, bss, stack and unused area. vector/ramcode in
SRAM is a copy of vector/ramcode in Flash.
1) vectors, ram_code
vectors is a code section of Flash Firmware (the executable bin file generated by
program compiling in SDK), and it corresponds to the assembling file
“cstartup_5316.s”, i.e. the startup code “bootloader”.
ramcode is memory resident code in Flash Firmware, and it corresponds to all
functions with keyword “_attribute_ram_code_” in SDK, such as function Flash
erase.
_attribute_ram_code_
void
flash_erase_sector
(
u32
addr);
In the following two cases, functions should be memory resident:
Some functions (e.g. Flash operation functions) involve timing multiplex with four
Flash MSPI pins must be memory resident. If these functions are placed in Flash, it
would cause timing conflict and system crash.