Tool/software:
I'm working on the TMS570LC4357, and I need to load my application into flash and execute it from RAM.
I want to achieve this using the linker script. How can this be done?
I already know how to handle section-wise copying, but after my startup code executes, I need the execution to continue from RAM after entering main()
This is my application linker
/* Linker Settings */
--retain="*(.intvecs)"
/* USER CODE BEGIN (1) */
/* USER CODE END */
/*----------------------------------------------------------------------------*/
/* Memory Map */
MEMORY
{
/* USER CODE BEGIN (2) */
/* USER CODE END */
VECTORS (X) : origin=0x00200000 length=0x00000020
//FLASH0 (RX) : origin=0x00000000 length=0x00200000
FLASH1 (RX) : origin=0x00200020 length=0x001FFFE00
STACKS (RW) : origin=0x08000000 length=0x00001500
RAM (RWX) : origin=0x08001500 length=0x00040000
/* USER CODE BEGIN (3) */
/* USER CODE END */
}
/* USER CODE BEGIN (4) */
/* USER CODE END */
/*----------------------------------------------------------------------------*/
/* Section Configuration */
SECTIONS
{
/* USER CODE BEGIN (5) */
/* USER CODE END */
.intvecs : {} > VECTORS
.text align(32) : {} > FLASH1
.const align(32) : {} > FLASH1
.cinit align(32) : {} > FLASH1
.pinit align(32) : {} > FLASH1
.bss : {} > RAM
.data : {} > RAM
.sysmem : {} > RAM
/* USER CODE BEGIN (6) */
/* USER CODE END */
Thanks