• AVR Freaks

AnsweredHot!Harmony 2.06 errors and warnings after adding graphics stack?

Author
RodoPIC
Senior Member
  • Total Posts : 173
  • Reward points : 0
  • Status: offline
2018/06/24 20:30:51 (permalink)
0

Harmony 2.06 errors and warnings after adding graphics stack?

Hi all,

This is for MPLABX 4.20, XC32 2.10, harmony 2.06 and PIC32MZ1024EFG100.
I'm new to harmony and PIC32. I started a few weeks ago using harmony 2.05_1 with a very basic board I made to connect a TFT (16BPP) to the PMP. The PMP mode didn't work. Microchip tech replicated the error and said there was something wrong with the generated code from harmony and suggested a few things. The only thing that worked (for me) was using EBI instead of PMP. The TFT showed the rectangles I place on the screen in the project with the graphics composer. I didn't try the touch panel stuff. I decided to wait for harmony 2.06.
Now I'm trying harmony 2.06. I was expecting the same basic errors as before: pin names for the TFT (vsync, hsync, etc). But that is not the case. I'm getting a bunch of warnings about sprintf and a couple of errors about __pic32_alloc_coherent. I haven't written any code yet. This happens after I add the graphics stack and set all the timing values (porches, clock, polarity, etc). I did not go into the graphics composer to create a screen yet. I just hit generate and try to compile. These steps compiled ok with version 2.05_1. Except with the pins names error I said earlier. So I was expecting the same errors but nope. I've been trying the PMP and the EBI and both have the same warnings and errors.
I'm going to try to include some of the warning and error text below but I'm not sure if the forum will allow it. I'm also going to try to attach a zip version of the project although the compressed file would probably be big.

I hope is just some new setting I'm missing that someone more familiar can point out to me or point out where to read about it.
 
EDIT: I had to erase the folders under _ext because they blow up the size of the project to 1.5megs when zipped. Forum limit is 500k. I reload the project and compile and the errors are still there.  

Thanks


libaria_widget_bar_graph_skin_classic.c:107:17: warning: incompatible implicit declaration of built-in function 'sprintf' [enabled by default]
sprintf(strbuff, "---");
^
libaria_widget_bar_graph_skin_classic.c:120:13: warning: incompatible implicit declaration of built-in function 'sprintf' [enabled by default]
sprintf(strbuff, "%d", graph->maxValue);
^
libaria_widget_bar_graph_skin_classic.c:123:13: warning: incompatible implicit declaration of built-in function 'sprintf' [enabled by default]
sprintf(strbuff, "---");
^
 
gfx.c: In function 'GFX_Open':
gfx.c:56:31: error: '__pic32_alloc_coherent' undeclared (first use in this function)
mem.coherent_alloc = &__pic32_alloc_coherent;
^

 
post edited by RodoPIC - 2018/06/24 20:32:05
#1
Ed@Microchip
Super Member
  • Total Posts : 138
  • Reward points : 0
  • Joined: 2017/04/06 09:39:29
  • Location: 0
  • Status: offline
Re: Harmony 2.06 errors and warnings after adding graphics stack? 2018/06/25 09:19:34 (permalink)
0
Hi RodoPIC,
 
    It looks like the build issues that you are seeing are due to the lack of BSP (MHC -> BSP Configuration). It is recommended to start a project using one of the existing BSPs that closely matches your board configuration, and customize that BSP to match your board design. You can also save the customized BSP for your board so you can use it in creating other projects.
 
   Refer to the following sections of the Harmony Help for information on how to use the BSP:
 
Volume II: Supported Hardware > Board Support Packages Help > Using a BSP
Volume II: Supported Hardware > Board Support Packages Help > Using a BSP > Creating Custom Initial Board Configurations
 
Thanks,
 
Ed
#2
RodoPIC
Senior Member
  • Total Posts : 173
  • Reward points : 0
  • Status: offline
Re: Harmony 2.06 errors and warnings after adding graphics stack? 2018/06/25 10:29:29 (permalink)
0
ed@microchip
Hi RodoPIC,
 
    It looks like the build issues that you are seeing are due to the lack of BSP (MHC -> BSP Configuration). It is recommended to start a project using one of the existing BSPs that closely matches your board configuration, and customize that BSP to match your board design. You can also save the customized BSP for your board so you can use it in creating other projects.
 
   Refer to the following sections of the Harmony Help for information on how to use the BSP:
 
Volume II: Supported Hardware > Board Support Packages Help > Using a BSP
Volume II: Supported Hardware > Board Support Packages Help > Using a BSP > Creating Custom Initial Board Configurations
 
Thanks,
 
Ed




I created my own BSP configuration so I didn't have to select the pin names and other trivial stuff every time I start a project. I fail to see how a custom BSP will fix this problem. As I said in my post, this worked in version 2.05_01. The issues are new to 2.06.
 
Why would you think the BSP is the issue? 
 
Thanks
#3
Ed@Microchip
Super Member
  • Total Posts : 138
  • Reward points : 0
  • Joined: 2017/04/06 09:39:29
  • Location: 0
  • Status: offline
Re: Harmony 2.06 errors and warnings after adding graphics stack? 2018/06/25 11:01:08 (permalink) ☼ Best Answerby MikeinAZ 2018/06/26 08:38:54
0
Hi RodoPIC,
 
The project that you attached didn't have "Use BSP?" checked in Harmony -> BSP Configuration, so I assumed that you started the project without a BSP. I did the following and I was able to get your project to build:
 
1. In MHC, checked "Use BSP?" and used the default PIC32MZ EF Starter Kit
2. Regenerate
3. Commented out the wrongly regenerated PORTS_CHANNEL_None and PORTS_BIT_POS_-1 enums. These wrongly regenerated code seems to appear if pin manager has been customized before the BSP is enabled.
4. Updated drv_gfx_lcc_generic.c to match the custom pin names used in Pin Manager for the LCD control signals (added _).
5. Rebuild.
 
Enabling the BSP added "#include "bsp.h"" in system_config.h. Since bsp.h includes the standard c header and the xc.h header, this resolved the compiler warnings/errors that you were seeing due to the missing symbols.
 
I have attached your updated project for your reference.
 
Thanks,
 
Ed
#4
RodoPIC
Senior Member
  • Total Posts : 173
  • Reward points : 0
  • Status: offline
Re: Harmony 2.06 errors and warnings after adding graphics stack? 2018/06/25 23:10:24 (permalink) ☄ Helpfulby kadu_cemo 2018/12/12 12:00:48
0
ed@microchip
Hi RodoPIC,
 
The project that you attached didn't have "Use BSP?" checked in Harmony -> BSP Configuration, so I assumed that you started the project without a BSP. I did the following and I was able to get your project to build:
 
1. In MHC, checked "Use BSP?" and used the default PIC32MZ EF Starter Kit
2. Regenerate
3. Commented out the wrongly regenerated PORTS_CHANNEL_None and PORTS_BIT_POS_-1 enums. These wrongly regenerated code seems to appear if pin manager has been customized before the BSP is enabled.
4. Updated drv_gfx_lcc_generic.c to match the custom pin names used in Pin Manager for the LCD control signals (added _).
5. Rebuild.
 
Enabling the BSP added "#include "bsp.h"" in system_config.h. Since bsp.h includes the standard c header and the xc.h header, this resolved the compiler warnings/errors that you were seeing due to the missing symbols.
 
I have attached your updated project for your reference.
 
Thanks,
 
Ed




So the real problem was the missing header (#include <stdio.h>). Once included I got to the normal errors I was expecting about the pin names. After changing the code to the pin names I used (add "_") the project compiled and the TFT shows the correct stuff. Thanks.
 
#5
Alexmouse
New Member
  • Total Posts : 10
  • Reward points : 0
  • Joined: 2009/07/06 03:13:29
  • Location: 0
  • Status: offline
Re: Harmony 2.06 errors and warnings after adding graphics stack? 2018/06/26 03:46:08 (permalink)
0
Yes, I'm seeing this too.
I'm also getting
../../../../framework/gfx/hal/src/gfx.c:56:31: error: '__pic32_alloc_coherent' undeclared (first use in this function) 
#6
NKurzman
A Guy on the Net
  • Total Posts : 17361
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: Harmony 2.06 errors and warnings after adding graphics stack? 2018/06/26 09:06:20 (permalink)
0
Alex Barrett
Yes, I'm seeing this too.
I'm also getting
../../../../framework/gfx/hal/src/gfx.c:56:31: error: '__pic32_alloc_coherent' undeclared (first use in this function) 


You are also missing a header.  That is support for Atmel ARM Chips.
search the Doc or the harmony source to find it.
#7
Alexmouse
New Member
  • Total Posts : 10
  • Reward points : 0
  • Joined: 2009/07/06 03:13:29
  • Location: 0
  • Status: offline
Re: Harmony 2.06 errors and warnings after adding graphics stack? 2018/06/27 03:44:19 (permalink)
0
What search term? How does '__pic32_alloc_coherent' relate to the ARM parts?
#8
Ed@Microchip
Super Member
  • Total Posts : 138
  • Reward points : 0
  • Joined: 2017/04/06 09:39:29
  • Location: 0
  • Status: offline
Re: Harmony 2.06 errors and warnings after adding graphics stack? 2018/06/27 10:00:05 (permalink)
4 (3)
The following headers will need to be included to resolve build warnings/errors if graphics is enabled without enabling a bsp:
 
1. framework/gfx/hal/src/gfx.c:
 #include <xc.h>
 
2. framework/gfx/hal/src/gfx_draw_ellipse.c
 #include <stdbool.h>
 
3. framework/gfx/libaria/src/libaria_widget_bar_graph_skin_classic.c
#include <stdio.h>
 
4. framework/gfx/libaria/src/libaria_widget_circular_gauge_skin_classic.c
#include <stdio.h>
 
5. framework/gfx/libaria/src/libaria_widget_line_graph_skin_classic.c
#include <stdio.h>
 
6. framework/gfx/libaria/src/libaria_widget_pie_chart_skin_classic.c
#include <stdio.h>
 
7. framework/gfx/utils/src/gfxu_image_png_external.c
#include <assert.h>
 
8. framework/gfx/utils/src/gfxu_image_png_internal.c
#include <assert.h>
#9
NKurzman
A Guy on the Net
  • Total Posts : 17361
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: Harmony 2.06 errors and warnings after adding graphics stack? 2018/06/27 15:49:54 (permalink)
0
MIPS needs certain area to be in the correct memory (coherent)  ARM does not.  They made a Marco to have it only use coherent for MIPS.
#10
Jump to:
© 2019 APG vNext Commercial Version 4.5