This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/AWR1642: Why is unused section deleted even though using the RETAIN pragma?

Part Number: AWR1642

Tool/software: TI C/C++ Compiler

I use RETAIN pragma for interrupt vector table as below.

#pragma RETAIN(userVectorTable)
#pragma DATA_SECTION(userVectorTable, ".intvecs")
static const volatile uint32_t vectorTable[16] = {

....

but above data is deleted on the map file.

Why is unused section deleted even though using the RETAIN pragma?

MEMORY CONFIGURATION

name origin length used unused attr fill
---------------------- -------- --------- -------- -------- ---- --------
VECTORS 00000000 00000100 00000000 00000100 X
PROG_RAM 00000100 0003ff00 000004dc 0003fa24 R X
DATA_RAM 08000000 00030000 00000818 0002f7e8 RW
L3_RAM 51000000 000a0000 00000000 000a0000 RW
HS_RAM 52080000 00008000 00000000 00008000 RW

I attached test project.

test_Retain.zip