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.

EEPROM write via CCS

Hi Folks,

I guess, my question is independet even from the CPU's (TM4C  series) version and from the Code composer studio as well. I'm interesting, is it possible to write the CPU's EEPROM via CCS directly?

I'm interesting a solution, like: Browse a binary file -> connect to device -> write into the EEPROM

Can anybody help me?

Regards,

Norbert

  • Hello Norbert,

    Do you mean using a Binary File to write to the EEPROM directly without CPU executing a program?

    Regards
    Amit
  • Hallo Amit,

    yes, you are right.
    Let's suppose the use case: I'm developing an application that reads configuration datas from the EEPROM, but curently downloading a project into the EEPROM isn't done. So for test purposes, I would like to create a binary file on my PC, and download it into the EEPROM without CPU execution.

    Regards,
    Norbert
  • Hello Norbert,

    You would need to use a GEL File to do the same. I have a working example (almost half year back from tm4c123). Copy the file

    eeprom.dat

    to D:

    and the following file

    tm4c123gh6pm.gel

    to

    C:\ti\ccsv5\ccs_base\emulation\gel

    The way it works is that the GEL on loading the program, copies the content of dat file to SRAM of the device and then uses the SRAM image of the content to program the EEPROM. The Syntax of the eeprom.dat file for user would be

    1651 1 20000000 0 NUM_OF_EEPROM_WORDS*2+1 0

    NUM_OF_EEPROM_WORDS

    ADDR

    DATA

    ADDR

    DATA

    In the Gel File the user has to update the following

    GEL_MemoryLoad(0x20000000, 0,NUM_OF_EEPROM_WORDS*2+1, "D:\\eeprom.dat");

    In the attached dat and gel file the NUM_OF_EEPROM_WORDS is 6

    The Gel file reads the number of words so that it can set the loop and then uses first the address to compute the EEPROM Location and next address to compute the value of EEPROM Data to be writtent to that location. This goes on till NUM_OF_EEPROM_WORDS is not completed.

    Regards

    Amit

    Regards

    Amit

  • Hi Amit,

    thank you for your reply. Maybe, do you know something about to declaring an EEPROM section in the linker command file and create a const variables in the source relating to that section? By this way, I can avoid the gel file and the additional effort of creating a separated binary.

    Regards,
    Norbert
  • Hello Nornert

    The EEPROM is not a directly addressable section and requires computation. Updating the same in the load would simply over burden the Flash loader.

    Regards
    Amit