Hot!How does the MHC project join the Graphics Stack?

Author
PSIR
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2018/05/27 19:05:17
  • Location: 0
  • Status: offline
2018/07/11 20:24:27 (permalink)
0

How does the MHC project join the Graphics Stack?

Hello everyone:

My MHC project selects the Use Graphics Stack in the options in the options. After generating the code, the compiled error message is as follows:

Harmony/v2_06/framework/gfx/libaria/src/libaria_widget_bar_graph_skin_classic.c:103:17: warning: incompatible implicit declaration of built-in function 'sprintf' [enabled by default]

It seems that sprintf() in this libaria_widget_bar_graph_skin_classic.c file cannot be compiled. If unchecked, those graphics library stackers will be deleted from the X IDE and compiled.

This means that if you want to add the project to the graphics library stack, you may not just check the Use Graphics Stack item. There should be other options to choose together, but you don't know how to check it.

I have seen some original teaching videos before, and introduced a project from scratch. After drawing a good graphic, it will be presented on the development board. If it is successful, it will use the original development board. Check Use BSP, MHC will do some hardware configuration of the development board, but I use my own board, so I did not check Use BSP, how can I successfully join the graphics library? Thank you.
 

Attached Image(s)

#1

8 Replies Related Threads

    NKurzman
    A Guy on the Net
    • Total Posts : 16029
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: How does the MHC project join the Graphics Stack? 2018/07/11 20:30:53 (permalink)
    0
    Are you using the recommended version of XC32, has listed in the README file ?
    #2
    PSIR
    New Member
    • Total Posts : 12
    • Reward points : 0
    • Joined: 2018/05/27 19:05:17
    • Location: 0
    • Status: offline
    Re: How does the MHC project join the Graphics Stack? 2018/07/11 20:50:44 (permalink)
    0
    I am using the latest version of XC32 v2.10
    #3
    NKurzman
    A Guy on the Net
    • Total Posts : 16029
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: How does the MHC project join the Graphics Stack? 2018/07/11 21:11:09 (permalink)
    0
    Is that the version listed in the readme file?
    #4
    muellernick
    Super Member
    • Total Posts : 398
    • Reward points : 0
    • Joined: 2015/01/06 23:58:23
    • Location: Germany
    • Status: offline
    Re: How does the MHC project join the Graphics Stack? 2018/07/12 01:11:39 (permalink)
    4 (2)
    It seems that sprintf() in this libaria_widget_bar_graph_skin_classic.c file cannot be compiled.

     
    The compiler didn't try to compile it, but he didn't have the definition. Including <stdio.h> should fix it.
     
    Nick
    #5
    Ed@Microchip
    Super Member
    • Total Posts : 75
    • Reward points : 0
    • Joined: 2017/04/06 09:39:29
    • Location: 0
    • Status: offline
    Re: How does the MHC project join the Graphics Stack? 2018/07/12 08:52:00 (permalink)
    4.67 (3)
    The standard C-headers don't get included if a BSP is not selected in MHC. If you are enabling graphics w/o using a BSP, you will run into build warnings/errors due to this. To fix these warnings/errors, include the c-headers in the failing files. Refer to this post for the list of files that need to be patched:
     
    https://www.microchip.com/forums/FindPost/1057129
    #6
    PSIR
    New Member
    • Total Posts : 12
    • Reward points : 0
    • Joined: 2018/05/27 19:05:17
    • Location: 0
    • Status: offline
    Re: How does the MHC project join the Graphics Stack? 2018/07/12 19:24:35 (permalink)
    0
    I also found that Graphics Stack has a relationship with BSP. I have found a step as follows:
    (1) Use BSP? To check, the system will select a development board according to the MCU model, usually MHC will select a  Starter Kit automaticly.


    (2) System Services→Input→Use Input System Service? To check.


    (3) Graphics Stack→Use Graphics Stack Check, the Graphics Controller selects None, then the graphics library will be added to compile.


    I will try again on the above method. I will share the result If  have any ideas.
    thanks.
    #7
    PSIR
    New Member
    • Total Posts : 12
    • Reward points : 0
    • Joined: 2018/05/27 19:05:17
    • Location: 0
    • Status: offline
    Re: How does the MHC project join the Graphics Stack? 2018/07/12 20:55:24 (permalink)
    0
    I have already tried the second-to-last method of this post, introducing different h files in the following file:
    https://www.microchip.com/forums/m1056694.aspx#1057129
    -------------------------------------------------------------------------------
    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>
    -------------------------------------------------------------------------------
    However, System Services→Input→Use Input System Service? This item is still checked to compile. If it is not checked, the following error message will appear, just listing three:
    ++++++++++++++++++++++++++++++++++++++++++++++++++
    ../src/system_config/ST7735/framework/gfx/libaria/libaria_harmony.c:48:1: error: unknown type name 'SYS_INP_InputListener'
     
    ../src/system_config/ST7735/framework/gfx/libaria/libaria_harmony.c:50:1: error: unknown type name 'SYS_INP_TouchStateEvent'

    ../src/system_config/ST7735/framework/gfx/libaria/libaria_harmony.c:51:1: error: unknown type name 'SYS_INP_TouchStateEvent'
    ++++++++++++++++++++++++++++++++++++++++++++++++++
    All errors are concentrated in libaria_harmony.c. Which H file does this file need to introduce?
    Also, What does the「Use Input System Service」mean?
     
    Thanks.
    #8
    Ed@Microchip
    Super Member
    • Total Posts : 75
    • Reward points : 0
    • Joined: 2017/04/06 09:39:29
    • Location: 0
    • Status: offline
    Re: How does the MHC project join the Graphics Stack? 2018/07/20 07:02:09 (permalink)
    0
    @PSIR - Input System Service is needed to support user input like touch. If you don't need touch and have disabled the Input System Service, you will need to uncheck Use Input System Service under Graphics Stack -> Use Harmony Graphics COmposer Suite -> Middleware -> User Aria User Interface Library. This will tell the MHC to not generate GFX code that uses the Input System Service data structures and APIs.
     
    Also, Input System Service is new in v2.06 and replaces the now deprecated Touch System Service.
    #9
    Jump to:
    © 2018 APG vNext Commercial Version 4.5