Hello,I bought the UAV dev board and the MPLAB ICD2 programmer. I am receiving the following message when trying to connect to the board:ICDWarn0020: Invalid target device id (expected=0x101, read=0x0)The programmer is working fine through USB and all self tests pass OK.The UAV Dev Board works OK with the preloaded software without being connected to the programmer.Do you know what could be happening and how can I get it programmed from the ICD2?Thanks and regards.

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Hello ,

    Just for information. ( the same problem append to me now )

    I have a green board and never had problem to program it with my original ICD3 and a custom made cable.

    But since I tryed to program an other board with a dspic33 on it .
    Nothing is working any mode.

    It can not read the device ID anymore.
    I can't program any devices anymore .
    except the dsPIC33 on the explorer board from microchip with original cable delivered with the ICD3.

    did somthing fried in my ICD3 ??

    Just a adding a layer to the mistery :-)

    regards

    Sandra
  • I have an ICD2 made by Microchip and have the same issue with a dsPIC30F4011 40 pin dip. I had MPLAB 8.33 and was able to program a dsPIC30F6014, PIC18F87J50 and a PIC18LF4620 without issue. I spent 8 hours tearing my board apart assuming I had made a mistake.

    I installed MPLAB 7.5, copied the ICD10010508.hex file, then installed MPLAB 8.36. It still didn't work. I downloaded the ICD10010508.hex file, hit cancel when it tried to upgrade immediately after and then was able to program my part with MPLAB8.36.

    I don't think this bug is necessarily limited to clones.
  • I figure it’s worth noting that I also have been unsuccessful in connecting the UAV DevBoard to the ICD2 in MPLAB v8.x.
    I have E-mailed Spark fun and my understanding is that they are waiting on shipment of the new ICD2’s. However no amount of playing with the files would allow me to compile any of the code (test, matrix nav, etc…) in MPLAB v7.5.
    FYI v8.x didn’t connect, but v7.5 did, so it seems I’m having the same problems as everyone else. Anyway, I’m going to wait until the shipment arrives and query if I can exchange the board.

    Sam.
  • Hello Bill,

    I am also the victim of bad Olimex board. I have followed the suggestion by Greg, and downgraded to 7.5 and added libdsp-coff and p30f4011.gld to my project files. That thing worked smoothly. Right now the status is that I have been able to successfully connect to the target, and program it. The program is a slightly modified version of the self-test you wrote. However verify fails due to some memory error, I don't know if that is critical. Though I have programmed it, I don't know whether it is running properly. I have yet to get my head around programming dsPIC, and need to interface UAVBoard to FTDI breakout board. That is still far away. However, still some progress.

    I wasted one full day debugging the problems related to the latest MPLAB IDE, which is as of this writing is v8.33. Did all the tests that you mentioned in this forum and the main UAVboard discussion. The connection cable, the power to the target, proper IDE configuration for dsPIC etc. None of them were the causes of the problem. Then I googled and landed on this page.

    The only difference between v7.50 and v8.33 seems to be the operating system downloaded onto ICD2 by IDE. v7.50 downloads "ICD10010508.hex" , while v8.3 downloads "ICD10010604.hex". Your guess about timing difference being the cause of the problem might be in that OS. Another weird thing is that 7.50 does not work with normal user privileges, it asks itself to be run under administrator privileges. I double-checked while installing that IDE is usable by all users. However, I did not face this issue with v8.33, I need to remove the permission issue as the cause of the problem.

    So the Sparkfun guys got another guinea pig to experiment with their incompatible Olimex board :) As you suggested in this forum should I contact Sparkfun people about my ICD2? Would they be willing to swap it with one that works with latest MPLAB IDE?

    Dev
  • Hi everyone,

    My UAV board is finally working and runs RollPitchYawDemo nicely!

    I have had the invalid target ID error for some time and put aside the board and waited for someone to figure this out. I originally suspected there is something wrong with my Olimex PIC-ICD2-POCKET, but it was really the MPLAB v8.3 causing the issue.

    The board now works with MPLAB V7.5 and with the following files in the project window


    It is important the linker script p30f4011.gld and the library file libdsp_coff.a (from C:\Program Files\Microchip\MPLAB C30\lib) added to make it work. Adding the library file was never obvious for me. Can someone explain why? Without this, during the link stage I get undefined reference to VectorAdd and similar errors.

    Thanks everyone for the suggested solutions!! RPYdemo is awesome.
  • Bill,
    Thanks for the file,
    I fresh installed 8.30 in another PC (did not recognize the UAVboard by the way) and it is also having the same errors as I posted above.
    Now i replaced my p30f4011.h for yours, this new set of errors appears:

    (resuming compiler directives)
    analog2digital.c:43: warning: `__no_auto_psv__' attribute directive ignored
    servoOut.c:36: warning: `__no_auto_psv__' attribute directive ignored
    gpsParse.c: In function `set_gps2':
    gpsParse.c:123: warning: passing arg 1 of `gpsoutline2' discards qualifiers from pointer target type
    gpsParse.c: At top level:
    gpsParse.c:317: warning: `__no_auto_psv__' attribute directive ignored
    gpsParse.c:354: warning: `__no_auto_psv__' attribute directive ignored
    gpsParse.c: In function `_U1RXInterrupt':
    gpsParse.c:360: warning: passing arg 1 of `__builtin_btg' discards qualifiers from pointer target type
    gpsParse.c: At top level:
    gpsParse.c:379: warning: `__no_auto_psv__' attribute directive ignored
    estYawDrift.c:31: warning: passing arg 1 of `__builtin_btg' discards qualifiers from pointer target type

    Nevertheless "BUILD SUCCEEDED: Fri May 15 15:38:26 2009" is outputted at the end.
    same situation happens with the other 8.30 PC...
  • T3
    Dante,

    Hopefully, by now you have your ICD2 working. If not, there is one more thing you might try. Try connecting your ICD2 to the DevBoard with something besides the 6 wire cable, even if the 6 wire cable checks out ok. You could use individual single wire jumpers, or a pair of 3 wire female-female servo cables. Be careful to get the correct pin sequence, refer to the 6 wire cable to see what it is. Pin 1 of the ICD2 connects to pin 1 of the UAV DevBoard, etc.

    The reason I suggest this is that I suspect there are some cables that have an intermittent problem. When I bought a PIC-ICD2-Pocket, it arrived with one of the wires pulled out of the connector. I have 4 of these cables, so last night I tried gently tugging on the wires. A couple of them slipped right out. So I took them apart to repair them. (I soldered them) In the process I discovered that some of the connections were not crimped very tight, and in a few cases the crimp was on the insulation, and the connection was made only by the end of the wire touching the connector.

    This could lead to an intermittent connection. The cable might test ok when you disconnect it, but when you connect it, it might not be.

    So, if you are able to make get your ICD2 working by connecting it with jumpers or a pair of servo cables, then there is a problem with your 6 wire cable. In that case, contact SparkFun to get a new cable.

    Best regards,
    Bill Premerlani
  • T3
    Here is a "Getting Started with PIC Programming" guide that might help.
    Bill Premerlani
  • T3
    Dante,

    The first thing to check are the power options under the programmer settings. Make sure that the ICD2 is not trying to supply power to the board. If that option is checked, uncheck it.

    Next, I have a question for you. Are you using the recommended ICD2?

    http://www.sparkfun.com/commerce/product_info.php?products_id=5

    Some folks (myself included) bought a PIC-ICD2-Pocket, and had some problems with it. If you have a PIC-ICD2-Pocket, that could be the problem.

    Assuming that you have the right ICD2, where did you connect the 6 wire programming cable to it? There are two places that you could connect, only one of them will work. You should connect to the 6 pin header that is between the USB and the RS232.

    Another thing to check is the continuity of the 6 wire programming cable. It is possible that one of the wires is broken or is not making a good connection with its pin.

    I am in the process of writing up a "getting started" document, I will have it finished in a day or two. Here is a link to a rough draft.

    In any case, I will work with you to get your board programmed.

    Best regards,
    Bill Premerlani
This reply was deleted.

Activity