Alternative (better!) IDE to MPLAB-X - Page 1
Forum section: electronics / general

author: ricko_uk
author_rank: Super Contributor
timestamp: July 14, 2021, 08:53:00 pm
content: Hi,I have been using MPLAB-X for all microchip projects and usually I use the various plugins like Harmony Code Configurator etc.Three of questions:1) Is it possible to use other IDEs?2) what are the limitations of doing so? I assume that for example Microchip's code configurator (or alternative) is not available nor are the other toolchain products form Microchip?3) if it is what are the recommendations/guidelines in doing so and especially which IDEs would you recommend which perhaps have been designed to work with and/or integrate with the Microchip toolchain?Thank you

author: JOEBOBSICLE
author_rank: Regular Contributor
timestamp: July 14, 2021, 09:54:35 pm
content: You can build outside of mplab X but there's no support in open ocd for most pic parts. So you can't debug using another IDE.Maybe j-link might work but who knows...

author: westfw
author_rank: Super Contributor
timestamp: July 15, 2021, 05:55:08 am
content: What is it that you dislike about MPLABX?

author: apurvdate
author_rank: Contributor
timestamp: July 15, 2021, 06:02:30 am
content: There is mikoC. Comes with its own IDE & compiler.https://www.mikroe.com/mikroc-picI haven't used it personally but I've seen few external consultants of our company use it. Lot of 3rd party created libraries are also available on their forums.

author: jc101
author_rank: Frequent Contributor
timestamp: July 15, 2021, 04:44:12 pm
content: Quote from: apurvdate on July 15, 2021, 06:02:30 amI moved from Mikroe IDE and compilers a while ago now to MPLAB-X, with USB dongle licences for XC8 and XC32 so they never expire. I had issues with a lack of part support with MikroC and the libraries, and there are a lot, are totally closed source. So if something isn't right, you have no idea if it's the library or something else.Microchip MCC and Harmony have their issues, but you have the source code and can track things down if something misbehaves.MPLAB-X can be problematic, but I've got used to its foibles now. I've found an SSD and plenty of RAM helps a lot with MPLAB-X.

author: apurvdate
author_rank: Contributor
timestamp: July 16, 2021, 06:48:52 am
content: Quote from: jc101 on July 15, 2021, 04:44:12 pmI agree with libraries being closed source is issue.I prefer a linux environment for code development so I never tried mikroe as it is windows only IIRC.Issue with MPLAB-X is if you've another IDE open - stm32cubeide for example - MPLABX will randomly go un-responsive. A lot of RAM helps

author: JPortici
author_rank: Super Contributor
timestamp: July 16, 2021, 07:19:13 am
content: this comes up from time to time, along with those that blabber about being not fair to pay for gcc optimizations - which i kind agree on, but now you pay mostly for their own addons like code coverage - so they will go on and create/compile their own tools.Some claim they made it, none ever reports how (because it's so easy so there is no need to explain?)To be honest MPLABX is the free IDE i dislike the leasti've come to live with it. I know that many would like a plugin set for VS Code, and while i kind of like it as an editor i just can't get used to it.Don't go Mikro C. As other said everything is closed source. Youwillhave issues. Good luck finding where it's at. I've moved from MikroC the moment XC8/XC16 came out and never looked back

author: ricko_uk
author_rank: Super Contributor
timestamp: July 16, 2021, 10:19:35 am
content: Thank you all!@westfw,the main thing is that it is NetBeans based which is very old technology with all it related issues. Sometimes locking up while debugging with ICDs like ICD4 or Jlink, other times not being able to stop it from doing something (some of its background processes) and either wait for several minutes or having to stop the process in task manager and restart it.But it looks like that might be the only option.

author: Sbampato12
author_rank: Regular Contributor
timestamp: July 16, 2021, 12:03:09 pm
content: Quote from: jc101 on July 15, 2021, 04:44:12 pmSo did I. I have bought the MikroPascal PRO PIC and latter for PIC32 also (dongle version) but there were some problems I've faced lately (since 2019 I didn't write uC FW, but that time), that made me loose some faith in their software. And since 2018/2019 I've moved mainly to linux (at home) its a shame that they don't offer an linux version/alternative, even paying (I see nothing wrong with that).But mainly because some inconsistency I found in their PIC32 (Pascal version) that wasn't covered in their documentation, and I lost a lot of time trying to figure out, and when I wrote to them the response was vague and sometimes they didn't responded, I finally choose to move on and use MPlab X. But I did only a test program, and then 2 years after, I started a project with an MSP.If I can say something is that the tools offered by TI are better/faster. But I've used PIC for 8 years, and MSP in one project, so I can't really say a lot about the differences.On the other hand, as the others already told, basically there is no option. At least if you want to use Microchip tools (Pickit or ICD3 ICD4...) or use the latest Microchip PNs.

author: NorthGuy
author_rank: Super Contributor
timestamp: July 16, 2021, 03:50:48 pm
content: Currently, I just use a text editor. Works much better for me.

author: JPortici
author_rank: Super Contributor
timestamp: July 16, 2021, 04:23:46 pm
content: Quote from: ricko_uk on July 16, 2021, 10:19:35 amI'm longing for MPLABX 6 (hoping the 6 will mean it will be based on apache netbeans, which has solved many issues that weren't solved in the current netbeans

author: ricko_uk
author_rank: Super Contributor
timestamp: July 16, 2021, 07:16:57 pm
content: I hope the next version is just native without netbeans at all!!!When I spoke to one of Microchip tech support he suggested that might be the case. Does anybody know for sure?

author: Simon
author_rank: Unknown
timestamp: July 17, 2021, 11:58:01 am
content: Quote from: ricko_uk on July 16, 2021, 10:19:35 amI just wish it would work on a 4k screen. Just reinstalled it hopefully changing the config file works this time unlike last time.

author: ricko_uk
author_rank: Super Contributor
timestamp: July 17, 2021, 12:49:12 pm
content: @Simon,What do you mean?I am planning to move to 4K. What happened exactly when you did?Thank you

author: Simon
author_rank: Unknown
timestamp: July 17, 2021, 12:54:30 pm
content: It will look horribly pixelated, I strove to have the natural experience or reading text as opposed to deciphering clusters of squares, but some people still do not know about progress.

author: ricko_uk
author_rank: Super Contributor
timestamp: July 17, 2021, 02:45:06 pm
content: Thank you Simon for the heads up.Will leave moving to 4K for the moment. Hopefully with the next MPLAB release it will be sorted.Thank you

author: Simon
author_rank: Unknown
timestamp: July 17, 2021, 03:56:10 pm
content: Well I think it will look the same on 4k as it will on HD, crap if you have a 27" monitor. The problem is that it is for netbeans that it runs on to sort out hi dpi support.

author: NorthGuy
author_rank: Super Contributor
timestamp: July 17, 2021, 04:13:36 pm
content: Quote from: ricko_uk on July 17, 2021, 02:45:06 pmI wouldn't count on this.

author: Rudolph Riedel
author_rank: Regular Contributor
timestamp: July 17, 2021, 04:33:14 pm
content: Quote from: JPortici on July 16, 2021, 04:23:46 pmNo release so far, so this would be several years from beeing almost useable if they released it tomorrow.At least given all the pain I had testing several 5.x release finding none useable for ATSAM.

author: JOEBOBSICLE
author_rank: Regular Contributor
timestamp: July 17, 2021, 05:23:45 pm
content: Isn't atsam cortex m based? I'd use Vs code with cortex m debug for that!

author: ricko_uk
author_rank: Super Contributor
timestamp: July 17, 2021, 06:27:08 pm
content: Quote from: JOEBOBSICLE on July 17, 2021, 05:23:45 pmAre you saying that if it is a cortex m processor you can use Visual Studio?And what about in circuit debugging? Which in-circuit debugger would you use which is fully supported by Visual Studio?Thank you

author: SiliconWizard
author_rank: Super Contributor
timestamp: July 17, 2021, 07:06:13 pm
content: Quote from: ricko_uk on July 17, 2021, 06:27:08 pmCortex-M MCUs are supported by GCC and JTAG/SWD. So you can use pretty much any tool that gives you access to that.Although not quite recent, you can start here:https://hbfsrobotics.com/blog/configuring-vs-code-arm-development-stm32cubemxOf course, you'll be missing any particular feature implemented in MPLAB, such as code generators and such. I don't know if someone wrote a VS code extension for Harmony, for instance.

author: ricko_uk
author_rank: Super Contributor
timestamp: July 17, 2021, 07:23:13 pm
content: Thank you SiliconWizard!

author: jc101
author_rank: Frequent Contributor
timestamp: July 18, 2021, 08:40:41 am
content: To make MPLAB-X better on my 27" 4K screens I end up doing the following after each version is installed.Edit the mplab_ide.conf file ( C:\Program Files (x86)\Microchip\MPLABX\v5.xx\mplab_platform\etc ) and adding this as the first optionCode:-J-Dsun.java2d.dpiaware=trueinto the lineCode:default_optionsThis seems to remove the pixelation for me. I do then have to play with altering the code text size in the config options, but I keep a canned set of those to ensure formatting consistency between the various machines I use.Note to do this you will need to run Notepad as administrator to be able to save it on a Windows 10 box.

author: Simon
author_rank: Unknown
timestamp: July 18, 2021, 08:48:17 am
content: Yea I did that in the past but I thought it was a netbeans file I was editing, maybe this is why it did not work as Microchip made it use another file. I'll try it. Hopefully the menu's scale up or it works with windows scaling.

author: jc101
author_rank: Frequent Contributor
timestamp: July 18, 2021, 09:03:51 am
content: Quote from: Simon on July 18, 2021, 08:48:17 amIt works for 5.50, as I did this only last week. Installed 5.50, edited the file, and it went from looking like Minecraft to usable.

author: Rudolph Riedel
author_rank: Regular Contributor
timestamp: July 18, 2021, 02:15:31 pm
content: Quote from: JOEBOBSICLE on July 17, 2021, 05:23:45 pmI would like to switch to using PlatformIO but the Atmel SAM platform does not support going CMSIS / BareMetal.It "only" supports Arduino, MBed, Simba and Zephyr - no option for me.Sure, using VScode as editor and compiling from the shell works but editing and compiling is by far not why I am still using Microchip Studio, one thing I would be missing would be the GUI for programming the chips including the "fuse" settings.Which brings me back to why testing out MPLAB-X was a major pain for me so far, it claims to be working for ATSAM but I disagree.

author: Simon
author_rank: Unknown
timestamp: July 18, 2021, 02:44:31 pm
content: Atmel studio now microchip studio is VS and supports ATSAM as Atmel's original IDE.

author: JOEBOBSICLE
author_rank: Regular Contributor
timestamp: July 18, 2021, 08:41:58 pm
content: Quote from: ricko_uk on July 17, 2021, 06:27:08 pmCortex debug is the name of an extension that launches openocd and then gdb. It can do any cortex m chip.There's a lot of IDEs now, you can even use visual studio by using visual gdb extension

author: NiHaoMike
author_rank: Super Contributor
timestamp: July 19, 2021, 03:01:51 am
content: MPLAB X looks just fine on a 50" 4K for me. Granted, I normally have it only take up half the screen leaving the other half for referencing datasheets and stuff, but I did try maximizing it and it seems to work well with the split view to make it easier to reference different parts of a large source file at once.

author: Simon
author_rank: Unknown
timestamp: August 11, 2021, 07:36:12 am
content: Quote from: jc101 on July 18, 2021, 08:40:41 amThis works, strange that line is not already in the options. changing the resident allow hi dpi setting from false to true did nothing. Amazing no one has bothered to fix this. Does this mean that at each update I will have to redo it?

author: jc101
author_rank: Frequent Contributor
timestamp: August 11, 2021, 02:18:57 pm
content: Quote from: Simon on August 11, 2021, 07:36:12 amSadly, yes. I've reported it before, never been fixed.

author: newbrain
author_rank: Super Contributor
timestamp: August 11, 2021, 02:38:16 pm
content: Quote from: ricko_uk on July 17, 2021, 06:27:08 pmYou know what?You can, and it's not even rocket surgery.Though the post you are referring to mentioned Visual StudioCode, a very different animal, I have compiled and debugged cortex-m code under Visual Studio.Just for kicks, I opened one of my Cmake/ninja/clang based project and with minimum fuss (some configuration editing in a VS json config file) it built from inside with no issue (with all the usual Visual Studio intellisense, error parsing, code jumps etc.).For debug, I set it to use pyocd as a gdb server (the board has a CMSIS DAP debug adapter) and it worked as expected, just another .json file for configuration.I did not setup flashing, but that's also possible, I'm sure.Note that I often refer to the (paid) VisualGDB extension - this is not it, in this case I disabled it on purpose, just to make sure I was only using Visual Studio stuff.

author: Simon
author_rank: Unknown
timestamp: August 11, 2021, 05:21:39 pm
content: Although the icons are all small and I tried everything but what I care more about is seeing the code I write as words rather than disassembled letters

author: AaronLee
author_rank: Regular Contributor
timestamp: August 11, 2021, 09:15:09 pm
content: Quote from: newbrain on August 11, 2021, 02:38:16 pmDo you happen to have a link to a website that explains any of this in detail? I'd be quite interested to try it out.

author: newbrain
author_rank: Super Contributor
timestamp: August 11, 2021, 10:38:32 pm
content: Quote from: AaronLee on August 11, 2021, 09:15:09 pmNot in great detail, but the bases are here:Cmake in VS:https://docs.microsoft.com/en-us/cpp/build/cmake-projects-in-visual-studio?view=msvc-160Debugger set up:https://docs.microsoft.com/en-us/cpp/build/launch-vs-schema-reference-cpp?view=msvc-160And a more step by step guide:https://devblogs.microsoft.com/cppblog/debugging-an-embedded-arm-device-in-visual-studio/