Reputation: 109
MPLAB X takes 50 seconds to build, and more than a minute to program the PIC for debug after having built immediately before. Also seems slow when debugging. Will a multiprocessor pc run this program significantly faster, and what parameters should I look for when buying the pc?
Present arrangement is
Upvotes: 3
Views: 8980
Reputation: 13931
CONFIGURATION TIPS
To speed up compilation process turn on "parallel make" (Tools -> Options). See image 1 below.
It helps a lot, because if you have multiple source files in your project - compiler must be called many times to compile each file. Most of this work can be done in parallel.
Check "Maintain active connection to hardware tool" in "Tools" -> "Options" -> "Project options" tab.
This will save you a lot of time when debugging.
Take a look at MPLAB memory limit in your configuration.
I'm not sure, but I think that MPLAB installer checks how much RAM you have and sets memory limits according to hardware. If you upgraded RAM - you may need to reconfigure IDE memory limit.
Locate your mplab_ide.conf
file, in my case (default installation directory):
C:\Program Files (x86)\Microchip\MPLABX\v5.15\mplab_platform\etc\mplab_ide.conf
and find line with "default_options":
default_options="-J-Dcore.properties.disableHttpProxy=true --branding mplab -J-Dcrownking.stream.verbosity=very-quiet -J-Xss8m -J-Xms512m -J-Xmx2G -J-XX:+UseConcMarkSweepGC -J-Dapt.limit.expanded.params=1000 -J-Dplugin.manager.check.interval=EVERY_WEEK -J-Dsun.java2d.noddraw=false -J-Dorg.netbeans.modules.extbrowser.UseDesktopBrowse=true -J-Dnetbeans.importclass=org.netbeans.upgrade.AutoUpgrade"
NOTE: Please edit your own config file, this may be not suitable for your MPLAB version.
Most important parameter here is -J-Xmx
. This is memory limit. I have set it to 4GB (-J-Xmx4G
) because I have 24GB RAM, but I have never seen MPLAB using more than 2GB (when I work with 8-bit microcontrollers).
Current MPLAB is based on NetBeans, so you can take a look here if you need more details:
You may turn off few plugins in IDE to speed up MPLAB loading process. I have turned off these (in Tools -> Plugins):
and it looks like nothing bad happened.
I have tried to turn off some other plugins, but MPLAB Code Configurator depends on them so I gave up.
If your project is pretty old - you may want to take a look at your version control (maybe manual Local history
feature cleanup is necessary). Or just re-create new project from scratch and add your files.
HARDWARE TIPS
Install MPLAB compilers on SSD disk.
Put your project on SSD disk.
More CPU cores can help a lot ("parallel make" must be turned on)
Configuring MPLAB to use more than 2GB RAM makes no difference (if there is nothing wrong with project, sources, local history, Git etc.).
Upvotes: 2
Reputation: 118
Here are some of the things you can do to speed up MPLAB X IDE:
Delete the MPLAB X Persistence and Cache directories on your machine Go to MPLAB X IDE >> Help >> About, and note down the Persistence and Cache Directory paths. Close the IDE; access the directories and delete the contents. Restart the IDE without importing previous settings.
Other things that might also slow down the IDE, is having a lot of watches, windows, EEPROM/SFR or call stack open. Make sure you open only the windows that you need.
If you have a multi core machine, you can take advantage of it; by checking the box which allows the "make" utility to take advantage of multi-core processors for compiling. Select Tools >> Options >> Embedded >> Project Options >> Check the Box "Use parallel make"
If you have turned on the logging, switch it off, under Tools >> Options >> Embedded >> Diagnostics >> Logging Level = OFF
Other things that can be done to make MPLAB X run faster is to: A. Maintain minimal Project configurations under Project Properties. B. Force Garbage collection by clicking on the MPLAB X Memory Gauge Refer: http://microchipdeveloper.com/mplabx:make-mplabx-run-faster-project-properties
If issue persists, report to “support.microchip.com”
Upvotes: 1