Tool/software: Code Composer Studio
Hello,
I faced with one strange behavior during armlnk.exe usage, hope somebody could help me with it.
I want to fill unused area of the memory with predefined pattern, but as soon as I try to use fill option, linker reports the error or even stucks:
<Linking> INTERNAL ERROR: C:\ti\ccsv7\tools\compiler\ti-cgt-arm_16.9.4.LTS\bin\armlnk.exe experienced an unhandled exception This is caused by a defect in the TI Linker. TI Customer Support may be able to suggest a workaround to avoid this. Upgrading to the newest version of the compiler may fix this problem. Contact TI in the E2E support forums at http://e2e.ti.com under "Development Tools", "TI C/C++ Compiler". See the link titled "Submitting an issue". We need to see this ENTIRE error message and a complete, reproducable test case including ALL of the command-line options. Include all of the object files, libraries, and linker command files used to link the program. >> Compilation failure
Without fill option everything works pretty nice, but for sure I have some uninitialized area.
Here is content of two linker files:
1. LinkFile.cmd - without filling memory, works nice
/*----------------------------------------------------------------------------*/
/* Linker Settings */
--retain="*(.intvecs)"
/*----------------------------------------------------------------------------*/
/* Memory Map */
MEMORY
{
VECTORS (X) : origin=0x00000000 length=0x00000020
BOOT_FLASH (RX) : origin=0x00000040 length=0x00001FC0
LOADER_FLASH (RX) : origin=0x00002000 length=0x00006000
APP_LENGTH (R) : origin=0x00008000 length=0x00000004
APP_CRC (R) : origin=0x00008004 length=0x00000004
APP_ID (R) : origin=0x00008008 length=0x00000004
APP_PN0 (R) : origin=0x0000800C length=0x00000004
APP_PN1 (R) : origin=0x00008010 length=0x00000004
APP_PN2 (R) : origin=0x00008014 length=0x00000004
APP_PN3 (R) : origin=0x00008018 length=0x00000004
APP_VECTORS (RX) : origin=0x0000801C length=0x00000024
APP_FLASH (RX) : origin=0x00008040 length=0x00017FC0
UNUSED_FLASH (RX) : origin=0x00020000 length=0x00040000
STACKS (RW) : origin=0x08000000 length=0x00001500
RAM (RW) : origin=0x08001500 length=0x00006B00
GIO_REGS (RW) : origin=0xFFF7BC00 length=0x00000100
MIBADC_REGS (RW) : origin=0xFFF7C000 length=0x00000200
DCAN1_REGS (RW) : origin=0xFFF7DC00 length=0x00000200
DCAN2_REGS (RW) : origin=0xFFF7DE00 length=0x00000200
FLASH_REGS (RW) : origin=0xFFF87000 length=0x00001000
SCI_REGS (RW) : origin=0xFFF7E400 length=0x00000100
SPI1_REGS (RW) : origin=0xFFF7F400 length=0x00000200
SPI2_REGS (RW) : origin=0xFFF7F600 length=0x00000200
SPI3_REGS (RW) : origin=0xFFF7F800 length=0x00000200
RTI_REGS (RW) : origin=0xFFFFFC00 length=0x00000100
IOMM_REGS (RW) : origin=0xFFFFEA00 length=0x00000200
VIM_REGS (RW) : origin=0xFFFFFE00 length=0x00000100
VIM_RAM (RW) : origin=0xFFF82000 length=0x00000400
PCR_REGS (RW) : origin=0xFFFFE000 length=0x00000100
SYS1_REGS (RW) : origin=0xFFFFFF00 length=0x00000100
SYS2_REGS (RW) : origin=0xFFFFE100 length=0x00000100
ESM_REGS (RW) : origin=0xFFFFF500 length=0x00000100
TCRAM1_REGS (RW) : origin=0xFFFFF800 length=0x00000100
TCRAM2_REGS (RW) : origin=0xFFFFF900 length=0x00000100
}
/*----------------------------------------------------------------------------*/
/* Section Configuration */
SECTIONS
{
.intvecs : ALIGN(16) {} > VECTORS
.text : ALIGN(16) {} > APP_FLASH
.const : ALIGN(16) {} > APP_FLASH
.cinit : ALIGN(16) {} > APP_FLASH
.pinit : ALIGN(16) {} > APP_FLASH
.bss : {} > RAM
.data : {} > RAM
.sysmem : {} > RAM
BootCode : {} > BOOT_FLASH
CANLoader : {} > LOADER_FLASH
/* ID "A_MC" of Application hard coded from Linker File to executable */
appid_to_rom: > APP_ID fill = 0x415F4D43 { . += (0x4); }
GioRegsFile : {} > GIO_REGS, type = NOINIT
MibAdcRegsFile : {} > MIBADC_REGS, type = NOINIT
DCan1RegsFile : {} > DCAN1_REGS, type = NOINIT
DCan2RegsFile : {} > DCAN2_REGS, type = NOINIT
FlashRegsFile : {} > FLASH_REGS, type = NOINIT
SciRegsFile : {} > SCI_REGS, type = NOINIT
Spi1RegsFile : {} > SPI1_REGS, type = NOINIT
Spi2RegsFile : {} > SPI2_REGS, type = NOINIT
Spi3RegsFile : {} > SPI3_REGS, type = NOINIT
RtiRegsFile : {} > RTI_REGS, type = NOINIT
IommRegsFile : {} > IOMM_REGS, type = NOINIT
VimRegsFile : {} > VIM_REGS, type = NOINIT
VimRamFile : {} > VIM_RAM, type = NOINIT
PcrRegsFile : {} > PCR_REGS, type = NOINIT
Sys1RegsFile : {} > SYS1_REGS, type = NOINIT
Sys2RegsFile : {} > SYS2_REGS, type = NOINIT
EsmRegsFile : {} > ESM_REGS, type = NOINIT
TcRam1RegsFile : {} > TCRAM1_REGS, type = NOINIT
TcRam2RegsFile : {} > TCRAM2_REGS, type = NOINIT
}
2 LinkFile_with_fill.cmd - with filling in memory, doesn't work
/*----------------------------------------------------------------------------*/
/* Linker Settings */
--retain="*(.intvecs)"
/*----------------------------------------------------------------------------*/
/* Memory Map */
MEMORY
{
VECTORS (X) : origin=0x00000000 length=0x00000020
BOOT_FLASH (RX) : origin=0x00000040 length=0x00001FC0
LOADER_FLASH (RX) : origin=0x00002000 length=0x00006000
APP_LENGTH (R) : origin=0x00008000 length=0x00000004
APP_CRC (R) : origin=0x00008004 length=0x00000004
APP_ID (R) : origin=0x00008008 length=0x00000004
APP_PN0 (R) : origin=0x0000800C length=0x00000004
APP_PN1 (R) : origin=0x00008010 length=0x00000004
APP_PN2 (R) : origin=0x00008014 length=0x00000004
APP_PN3 (R) : origin=0x00008018 length=0x00000004
APP_VECTORS (RX) : origin=0x0000801C length=0x00000024
APP_FLASH (RX) : origin=0x00008040 length=0x00017FC0 fill=0xFFFFFFFF
UNUSED_FLASH (RX) : origin=0x00020000 length=0x00040000
STACKS (RW) : origin=0x08000000 length=0x00001500
RAM (RW) : origin=0x08001500 length=0x00006B00
GIO_REGS (RW) : origin=0xFFF7BC00 length=0x00000100
MIBADC_REGS (RW) : origin=0xFFF7C000 length=0x00000200
DCAN1_REGS (RW) : origin=0xFFF7DC00 length=0x00000200
DCAN2_REGS (RW) : origin=0xFFF7DE00 length=0x00000200
FLASH_REGS (RW) : origin=0xFFF87000 length=0x00001000
SCI_REGS (RW) : origin=0xFFF7E400 length=0x00000100
SPI1_REGS (RW) : origin=0xFFF7F400 length=0x00000200
SPI2_REGS (RW) : origin=0xFFF7F600 length=0x00000200
SPI3_REGS (RW) : origin=0xFFF7F800 length=0x00000200
RTI_REGS (RW) : origin=0xFFFFFC00 length=0x00000100
IOMM_REGS (RW) : origin=0xFFFFEA00 length=0x00000200
VIM_REGS (RW) : origin=0xFFFFFE00 length=0x00000100
VIM_RAM (RW) : origin=0xFFF82000 length=0x00000400
PCR_REGS (RW) : origin=0xFFFFE000 length=0x00000100
SYS1_REGS (RW) : origin=0xFFFFFF00 length=0x00000100
SYS2_REGS (RW) : origin=0xFFFFE100 length=0x00000100
ESM_REGS (RW) : origin=0xFFFFF500 length=0x00000100
TCRAM1_REGS (RW) : origin=0xFFFFF800 length=0x00000100
TCRAM2_REGS (RW) : origin=0xFFFFF900 length=0x00000100
}
/*----------------------------------------------------------------------------*/
/* Section Configuration */
SECTIONS
{
.intvecs : ALIGN(16) {} > VECTORS
.text : ALIGN(16) {} > APP_FLASH
.const : ALIGN(16) {} > APP_FLASH
.cinit : ALIGN(16) {} > APP_FLASH
.pinit : ALIGN(16) {} > APP_FLASH
.bss : {} > RAM
.data : {} > RAM
.sysmem : {} > RAM
BootCode : {} > BOOT_FLASH
CANLoader : {} > LOADER_FLASH
/* ID "A_MC" of Application hard coded from Linker File to executable */
appid_to_rom: > APP_ID fill = 0x415F4D43 { . += (0x4); }
GioRegsFile : {} > GIO_REGS, type = NOINIT
MibAdcRegsFile : {} > MIBADC_REGS, type = NOINIT
DCan1RegsFile : {} > DCAN1_REGS, type = NOINIT
DCan2RegsFile : {} > DCAN2_REGS, type = NOINIT
FlashRegsFile : {} > FLASH_REGS, type = NOINIT
SciRegsFile : {} > SCI_REGS, type = NOINIT
Spi1RegsFile : {} > SPI1_REGS, type = NOINIT
Spi2RegsFile : {} > SPI2_REGS, type = NOINIT
Spi3RegsFile : {} > SPI3_REGS, type = NOINIT
RtiRegsFile : {} > RTI_REGS, type = NOINIT
IommRegsFile : {} > IOMM_REGS, type = NOINIT
VimRegsFile : {} > VIM_REGS, type = NOINIT
VimRamFile : {} > VIM_RAM, type = NOINIT
PcrRegsFile : {} > PCR_REGS, type = NOINIT
Sys1RegsFile : {} > SYS1_REGS, type = NOINIT
Sys2RegsFile : {} > SYS2_REGS, type = NOINIT
EsmRegsFile : {} > ESM_REGS, type = NOINIT
TcRam1RegsFile : {} > TCRAM1_REGS, type = NOINIT
TcRam2RegsFile : {} > TCRAM2_REGS, type = NOINIT
}
Let me know please if some additional information is necessary and thanks in advance.