• AVR Freaks

Hot!How to use configurations with Harmony 3?

Author
Luca Pascarella
Junior Member
  • Total Posts : 104
  • Reward points : 0
  • Joined: 2007/05/28 00:53:17
  • Location: The Netherlands
  • Status: offline
2020/04/03 10:14:57 (permalink)
0

How to use configurations with Harmony 3?

With Harmony 2 was possible to use MPLABX configurations to create variants of a device even with different microcontrollers. This allows sharing high-level code between variants easily because all code is in a single MPLABX project.
However, this seems to not work with Harmony 3. When I create a new configuration "Tools->Harmony 3 configurator" always adds new files into default configuration ignoring the current configuration.
 
The only solution that I see is to create a project for every variant. But this creates multiple copies of high-level code. Or I should refer to a parent folder.
 
What strategy are you using to deal with variants?
I do not want to copy code between projects? I would like also to use git normally.
#1

2 Replies Related Threads

    jdeguire
    Super Member
    • Total Posts : 591
    • Reward points : 0
    • Joined: 2012/01/13 07:48:44
    • Location: United States
    • Status: offline
    Re: How to use configurations with Harmony 3? 2020/04/06 10:20:32 (permalink)
    0
    It turns out that creating a project for each configuration is actually the recommended way to do it.  If I remember correctly, this is because MPLAB X configurations weren't really designed to handle having so many files excluded/included that Harmony needs in order to have per-configuration Harmony files.  In my experience, MPLAB X did do a decent job at it, but I can see why it might be a problem for the MPLAB X devs trying to make reading a now-ginormous project XML file fast and reliable.
     
    With that said, you can have multiple configurations for Harmony 3, but you have to copy and paste stuff yourself.  This is the path I started down back when I was trying to evaluate Harmony 3 and update our Harmony 2 code base for it (really, our codebase is pre-Harmony 1, but we've long since converted with good results).
     
    I'll probably learn to use multiple projects instead, though I would really like it if the MHC3 software would help us by letting us easily create new projects based on the current one.
    #2
    Luca Pascarella
    Junior Member
    • Total Posts : 104
    • Reward points : 0
    • Joined: 2007/05/28 00:53:17
    • Location: The Netherlands
    • Status: offline
    Re: How to use configurations with Harmony 3? 2020/04/07 02:29:24 (permalink)
    0
    I see, I'll go for multiple projects solution and I'll put the common sources in a parent directory.
    #3
    Jump to:
    © 2020 APG vNext Commercial Version 4.5