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.

CC Debugger IAR Crash

Other Parts Discussed in Thread: CC2540, BLE-STACK

I am having a terrible time with IAR crashing as soon as I halt the debugger.  Everything works great until then.  IAR says that it's a CC Debugger driver problem.    I upgraded the CC debugger firmware to the newest version and the problem persists.  Does anyone have suggestions?

Details:  CC2540 Bluetooth LE target, Keyfob dev kit (and other targets too), windows 8, any (and many) firmware loads.

I've tried a lot of different configurations and like I said above, IAR only crashes when stopping debug.  Until then, it works fine.

Thanks,

Rich

  • Rich,

    We normally see this when the debugger loses communication with the target, but could you provide answers to the following questions?

    (1) Which version of IAR are you using?

    (2) Have you tried running any examples from our BLE-Stack(http://www.ti.com/tool/ble-stack), and seen the same issue?

    (3) You mention other targets too; what other targets do you have connected?

    Regards,

    Reagan

  • I'm running the newest version of IAR (actually reloading all software today to see if that helps)

    I have tried many of the examples provided from TI.  They work great, but still crash.

    Targets... only the CC2540.  I miss used targets... I have tried it with the Keyfob and with a BlueGiga BLE112 development board.  Same results for both.

     

    Thanks, R

  • More info...  I tried reloading software, no change in operation.

    IAR 8.20.2

    IAR Common components  6.4.8.2543

    TI CC Debugger Driver 2.50.0.0  11/1/2010... seems sort of old.

    I tried pointing to the 32 bit driver, but it would not take it.

    R

     

  • Rich Morris said:
    I am having a terrible time with IAR crashing as soon as I halt the debugger.  Everything works great until then.  IAR says that it's a CC Debugger driver problem.    I upgraded the CC debugger firmware to the newest version and the problem persists.  Does anyone have suggestions?

    I haven't got a CC Debugger to investigate, but if you have Visual Studio can you try attaching Visual Studio to IAR before start debugging. When the IAR crash happens upon halting the debugger, Visual Studio should report where the crash happens to be able to invesigate.

    (I have previously done that when CCS was crashing when the debugger was halted)

  • Thanks, I've never done that but I'll give it a try.  I'm using VS express, hopefully it's not defeatured too much... 

    I think I'm going back to IAR also.  My workaround is to compile with IAR, load with Smart RF Flash Programmer.  I just noticed though, even if I don't debug, IAR crashes if I try to change projects.  It rebuilds over and over just fine, only changing projects makes it crash.  Maybe something similar in the stop debugging (file access protection for Win 8 ??)

    R

  • Hi Rich,

    Do you buy IAR license? It is a real expensive SW. If you buy it and suffer such painful experience, you should contact IAR or its agent sales to help you.

  • Do you have suggestions Reagan?  I tried a lot of things over the weekend and still no luck.  I have conversed with IAR and they believe it must be a driver problem and at this point so do I.  Is the problem element Windows 8 or Microsoft Surface?  Other ideas? 

     

    I now avoid debug in IAR (using simulator instead) and all is fine.  That is except that I can't debug!  Only run and gun....

     

    TIA, R

  • Rich,
    I am not having problems with it once I updated everything, but I'm also on Windows 7. Have you been able to debug in the past, before you switched either the debugger or to Windows 8?

  • Never tried, I'm new to the CC2540 development land.  Is it possible for you to try.  I suspect more folks will be moving to Win8.  I'm lovin' it, particularly with the Surface!  and... particularly since Win8 has native BLE support after all and that's what this is ultimately about.

     

    R

  • Rich,

    I am looking into this with some other people, but in order to get a better idea of what could be going wrong, and that way I can look to duplicate your setup as much as possible, can you answer the following questions?

    -What error are you actually getting? Is it specifying that it's losing communication with the debugger, or that it's failing to read an address?

    -I take it this is with the Surface Pro?

    -Additionally, I know this may seem odd, but could you just specify which exact version of IAR you have (I know you said it's updated), and which version of the CC debugger firmware you installed?

    -When you ran the example projects from our BLE stack, did you really just import them directly into IAR to run them, or did you modify different settings?

    Thanks,

    Reagan

  • Load Workspace cc2540 GlucoseSensor > first time > AOK

    Close Workspace

    Load Workspace cc2540 GlucoseSensor  >again> Crash

    The GlucoseSensor directory has not been modified from the delivered version from TI.

  • Rich,

    Can you answer some of the questions I previously posted. Also, what do you mean by "crash"? The whole IAR application closes, or it gives an error?

  • I'm experiencing similar issues with IAR 8.20.2

    The debugging experience is a bit of a nightmare.  The "single step" button works less than 20% of the time.  Instead, it will either run to the next breakpoint or hang forever.  The IAR interface will freeze often - sometimes this can be resolved by hitting the reset button on the CC debugger.

  • Hi,

    This can sometimes be caused by having too much optimization enabled in the project options -> c/c++ compiler. The poor debugger doesn't always know what's going on when code gets moved around and optimized.

    I'd suggest trying to set optimization to None. Also, single stepping has a tendency to work better in these instances if you click on the Disassembly View and do the single stepping there instead. Another option is to right click on the line you want to go to and select Run to cursor.

    Best regards,
    Aslak 

  • Hi Aslak N,

    I have just updated to the latest IAR (8.30.3) (the time limit version) and it crash when i'm trying to change the optimization and also crashes when i stop the debug process.

    It does not happen in older version.

  • Hi netanel,

    Which BLE stack version do you use? If you use BLES stack 1.4.0, the library is built by IAR v8.20.2 and you can download it from http://www.iar.com/Products/Wireless-solutions/Tools-for-TI-wireless/.

  • Now i'm using stack 1.4.0 with IAR 8.30.3.

    Same issue - when build, run all fine.

    When stopping - crash.

    I debug it using vs2013:

    Unhandled exception at 0x604A9F53 (kernel.dll) in IarIdePm.exe: 0xC000041D: An unhandled exception was encountered during a user callback.

  • There was a problem with the license,

    The free 30 days license for the ARM version did some troubles to the 8051 license.

    Only full pc refresh (windows 8.1) fixed it. (windows 7 will need format).

    It's something in the IAR registry keys (regedit), i could not found the source of it.

  • Rich

    Did you eventually find a solution to this problem?  I started seeing the same problem this weekend and I cant work out how to fix it.

    If you found a solution would you be able to post it here.

    Thanks
    Mark

  • Hi,

    I've not seen the same problem, but if it's a license problem with IAR, you may find that it helps deleting the license cache and some settings, and installing the license again.

    Note that I have a network license, and depending on your license type, doing this may cause you trouble I'm not aware of when trying to reinstall the license.

    C:\ProgramData\IARSystems\LicenseManagement\LicenseCache
    C:\ProgramData\IARSystems\LicenseManagement\LicensePackages\8051

    I have alerted IAR about this thread, in case they have input.

    BR,
    Aslak

  • Hi

    I have already removed and reinstalled IAR, so I am convinced that is not the problem. 

    As Rich stated in his emails the problem only occurs when the Debugger is set to Texas Instruments all other debuggers and the simulator work.  Also for me the problem only occurred after Smart RF Studio Flash Programmer suggested that I update the Firmware on my CC Debuggers.  Before that update everything worked fine, so I am pretty convinced it is a problem with the Debugger and not IAR.

    Regards

    Mark

  • Hi Mark,

    I wrote that i dud full pc-refresh to fix this issue.

    If you cant do PC refresh you have to use windows restore or even format your windows.

    It seems like windows registry problem.

  • I ran into a problem with identical symptoms a couple of days ago and just figured out how to fix it on my system. I'm using a CCDebugger, IAR Embedded Workbench for 8051, and Windows 10.

    It turned out to be a problem with the registry, with an entry in Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\ . The name was the IAR executable, with full path, and the data was "$~ IgnoreFreeLibrary<8051emu_cc.dll>" Deleting the entry fixed the problem.

    In debugging the problem, I found that I could run IAR as a different user on the same machine without having crashes. If you're thinking about messing with the registry to fix the problem on your system, it might be a good idea to do this test first to make sure your symptoms match mine.

    As for what caused the problem in the first place, I had a flaky connection to a target board, with the ground and various other wires detaching pretty regularly. I naturally got a bunch of strange errors and crashed a bunch of debugging sessions in strange ways. Sometime during this process I started getting the crashes as described in this thread, and they persisted even after I switched to a target with better wiring.
  • I have experienced exactly the same issue and either not get it resolved, the IAR8.20 get crashed in the following cases:
    1: switch workspace
    2: close previously opened project and open it again
    3: halt the debug

    I don't think it is the license issue, as the code could be compiled at this time
  • Does it happen always or sometimes? If it happens sometimes, just restart IAR and CC debugger. By the way, I think this is about IAR took issue. I would suggest you to contact IAR for help.
  • Hi Chen:

    Thank you for the reply. Yes, it should be due to IAR issue... just post here to see whether Ti engineers had meet this.

    I need to check with IAR forum for this.
  • To give some update on resolving the this issue on my side:

    I just found some clue in the following link and tried success!

    supp.iar.com/.../KnownProblems.pdf

    ----

    EW 24549

    Under certain circumstances, for example when changing Project>Options or selecting another configuration, automatic Windows 8 compatibility settings can cause problems for IAR Embedded Workbench. Error message(s) produced then contain information similar to: - Faulting application path: $EW_DIR$\common\bin\IarIdePm.exe - Faulting module path: $EW_DIR$\common\bin\kernel.dll.

    Workaround: Install another copy of your IAR Embedded Workbench product in a different location or rename the directory of your current installation.

    ----

    What I tried is renamed the folder name:

    C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.4

    to

    C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.4_



    And the crash issue is resolved!
  • Thanks for sharing this with us!!