Does Microchip MCUs have software like STM's CubeMX? - Page 1
Forum section: electronics / general

author: helpme
author_rank: Newbie
timestamp: May 25, 2016, 03:00:54 am
content: CubeMX auto-generates config and initialization code for the STM32 MCUs. Is there a similar software like CubeMX for Microchip PIC MCUs?

author: TheDirty
author_rank: Frequent Contributor
timestamp: May 25, 2016, 03:11:11 am
content: I've never used PIC18's, but MPLABX has a plugin called Code Configurator that auto generates initialization code for modules and implements a basic library for each. I'm sure a lot of people hate it here, but being fairly new to PIC's I use it to generate initialization code that I steal for my own libraries.

author: Romain
author_rank: Regular Contributor
timestamp: May 28, 2016, 06:27:31 pm
content: Microchip supplies the Harmony Framework to "help" you manage your peripherals...http://www.microchip.com/mplab/mplab-harmonyI was maintaining a code developed 3 years ago (before they introduced Harmony), and following the updates of MPLABX and XC32, I had to patch my code there and there because they made the old PLIB obsolete. I never had the time (nor the need, or even will) to try Harmony.Anyone with some feedback on it?

author: jnz
author_rank: Frequent Contributor
timestamp: May 28, 2016, 08:42:32 pm
content: I tried Harmony once before I left Microchip for good (although I still have three products that still use them, nothing new ever will).I like Cube quite a bit. The app is awesome. The HAL needs a little work to be less bloated, but it does work. I didn't have 1/10th the impression of the Harmony app.

author: Howardlong
author_rank: Super Contributor
timestamp: May 28, 2016, 10:10:11 pm
content: For a number of low end PICs includi a few PIC24s the Code Configurator will generate code to set up and operate the peripherals.For PIC32 there is Harmony that also includes a code generator, the MHC. Harmony is not just a code generator, it's a framework.By far the biggest problem with any code generator is maintenance of code, particularly when there are bugs in the generator itself, you need to modify generated code, or the code generstor itself is updated. Almost always it's a time-bomb ready to break and overwrite your code.The quality of both the Code Configurator and Harmony/MHC is quite bad, and there is not a publicly maintained list of the numerous broken bits. Harmony also means you have to learn their framework, which is a straitjacket for programmers and is terribly difficult to understand well enough to get your fingers dirty on real production code. The Code Configurator isn't as bad but it still generates code for things like I2C which is trying to be a jack of all trades but master of none, that comment extends to Harmony too.I do use both the Code Configurator and MHC almost daily, but neither are a panacea: you still have to know your simpler peripherals at the hardware and register level pretty thoroughly. Innevitably you'll almost certainly end up with a hybrid design using both generated code and your own stuff, mostly because of the bugs and unmaintainablilty of generated code by the code generators.All code generators I've encountered have been universally shit since I first used them over 25 years ago. The idea might sound good but the implementation is always half arsed. These examples are no different.

author: jnz
author_rank: Frequent Contributor
timestamp: May 28, 2016, 11:42:19 pm
content: The time bomb thing about code generators is right. If you use one, sooner or later it'll destroy your code.Best I've found is to use one in a safe place, a scratchpad removed from your actual project and copy parts in where necessary.