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/TMS320F2808: loading raw binary to flash

Part Number: TMS320F2808


Tool/software: Code Composer Studio

Hello,

I’m trying to load a raw binary file into flash, using CCS 8.3.0.  Searching online throws up a lot of posts, but they are not really helping me.  Also I feel it ought to be easy to just ask CCS to load values from a file to memory (flash) starting at some address.
I have tried GEL_MemoryLoad(0x3E8000, 0, 0xC000, "C:\\Build\\test.bin", 16) but get:
    C28xx: Data verification failed at address 0x3e8000
    LoadOFP() cannot be evaluated.
    Data verification failed at address 0x3e8000
And even tried:
    GEL_MapOn();
    GEL_MapAdd(0x3E8000,0,0xC000,1,1);
    GEL_MemoryLoad(0x3E8000,0,0xC000,"C:\\Build\\test.bin",16);
    GEL_MapReset();
But with the same result.
I’m not really sure what I’m doing (as may be clear).  I find the GEL help fairly minimalist and don’t know where to look for more detailed help.

If I got the above right, I’m trying to load to Flash sectors D-B.  They are already erased (CCS reports all 0xFFFF)

Is it possible to do this via GEL or another way?

Regards, Giles

  • Hello,
    GEL_MemoryLoad can only write to RAM, not flash. Since the debugger memory map has identified 0x3E8000 as read only (flash) memory, the GEL call fails.

    There is a DSS API call "memory.loadBinaryProgram()". This call CAN write to flash. But of course this is a DSS API. I am investigating to see if there is an equivalent GEL API for this.

    Thanks
    ki
  • Ki-Soo Lee said:
    I am investigating to see if there is an equivalent GEL API for this.

    There is. try:

    GEL_LoadBin(<binary file>, <start address>)

    Thanks

    ki

  • Hi

    GEL_LoadBin certainly does the job - thanks.

    But a couple of things:

    (1) It seems to be a completely undocumented function.  There is no help on in in CCS, and even Googling GEL_LoadBin returns no hits.

    (2) Unfortunately the binary I'm loading has the bytes in a word swapped - presumably because it is being sent from a big-endian dataloader.  All this is due to our own tools.  But is there a GEL_LoadBin parameter to deal with big-endian?  Some of the documented load functions have such, and I've tried a few similar things with GEL_LoadBin, but with no success.  With no documentation I'm just guessing.

    Regards, Gies

  • Giles Robnson said:
    (1) It seems to be a completely undocumented function.  There is no help on in in CCS, and even Googling GEL_LoadBin returns no hits.

    Yes, the function is relatively new (I was not aware of it until recently) and it is a "hidden" function created to support the DSS equivalent (which was requested). But it is an available function and should be added to the GEL function list.

    Giles Robnson said:
    (2) Unfortunately the binary I'm loading has the bytes in a word swapped - presumably because it is being sent from a big-endian dataloader.  All this is due to our own tools.  But is there a GEL_LoadBin parameter to deal with big-endian?  Some of the documented load functions have such, and I've tried a few similar things with GEL_LoadBin, but with no success.  With no documentation I'm just guessing.

    Unfortunately both GEL and DSS API does not have an option for byte-swapping.

    ki

  • I've managed to work round the byte swapping, so I'm now OK.
    Thanks.