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.

CCS/TMS320F280049C: SCI custom bootloader on F280049C controlCARD

Part Number: TMS320F280049C
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

Good morning,

i'd like to implement a custom bootloader on my F280049C controlCARD via SCI. 

To do practice with the bootloader concepts and the examples provided by TI, I’m trying to do an exercise. 

I’m going to use the “flashapi_ex2_sci_kernel” example (BANK0_NO_LDFU build configuration) and the “serial_flash_programmer” PC application available in the C2000Ware software pack. 

I set the “flash” boot mode from Bank 0 and Sector 0. In the sectors 0, 1 and 2 of Bank 0 I stored the SCI kernel (SCI bootloader).

The BANK0_NO_LDFU kernel configuration must be used to manipulate flash in Bank 1 so I built the “flashapi_ex3_live_firmware_update” example (BANK1_FLASH build configuration) with the purpose to use the “flashapi_ex3_live_firmware_updateBANK1FLASH.txt” file generated as Application code. In the picture above is shown what I’m going to do. 

When I run the firmware download with the console command “serial_flash_programmer.exe -d f28004x -k flashapi_ex2_sci_kernel.txt -a flashapi_ex3_live_firmware_updateBANK1FLASH.txt -b 9600 -p COM1 -v -w” I receive always the same “crash” during the download.

The “serial flash programmer” tries to download the kernel. Maybe it’s configured to work with the SCI bootloader stored in the ROM memory. This step is not required in my example because I boot directly from Bank 0 and Sector 0 where the SCI kernel is stored. 

I’d like to ask you:

  • Is it possible to disable the kernel download in the “serial flash programmer”? If yes, in which way?
  • Is my idea correct or there is some concepts wrong? 

Thank you very much for your support. 

Fabrizio

  • Hello

    Thanks for providing good details and images in your post!
    I'm not seeing anything at this moment in regards to any wrong concept.

    The serial flash programmer is designed to work with the ROM bootloader where it first uses that ROM bootloader to load the kernel and then the loaded kernel loads in the application to flash. This is likely getting stuck because it uses the kernel already in your memory to load the kernel file instead of the application file. What you need to do is import the serial flash programmer into Visual Studio, open serial_flash_programmer.cpp and comment out line 218 (#define kernel). Then rebuild the EXE. This removes the first step where it loads the kernel (which you don't need in this case).

    Serial Flash Programmer doc: http://www.ti.com/lit/sprabv4

    Best regards
    Chris
  • Hello Christopher,
    thank you very much for your reply.

    I commented the line 218 (#define kernel) in the Serial Flash programmer project and now the download of the application code in Bank 1 works correctly.

    Thank you for your support.

    Have a nice day.

    Fabrizio