Author Topic: Does Microchip MCUs have software like STM's CubeMX?  (Read 2809 times)

0 Members and 1 Guest are viewing this topic.

Offline helpmeTopic starter

  • Newbie
  • Posts: 3
  • Country: hk
Does Microchip MCUs have software like STM's CubeMX?
« on: May 25, 2016, 03:00:54 am »
CubeMX auto-generates config and initialization code for the STM32 MCUs. Is there a similar software like CubeMX for Microchip PIC MCUs?
« Last Edit: May 25, 2016, 03:11:49 am by helpme »
 

Offline TheDirty

  • Frequent Contributor
  • **
  • Posts: 440
  • Country: ca
Re: Does Microchip MCUs have software like STM's CubeMX?
« Reply #1 on: May 25, 2016, 03:11:11 am »
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.
Mark Higgins
 

Offline Romain

  • Regular Contributor
  • *
  • Posts: 72
  • Country: fr
  • HW & SW consultant
Re: Does Microchip MCUs have software like STM's CubeMX?
« Reply #2 on: May 28, 2016, 06:27:31 pm »
Microchip supplies the Harmony Framework to "help" you manage your peripherals...
http://www.microchip.com/mplab/mplab-harmony

I 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?
 

Offline jnz

  • Frequent Contributor
  • **
  • Posts: 593
Re: Does Microchip MCUs have software like STM's CubeMX?
« Reply #3 on: May 28, 2016, 08:42:32 pm »
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.
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5317
  • Country: gb
Re: Does Microchip MCUs have software like STM's CubeMX?
« Reply #4 on: May 28, 2016, 10:10:11 pm »
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.
 

Offline jnz

  • Frequent Contributor
  • **
  • Posts: 593
Re: Does Microchip MCUs have software like STM's CubeMX?
« Reply #5 on: May 28, 2016, 11:42:19 pm »
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.
« Last Edit: May 29, 2016, 05:10:01 am by jnz »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf