Memory Map¶
The devices supported by the SimpleLink CC2640R2 SDK each contains several memory regions including RAM, ROM, and Flash. This section aims to show how these memory regions are utilized by the stack and user application.
The stack library configuration memory map can be seen below. See Stack Library Configuration (_stack_library) for more information on the configuration.
CC2640R2 Memory Map¶
The following table contains the memory map for the CC2640R2 device.
Memory Section |
Starting Address |
Size (bytes) |
Description |
---|---|---|---|
Flash |
0x00000000 |
60 |
Cortex Interrupt Vecs |
0x00001000 |
816 |
TI RTOS ROM Jump Table |
|
Application / Stack Code |
|||
SNV |
1-2 pages |
Simple Non-Volatile Storage |
|
Last Flash Page* |
88 |
||
ROM |
0x10000000 |
ROM_SIZE |
TI-RTOS, BLE-Stack/BLE5-stack, Crypto, Driverlib, Boot |
RAM |
0x20000000 |
RAMVEC_SIZE |
Interrupt Vector Table in RAM for dynamic Hwi creation |
0x20000100 |
RTOSRAM_SIZE |
Reserved for pointers for TI-RTOS in ROM |
|
.bss and .data |
|||
ICall heap |
|||
TI-RTOS kernel system stack (CSTACK) |
|||
AUX RAM |
0x400E0000 |
AUXRAM_SIZE |
Memory area belonging to the Sensor Controller |
Note
At the table above, the following variables are platform dependent:
Last Flash Page : 124 kB (the top of the Flash subtracted by its page size: 0x20000 - 0x1000 = 0x1F000)
ROM_SIZE : 112 kB
RAMVEC_SIZE : 200 B
RTOSRAM_SIZE : 262 B
AUXRAM_SIZE : 2 kB
Note
The Sensor Controller is not available on the CC2640R2L, so the AUX RAM can be used freely by the application.
TI-RTOS ROM Jump Table¶
The TI-RTOS ROM Jump Table can be relocated to any address. To do that, open the .cfg file of your project and add the following lines after the ROM declaration:
Note
There is no TI-RTOS ROM Jump Table on CC13x1x3 or CC26x1x3
var ROM = xdc.useModule('ti.sysbios.rom.ROM');
if (Program.cpu.deviceName.match(/CC26/)) {
ROM.romName = ROM.CC26X2V2;
}
else if (Program.cpu.deviceName.match(/CC13/)) {
ROM.romName = ROM.CC13X2V2;
}
ROM.constStructAddr = 0x4000; // replace 0x4000 with any address in FLASH
ROM.externFuncStructAddr = 0x43C0; // replace 0x43C0 with any address in FLASH
ROM.dataStructAddr = 0x20001080; // replace 0x20001080 with any address in RAM
For projects that use OAD, the TI-RTOS Jump Table definitions are later in the .cfg file. Check for the declaration below:
if (Program.build.cfgArgs.OAD_IMG_A == 1)
{
m3Hwi.resetVectorAddress = 0x00055fc0;
ROM.constStructAddr = 0x37000;
ROM.externFuncStructAddr = 0x373C0;
}
else if (Program.build.cfgArgs.OAD_IMG_B == 1) //(OAD_IMG_TYPE == "B")
{
if (compilerDefs.indexOf('SECURITY') > -1)
{
// Check for SECURITY compiler symbol
m3Hwi.resetVectorAddress = 0x90; // Image B Reset Vector Address
}
else
{
m3Hwi.resetVectorAddress = 0x50; // Image B Reset Vector Address
}
ROM.constStructAddr = 0x01000;
ROM.externFuncStructAddr = 0x013c0;
}
else
{
m3Hwi.resetVectorAddress = 0x0;
}
The .map file for a given project can be consulted to see exactly what sections of the stack reside in ROM.
Note
The SNV region can be configured to be either one or two pages long using the
NVOCMP_NVPAGES
define. On some systems, only two page SNV may be supported.
Refer to Flash for more information about what is supported on a
given platform.