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.

Issue with Uniflash tool and CC2538 on Ubuntu

Other Parts Discussed in Thread: UNIFLASH, CC2538, CCSTUDIO

All, 

I have just installed Uniflash version 2.0 (with support for CC2538) and I cannot successfully flash a CC2538. The error message is:

"Multiload operation failed: Connect to target failed" and then in the details it says something about IcePick_C Error connecting to target : Error -233 @ 0x0) The JTAG IR and DR scan paths cannot circulate bits, they may be broken.

Regards,
Thomas 

  • PS: It also did not behave well during installation. The "desktop icon" cannot execute (fails with a Eclipse error) but if I run the same executable from the command line the gui comes up. And the install script never says it has completed, so I am not sure it succeeded. The machine is a DELL laptop with a completely fresh copy of Ubuntu 12.10 on it.

    Regards,
    Thomas 

  • Just tried on my Windows7 PC also, with the exact same error message.

    [21:39:07] Cortex_M3_0: GEL Output:
    Memory Map Initialization Complete

    [21:39:08] Loaded target configuration from: C:\Users\a0869488\AppData\Local\.TI\646835867\0\0/temptargetconfiguration.ccxml
    [21:39:08] Settings purged.
    [21:39:28] FATAL >> IcePick_C: Error connecting to the target: (Error -233 @ 0x0) The JTAG IR and DR scan-paths cannot circulate bits, they may be broken. An attempt to scan the JTAG scan-path has failed. The target's JTAG scan-path appears to be broken with a stuck-at-ones or stuck-at-zero fault. (Emulation package 5.0.952.0)

    [21:39:28] MultiLoad operation failed: Connect to target failed!

  • Hi TA12012,

    The problem is that the auto generated ccxml apparently doesn't work with CC2538 and connect attempts would fail. Please use the attached ccxml instead.

    Also, this device do not support "multiload" feature as the core part of the flash operations binaries are external to our team. "erase" will not work as well. You can only load single programs at a time due to the limitation from the external software. To do this, please go to the menu "Program->Load Program".

    Regards,

    Victor

    7658.CC2538.zip

  • Victor, 

    That works on both Windows and  Ubuntu 12. Thanks.

    In windows everything works fine, in Ubuntu the icon that get installed does not work (complains about not having root access). But if run in from a terminal window everything works just fine. 

    If I may, can I ask one more question. Can you give me command line style command that we could use to call UniFlash with from within a Makefile.

    something like 

    ./Uniflash -noGUI -files ...? I cannot find the documentation for this

     I do not want the GUI to come up in this case.

    Regards,
    Thomas 

  • Hi Tomas,

    I will look into the Ubuntu shortcut problem. It should be an installation issue.

    As for your command line problem, we do have a command line interface for the app. The command line app folder is located at: " <installation folder>\uniflashv2\ccs_base\scripting\examples\uniflash\cmdLine ". Inside you will find an example script, a readme file contains detailed guide. That should solve your problem.

    Regards,

    Victor

  • Hello,

    I have a similar problem as TA, when I try to use UniFlash from Terminal I get the following:

    user@instant-contiki:/opt/ti$ sudo ./uniflash.sh -ccxml /home/user/CC2538.ccxml -program /home/user/lifx/contiki-cc2538/examples/er-rest-example/er-example-server.elf

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

    <START: 10:08:36 GMT+0100 (CET)>

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

    flxInitLoad: client has not been protected.
    flxInitLoad: client has not been protected.
    > Flash Manager is configured for the following part: CC2538

    SEVERE: Option not found
    org.mozilla.javascript.WrappedException: Wrapped com.ti.ccstudio.scripting.environment.ScriptingException: Option not found (/opt/ti/uniflashv2/ccs_base/scripting/examples/uniflash/cmdLine/uniFlash_main.js#243)
    at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1705)
    at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:157)
    at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:201)
    at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:74)
    at org.mozilla.javascript.gen.c1._c8(/opt/ti/uniflashv2/ccs_base/scripting/examples/uniflash/cmdLine/uniFlash_main.js:243)
    at org.mozilla.javascript.gen.c1.call(/opt/ti/uniflashv2/ccs_base/scripting/examples/uniflash/cmdLine/uniFlash_main.js)
    at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:106)
    at org.mozilla.javascript.gen.c1._c0(/opt/ti/uniflashv2/ccs_base/scripting/examples/uniflash/cmdLine/uniFlash_main.js:16)
    at org.mozilla.javascript.gen.c1.call(/opt/ti/uniflashv2/ccs_base/scripting/examples/uniflash/cmdLine/uniFlash_main.js)
    at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:337)
    at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2755)
    at org.mozilla.javascript.gen.c1.call(/opt/ti/uniflashv2/ccs_base/scripting/examples/uniflash/cmdLine/uniFlash_main.js)
    at org.mozilla.javascript.gen.c1.exec(/opt/ti/uniflashv2/ccs_base/scripting/examples/uniflash/cmdLine/uniFlash_main.js)
    at org.mozilla.javascript.tools.shell.Main.evaluateScript(Main.java:500)
    at org.mozilla.javascript.tools.shell.Main.processFileSecure(Main.java:422)
    at org.mozilla.javascript.tools.shell.Main.processFile(Main.java:388)
    at org.mozilla.javascript.tools.shell.Main.processSource(Main.java:379)
    at org.mozilla.javascript.tools.shell.Main.processFiles(Main.java:176)
    at org.mozilla.javascript.tools.shell.Main$IProxy.run(Main.java:97)
    at org.mozilla.javascript.Context.call(Context.java:540)
    at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:447)
    at org.mozilla.javascript.tools.shell.Main.exec(Main.java:159)
    at org.mozilla.javascript.tools.shell.Main.main(Main.java:137)
    Caused by: com.ti.ccstudio.scripting.environment.ScriptingException: Option not found
    at com.ti.debug.engine.scripting.Options.setBoolean(Options.java:234)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:142)
    ... 21 more


    In addition I have only succeeded one to flash my device using the GUI once. Could it be some things missing? I have not tried the tool on Windows yet.

    Thanks,

    Jonas

  • Hi Jonas,

    Are you using the ccxml that was attached in my previous post? It appears that there is a bug in the ccxml generation that the auto generated ccxml for CC2538 doesn't work. You will have to manually create the script and edit it to change connection types. From the GUI, open the ccxml to create a flash session by using "File->Open Target Configuration(*.ccxml) File" instead of creating a new one. Remeber also to only load program using "Program->Load Program". If you still fail to program from the GUI please turn on the verbose mode option at the very bottom in the list of options and attach the output from the console.

    Also, which version of UniFlash are you running? 

    Regards,

    Victor

  • Hi Victor,

    Yes, am using the provided CC2538.ccxml

    Program->Load Program is the only feature I am interested in, which is what I am trying. The Uniflash version I am using is 2.0.0.00013 

    Seems it is now working from GUI, but not from command line. Here is the output in verbose mode (from command line tool):

    C:\TI>call "C:\ti/uniflashv2\ccs_base\scripting\examples\uniflash\cmdLine\uniflash.bat" -verbose 1 -ccxml c:\ti\uniflashv2\CC2538.ccxml -program C:\wo
    rk\temp\contiki\cc2538dk\er-example-server.elf

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

    <START: 09:11:59 GMT+0100 (CET)>

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

    > Flash Manager is configured for the following part: CC2538

    SEVERE: Option not found
    org.mozilla.javascript.WrappedException: Wrapped com.ti.ccstudio.scripting.environment.ScriptingException: Option not found (C:\TI\uniflashv2\ccs_base
    \scripting\examples\uniflash\cmdLine\uniFlash_main.js#243)
    at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1705)
    at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:157)
    at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:201)
    at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:74)
    at org.mozilla.javascript.gen.c1._c8(C:\TI\uniflashv2\ccs_base\scripting\examples\uniflash\cmdLine\uniFlash_main.js:243)
    at org.mozilla.javascript.gen.c1.call(C:\TI\uniflashv2\ccs_base\scripting\examples\uniflash\cmdLine\uniFlash_main.js)
    at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:106)
    at org.mozilla.javascript.gen.c1._c0(C:\TI\uniflashv2\ccs_base\scripting\examples\uniflash\cmdLine\uniFlash_main.js:16)
    at org.mozilla.javascript.gen.c1.call(C:\TI\uniflashv2\ccs_base\scripting\examples\uniflash\cmdLine\uniFlash_main.js)
    at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:337)
    at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2755)
    at org.mozilla.javascript.gen.c1.call(C:\TI\uniflashv2\ccs_base\scripting\examples\uniflash\cmdLine\uniFlash_main.js)
    at org.mozilla.javascript.gen.c1.exec(C:\TI\uniflashv2\ccs_base\scripting\examples\uniflash\cmdLine\uniFlash_main.js)
    at org.mozilla.javascript.tools.shell.Main.evaluateScript(Main.java:500)
    at org.mozilla.javascript.tools.shell.Main.processFileSecure(Main.java:422)
    at org.mozilla.javascript.tools.shell.Main.processFile(Main.java:388)
    at org.mozilla.javascript.tools.shell.Main.processSource(Main.java:379)
    at org.mozilla.javascript.tools.shell.Main.processFiles(Main.java:176)
    at org.mozilla.javascript.tools.shell.Main$IProxy.run(Main.java:97)
    at org.mozilla.javascript.Context.call(Context.java:540)
    at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:447)
    at org.mozilla.javascript.tools.shell.Main.exec(Main.java:159)
    at org.mozilla.javascript.tools.shell.Main.main(Main.java:137)
    Caused by: com.ti.ccstudio.scripting.environment.ScriptingException: Option not found
    at com.ti.debug.engine.scripting.Options.setBoolean(Options.java:234)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:142)
    ... 21 more

    I think the problem using GUI to program was caused by my virtual Linux machine and USB drivers. I will verify my .elf file in order to verify the flashing of the device form GUI.

    Thanks,

    Jonas

  • Hi Jonas,

    The command line won't work with CC2538 in that version, it is a known issue and will be fixed in the next version. In the meantime, i guess you will have to make do with the GUI. This known issue is listed in the release notes: 

    http://processors.wiki.ti.com/index.php/CCS_UniFlash_v2.0_Release_Notes#Known_Issue.28s.29

    Regards,

    Victor

  • Victor,

    Ok, I see. Looking forward to next release, with support for command line tools for CC2538.

    Thanks for your support!

    Cheers,

    Jonas

  • Victor, 

    I know have a similar issue in version 3.0 of Uniflash. It seems to flash the code onto the board, but then it gets stuck waiting for the CC2538 to reboot.

    I added a startup_gcc.c from our CC2538 driver lib, this did not change the behavior of the system.

    Regards,
    /TA

  • Yes, it is a painful situation as of right now. Hopefully the CC25xx team can get a fix on this in the next CCS release. For the meantime, if you are only using UniFlash, a temp fix is by replacing the gel file with this one:1602.cc2538.gel

    Basically we are not restarting the device after program load, thus will not run into the infinite loop scenario. This however, may produce some error messages. But you won't get stuck and the file write should be completed fine.

    For the case of including startup_gcc.c from our CC2538 driver lib, try their blinky example first. That should work.

     

  • That works, thanks. I can now generate code using MSP430-GCC, upload using Uniflash on a Ubuntu 12.04LTS.

    Regards,
    /Thomas