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.
Hello,
I wrote a Bootloader to update my TMS320F280025C controller. I want to flash16 bytes at the same time.
The flash process begins and the right data were written to the right addresses in the flash. The problem is that the flash process aborts when the address 0x879DB is flashed.
But only the half data are flashed. When I flash an .bin-File that is smaller than it works fine.
Does anybody no where the problem is and how can I fix them?
Here is the Linker-File for my programm:
MEMORY
{
// All length in word (2Byte). All orgin adresses words.
//--- Begin / Boot -------------------------------------------------------------------
BEGIN : origin = 0x00080000, length = 0x00000002
//--- RAM ----------------------------------------------------------------------------
// RAMM0 : origin = 0x00000000, length = 0x00000400
BOOT_RSVD : origin = 0x00000002, length = 0x00000126
RAM_Command : origin = 0x00000128, length = 0x00000018 // Not deleted on Soft-Reset: Command APP to Bootloader
RAM_APP_TO_BOOT : origin = 0x00000140, length = 0x00000200 // Not deleted on Soft-Reset: APP has write permission: Used for Reset reason, ...
RAM_Boot_To_APP : origin = 0x00000340, length = 0x000000C0 // Not deleted on Soft-Reset: Boot has write permission: Usage ?
// RAMM1 : origin = 0x00000400, length = 0x000003F8
// RAMM1_RSVD : origin = 0x000007F8, length = 0x00000008 // Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory"
RAM_STACK : origin = 0x00000400, length = 0x000003F8
// RAMLS4 : origin = 0x0000A000, length = 0x00000800
// RAMLS5 : origin = 0x0000A800, length = 0x00000800
RAM_DATA : origin = 0x0000A000, length = 0x00001000
// RAMLS6 : origin = 0x0000B000, length = 0x00000800
// RAMLS7 : origin = 0x0000B800, length = 0x00000800
RAM_OSCI : origin = 0x0000B000, length = 0x00001000
// RAMGS0 : origin = 0x0000C000, length = 0x000007F8
RAM_RAM_CODE : origin = 0x0000C000, length = 0x000007F8 // Code that must be executed in RAM ist copied here
// RAMGS0_RSVD : origin = 0x0000C7F8, length = 0x00000008 // Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory"
//--- Reset ----------------------------------------------------------------------------
RESET : origin = 0x003FFFC0, length = 0x00000002
//--- BootROM --------------------------------------------------------------------------
BOOTROM : origin = 0x003F0000, length = 0x00008000
BOOTROM_EXT : origin = 0x003F8000, length = 0x00007FC0
//--- FLASH ----------------------------------------------------------------------------
//--- Bootloader -----
// FLASH_BANK0_SEC0 : origin = 0x080002, length = 0x000FFE
// FLASH_BANK0_SEC1 : origin = 0x081000, length = 0x001000
// FLASH_BANK0_SEC2 : origin = 0x082000, length = 0x001000
FLASH_BOOTLOADER : origin = 0x080002, length = 0x002FFE // Area of the Bootloader
//--- Config Block ----
// FLASH_BANK0_SEC3 : origin = 0x083000, length = 0x001000
FLASH_CONFIG : origin = 0x083000, length = 0x001000 // Configuration only written in production of the device. By second Binary.
//--- APP -------------
// FLASH_BANK0_SEC4 : origin = 0x084000, length = 0x001000
// FLASH_BANK0_SEC5 : origin = 0x085000, length = 0x001000
// FLASH_BANK0_SEC6 : origin = 0x086000, length = 0x001000
// FLASH_BANK0_SEC7 : origin = 0x087000, length = 0x001000
// FLASH_BANK0_SEC8 : origin = 0x088000, length = 0x001000
// FLASH_BANK0_SEC9 : origin = 0x089000, length = 0x001000
// FLASH_BANK0_SEC10 : origin = 0x08A000, length = 0x001000
// FLASH_BANK0_SEC11 : origin = 0x08B000, length = 0x001000
// FLASH_BANK0_SEC12 : origin = 0x08C000, length = 0x001000
// FLASH_BANK0_SEC13 : origin = 0x08D000, length = 0x001000
FLASH_APP_CRC : origin = 0x084000, length = 0x000100 // Do not use: This block is used for CRC of the Firmware. It is written by an external tool
FLASH_APPLICATION : origin = 0x084102, length = 0x009EFE // Area of the Application (Size = SizeOfFlash - BEGIN - FLASH_APP_CRC)
// FLASH_BANK0_SEC14 : origin = 0x08E000, length = 0x001000
FLASH_RAM_CODE : origin = 0x08E000, length = 0x001000 // Code that will be copied to RAM
//--- Online config ----
// FLASH_BANK0_SEC15 : origin = 0x08F000, length = 0x000FF0
// FLASH_BANK0_SEC15_RSVD : origin = 0x08FFF0, length = 0x000010 // Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory"
FLASH_ONLINECONFIG : origin = 0x08F000, length = 0x001000 // Reserve: In case we have to write someting on run time. Yes! We also take RSVD. Because it will only be data.
}
SECTIONS
{
codestart : > BEGIN, ALIGN(8)
.text : >> FLASH_BOOTLOADER, ALIGN(8)
.cinit : > FLASH_BOOTLOADER, ALIGN(8)
.switch : > FLASH_BOOTLOADER, ALIGN(8)
.reset : > RESET, TYPE = DSECT
command : load = RAM_Command, TYPE = NOLOAD // Command APP to Bootloader.
RamAppToBoot : load = RAM_APP_TO_BOOT, TYPE = NOLOAD // RAM APP to BOOT. Will not be deleated on reset.
RamBootToApp : load = RAM_Boot_To_APP, TYPE = NOLOAD // RAM BOOT to APP. Will not be deleated on reset.
.stack : > RAM_STACK
.heap : > RAM_STACK
.init_array : > FLASH_BOOTLOADER, ALIGN(8)
.bss : > RAM_DATA
.bss:output : > RAM_DATA
.bss:cio : > RAM_DATA
.const : > FLASH_BOOTLOADER, ALIGN(8)
.data : > RAM_DATA
.sysmem : > RAM_DATA
osciRAM : > RAM_OSCI
// Allocate IQ math areas:
// IQmath : > RAM_DATA
// IQmathTables : > RAM_DATA
.TI.ramfunc : LOAD = FLASH_BOOTLOADER,
RUN = RAM_RAM_CODE,
LOAD_START(RamfuncsLoadStart),
LOAD_SIZE(RamfuncsLoadSize),
LOAD_END(RamfuncsLoadEnd),
RUN_START(RamfuncsRunStart),
RUN_SIZE(RamfuncsRunSize),
RUN_END(RamfuncsRunEnd),
ALIGN(8)
FlashConfig : > FLASH_CONFIG
}
Best regards,
Markus
Markus,
What is the error from the flash API when it failed to program at that address further?
Also, please clean up your linker cmd to remove all the commented stuff and attach the linker cmd file to your post instead of copy/pasting it.
Thanks and regards,
Vamsi
Hi Vamsi,
there is no error. It stop to write my data to flash without an error.
Thanks and regards,
Markus
Markus,
Does that mean the PC is stuck in flash API's program function? Or in the while loop after that waiting for the program command to complete?
Please search for below question in this FAQ: e2e.ti.com/.../faq-faq-on-flash-api-usage-for-c2000-devices
What are the common debug tips that we can consider when Flash API fails to erase or program?
Thanks and regards,
Vamsi