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.

uniflashCLI.bat crashes when called from batch file

Other Parts Discussed in Thread: CC3200, UNIFLASH

I'm having trouble running uniflashCLI.bat from a batch file.

I use the following command to flash my CC3200:

C:\ti\uniflash_3.2\uniflashCLI.bat ^
  -config "C:\path\to\uniflash-config.usf" ^
  -setOptions ^
    spPath="C:\path\to\servicepack_1.0.0.10.0.bin" ^
    com=4 ^
    capacity=16MB ^
  -operations ^
    format ^
    servicePackUpdate ^
    program

When I paste that command into Windows Command Prompt is executes correctly and formats and programs the attached CC3200.

However when I put the exact same command into a batch file and run that batch file I get the following error:

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

> Configuring UniFlash with the following configuration: C:\path\to\uniflash-config.usf

Exception in thread "main" java.lang.NoClassDefFoundError: com/ti/uniflash/session/support/SessionHandlerFactory
        at com.ti.uniflash.commandline.CommandLine.setUpApplication(Unknown Source)
        at com.ti.uniflash.commandline.CommandLine.main(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.ti.uniflash.session.support.SessionHandlerFactory
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
        ... 2 more

How should I go about getting uniflashCLI.bat to work when being called from a batch file?

Thanks,
Marek

  • Hi Marek,

    It looks to me to be a Windows question and not CC3200/Uniflash related...
    I'm not sure if we can help, but maybe you can try: "call C:\ti\uniflash_3.2\uniflashCLI.bat" in your batch file and see if it helps.

    Regards,
    Gigi Joseph
  • Hi Gigi,

    Thanks for the quick reply.

    Looks like you were mostly correct.
    uniflashCLI.bat needs to be run from it's containing directory or it crashes for me.

    Updating the batch script to the following has solved my issue:

    C:
    cd C:\ti\uniflash_3.2
    call uniflashCLI.bat ^
      -config "E:\path\to\uniflash-config.usf" ^
      -setOptions ^
        spPath="E:\path\to\servicepack_1.0.0.10.0.bin" ^
        com=4 ^
        capacity=16MB ^
      -operations ^
        format ^
        servicePackUpdate ^
        program

    Thanks for the help.


    Marek