I would like to execute "text" section in RAM on Hercules MCU(LS12).
For example,I changed the linker command file(.cmd) from :
/*----------------------------------------------------------------------------*/
/* Linker Settings */
--retain="*(.intvecs)"
/*----------------------------------------------------------------------------*/
/* Memory Map */
MEMORY{
VECTORS (X) : origin=0x00000000 length=0x00000020
FLASH0 (RX) : origin=0x00000020 length=0x0013FFE0
STACKS (RW) : origin=0x08000000 length=0x00001300
RAM (RW) : origin=0x08001300 length=0x0002ED00
}
/*----------------------------------------------------------------------------*/
/* Section Configuration */
SECTIONS{
.intvecs : {} > VECTORS
.text : {} > FLASH0
.const : {} > FLASH0
.cinit : {} > FLASH0
.pinit : {} > FLASH0
.bss : {} > RAM
.data : {} > RAM
/* USER CODE BEGIN (1) */
.constdata : {} > FLASH0
/* USER CODE END */
}
/*----------------------------------------------------------------------------*/
to :
/*----------------------------------------------------------------------------*/
/* Linker Settings */
--retain="*(.intvecs)"
/*----------------------------------------------------------------------------*/
/* Memory Map */
MEMORY{
VECTORS (X) : origin=0x00000000 length=0x00000020
FLASH0 (RX) : origin=0x00000020 length=0x0013FFE0
STACKS (RW) : origin=0x08000000 length=0x00001300
RAM (RW) : origin=0x08001300 length=0x0002ED00
}
/*----------------------------------------------------------------------------*/
/* Section Configuration */
SECTIONS{
.intvecs : {} > VECTORS
.text : {} > RAM
.const : {} > FLASH0
.cinit : {} > FLASH0
.pinit : {} > FLASH0
.bss : {} > RAM
.data : {} > RAM
/* USER CODE BEGIN (1) */
.constdata : {} > FLASH0
/* USER CODE END */
}
/*----------------------------------------------------------------------------*/
but an error occured on CCS.
The error message is :
"../TMS570LS122xFlashLnk.cmd", line 27: error #10099-D: program will not fit
into available memory. placement with alignment fails for section
".intvecs" size 0x20 . Available memory ranges:
VECTORS size: 0x20 unused: 0x20 max hole: 0x20
error #10010: errors encountered during linking;
Is there any way to change the linker command file with another method,
or is there any "copy text section from flash to ram before execution" method
(I'd see about this issue on TI community) ?
I'll appriciate if someone would reply to my question.
Regards,
Hiroyasu