Menu

#252 ICD2 debugger fails - device memory is in an unknown state

pending
Debugger (9)
5
2010-07-23
2010-07-20
fredo82
No

I compiled a small c program for PIC16F876A device (that drives pic serial port) with sdcc compiler under piklab 0.15.10 and ran my small piece of pic program using ICD2 programmer and everything was working as I expected (I could see the correct words transmitted by pic serial port using gtkterm software). After that, I just tried to run the same program with ICD2 in debugger mode but then it wasn't working anymore. Also when I stopped my software to execute then tried again to run it, piklab displayed this message: The device memory is in an unknown state. You may want to reprogram the device. Continue anyway? (for me it was written in my default french language). I had the same trouble with piklab 0.15.7 before I decided to compile the latest release. I also tried several ICD2 firmwares (ICD01020706.hex v2.7.1 from MPLAB 7.60 and v2.7.6 from MPLAB 8.30 or 8.43) but with same results. For information, I use Piklab under Ubuntu 9.10. Is the device PIC16F876A supported by Piklab with ICD2 debugger (seems to be in the list but maybe has not been tested). I don't know how to use the ICD2 as debugger now and if my problem is a piklab bug so I decided to report my problem. Thanks and regards.

Discussion

  • fredo82

    fredo82 - 2010-07-23

    I tried to compile very simple c code and had the same message already described while debugging with ICD2 (The device memory is in an unknown state...). Then I compile some very simple assembler code (with gputils tools) then debugging with ICD2 works fine. My failure seems to be related to sdcc compilation.
    Maybe I found the response myself in the wiki section about the sdcc toolchain where it is written: "Additionally this means that debugging at the C source level is not supported by Piklab for mid-range devices (sdcc target 'p14') because not all the required information is put inside the "coff" file... ".
    Can somebody confirm me that it's not possible with Piklab to use the ICD2 debugger for the mid-range pic devices (for example my pic16f876a) when compiling c code with sdcc tool ? Would it be possible for 18f family pics (sdcc target 'p16') ? (then I should migrate to PIC18F2550 device)
    I only used Mplab under Windows with hitech c compiler free version but I would be pleased to switch to Linux with free/open source tools so using Piklab with sdcc seemed to be the right choice but I can't do without ICD2 debugger.
    Thanks for any advice and help (and sorry for my very limited english).

     
  • fredo82

    fredo82 - 2010-07-23
    • assigned_to: nobody --> azhyd
    • status: open --> pending
     

Log in to post a comment.