• AVR Freaks

Helpful ReplyHot!Should I Use Harmony for New Projects?

Page: 12 > Showing page 1 of 2
Author
cen199
Starting Member
  • Total Posts : 16
  • Reward points : 0
  • Joined: 2014/03/07 10:41:05
  • Location: 0
  • Status: offline
2020/05/01 06:56:19 (permalink)
0

Should I Use Harmony for New Projects?

I have read several older threads about Harmony that are not favorable.  I am wondering what the latest consensus is.  Should  I start a new project with Harmony?
 
As someone with 20 years experience with PICs, the fact that I am asking the "noob" question of how to start a PIC project hints at a problem in itself.  Microchip has become a monster and is no longer easy to navigate.  I have been hanging on to "legacy PLIB" for some time, and I have no problems with it.  However, I'm afraid it will become unusable soon.
 
Is MCC something that is here to stay? Is Harmony the only way to go? Are there other options?
 
A software tool, like traditional tools, should save time and make work easier.  Does Harmony do this for basic projects that just need the core setup and some peripheral configuration bits set? 
 
I tried to make a new project with Harmony.  Installing it took a several tries from what appeared to be directory issues.  It would seem the directory must be already created and not in a protected area like Program Files (with all the other Microchip stuff).  The Content Manager did not work after the automatic restart, which wasted time before I realized a manual MPLAB restart would get it going.  The new project I created is for PIC32MX174F256B.  The Pin Configuration window is not resizeable or movable and every "touch" with the mouse just rips off the tabs and tries to stuff them back in another window.  After generating code, MPLAB compiler throws "Unknown processor!" error (from xc.h). 
 
So far, Harmony is increasing complexity and slowing down development.  Is there any benefit if I push through the steep part of the learning curve? 
 
 
 
 
 
#1
NKurzman
A Guy on the Net
  • Total Posts : 18975
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/05/01 07:02:26 (permalink)
0
MCC is for pic10 to small PIC32.
I have not tried harmony 3 so I can’t comment on it. For a pic 32mx you can still probably use Plib
MCC generates working code. But it can be bloated and inefficient.
But it’s useful. I never used plib anyway.
We can make sample projects and steal the subroutines.
#2
Jim Nickerson
User 452
  • Total Posts : 6752
  • Reward points : 0
  • Joined: 2003/11/07 12:35:10
  • Location: San Diego, CA
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/05/01 07:12:56 (permalink)
0
I have used all of the Harmony Versions
In my opinion Harmony 3 is soooo much better than the previous versions
The learning curve is steep
sometimes I find the documentation is quite confusing
Following the documentation to get a plib app up I got my first Harmony 3 Blink the Led up on the
https://www.microchip.com/DevelopmentTools/ProductDetails/PartNO/ATSAME70-XPLD
#3
Jim Nickerson
User 452
  • Total Posts : 6752
  • Reward points : 0
  • Joined: 2003/11/07 12:35:10
  • Location: San Diego, CA
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/05/01 07:14:17 (permalink)
0
I make use of MCC for all the chips it handles
It makes bringing up a new board relatively painless
#4
nigelwright7557
Super Member
  • Total Posts : 471
  • Reward points : 0
  • Joined: 2006/11/06 08:15:51
  • Location: 0
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/05/01 07:46:33 (permalink)
5 (1)
I found setting up clocks and system on PIC32's very tedious without Harmony.
Harmony is a great leap forward in embedded systems.
However, it is a steep learning curve.
It can even be quite hard moving from H2 to H3.
I had a previously working project under H2 not work when converted to H3.
H3 wasnt setting up some registers that H2 did.
 
 
 
#5
Paul PortSol
Super Member
  • Total Posts : 635
  • Reward points : 0
  • Joined: 2015/07/03 11:52:03
  • Location: Newfoundland, Canada
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/05/01 07:54:43 (permalink)
0
I think it depends on the modules you need to use.
 
Check if the modules you need to use (UART, LAN, Bootloader, etc.) and chosen PIC are supported in the Latest Harmony, and check latest forum posts about related issues, and check release notes in the Harmony Version.
 
If you are using a module with known Harmony bugs or unreleased support then expect a can of worms. 
i.e. I tried a simple test program for CAN and found the clocks were calculated wrong in Harmony3, so used HarmonyV206 instead. Some people have had issues with USB HID in HarmonyV206 but OK in HarmonyV204.
 
Try testing ALL the modules you will need on a demo board first, don't assume anything. The you can make an informed choice.
 
I would aim for Harmony3 just to minimize porting to newer version later.
-but-
if you need something that isn't supported and proven, then consider using something earlier or something else, or even a different MCU (PIC, AVR, etc.).
 
Paul
#6
NorthGuy
Super Member
  • Total Posts : 6350
  • Reward points : 0
  • Joined: 2014/02/23 14:23:23
  • Location: Northern Canada
  • Status: online
Re: Should I Use Harmony for New Projects? 2020/05/01 08:52:46 (permalink)
5 (3)
cen199
I have been hanging on to "legacy PLIB" for some time, and I have no problems with it.  However, I'm afraid it will become unusable soon.



How can it become more unusable?
 
These things are there with the intent of making your work easier. So use what you feel is the easiest for you. If you like PLIB, use PLIB. If you like Harmony, use Harmony. If you like to get by without any of these, do that.
 
If someone spent long time with Harmony, he has lots of experience with it and Harmony will help him more than it will help a novice. If someone (like me) spent time with datasheets, using a framework which builds a barrier between him and the things he already knows is not very good idea.
 
If you spent 20 years programming, you should know very well who you are and what you like. Use this knowledge. There's no miracles.
 
post edited by NorthGuy - 2020/05/01 08:54:01
#7
NKurzman
A Guy on the Net
  • Total Posts : 18975
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/05/01 09:15:45 (permalink)
5 (4)
North Guy

I disagree with you about Harmony experience. If you have a lot of experience with harmony 1.xx and a lot of code, i’m not sure how much of that translates to Harmony 3.xx. It didn’t readily translate over to Harmony 2.xx Which is why I never upgraded from 1.xx to 2.xx.
My issue is. Harmony 2.xx was Abandoned with known bugs. Harmony 3.xx is semi compatible at Best. And appears to be another do over with lots of issues. And It abandons Some hardware support. As in we’re not going to support the chips And eval boards that we’re still selling.

My biggest issue is Harmony 4.xx
After investing a huge amount of time in developing a new Harmony 3.xx app, from scratch apparently, Will I be able to migrate to Harmony 4.xx. History says no, start over again. That is why, for a larger network connected touchscreen product, I am pursuing Linux. It has a path to the future.
I will probably use Harmony to set up a pic 32mx but use none of the drivers.
#8
T Yorky
Super (Thick) Member
  • Total Posts : 569
  • Reward points : 0
  • Joined: 2012/08/28 02:07:35
  • Location: UK
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/05/01 09:54:21 (permalink)
0
@CEN199, just my take on Harmony. I am impressed with Harmony. It is a massive step forward from the MAL/MLA. But if you are used to simple projects, everything done in main(), blocking code, etc then Harmony is going to appear a massive overkill. Harmony is more like system programming with an OS. Where you have to adhere to rigid rules and cooperate with other code (you haven't written). There was a massive learning(reading!) curve. I was fortunate that the Harmony 'style' is similar to that we used on the 16bit platform so we could merge our own code fairly easily. If you intend to use PIC32 I would say persevere. And to allow you to implement simple projects just get Harmony to create a basic operating processor (CPU setup, timer, uart) and then modify the project by adding in your own style code, but stick to the 'Harmony rules'. If you are not familiar, ensure you fully understand how the call-backs work.
Where Harmony excels is providing the 'features' that are now expected in devices by users, USB, BTooth, Wifi, Ethernet. Harmony allows these to easily co-exist with a custom app. As long as you stick to 'the rules'.
T Yorky
#9
NKurzman
A Guy on the Net
  • Total Posts : 18975
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/05/01 10:23:46 (permalink)
0
Where Harmony excels is providing the 'features' that are now expected in devices by users, USB, BTooth, Wifi, Ethernet.
USB, Ethernet - Yes.
Wi-Fi -  was there coded poorly for the RN modules, then Dropped. Is it Back?  what Module  RN or Atmel.
BlueTooth?  what module? What support?  In V 1.XX almost nothing.
From what I gather V 3.XX defaults to Using an RTOS (FreeRTOS) V1.XX and V2.XX it was an option.
#10
cen199
Starting Member
  • Total Posts : 16
  • Reward points : 0
  • Joined: 2014/03/07 10:41:05
  • Location: 0
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/05/01 12:36:45 (permalink)
5 (1)
Thank you for all the helpful replies.
 
MCC is the best choice for me.  I created a new project with MCC and copied over an old project's files (about 50 .c files).  Within an hour and a half I got it to compile.  I did some non-functional defines to get past the missing __ISR definition.  Other than some changes to the ISRs, starting with MCC seems like it will be almost no changes for me.
 
@NKurzman, your second post makes me want to avoid Harmony.  Learning a framework is a waste of time if it is going to be short lived.  I have better portability and longevity with my low level code than what you describe.
 
#11
NKurzman
A Guy on the Net
  • Total Posts : 18975
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/05/01 14:57:14 (permalink)
5 (1)
It all depends on what features you need.
If you need USB or ethernet you kind of have to use it.
If you using simpler profiles and plan on writing directly to registers that always works even under harmony.

For the pic32mz you may need it to configure the timing Flash timing and cashe registers.

For smaller projects I’ve used a hybrid approach For smaller projects I’ve used a hybrid approach. Set up an empty project in harmony. Then write my own drivers. In the previous project I used the harmony equivalent of PLIB. That is portable between one and two. I do not know if it’s portable to three.

Setting up the clock timing and harmony is probably the best part of it.
I think they’ve got the kinks worked out of the pin manager too.
#12
cen199
Starting Member
  • Total Posts : 16
  • Reward points : 0
  • Joined: 2014/03/07 10:41:05
  • Location: 0
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/05/02 08:27:27 (permalink)
0
I spoke a little too soon about MCC.  The PIC32MX174 for my next project is not supported.  Fortunately, I realize now that the vast majority of the stuff I have been using is not part of PLIB.  Other than some processor clock and interrupt setup, I don't use anything other than the processor header files that have remained all along.
 
For USB and Ethernet I prefer external chips.  Leaving this to the experts can result in less complicated code and lower demands on the microcontroller.  I have had success with FT230X and W5500.  There are always trade offs.  Honestly, if a project looks like it will get complex, I'll go to the STM32H7xx.  The value line parts in this series are incredibly powerful for the price.  They are also much more complicated than PIC32MX.  
 
I wanted to take your approach of using Harmony for limited setup.  I ended up here after a few hours with no success.
 
 
#13
RISC
Super Member
  • Total Posts : 5778
  • Reward points : 0
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/05/03 03:21:25 (permalink)
0
Hi,
Few months back, I was told by online technical support that PIC32 support in MCC was stopped and to use Harmony which also supports  32 bits PIC / SAM devices in Harmony v3.
Regards
 
#14
LostInSpace
Super Member
  • Total Posts : 310
  • Reward points : 0
  • Joined: 2016/03/11 22:47:59
  • Location: 0
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/05/04 13:56:03 (permalink) ☄ Helpfulby Paul PortSol 2020/05/05 04:37:31
5 (1)
Many folks have the idea that Harmony is some all 'Evil Framework' (which it can be), but at it's simplest it is a Chip Configurator not unlike STM's CubeMX as an example. Microchip has just done a rather poor job of presenting it this way, so I wrote the 'missing app note' on this, perhaps it will clarify for you.
 
https://analoghome.blogspot.com/2019/07/microchip-pic32-harmony-bare-metal.html
#15
NKurzman
A Guy on the Net
  • Total Posts : 18975
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/05/04 15:43:04 (permalink)
5 (2)
Does STM come out with incompatible New version every few years?
DO they have poorly Constructed, Poorly Documented Peripheral Drivers (I2C and UART)  The UART did not have a Ring Buffer mode.  But it did have a Queue of Buffers.
The Graphics Library Changed.
The Bootloader is the Old Sample App with a cheap Wrapper.
V3 Supports ARM now, But dump Backwards compatibility.
The MCC does a Better Job, and they support more variations.
My BIG Complaint is after using it for Years, I can't reuse code or knowledge.
Maybe V3 is a solid Platform, Or maybe they dump it for V4 if a Year or two.
Microchip history of abandoning code is as legendary as their Never Abandoning PICs.
As a Product it is useful.  But Its History is checkered.  For a Graphics App.  I would be leary to recommend it.
It will do the Job.  But for a Long life Platform, or a series of Products.  Will It be around?
#16
Paul PortSol
Super Member
  • Total Posts : 635
  • Reward points : 0
  • Joined: 2015/07/03 11:52:03
  • Location: Newfoundland, Canada
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/05/05 04:40:31 (permalink)
0
LostInSpace,
Thank you for the appnote!
 
Wish there was a good place for people to post common Harmony info (a wiki),
as I've had to post same answers so many times.
Paul
#17
Paul PortSol
Super Member
  • Total Posts : 635
  • Reward points : 0
  • Joined: 2015/07/03 11:52:03
  • Location: Newfoundland, Canada
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/05/05 04:50:06 (permalink)
0
-Comment moved to the previously posted AppNote's page-
post edited by Paul PortSol - 2020/05/05 04:56:03
#18
friesen
Super Member
  • Total Posts : 2154
  • Reward points : 0
  • Joined: 2008/05/08 05:23:35
  • Location: Indiana, USA
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/05/05 05:56:13 (permalink)
5 (1)
I think if Harmony X was bug free, this discussion would be different.
 
Partly it boils down to how you do things though.  I personally don't appreciate the level of obscurity to manage SPI or serial.  I tried Linux already, and for embedded development I don't like it, its like threading needles with gloves on. 
 
To create a basic uart I think it took about 250 lines to do it myself, and it probably takes harmony 5000 lines or something.
 
But I don't think this issue is entirely a Microchip issue, as the STM32 line faces a similar complexity issue with the CubeMX.  I think it boils down to embedded complexity and the big companies trying to fill a need.
 
I see a parallel problem with the present state of Javascript frameworks.  For single developers it seems about like you have to take a bit different approach vs a large team.  I personally don't feel like investing 300 hours to learn a framework when I could just get the job done in 100 hours by writing 250 line uarts.

Erik Friesen
#19
NKurzman
A Guy on the Net
  • Total Posts : 18975
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: Should I Use Harmony for New Projects? 2020/05/05 07:54:03 (permalink)
4 (1)
You can use Harmony with your own 250 line UART. I did. I did not use their UART, SPI, or I2C. But did use their, tcp/ip, MSD, and graphics. They had no Bluetooth at the time.
I have had to add patches to USB and DHCP. These were from Microchip but I had to adapt them to my older Unsupported version. And I’m not 100% sure DHCP is fixed yet. And I’m not 100% sure the DHCP is fixed yet.
If I move forward the harmony V3 I will have to review all of my code since they change the underlying library to Support ARM.
My graphics library was abandoned.
I may need away to drag it along to a newer Harmony version.
The bugs at the beginning of Harmony were terrible. And the fact that the version 3.00-3.10 MPLabX couldn’t debug properly made it worse. But in the here an now my concern is that. They will abandon this again an try the next shiny thing in auto code generation.

Not that happy to hear that about Linux.
I was thinking about using that.
Possibly with a smaller PIC To deal with the hardware that needs to be controlled directly.
#20
Page: 12 > Showing page 1 of 2
Jump to:
© 2020 APG vNext Commercial Version 4.5