• AVR Freaks

Hot!Merging Harmony Demos for Specific Application [Without BSP]:

Author
karan123
Super Member
  • Total Posts : 833
  • Reward points : 0
  • Joined: 2009/02/02 11:11:21
  • Location: 0
  • Status: offline
2019/05/03 10:50:00 (permalink)
0

Merging Harmony Demos for Specific Application [Without BSP]:

Hi,
 
I have got success to run Harmony V2_06 demos one by one on my customized hardware with PIC32MZ2048EFM100
1) aria_quickstart
2) sdcard_msd_fat_multi_disk
By Just changing MCU from PIC32MZ2048EFM144 to   PIC32MZ2048EFM100.
 
What is the best way to merge or combine and add(more driver as per application) ?
1) Is it possible to combine them with MHC Import option.?
2) Create everything from scratch ?
3) Create New BSP according to my Hardware and Create  everything from scratch?
4) One First project like (aria_quickstart) and add features from second project(sdcard_msd_fat_multi_disk) to First project ?
 
and then delete CTP and add RTP [Four Wires], Flash Drives, Interrupts etc .?
What are the things should be taken care while merging/adding  in MHC V2_06 ?
 
Thanks..
Karan
 
 
#1

4 Replies Related Threads

    Paul PortSol
    Super Member
    • Total Posts : 471
    • Reward points : 0
    • Joined: 2015/07/03 11:52:03
    • Location: Newfoundland, Canada
    • Status: online
    Re: Merging Harmony Demos for Specific Application [Without BSP]: 2019/05/06 04:26:50 (permalink)
    0
    1) Recommend you create fresh project, no BSP, pins defined in pin manager, modules & clocks set in MHC. Then generate, and appropriately copy code from sample projects (or even better copy code from examples created using MHC-App-Generate).
    You can modify the generated .c and .h files in your project folder, but avoid modifying other files types (instead change MHC so files generated properly).
     
    Avoid modifying library files, better to copy them into your own custom folder, and set the paths in project settings to find your folder first, or even better rename the modified files. This will make it safer should you later upgrade Harmony version.
     
    Keep a good list of everything you modified, again so you have it for another harmony version, or for another project with similar needs. Especially true for patches and bug fixes.
     
    2) Yes, as per (1)
     
    3) Avoid BSP. Those are a carry over from Harmony 1.0 and are totally unnecessary in Harmony 2.0. Instead use MHC settings like Pin Manager.
     
    4) No, start with a fresh project. Copy in only what you need from other projects and examples. Many were created by different people with different styles, and some have "leftover" MHC settings. Take the time to go through all MHC settings and make them your own. Using an old project I've found you can't fully undo things added by MHC, so start fresh, backup/commit often, that way you can go back to "before" and cleanly fully remove something not properly added.
     
    Do the "merge" manually so you know what is done. Same for harmony upgrades. Hopefully when upgrade the list of "patches" gets shorter, but sometimes you have to add new ones :/
     
    (Shortcuts are things well proven by grandparents, any newer shortcuts should be temporary or you'll end up paying for them later).
     
    Paul
     
     
     
    #2
    karan123
    Super Member
    • Total Posts : 833
    • Reward points : 0
    • Joined: 2009/02/02 11:11:21
    • Location: 0
    • Status: offline
    Re: Merging Harmony Demos for Specific Application [Without BSP]: 2019/05/07 08:14:32 (permalink)
    0
    Thanks for update..
     
    After creating fresh project .Should I go for different apps like below in MHC?
    1) aria_quickstart                      --> app1
    2) sdcard                                  --> app2
    3) USB                                     --> app3
    4) NVM                                    --> app4
    post edited by karan123 - 2019/05/07 08:15:48
    #3
    Paul PortSol
    Super Member
    • Total Posts : 471
    • Reward points : 0
    • Joined: 2015/07/03 11:52:03
    • Location: Newfoundland, Canada
    • Status: online
    Re: Merging Harmony Demos for Specific Application [Without BSP]: 2019/05/07 09:51:23 (permalink)
    0
    That depends on the project implementation.
    Are access to those things related or independent?
    If independent then separate apps can help keep them separate.
    If related then maybe in a single app where you control the flow.
     
    The apps in harmony are implemented using a state machine, not  time sliced tasks, so the apps will be serviced in order anyway. Only interrupt actions (and any callbacks from those) will be handled out of sequence.
     
    If you looks at some of the demos and generated code you'll see they are often state machines within the state machine of each app.
     
    Have fun planning/designing your system, that may guide your implementation. 
     
     
    #4
    karan123
    Super Member
    • Total Posts : 833
    • Reward points : 0
    • Joined: 2009/02/02 11:11:21
    • Location: 0
    • Status: offline
    Re: Merging Harmony Demos for Specific Application [Without BSP]: 2019/05/07 12:15:49 (permalink)
    0

    That depends on the project implementation.
    Are access to those things related or independent?
    If independent then separate apps can help keep them separate.
    If related then maybe in a single app where you control the flow.

    Thanks.....They are not independent.
    You mean to say that if all are dependent to each other.
    Select/Configure all below in one app in MHC.
    1) GFX    (LCC)                        --> app
    2) Sdcard   (with FS)               --> app
    3) USB     (with FS)                 --> app
    4) NVM                                   --> app
    5) RTP                                    --> app
     
    These All should work in single app (in state machine)? 
    #5
    Jump to:
    © 2019 APG vNext Commercial Version 4.5