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.

Compiler/UCD3138064A: how to insert the device ID into the ".x0" firmware file?

Part Number: UCD3138064A
Other Parts Discussed in Thread: UCD3138, , UCD3138A64A, UCD3138128A, UCD3138A, UCD3138064, UCD3138A64, UCD3138128

Tool/software: TI C/C++ Compiler

I am using old GUI (from 2013) to download ".x0" file into UCD3138 devices.

The current GUI will say: "The GUI was unable to find the device id in the firmware file. Error message: A valid device id would be for example: UCD3000ISO1,UCD3100ISO1,UCD310064V1,UCD310128V1,UCD310A64V1,UCD3138A,UCD3138064A,UCD3138128A,UCD3138A64A. Must specify valid information for parsing in the string."

What steps are needed to put this "device id" into ".x0" file.

I need to be able to duplicate this on the command line, I need to know how this feature works. So a pure GUI based approach is not sufficient.

I have tried to find the answer in the compiler PDF documents, inside the "armhex" and the older "hex470" sections, but could not find the answer.

  • Hello,

    The GUI simply does an ascii dump of the .x0 file contents and looks for a string that fits the device id pattern/signature.  It then figures out which device this firmware is intended for to avoid downloading firmware that is for a different device.  

    I believe in the pfc EVM firmware there is code like below.  If you have that it should be sufficient, because when the file is compiled this string will be embedded in the .x0 as hex and will be found when converted to ascii.

    #if defined(UCD3138)

    #define DEVICE_ID "UCD3100ISO1|0.0.08.0317|141031" //Device id
    #elif defined(UCD3138A)
    #define DEVICE_ID "UCD3138A|0.0.08.0317|141031" //Device id
    #elif defined(UCD3138064)
    #define DEVICE_ID "UCD310064V1|0.0.08.0317|141031" //Device id
    #elif defined(UCD3138064A)
    #define DEVICE_ID "UCD3138064A|0.0.08.0317|141031" //Device id
    #elif defined(UCD3138A64)
    #define DEVICE_ID "UCD310A64V1|0.0.08.0317|141031" //Device id
    #elif defined(UCD3138128)
    #define DEVICE_ID "UCD310128V1|0.0.08.0317|141031" //Device id
    #elif defined(UCD3138128A)
    #define DEVICE_ID "UCD3138128A|0.0.08.0317|141031" //Device id
    #endif

  • Amiel's answer is basically correct.

    Just to add a few more things:

    The "DEVICE_ID" is used in:

    const Uint8  device_id_string[] = DEVICE_ID;

    Then the linker script locates this at a specific address (0x7F58):

    FixedDeviceID  : {} > (DEVICEID)
    DEVICEID  (RX) : org = 0x00007F58, len = 0x00000020

    Also, the ID string has to be specific format. The string provided in the example:

    "UCD310064V1|0.0.08.0317|141031"

    works for the download, but after downloading, the GUI says it's not in the right format. I think maybe the version part (the middle part) is too long.

    Too short of a version won't work either. So the string

    "UCD310064V1|0.0.0|191031"

    gets rejected, while the string

    "UCD310064V1|0.0.0.0|191031"

    with the extra ".0", gets accepted.