• AVR Freaks

Helpful ReplyHot!Cant' create new configuration in Harmony 3 Project

Author
ibbro
Starting Member
  • Total Posts : 87
  • Reward points : 0
  • Joined: 2015/10/22 07:34:56
  • Location: 0
  • Status: offline
2020/01/26 07:01:04 (permalink)
0

Cant' create new configuration in Harmony 3 Project

Has anyone found clear documentation for the process of adding a new configuraton to an existing Harmony 3 project? I've been using Harmony 3 examples and modifying them for our board setup with no problems by modifying a similar configuration. If I simply rename the configuration, or try to add a new configuration everything falls apart. MHC will no longer load. Manually renaming subdirectories within the project to the new configuraton name will get MHC running again, but then it no longer prompts for the config XML file. 
 
 
#1
BillP
Super Member
  • Total Posts : 389
  • Reward points : 0
  • Joined: 2014/09/28 07:53:35
  • Location: CA
  • Status: offline
Re: Cant' create new configuration in Harmony 3 Project 2020/01/26 08:48:25 (permalink)
0
<currentHInstall> is the location where Harmony is installed

1.  Make a copy of the directory (old_project) in the <currentHInstall> /apps/ directory.    Rename the copy directory to “new_project”.
2.  Start MPLAB IDE and select the Open Project. . .  Go to <currentHInstall> /apps/new_project /firmware/old_project.X.  Click on “Open Project”.
3.  Right click on the “old_project” project in the Projects window and select “Rename…”.  Check the “Also rename Project folder”, enter the new name (i.e. “new_project”). Click Rename.   
4.  Right click on the “new_project” project in the Projects window and select “Set as Main Project”.  
5.  Click on the Tools/Embedded/MPLAB Harmony 3 Configurator and make any changes for the new project.


#2
ibbro
Starting Member
  • Total Posts : 87
  • Reward points : 0
  • Joined: 2015/10/22 07:34:56
  • Location: 0
  • Status: offline
Re: Cant' create new configuration in Harmony 3 Project 2020/01/26 09:57:35 (permalink)
0
I understand that process and can do it successfully. It is when I try to change the configuration name in MPLAB that it fails. If I rename the configuration in MPLAB the underlying project directories contain the original configuration name as does the configurations.xml file. I haven't found a way to rename or add a configuration without just creating a new project. I would think that harmony would provide a way to do that but haven't found it.
 
I can get by without that, but going the other direction and trying to duplicate the functionaliy of an existing demo in a new project , I typically can't compile the resulting Harmony generated code, because of undefined SYS_DEBUG stuff.
 
Harmony generates lots of SYS_DEBUG_MESSAGE in generated files and those defines are based on a SYS_DEBUG_ENABLE which does not show up when searching the project, except in the ifdefined where I found it. (At least in the working example I'm looking at) For instance the cdc_com_port_single example for the curiosity 2.0 board works. It includes some conditional compilation based on SYS_DEBUG_ENABLE which is true in that project. When I start a new project, add the same Harmony components and configure them the same, it won't compile unless I comment out all the SYS_DEBUG_MESSAGE lines. Would you know where the SYS_DEBUG_ENABLE is defined in a case like that? I don't see options for it in Harmony or gcc. In the cdc_com_port_single example CONSOLE and DEBUG are not even included in MHC but it still contains the debug code and SYS_DEBUG_ENABLE is true.
 
Thanks -IB
 
post edited by ibbro - 2020/01/26 09:58:40
#3
ibbro
Starting Member
  • Total Posts : 87
  • Reward points : 0
  • Joined: 2015/10/22 07:34:56
  • Location: 0
  • Status: offline
Re: Cant' create new configuration in Harmony 3 Project 2020/01/26 10:18:27 (permalink)
0
I found SYS_DEBUG_ENABLE, I must have typed it wrong in my original search. It is defined by default in new harmony 3 generated code in configuration.h and stops the SYS_DEBUG_MESSAGE from being defined, which is what they use in generated code. The example didn't have it defined and so created defines for SYS_DEBUG_MESSAGE instead. Harmony 3 USB code as generated needs it undefined to work.
#4
BillP
Super Member
  • Total Posts : 389
  • Reward points : 0
  • Joined: 2014/09/28 07:53:35
  • Location: CA
  • Status: offline
Re: Cant' create new configuration in Harmony 3 Project 2020/01/26 12:02:23 (permalink)
0
Oops, sorry.  I misread your original post.  I read "project" when you meant "configuration".  I am sure there is a way to do what you want to do, but I have not done that before, so no help there.
 
As for the SYS_DEBUG messages, there is another problem, especially with the net modules.  Many of them assume you are using SYS_CONSOLE and SYS_DEBUG so there are 4 source or header files (see below) that have a #include that causes compile errors.  There should be a conditional around these includes, but since that does not exist (yet), I have to manually comment out the offending lines to avoid compile errors.
 
src-> config-> PIC32MZ-> driver-> ethmac-> src-> dynamic-> drv_ethmac_lib.h
src-> config-> PIC32MZ-> library-> tcpip-> src-> tcpip_private.h
src-> config-> PIC32MZ-> driver-> miim-> src-> dynamic-> drv_miim.c
src-> config-> PIC32MZ-> driver-> ethphy-> src-> dynamic-> drv_ethphy.c


#5
ibbro
Starting Member
  • Total Posts : 87
  • Reward points : 0
  • Joined: 2015/10/22 07:34:56
  • Location: 0
  • Status: offline
Re: Cant' create new configuration in Harmony 3 Project 2020/01/26 12:21:21 (permalink)
0
Thanks for that. Adding TCPIP to an existing project with USB CDC is where I started this morning. And I got lots of errors so backed up, which is where my post originated. Ready to move forward again, I think your info will be helpful.
#6
arpananand
Super Member
  • Total Posts : 488
  • Reward points : 0
  • Joined: 2009/11/18 04:35:42
  • Location: 0
  • Status: offline
Re: Cant' create new configuration in Harmony 3 Project 2020/01/27 21:56:16 (permalink) ☄ Helpfulby realexander 2020/05/09 12:27:28
0
when you are trying to create new configuration for an MPLAB project, i believe you mainly want to share your application files (app.c, main.c) with different configurations, don't you?
 
if that is the case, then Harmony 3 has a different way of sharing application files between multiple configurations as compare to Harmony 2. H3 do not use "configuration" feature of MPLAB for the same and rather it needs new projects to be created for it.
For example, if you want to use "main.c" written for "pic32mx_xlp_sk" board of "<your H3 location>\csp\apps\spi\spi_eeprom_write_read" demo for your board, then do following:
  1. start creating a new H3 project
  2. while creating the new project, in project setting, keep the "Location" of the project same as the project you want to share your app files with. in this case your location should be: "<your H3 location>\csp\apps\spi\spi_eeprom_write_read". check attached screenshot.
  3. change the "Folder" name to something which is your board specific. check attached screenshot.
 this will create a setup for you wherein you can share same application files with different configurations.

Attached Image(s)

#7
Jump to:
© 2020 APG vNext Commercial Version 4.5