Other Parts Discussed in Thread: NOWECC, UNIFLASH
Tool/software:
MPU: RM57L843
IDE: Migration of the CCS (Code Composer Studio) environment to the IAR environment.
Bootloader Base Code: UART_Bootloader_RM57.zip (from the TI forum)
I have issue while converting the Bootloader written in CCS to the IAR environment.
I need to implement Flash write with ECC using the F021 Flash API provided by TI.
I’m having difficulty converting the TI CCS linker script (.cmd) file to the IAR linker script (.icf) file.
TI CCS linker script (.cmd) file...
MEMORY { VECTORS (X) : origin=0x00000000 length=0x00000020 vfill = 0xffffffff FLASH0 (RX) : origin=0x00000020 length=0x001FFFE0 vfill = 0xffffffff FLASH1 (RX) : origin=0x00200000 length=0x00200000 vfill = 0xffffffff STACK (RW) : origin=0x08000000 length=0x00002000 RAM (RWX) : origin=0x08002000 length=0x0007E000 ECC_VEC (R) : origin=(0xf0400000 + (start(VECTORS) >> 3)) length=(size(VECTORS) >> 3) ECC={algorithm=algoL2R5F021, input_range=VECTORS} ECC_FLA0 (R) : origin=(0xf0400000 + (start(FLASH0) >> 3)) length=(size(FLASH0) >> 3) ECC={algorithm=algoL2R5F021, input_range=FLASH0 } ECC_FLA1 (R) : origin=(0xf0400000 + (start(FLASH1) >> 3)) length=(size(FLASH1) >> 3) ECC={algorithm=algoL2R5F021, input_range=FLASH1 } } ECC { algoL2R5F021 : address_mask = 0xfffffff8 /* Address Bits 31:3 */ hamming_mask = R4 /* Use R4/R5 build in Mask */ parity_mask = 0x0c /* Set which ECC bits are Even and Odd parity */ mirroring = F021 /* RM57Lx and TMS570LCx are build in F021 */ } SECTIONS { .intvecs : {} > VECTORS .text align(32) : {} > FLASH0 | FLASH1 .const align(32) : {} > FLASH0 | FLASH1 .cinit align(32) : {} > FLASH0 | FLASH1 .pinit align(32) : {} > FLASH0 | FLASH1 .bss : {} > RAM .data : {} > RAM .sysmem : {} > RAM flashAPI: { .\Boot\Fapi_UserDefinedFunctions.obj (.text) .\Boot\bl_flash.obj (.text, .data) --library= "C:\ti\Hercules\F021 Flash API\02.01.01\F021_API_CortexR4_LE_L2FMC.lib" (.text, .data) } palign=8 load = FLASH0 |FLASH1, run = RAM, LOAD_START(apiLoadStart), RUN_START(apiRunStart), SIZE(apiLoadSize) }
I don’t know how to modify the following part in the cmd file for ECC Flash write when converting it to the IAR environment.
MEMORY { .... ECC_VEC(R) : ... ECC_FLA0(R) : ... ECC_FLA1(R) : ... } SECTIONS { flashAPI: { .... } }
If converting between the two linkers (TI CCS and IAR) is difficult, I would like to know if there is a way to implement Flash write with ECC without using a linker script.
I seek your advice.