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/TMS320F28069: Hex Utility + Binary Output for DFU Bootloader

Part Number: TMS320F28069
Other Parts Discussed in Thread: UNIFLASH, C2000WARE

Tool/software: Code Composer Studio

So I'm trying to develop a DFU Bootloader application to exist on my F28069/M based project. Currently I have a semi-working set of programs, one for my host side that sends the DFU commands/stores the program and the example code for the F28069 that can enumerate as a DFU device and write to flash.

I'm trying to get my application to compile down to a .bin that I can send over to be written to flash using the above programs. I am debugging why this isn't working and the steps I'm trying to get through before trying to load using the bootloader are.

  1. Use the hex-utility to output a .hex file that I can then upload to my board using CCS + XDS110
  2. Use method mentioned here to generate a .bin file from that .hex file
  3. Use Uniflash to load my .bin into flash(with the correct offset address) and get it to boot correctly.

Once I can do these things I will try using the DFU bootloader. However I'm stuck at step 1. I have the hex utility enabled and dropping out a .hex file but every time I load it the processor drops to address 0x0000 according to the XDS110 and then will get locked in the BOOT_ROM indicating something went wrong in flashing. Any help on what to do here would be much appreciated. I think once I get it to boot this .hex I can figure it out from there but I can't seem to get that working.

  • Daniel,

    Did you already check this document? http://www.ti.com/lit/sprabv4

    There is already an C2000Ware example which does something similar in below path:

    <C2000Ware>\utilities\flash_programmers\serial_flash_programmer

    Regards,

    Manoj

  • I don't want to do this over SCI, I'm trying to use the USB channel to upgrade the firmware.

  • Daniel, 

    What options are you using to generate the .hex file?

    For firmware updates through SCI, we use the following option in the C2000 Hex Utility 

    --boot --sci8 --ascii

    Thanks,

    Sira

  • I also meant to say - please refer to Sec 12 of spru513, especially Sec 12.11.4, 12.11.5, 12.11.6.

  • Daniel, FYI, this thread has been assigned to another expert, so you can expect a reply Monday.

    Thanks,

    Sira

  • Daniel,

    What is the entry point for your code? Do you see the PC set to the entry point after downloading the hex file using CCS + XDS110?

    You can refer the following post and see if it helps.

    https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/875932

    Best Regards

    Siddharth

  • I was able to make the .hex file, and the .bin file work using the XDS110 by specifying the --load_image option in the hex utility. Now I'm onto working on getting the VCU CRC check to work correctly, and getting the application to boot. For the second part. I'm using a bootloader application example, and after it checks the app it tries to load the app entry address. What would you suggest as the the entry for that address, I have the codestart section(which usually goes into the "BEGIN" section in the examples for the linker file) segregated from the rest of flash so that I can use that address as the application entry-point is that correct? When I load that address I get an ILLEGAL_ISR which indicates an illegal operation. 

  • So I wanted to post a resolution to this, as I figured out how to get this to work:

    To make your .out file bootable using a XDS debugger you should use the --load_image function in the C2000 Hex Utility section of the project properties.

    You can use the method outlined in the first post to convert that hex to a binary that can be used to flash the processor using the USB/DFU bootloader example

    To branch to that application, once it's loaded, I created a .asm function similar to the CodeStart.asm that creates a section called codestart_application which can be stored in a static memory address specified by the linker file, then you can branch to that address when you get a successful bootload of the application which will then run that application.

    The last thing I need to do is figure out how to get back into the bootloader, I've tried erasing the CRC section using the debugger flash erase tool and it caused the whole program to malfunction and not recover, need to figure out how to erase the block of flash that stores the CRC and make sure it falls back to the bootloader.