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.

need to copy the content of a good TMS320LF2407A Flash to a faulty one

Other Parts Discussed in Thread: TMS320LF2407A

Hello,

I have the same problem and I hope someone could help me solve it.

I'm using CCS3.3 and XDS510 JTAG adapter.

I need to copy the content of a good TMS320LF2407A Flash to a faulty one. I've already read the good one and have both types of files, (COFF).out and (HEX),dat.

No way to Flash .out file both with "on-chip flash programmer" and TMS320LF24XX Flash Programmer. I keep having "file not linked" error. I saw the solution posted by David but I don't know hot to practically do it, since I know little about CCS. Can someone help me step by step with the process?

I tryed to do it but I have some questions about the process.

"You can then create a CCS project and put this data in the project. I'd make it ASM only project." ---- How can I make it an ASM only project? CSS adds it in the DOCUMENTS folder, is that right?

"Then open the .dat file and delete the first line (the first line is unique, and below it you will see line after line of data values from the flash). Then add a .data directive as the first line in the file (make sure the directive does NOT start in column 1)" ---- Done it, would just a tab do it? We don't want it aligned with hex data right?

"This will put all that flash data into the .data section in the project." ---- How can I seei it? Maybe is just that after linking it all goes in data section?

"Create a linker .cmd file for the project and link the .data section to address 0x0000" ---- This is the hardest part for me. I can I actually do it? Do I have to create a .cmd file and add it to the project so that when I build it this .cmd file is used to do the job?  How should it be written? I tryed modifying some exemple .cmd file with no success. Can someone post a simple working .cmd linker file that would do the job?

Is there anything else I need to set up in the project before building it?

Thanks in advance to anyone who would help me.

  • Hi Marco,

    I split your thread from this one: e2e.ti.com/.../468297 and have assigned someone from the C2000 team to help you.
  • Marco, when I am pressing submit the forum is messing up my bullets points below, sorry for the inconvenience.

    ______________________________

    Marco,

    talking with a coworker of mine, this issue used to come up from time to time when using CCS3.

    you are on the right track with your workaround.

    1. Take the .dat file that you have and include it in an ASM file as a "SECTIONS"
    1. You have correctly removed the first line, that simply indicates where it came from in memory.The section you create can then be placed into memory with a linker command file
    2. I cannot provide you with a turn key solution, however it should be pretty simple to create.
    • Create an area in memory large enough to hold your section you created in step 1.
    1. MEMORY
      {    PAGE 0 :    FlashMemory:  origin = 0000h, length = 005Fh   /* memory location to put .dat*/
    • Insert that section into the area you have created.
      1. SectionName : { } > FlashMemory     PAGE 0     /* place section containing .dat in memory  */

    The lines of code above show examples of what the code will look like, you will need to adjust the start address and length to accommodate your code.

    Hope it helps.
    Cody

  • Thank You Devin for opening this new tread to help me.
  • Thank You Cody for your help and no problems with messed up bullet points. I only see your answer today since I'm currently on holiday. I'm now trying to replicate my problem at home and solve it. Unfortunately with no succes up to now. I'm really sorry but, as mentioned in my first help request, I have little knowledge of what is for you a daily work. Maybe we can do it by steps. Your first point is really obscure to me. How do I include my .dat file in an ASM file as a "SECTIONS"? How should this ASM file be? Its extension should be .a or .s and goes in "source" folder,  is that right?
    Just to give you more infos, my .dat file contains the whole 32k of the chip flash. I think my linker .cmd code should have origin=0000h and lenght=8000h (whole flash). Maybe it would be easier for you and for me if you can upload a whole 32k empty (by empty I mean filled with 00 or FF) flashable .out file (working with flashing utilities) where I can simply substitute with a HEX editor the 32k ff's with my code? For what I see there's no checksum information of bytes contained in .out files, just start address of .data section and its extension.
    Waiting for your reply,
    Regards, Marco.

  • Marco,

     I have included a few samples below to hopefully get you started... these are not working examples and will need to be edited to fit your purpose. I have never compiled them so there may be some syntax errors, but they should be pretty close to what you need! After creating the files below you should be able to build a project and create a .out file that you can use to program your device.

    to create a section in ASM you will need to create an assembly file (sample.asm for example) similar to the following.

    ; Sample.asm	
    	.sect "flash_section"
    		.uword 00080h, 00040h, 00020h, 00010h; Customer .dat file formatted into words
    	.end

    After creating the section you will need to use a command file (sample.cmd for example) similar to the following

    /*
    // FILE:	Sample.cmd
    
    */
    
    
    MEMORY
    {
    PAGE 0:    /* Program Memory */
               /* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE1 for data allocation */
    
    
       FLASH_Memory      : origin = 0x00xxxxxxx, length = 0x00xxxx     /* on-chip FLASH */
    
    
    PAGE 1 :   /* Data Memory */
               /* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE0 for program allocation */
               /* Registers remain on PAGE1                                                  */
    
    
       RAM       : origin = 0x00xxxx, length = 0x00xxxx     /* on-chip RAM block L1 */
    
    }
    
    
    
    SECTIONS
    {
    
       /* Allocate program areas: */
    
       flash_section               : > FLASH_Memory      PAGE = 0
       
    }
    
    
    

    Hope it helps,
    Cody

  • Hi Cody,

    Thank you very much for your sample codes. I adapted them to fit my purpose and I think I did it. I just want to make a note that maybe would help anyone in the same situation. The .uword directive is not recognised by the compiler, so I used .word directive instead. During the Building option I still have a Warning message saying "warning : entry point symbol _c_int0  undefined" Shoud I care about it or is just normal and due to my "only asm project"? Anyway I now have a .out flash code that I'll try to flash on my chip as soon as I go back to work. Let's hope it works. I leave the topic open so that, if something goes wrong, I'll ask some more help from you, giving you all the details. I'll update here as soon as I have some news.

    Thank you again,

    Marco.

  • Great!

    Glad to hear you are having success.

    Regards,
    Cody
  • Hi Cody.
    I'm now back to work and I can confirm that everything work as expected and I could program my TMS320LF2407A flash with no errors from the CCS3.3 "on-chip flash programmer".
    Thank you very much for your help.

    Regards,

    Marco.