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.

C2000WARE: CAN Flash Programming Image File Format

Part Number: C2000WARE

Tool/software:

Taking a look at the C2000 CAN Flash programming (CAN Flash Programming of C2000Tm Microcontrollers (Rev. A) (ti.com)) and trying to understand the format for the image .txt file generate from the following command:

"${CG_TOOL_HEX}" "${BuildArtifactFileName}" -boot -sci8 -a -o "${BuildArtifactFileBaseName}.txt"

Opening up the text file in Code Composer Studio, I find that the first character appears unknown and need an explanation of how the bytes in the file are being translated to bytes on the microcontroller.

  • Hi Tomas,

    That character is the start of file character (visible in CCS). The bytes in the file are translated to the microcontroller starting with the key-value pair (0xAA, 0x08), then it parses over the reserved words and initial entry point address. Since this is the kernel for CAN, the initial entry point address will be 0x00000000 with length of first block 0x0200. Address for the first block would be 0x00000000 followed by the data within the first block. 

    For the kernel download, the CAN message buffer take in the data over CAN and store it in RAM. To read more on this operation, you can view the bootloader file for CAN:

    C:\ti\C2000Ware_5_03_00_00\libraries\boot_rom\f28003x\rev0\rom_sources\F28003x_ROM\bootROM\source

    For the application, the kernel will stream in the data in a similar way, and the DCAN_ReceiveApplication function will use the Flash API to write the bytes to the appropriate locations in flash memory. For more information, you can look into the function operation within the kernel file to load the application.

    Regards,

    Charles

  • So, do the following bytes after line 2 indicate the bytes written to the memory of the microcontroller?

    Also, I see in the C2000Ware code that there are boot rom examples and for the MCAN Boot, but I cannot find out how to pull up the f2838x MCAN Boot example into Code Composer Studio. Other versions in the boot rom folder, like the f280015x have .ccsproject files I can use to import the example project, but not for the f2838x. 

    How do I load the f2838x MCAN Bootloader example project into Code Composer Studio?

  • >So, do the following bytes after line 2 indicate the bytes written to the memory of the microcontroller?

    Yes.

    >How do I load the f2838x MCAN Bootloader example project into Code Composer Studio?

    The F2838x MCAN Bootloader Example you would have to generate, it is not a ready-made project in C2000ware. There are other reference examples for the MCAN flash kernel in driverlib (ex. C:\ti\C2000Ware_5_03_00_00\driverlib\f28003x\examples\flash)

    Thanks,

    Charles