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.

Uniflash: Options in command line interface

Other Parts Discussed in Thread: UNIFLASH, TMS570LS3137

Hi,


I'm using Uniflash 3.0.0.000031 on Ubuntu 12.04 64-bit to flash my TMS570LS3137 on a Hercules devel board.

I can successfully flash my board using the following commandline:

$ ./uniflash.sh -ccxml tms570.ccxml -program demo.out

Flashing of my ~30 KB application takes about 80 seconds.

I'd like to flash faster, so I checked the available options with -viewOptions, and I saw:

Radio Button Option:
    id: FlashEraseSelection
    name:
    value: Entire Flash
    choices:
        Entire Flash
        Necessary Sectors Only (for Program Load)
        Selected Sectors Only

However, settings the options as suggested in the examples does not work. On trying

$ ./uniflash.sh -ccxml tms570.ccxml -setOptions FlashEraseSelection="Necessary Sectors Only (for Program Load)" -program demo.out

I just get the following error:


***** Texas Instruments Universal Flash Programmer *****

<START: 11:19:37 GMT+0100 (MEZ)>

> Configuring the Flash Programmer with the given configuration ...

> Flash Manager is configured for the following part: TMS570LS3137

> Setting up the user Flash Options ...

SEVERE: Value is not valid for current property
> [Error]: could not set value of option.
<END: 11:19:39 GMT+0100 (MEZ)>

<Total Time: 1.608s>

I also tried -setOptions FlashEraseSelection=1 and escaping the strings in '' instead of "".

How can I correctly set options for flash programming from the commandline?

Thanks,

Alex

  • Alex,

    I've tested this, and it seems to be a bug in the command line tool.

    It seems to only affect the Linux version of UniFlash, as I was able to set the option properly on Windows with the same command. And the root cause seems to be the way it handles the quotes "". I will look into fixing this in the next version of UniFlash (3.1, out around Feb. 2014).

    In the mean time, you can work around this by:

    1. starting the GUI

    2. config for your TMS570 device

    3. modifying the value of the Erase selection to Necessary Sector Only

    4. export the session file using menu item 'Session -> Save setting as a Copy', and saving it to your local drive

    5. use command line: > ./uniflash.sh -ccxml tms570.ccxml -loadSettings <pathToSessionFileFromStep4> -program demo.out

    Please let me know if this works for you, and sorry for the inconvenience with the command line tool bug.

    Thanks,

    Ricky

  • Hi Ricky,


    your proposed approach works. Thanks a lot, flashing is now twice as fast as before.

    However, uniflash complains about failed verification, even if my application works correctly afterwards.

    ~/ti $ ./uniflash.sh -ccxml tms570.ccxml -loadSettings x.uniflashsession -program test.out

    ***** Texas Instruments Universal Flash Programmer *****

    <START: 19:50:00 GMT+0100 (MEZ)>

    > Configuring the Flash Programmer with the given configuration ...

    > Flash Manager is configured for the following part: TMS570LS3137

    > Loading settings from the given session file ...

    <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
    <PropertyValues>

      <property id="FlashEraseSelection">
        <curValue>Necessary Sectors Only (for Program Load)</curValue>
      </property>

    </PropertyValues>

    > Settings loaded.

    > Connecting to the target for Flash operations ...

    TraceCompMgr: error while loading shared libraries: libIceBox.so.21: cannot open shared object file: No such file or directory
    TraceCompMgr: error while loading shared libraries: libIceBox.so.21: cannot open shared object file: No such file or directory
    CortexR4: GEL Output:   Memory Map Setup for Flash @ Address 0x0
    > Connected.

    > Loading Program: test.out
    CortexR4: Writing Flash @ Address 0x00000000 of Length 0x00006288

    CortexR4: Erasing Flash Bank 0, Sector 0

    CortexR4: Verifying Flash @ Address 0x00000000 of length 0x00006288

    SEVERE: CortexR4: Error during Flash verification (Flash algorithm returned error condition). Operation cancelled.

    SEVERE: CortexR4: Flash verification returned error condition. Operation cancelled.

    SEVERE: CortexR4: Error Writing Flash @ Address 0x00000000 of Length 0x00006288

    SEVERE: CortexR4: GEL: File: /home/staff/zuepke/ti/test.out: Load failed.

    SEVERE: File: /home/staff/zuepke/ti/test.out: Load failed.
    SEVERE: Error loading "test.out": File: /home/staff/zuepke/ti/test.out: Load failed.
    > Command suspended due to errors in loading the program.

    > Disconnecting from target.

    <END: 19:50:45 GMT+0100 (MEZ)>

    <Operation Time: 13.054s>
    <Total Time: 44.778s>
    ~/ti $

    Best regards,

    Alex

  • Alex,

    Glad to hear that it is working for you.

    I'm not too sure what is causing the verification error though. I wonder if it has something to do with ECC data. Are you programming ECC data in your program, or are you using auto ECC generation?

    You can also turn off the verification option if you are sure that it is programming your device correctly.

    Thanks,

    Ricky

  • Hello Ricky,

    the reported problem above was my own fault. The verification phase failed because my test-app had an active POM overlay. After disabling the POM, flashing works flawlessly.

    Thanks,

    Alex