Does anyone find MPLAB X Flakey??

Discussion in 'Embedded Systems and Microcontrollers' started by Lestraveled, Jun 2, 2014.

  1. Lestraveled

    Thread Starter Well-Known Member

    May 19, 2014
    1,957
    1,215
    I am getting reacquainted with PIC chips. 10 plus years ago I did a fair amount of assembly language programming using MPLAB ver. ? and a microchip programmer that was in a white box.

    Today I am using MPLAB X Ver.2.05 with an PM3 programmer on a Vista machine (I know Vista sucks, Its a spare computer in my shop.)

    This is what is happening:
    - Sometimes when compiling assembly code I get warnings that I am not on the right bank for the register I am addressing. I recompile the same code and the warnings go away. I compile again and they are back. Ether way the code works as expected.

    - PM3 programmer - One day it works perfectly. The next day it appears to function correctly but continues to program the first build entered after power up no matter what I send to it. The only way to program a new build is to power the PM3 down first.

    I have gone through the documentation and see no supporting data for the above behavior. I remember that when I used MPLAB 10 years ago it was rock solid.

    Has anyone else had these kind of problems with MPLAB X and a PM3 programmer?

    Thank you ahead of time. I appreciate your assistance.

    Mark
     
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,515
    2,369
    I think if you don't actually declare it (bank), the compiler gives you a warning.
    One of the reasons I migrated to 18F, you don't need to worry about it.
    Also I went back to MPLAB IDE.
    Max.
     
  3. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    AFAIK MPLAB X generates random "features" at random times.

    The non-X version is quite stable and predictable. Faster too.
     
  4. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
  5. nigelwright7557

    Senior Member

    May 10, 2008
    487
    71
    MPLAB X is still quite new.
    I didn't like it so when back to MPLAB.
    You can still download the old MPLAB.
    I think its at version 8.92.

    Microchip have shot themselves in the foot with new MPLAB X and the new XC8 compiler. Nothing legacy compiles without work.
     
  6. MMcLaren

    Well-Known Member

    Feb 14, 2010
    759
    116
    Hi Mark. Nice to meet you, Sir.

    I'm still using MPLAB too (Windows 7). It only has marginal Simulator support for some of the newer chips but, based on user comments, I'm still not quite ready to jump into MPLAB X.

    Good luck... Have fun...

    Cheerful regards, Mike
     
  7. Lestraveled

    Thread Starter Well-Known Member

    May 19, 2014
    1,957
    1,215
    Thank you all.
    Your comments support what I am seeing with MPLAB X. I will be going forward into the past to MPLAB Ver.8.92.

    Thank you again.
     
  8. JohnInTX

    Moderator

    Jun 26, 2012
    2,341
    1,024
    That sounds like an assembler problem. In Project->Properties you can select from the various assemblers installed on your system. Maybe try MPASM Suite from 8.xx. Also, if you are using absolute mode, be sure to explicitly select it in the Assembler Options, its not standard. I don't know why subsequent builds yield different results but X and all of its tools are a significant departure from any previous in many ways and this smells like an optimization issue - which X's assembler does.

    I don't know what's up with your PM3. Make sure it has the latest firmware and check the readme files.

    The sad fact is that 8.xx is going away. Hopefully, X will be serviceable by then. I am currently supporting 2 large projects. XC8 won't compile the RTOS used in one of them - and never will according to uCHIP. I meet with the 2ed client next Friday.the.freaking.13th to discuss migrating another, very large codeset to X. Not feeling good.

    Good luck.

    EDIT: Since you are in Tucson, the very belly of the beast, you might call and get an FAE from the sales office over to help. Or send your code on a support ticket and see what they say.
     
    Last edited: Jun 2, 2014
  9. Lestraveled

    Thread Starter Well-Known Member

    May 19, 2014
    1,957
    1,215
    John
    Thank you for responding.

    I am not too upset about the warnings because the code works. (I implicitly the set the Bank select bits in the status register before accessing the port.)

    The problem that has turned from random to steady is the PM3 issue. It refuses to accept new code other than the first time after power up. MPLAB X updated its operating system upon first use. MPLAB X communicates easily with the PM3.

    I loaded MPLAB V8.92 and at this hour, it can not communicate with the PM3 via USB. I am currently searching for a serial cable to bypass the USB interface.
     
  10. Lestraveled

    Thread Starter Well-Known Member

    May 19, 2014
    1,957
    1,215
    Update on the PM3 issue

    It appears to be a USB issue, not a MPLAB X or a PM3 issue.

    When the problem is present the last lines of the programming status is:
    Programming Target
    Programming Complete

    When the problem is not present (everything works) the last lines of the programming status is:
    Programming Target
    Programming Complete
    Running Target

    Fix: When the problem presents itself, (I program a chip and nothing is changed), I disconnect the USB cable and reconnect it. The programming status window updates the status of the programmer. From then on, until I reboot the computer, the PM3 works fine.

    I suspect that if I was running anything other than Vista I would not have this problem.

    Thank you for listening and responding.

    Mark
     
    ErnieM and JohnInTX like this.
  11. JohnInTX

    Moderator

    Jun 26, 2012
    2,341
    1,024
    Did you remember to change the PM3 driver from X to MPLAB 8.xx using the MPLAB driver switcher (in administrator mode?).

    I'll see if I can try a quickie on my PM3 to see what happens under X.

    EDIT: we cross posted but in the interim, I found that I can change code, recompile (XC8) by clicking Make-and-Program and the PM3 does blast the PIC with the new code. I didn't have to cycle the USB or power (after it updated the PM3).

    I don't have any assembly builds to try on it. Sorry.

    Win7-64 Pro MPLABX 2.10 XC8 1.31
    Maybe a Vista/driver problem after all.

    UPDATE: So.. I closed MPLABX and restarted it with the PM3 left on. Now, I have the same problem! I have to cycle power or the USB on the PM3 to get it to program a new load. How SO VERY MICROCHIP.

    For messages I see:
    In the Build Load Window
    BUILD SUCCESSFUL (total time: 2s)
    Loading code from M:/UP/XC8/1787_Play/1787_Play.X/dist/default/production/1787_Play.X.production.hex...
    Loading completed
    Connecting to programmer...
    Programming target...
    Programming completed
    Running target...


    And in the PM3 window:
    Programming target...
    Programming completed


    The first is what I'd expect running RealICE, the second for stand-alone programming. But both??

    Thanks for bringing this up. If you find a workaround let us know. Its not a Vista issue.

    UPDATE Deux: Parsing the MPLABX 2.10 PM3 Readme reveals this little gem:
    Guess which one I have.

    I quit.
     
    Last edited: Jun 3, 2014
  12. Sensacell

    Well-Known Member

    Jun 19, 2012
    1,128
    266
    I just recovered from my first brush with MPLAB-X.
    The program has some exciting new features that thrilled me at first, but the overall experience was a disaster, the debugger (Pickit3) did not work correctly, it lost track of symbols, got out of sync with the source code, etc.

    Reverting back to the standard MPLAB was like reuniting with a good old friend.
     
    JohnInTX likes this.
  13. JohnInTX

    Moderator

    Jun 26, 2012
    2,341
    1,024
    Thanks, but you are NOT making me feel any better about my meeting next Fri (post #8).

    Actually.. many thanks. To you and the other posters in the thread. I've been wrestling with the prospect of migrating a big project to X and feeling unsettled.. Almost had myself talked into it.
     
  14. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    My biggest mystery "X" problem was neither PICkit 2 nor 3 would work with it. No problem with non-X or the IPE thing, just no support withing X itself.

    The solution was to change the cable to the bright red one that ships with the PICkit 3. Now I wonder why that hardware worked just fine with a different cable under different programs.

    So it would seem that MPLAB-X is now ROHS.
     
    JohnInTX likes this.
  15. Lestraveled

    Thread Starter Well-Known Member

    May 19, 2014
    1,957
    1,215
    Update on the PM3 issue.

    My PM3 is also a 10-00359.

    This morning I brought MPLAB X up first. Just before I did my first load I powered the PM3 on. It worked perfectly as I alternated between two builds.

    Leaving the PM3 on, I then shut down MPLAB X and opened MPLAB 8.92 and tried to talk to the PM3, no joy.

    I opened MPLAB X and it did not recognize the PM3. I had to open properties and select it as the programmer. The PM3 failed to program the first load but correctly programmed the following loads.

    I repeated going in and out of MPLAB X three times.
    2 out of 3 times it did not recognize the PM3.
    3 out of 3 times it would not program the first load.
    3 out of 3 times after the first load it worked perfectly.

    Anyway, I will play with it a little more. I'll post if find something concrete.

    Mark
     
    JohnInTX likes this.
  16. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    2,907
    2,165
    Last edited: Jun 3, 2014
    JohnInTX likes this.
  17. JohnInTX

    Moderator

    Jun 26, 2012
    2,341
    1,024
  18. Lestraveled

    Thread Starter Well-Known Member

    May 19, 2014
    1,957
    1,215
    No, I am not at this time. I just wanted to load MPLAB 8.92 to take a look at it and possible use it as a diagnostic.

    As I understand it, MPLAB is at the end of its life and MPLAB X is taking its place. If I am going put the effort into learning (re-learning) a software development package it should be MPLAB X.

    I had two issues when I opened this thread to ask for help; unexplained warnings on code that worked fine, and a PM3 programmer that would not accept new code.

    The warnings are still a mystery. This morning I integrated the PIC into the assembly and it worked fine. Success!! I started the PCB design.

    The proper use of the PM3 (non-roHS version) appears to be, turn it on just before you need to use it. It will then work normally. Don't power it up and then load MPLAB X.

    In the last 27 hours I have learned a lot. I am going to bite the bullet and work with MPLAB X. (I have a high tolerance to pain, what the heck.)

    Thank you all.

    Mark
     
  19. JohnInTX

    Moderator

    Jun 26, 2012
    2,341
    1,024
    I griped about the PM3 issue on a support ticket and they offered a 50% discount on a new one.

    Oh boy.
     
  20. Lestraveled

    Thread Starter Well-Known Member

    May 19, 2014
    1,957
    1,215
    Yea, Oh Boy. That means....lets see...Divide by 2 ....carry the one...$450 bucks. I bought my PM3 for $45.44 on ebay. I will deal with a little flakeyness for that price difference. I suspect you might also.
    John, you're good guy. Thank you.
     
Loading...