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.

Creating a Second-Level Bootloader for FLASH Bootloading on TMS320C5000

Other Parts Discussed in Thread: TMS320C5515, CODECOMPOSER

Greetings, We are developing a product around the TI C5515 Fixed Point DSP. In this product we utilize our own Bootloader program which provides firmware image management and execution capabilities. Our bootloader resiseds in the base of flash memory and is invoked by the on-chip primary DSP bootloader. Our Bootloader receives firmware images via a UART in binary data format and stores them in upper flash along with related data structures. We need our Bootloader to be able to load a firmware image from flash to the corresponding areas of RAM according to its linking and then be able to execute that firmware program. We have done this successfully on our existing product based on the TI C6727 Floating Point PRocessor based upon assembly language code we obtained that I translated to "C". I have a document that explains how to create a second-level bootloader (SPRA999A1) but I cannot seem to find this same document for the TMS320C5515 DSP. It is all well and good to understand that the linker creates .out files in Common Object File Format (COFF) and that the Hex Conversion Utility (hex55v4.exe) converts the COFF file to various formats. The problem is that I cannot find documentation as to the exact format produced by the hex55v4 -b (binary) switch and what the on-chip bootloader does when it loads and executes a program residing in flash memory created in binary format by hex55v4. I need to be able to reproduce the functionality of the on-chip primary bootloader and encapsulate that function, preferably in "C" code, and integrate it into our Bootloader program. Would it be possible to obtain the source code for the DSP on-chip bootloader? This would obviously be the most pragmatic way to proceed. If not, if I could get a detailed description of what the on-chip bootloader does, and a through defintion of the format of the binary file produced by hex55v4, then I could write my own second-level bootloader function. Any help in this matter would be greatly appreciated. Thanks very much.

Howard Marshall, Senior Software Engineer, Aegis Lightwave, 78A Olympia Ave, Woburn, MA 01801 USA

  • Hi Howard,

    Please refer to the C5515 bootloader app note,  http://focus.ti.com/lit/an/sprabd7/sprabd7.pdf

    If you need further info, please let us know.

    Best Regards,

    Peter Chung

     

  • Hi Peter,

    in the app note it is mentioned, that booting from SD Card is possible. Is there more information on this possibility existing? Does it work, if the SD Card has a Filesystem (as in the ATA FS SD Card examples)? It is also mentioned, the code can be encrypted? How can this be done?

    Thanks and regards

  • Hi,

     

    There is a tool to make a boot image for the SD boot. http://e2e.ti.com/support/dsp/tms320c5000_power-efficient_dsps/f/109/p/69684/252377.aspx#252377

    Because SD boot requires secure boot image. After you create boot image, you simply copy the boot image to SD card. Then it'll boot from the SD card. One thing you make sure is that other boot method are deactivated. SD boot is lower priority than NOR, NAND, I2C and SPI. 

    Regards,

    Hyun

  • As I have now experienced, things aren''t so easy - not at least for EU Citizens...

    Ok, but my local support tries to find a way, so I'm still interested in the more technical questions:

    Assume I have a SDCard with a FAT-filesystem on it. Can I just place a bootfile with a fixed name or do I have to prepare the SDCard - and if so - how in detail?

    How is the code secured? By the ID of the DSP processor?

    Thanks

    Micky.

  • Micky,

    The C5505/04/15/14 supports only secure boot-up from SD cards. The boot-image has to be encrypted. We have a tool that generates an encrypted boot-image out of "*.out" file. Since we need to be compliant with "export control", we need to know customers who have the tool, So please contact your local sales and let them contact our marketing team in order to get the tool.

     

    Best Regards,

    Peter Chung

     

     

  • Peter,

    yes I know that (and have already contact to TI). But I want to know is just a basic question. Let's say, I have this out-File. Do I place it somewhere on the SD Card, does the Tool this somehow, disturbs this file a "normal" Fat System?

     

    Micky

  • Micky,

     

    The boot-image create tool will create a *bin file. Then you need to name the file as "boot5505.bin", then copy over to your SD card. The boot-image must be in the first partition with filename "boot5505.bin . 

    Please refer to the "Using the TMS320C5515/14/05/04 Bootloader"  (http://focus.ti.com/lit/an/sprabd7/sprabd7.pdf)

    Regards,

    Peter Chung

  • Hi Peter,

    In the mentime I have finally the utilty here. I want to test it, but as I understand I have to remove the bootimages of my C5515 EVM. Is there any easy way to do so (e.g. with CodeComposer)?

     

  • Micky,

    I have attached a .bin file. You can write it to the NOR/NAND/SPI/I2C and it will erase the content.

    If you do not have the programmer.out for the EVM, then let me know. I will get you the file.

    Regards,

    Peter Chung

     

    erase.bin
  • Hi Peter,

    I've just seen, that you did answer me (seems the thread has been moved. In my profile the link didn't work anymore - anyway): I have the EVM and the CC. But how can I flash something to the EVM? I just can't see it. I could upload something *.out into memory, also the .bin?

    Sorry, if this is a stupid Q...

    Micky

  • Micky,

    Please find the programmer.out file

    [How to use the programming tool]
    1) Open CCS
    2) Connect to target
    3) download "programmer.out"  and run
    4) Firt instruction on output window.
    Choose the device...
    0XX - CPLD setup only
    1x - NAND Flash [CSx: 2,3,4,5]
    2x - NOR Flash [CSx: 2,3,4,5]
    3x - SPI EEPROM [x=1: EVM, x=2: USB Stick]
    4 - IIC EEPROM
    5 - MMC;  6 - SD

    ==> select device you want to program
    ==> for NAND and NOR, you should select Chip Select number
    ==> 2: NAND_CE0, 3: NAND_CE1, 4: ASYNC_CE0 (NOR FLASH in the EVM Memory Card), 5: ASYNC_CE1 (SRAM in the EVM memory card)
    ==> example: "24"

    **You must program a secure boot-image to MMC and SD to get proper boot-up operation.

    5) Second instruction on output window
    Operation to perform...
    0 - CPLD setup for this device
    1<file> - Program device with <file>
    2<file> - Read device data to output <file>

    ==> enter 1+file name
    ==> note that no gap between 1 and file name
    ==> file name should include whold path
    ==> example: "1C:\Medical\SW\C5505_tool\BootImageCreation\mybootImage.bin"

    6) wait till programming is complete

    programmer.out
  • Thanks!

    BTW: Where is the Verify Answer Button?

  • Hi peter,

    I want to get some help from you.

    I baught TMS320C5515 EVM board + Digital Stethoscope front-end board a few days ago. I have tried to find a way to make it work because the contents described in the Quick Start Guide and the Applicaton Report don't match the contents in the two CDs (CCS v4.1 IDE and Digital Stethoscope analog front-end module).

    I found the programmer.out and EVM_Samples\bin\EVM_Sample.bin in "D:\Texas Instruments\ccsv4\emulation\boards\evm5515_v1\tests\demo" and I copied them to D:\. I loaded the programmer.out and ran the program, then I burned the EVM_Sample.bin by typing 31 and D:\EVM_Sample.bin, it worked.

    Then I found the STETHSystem.out and transfered it to STETHSystem.bin by typing "hex55.exe -boot -v5505 -serial8 -b -o STETHSystem.bin STETHSystem.out" in the command line.Then I tried to burn it to the SPI EEPROM  just as before, but failed, as follows,

    Choose the device...
    0XX - CPLD setup only
    1x - NAND Flash [CSx: 2,3,4,5]
    2x - NOR Flash [CSx: 2,3,4,5]
    3x - SPI EEPROM [x=1: EVM, x=2: USB Stick]
    4 - IIC EEPROM
    5 - MMC;  6 - SD
    31
    Operation to perform...
    0 - CPLD setup for this device
    1<file> - Program device with <file>
    2<file> - Read device data to output <file>
    1D:\STETHSystem.bin
    SPI EEPROM...
    Writing data to device...
    Opening D:\STETHSystem.bin...
    Input file opened
    WRITE ERROR! at 0x0000
    Wrote 0x4631  Read 0xffff

    So I'm wondering if there's something wrong in the command "hex55.exe -boot -v5505 -serial8 -b -o STETHSystem.bin STETHSystem.out", I read the "Using the TMS320C5515/14/05/04 Bootloader.pdf" and tried to change the parameters and it failed again. I don't know how to do it,, would you give me some advice?

  • I think "stethosystem.bin" is too big for the SPI EEPROM. The EEPROM size is 256Kbit (not byte). But, I don't know why it failed to write the first byte. Since it worked with the EVM_Sample.bin, I do not worry about it.

    Why don't you program it to NOR or NAND?

    Regards,

    Peter Chung

     

  • Hi Peter,

    Thank you for your help! I've tried to program it to NOR and it worked. But I've got another problem.

    First, I burned the program which is in StethSystem_v_0_9 folder given by the CD, it was programmed successfully, but when I ran it, there was only a white line on the LCD and I couldn't see anything in the PC appication. So I think there must be something wrong in the codes.

    Then,  I downloaded the MDK_Stethoscope_C5515EVM.zip from http://code.google.com/p/c5505-ezdsp/ and got the StethSystem_v_0_12 folder, perhaps it's the latest version, then I programmed STETHSystem.out to NOR and it worked, the LCD and PC application are all right, there's no problem here, but I don't konw how to build  STETHSystem.out.

    So I want to open the project in StethSystem_v_0_12 folder and build it. As I can't import the project  by selecting Existing CCS/CCE Eclipse Project, I selected File - import - legacy  CCSv3.3 Project ... and migirated the project to CCS 4.1.0, then I closed it and imported the migrated project by selecting Existing CCS/CCE Eclipse Project , after this, I choosed Project - Build Active Project and there were lots of errors and warnings, I guess it's the problem of Include Options in C\C++ Build Properties cause there was a "C:/ti/C5500/csl/include" which I didn't find it on my PC, or there were some other reasons, woud you give me some adivices?

    Best regards,

    Gao Jiao

  • Hi Jiao,

    I am glad that you made it work finally.

    The project is for CCS 3.3, you can't open the project with CCS4.x. Do you have CCS3.3?

    Regards,

    Peter Chung

  • Yes, I installed CCS 3.3 and I can edit the project now. Thank you very much for your help!

    Best regards,

    Gao Jiao

  • Hi Peter,

    with the erase.bin, the image on the EVM-SPI was obviously erased, as the default is not bootet anylonger. Now I want to download my programm into the SD Card, but it won't work.

    You mentioned You must program a secure boot-image to MMC and SD to get proper boot-up operation.

    but I have a SD Card only. Do you mean, I should both use MMC and SD option or do you mean this or that?

    Aynway, I tried to use with MMC option (having a SD Card) and got

    MMC...
    BOOT5505.BIN not found
    Opening V:\oled.bin...
    Input file opened
    Create() error

    With SD, at least a boot5505.bin File is written. (I have the c5515 EVM, so I hope this doesn't matter).

    Well, it doesnot boot (regardless if I use SD or MCC or both). I just compiled the Oled Demo of the EVM, converted the out with the secure boot tool and wrote it to the SD. Do I miss something - I hope the processor is switched to the right frequencies etc.

    Any help is welcome.

    Micky

  • Micky,

    1) Do you have the tool that generates secure boot-image?

    2) You can use either SD or MMC card

    3) the boot5505.bin file should be located at the root directoy.

    Please let me know how it goes.

    Regards,

    Peter

  • HI Peter,

    1) yes I have the tool

    2) I have created a out file (out of a running example of the evm). This I converted to a bin with the secure boot image tool.

    3) Then I used the programmer.out to place the example.bin on the SD Card. It writes bytes and the file, but it doesn't boot.

    What do I wrong here?

    Micky

  • Hello,

    I'm still facing this unsolved problem:

    I have the secure-image-tool for generating a bin-File . This generates a bin file, I uploaded it in system to a SD Card in the EVM. But the DSP won't boot.

    Can you please provide some advice?

    Thanks in advance

    Michael

  • I also have a project using the C5515.  Originally, we were using an I2C EEPROM to boot, but the application has grown to the point where the code size exceeds 64kB, the maximum supported size.

    The board has a SD card, but unfortunately it is on SD 1.

    I would like to write a secondary bootloader that could reside in the I2C EEPROM, then would load the main program from the SD card.  It seems like starting from the existing bootloader code is most logical; is there any way I could get a copy of the source?

     

  • Hi Peter

    I am trying to develop a second stage bootloader and have copied the contents of the bin file to RAM according to the C5515 bootloader app note. However the program does not run properly after jumping to the image entry point.

    Is there a second stage bootloader example or is the source code for the ROM bootloader available?

    Thanks

    William