SOLVED - MPLAB MANY ISSUES: Slow/no vars updates, ICD4 not connecting, etc. - Page 1
Forum section: electronics / projects

author: ricko_uk
author_rank: Super Contributor
timestamp: November 05, 2021, 08:30:59 pm
content: Hi,after all help and suggestions received for a couple of posts and a total of over 4 hours with microchip tech support across the past 3 days, I thought of making this post with what seem to be the solutions to various MPLAB-X and ICD4 issues including:1) very long time (minutes) to update variables/watch with ICD4 (possible other debuggers too)2) software breakpoints locking MPLAB3) multi-dimensional arrays not loading data from the hardware (incorrect values or no values at all) on variables watch windows not the pop-up window when hovering over the array on the code window4) ICD-4 not stopping at hardware breakpoints and/or software breakpoints5) MPLAB and/or ICD4 locking up6) toolpacks installed showing as installed by MPLAB (Project Properties -> ICD4 -> Toolpack Selection) but the ICD4 has a different one loadedThey will try to address all these issues with MPLAB 6 (major new release - not just an update) coming out in Q1 2022.NOTES:i)MPLAB 5.50 (the most recent release as of Nov 2021) seems to have some bugs which might affect the ICD4ii)when updating the ICD4 toolpack it does not always update the firmware on the ICD4 (which it should - see below how to check that)iii)apparently (at least on my system) MPLAB does not like Dropbox (it might be because it continuously tries to access the files - only explanation Microchip thought of)iv)it also does not seem to like any other fixed drive (i.e. installed not USB obviously) other than C:SOLUTIONS THAT SOLVED THE ISSUES (at least so far):a)move the project out of Dropbox and to the C: drive. I tried moving it out of Dropbox on a fixed drive which was not C: and was still taking ages to upload the variables (if/when it did)b)after moving the project to C: (or if having any of the issues 1 to 4 above) then do the following:- inside the project ".X" folder (i.e. ProjectName.X) deleteONLYthe following folders which MPLAB will recreate automatically next time you compile:- .generated_files- build- debug- dist- BUT do NOT touch the "nbproject" and "report" folders, NOR the Makefile file.c)an alternative to the above point (b) is to select "Clean" from the project tree (right click on the project name). Microchip suggested it might be better (they prefer) to just delete the folders manually as mentioned in point (b)d)close MPLAB first then clear the MPLAB cache by deleting the entire cache ("var") folder. It will be automatically recreated by MPLAB when you re-launch it. You find the path by clicking on Help -> About and at the bottom it shows the path under "Cache directory:". For example C:\Users\JohnSmith\AppData\Local\mplab_ide\Cache\dev\v5.50\vare)check in Task Manager for "residues" of MPLAB. There should only be one MPLAB instance but sometimes you find one or two other MPLAB processes running (they are usually in the Processes tab of Task Manager under the section/header "Background Processes" NOT in the "Apps" section/header). If there are any in then End them. They are often Java/Netbeans threads that lost "connectivity" or sync with MPLABf)try to NOT use software breakpoints. They have been reported to have issues which will be addressed in the next MPLAB version coming out in Q1 2022g)check the toolpacks are actually synchronised. Sometimes it happens that you select a certain toolpack and MPLAB confirms that toolpack is the installed and running BUT when you try to run the ICD4 you can see in the Output Window (bottom of MPLAB) that appears every time you program your target, that the toolpack installed on the ICD4 is a different version. The only reliable way to check the installed toolpack is by reading the first few lines of the Output Window when you program the target. It clearly tells you which Toolpack is installed on the ICD4h)change the toolpack to a previous one (Project Properties -> ICD4 -> Toolpack Selection ->Use Specific Toolpack). Select the one that came with that specific verion of MPLAB (it is the only one highlighted in black and that cannot be unistalled). Then program or debug your target (your PCB does not need to be connected, just the ICD4) and check the new Taolpack is installed on the ICD4 (as mentioned above by checking the Version Installed in the Output Window). THEN IF YOU WANT you can try reselecting thelatesttoolpack by 1) installing it (through the Toolpacks menu) and then 2) selecting the latest one NOT by picking it like mentioned above but by selecting (Project Properties -> ICD4 -> Toolpack Selection ->Use LATEST Toolpack)do the same by selecting thei)this is a weird one but solved some issues when the ICD4 locks up or MPLAB says the ICD4 is used by other project. Create a new generic project using a completely different processor family and even compiler (if you are using PIC32 with XC3 compiler then create a new project for a PIC16 using XC16 compiler. Just make a simple even empty main.c(). Then make it the current/active project and compile it. Then switch over back to your original project.I hope all that helps others too!And as always, thank you all for all the help with the previous related posts!

author: I wanted a rude username
author_rank: Frequent Contributor
timestamp: November 05, 2021, 10:12:17 pm
content: MPLAB-X was excruciatingly slow until Iincreased the JVM heap size from the default 512 MiB using -J-Xmx. I still don't want to use it, but this at least made it bearable.

author: ricko_uk
author_rank: Super Contributor
timestamp: November 06, 2021, 12:37:28 am
content: What value did you increase it to?And where is the option?