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.

Bootloader Tricks

Other Parts Discussed in Thread: TMS320C5515

We're looking to release our first hardware with a limited set of software in an SPI EEPROM, with a view to allowing for field reflashing of our internal SPI flash with more advanced software versions later.

In our first version, we'd like to avoid having to write and debug (1) USB interface or (2) SD card interface. HOWEVER, we want to be able to LOAD our NEW software from either USB or SD cards. Here's how - the boot ROM code supposedly includes code to boot from USB or SD Cards directly i.e. the smarts to do this are ALREADY in the C5505 ROM. So, the idea is this. We don't have to develop the smarts to use USB or SD right now in our first release, since the ROM has the code already. Our first SPI flash will be simple, and when we want more complex code, the user simply inserts SD or connects USB, and we boot the new code, which we then write to the SPI flash, and we're upated.

Here's the problem - as I understand it, the ROM will look for a boot device in a certain order. So it will find the SPI Flash first, and not look for USB or SD cards. So here's the question - how do we get it to look at USB or SD when we want the "update boot"?

I'm thinking that the only way to do this would be to have some sort of key/switch that would hardware disable the SPI Flash during boot, so that the ROM boot code keeps searching. I guess another way would be to have a switch controlled by software which disables the SPI Flash and reboots and then re-enables it somehow?

Any better ideas out there? Would welcome some creative solutions.

Would also like CONFIRMATION from TI and/or others that, indeed, this approach to updating our product in the field is workable. I don't want to find out that the ROM code for USB and/or SD cards doesn't actually work!

Thanks in advance for your ideas.

  • According to the documentation, the C5505 bootloader does not support MMC/SD, UART, or USB as a source.  This eliminates my concern about the VID/PID being fixed in ROM.

    I am designing with the C5506, which does not have a scanning bootloader, but instead reads 4 GPIO pins at reset to select exactly one boot method.  A user-actuated switch could easily alter the bootloader source for the C5506 by changing the GPIO levels.

    For your situation, I'm not sure what to suggest.  Both USB and SD boot seems to be eliminated as a choice because they're unsupported.  The only options, in order of scan, are NOR, NAND, SPI, and I2C.  I think you'll need some sort of removable memory and possibly a switch to disable the permanent SPI.  Since CompactFlash is based on NOR/NAND, you could feasibly allow a CF card to override the boot process.  However, getting your firmware image onto the CF card might be tricky, since you can't use a normal FAT system.  The memory contents must match the DSP boot signature.  If you use an SPI or I2C based removable memory, then you'll need a physical switch to disable the default SPI.

    Another option would be to develop an upgrade function into your USB interface.  The SPI EEPROM would then most likely have a protected region and an upgradable region.  At startup, the C5505 would always load the core firmware from SPI.  But you have the option of putting code in that firmware image which can rewrite some or even all of the EEPROM.  Just pay careful attention to the block erase size.  With this setup, you could either have a hardware switch or even a software command that breaks out of the original firmware and loads a new firmware image over USB for programming into the EEPROM.  Unfortunately, this is a big piece of code to write, and it has to work flawlessly before you can ship, unless you want to risk not being able to upgrade early models in the field.  I believe there are commercial solutions available, but I don't know if they support the C5505 yet.

    I am in a similar situation, even with the C5506.  I've decided against the USB bootloader because of the fixed VID/PID, the potential for slow startup, the need for custom Windows drivers, and the need for a hardware switch.  Instead, my board will hard-wire the SPI bootloader, and I will have to make sure that the USB function has commands for load, checksum, program, and verify of firmware updates.  A big question is whether to allow the update firmware to overwrite itself (which allows bug fixes to the upgrade process) or to protect a fixed section of the SPI memory (which hopefully prevents the user from upgrading the product to a brick).

  • Brian, Thanks for responding.

    According to SPRAB92 and SPRAB92A by Ming Wei, the C5504/5 and VC5504/5 support MMC/SD, USB and UART booting. The C5505 document was written in December 09 and the updated one for VC5505 in May 2010. So I'm assuming this capability is indeed true.

    I agree with your concern about upgrading products to bricks - tricky stuff. Never seems to bother all the Windows software companies that take over our systems and give us new features we didn't ask for :(

     

  • Hi MixedSignal!

    Our company is developing new device using tms320c5515 DSP. We have bought EVM TMS320C5515 starter kit.

    We want to do the same firmware update. We will just turn off SPI eeprom using hardware (Just hold a button or several buttons on device).

    There is a big problem! As far as we understand we need to make secure boot image, but we can't get the utility. We contacted our local representative located in Moscow, Russia but they don't know anything about it! Could you please help us!

    Best regards,

  • You probably need HEX55.exe to create your boot image.

    At least for the C5503/C5506/C5507/C5509/C5509A there is a document, SPRA375F, which explains the entire process.  One critical detail is the -v5510:2 option which tells which format to use.

    In your case, the option might be -v5515 or -v5515:x - I'm not sure.  You need to look at the documentation for the TMS320C5515 and follow the links to the Bootloader documentation, which is probably in a separate file.  Once you find that, you should have all the correct details for your processor.  Sorry, I have not used the C5515, so I don't happen to know the document name.

  • Of course I know about this utility! But it is unable to make secure boot image! 5515 can only boot from SD card using secure boot image.

  • Sorry. I made the assumption that the C5515 documentation would explain how to create a secure boot image, and I further assumed that HEX55.exe would have a special option to support this. If you've already checked the complete C5515 bootloader documentation and found nothing, then I sure hope someone from TI can unravel this mystery.

  • Mixed-signal,

    Yes, the C5515 does have the ability to boot from USB or SD card. Due to export control restrictions, please contact your local TI representative to request the secure boot image software. We will followup with him/her to get the necessary process sorted out.

    Regards,

    Sunil Kamath

     

  • Hi di-sk,

    Please let me know who is your TI contact and I will follow up with the person to get the necessary process done.

     

    Best Regards,

    Sunil Kamath