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: How to copy the compiled file from one device and load it on the other one?

Tool/software: Code Composer Studio

Hi,

I want to download the compiled program from one device and load it on the other similar devices. The emulator is XDS100v2 and the device belongs to C67xx DSP family. All of the boards are completely similar to each other. I wrote the program in the past and used it in one of my projects, and want to do the same project now for similar hardware. The issue is that I don't have the source code right now on the computer 
I am working on it now unfortunately and I can't return where my Laptop (the computer that I had saved the source code on it) is there so that I need to copy the program from the board that was programmed in the past and get it so that I can reuse it again. 

I'm looking for any way to read (copy) the compiled program (.hex file) from one device and load it on the other similar devices. Any link, wiki, user manual or video which could help me. I have a lack of time. Please give me advice. I didn't have similar experience and it's new for me to do this.

Please consider that the issue is not to achieve the source code from the programmed device but is to be able to program some other similar devices by achieving the hex file (compiled final file) from it.

In the simple words I should say that:

1-I want to download the hex file from one device

2-Then I want to program other devices with that .hex file

Regards,

Hossein

  • Hello,
    You can use CCS to read the target memory and copy its contents to a binary (or hex) file on the computer, using the Memory Browser view:
    e2e.ti.com/.../692926

    Now the issue is what type of memory you wish to download the binary to on the other device. If it is RAM, then no problem - you can again use the Memory Browser to load that binary or hex file to memory. If it is flash memory, then it gets more tricky. CCS does not have native external flash programming support for C6x. Usually some third party utility like FlashBurn is used. Since you already have an existing board that you programmed the flash with, I assume you already have some method of doing this.

    Thanks
    ki
  • Hi Ki,

    Thank you. My mission has been done.

    Related to your reply there are two more questions in my mind now.
    #1-Fortunately I had ccxml and gel file on the new computer and choose them for the new boards and then I load the binary file in Memory Browser on them. But when I didn't choose the appropriate ccxml and gel file after loading binary file there was a problem and the board didn't work correctly. The clear question is that: Doesn't this saved binary file contain gel and ccxml file? I thought what is loaded to memory should contain every compiled file such as ccxml and gel. Would you please make this clear to me? Is there any link or wiki that discuss final complied fie?

    #2- You said if the memory is external flash memory it gets more tricky. Ok, so if I'd like to know more about this. Are those third-party utilities which you mentioned free or not?

    Regards,
    Hossein
  • Related to the last sentence, No I had not such an experience of external flash memory programming for C6x.
  • Hossein Forouzani said:
    Doesn't this saved binary file contain gel and ccxml file?

    No. 

    Hossein Forouzani said:
    I thought what is loaded to memory should contain every compiled file such as ccxml and gel. Would you please make this clear to me

    It does NOT. Compiled files such as *.out, *.obj, etc do not contain any information at all regarding ccxml and gel files. ccxml and gel files are CCS debugger specific files and have nothing to do with the code or build process. Those files do not belong in standard generated executables from the build tools.

    Hossein Forouzani said:
    Is there any link or wiki that discuss final complied fie?

    http://processors.wiki.ti.com/index.php/A_Brief_History_of_TI_Object_File_Formats

    Hossein Forouzani said:
    #2- You said if the memory is external flash memory it gets more tricky. Ok, so if I'd like to know more about this. Are those third-party utilities which you mentioned free or not?

    Using it on generic DSKs it is free. For custom board, it is not:

    http://classic.softwaredesignsolutions.com/flashburn4.aspx

    Thanks

    ki

  • Hi KI,

    Thank you for your complete answer. I really enjoy your participation in helping us.

    You said:

    It does NOT. Compiled files such as *.out, *.obj, etc do not contain any information at all regarding ccxml and gel files. ccxml and gel files are CCS debugger specific files and have nothing to do with the code or build process. Those files do not belong in standard generated executables from the build tools.

    Related to your comment I have a related question:

    Ok, consider that we have a board and there isn't its gel file. So how could we load the binary file which we saved from another device in Memory Browser before this? 

    Best Regards,

    Hossein

  • Hossein Forouzani said:
    Ok, consider that we have a board and there isn't its gel file. So how could we load the binary file which we saved from another device in Memory Browser before this? 

    A GEL file is not always needed. It depends on what kind of initialization is required for the device. There are many CCS debug environments where a startup GEL file is not even used because any extra initialization is not needed (perhaps there is a bootloader that does all the required initialization, or the target board simply does not require any additional initialization, etc).

  • Thank you for your reply.