SWRA845 June 2026 CC2340R5 , CC2745R10-Q1
In some project implementations, engineers want to allocate a section of their own data space to support the application, and this section is defined by a specific start address and end address. To do this, declare a new section space in the SECTIONS section of the .cmd file.
A .cmd file is a linker command file that allocates specified sections to Flash or SRAM. For information on how to use this file, see also the reference document Linker Command. Regarding Linker Command files, the primary focus is on understanding and using the Memory and Section modules. For detailed guidance, see also the Memory User Manual and the Section User Manual.
SECTIONS
{
.mysection :
{
__my_section_start__ = ;
*(.my_section)
__my_section_end__ = .;
} > RAM
}
In the code, use extern uint8_t __my_section_start__; and extern uint8_t __my_section_end__; to reference it.