Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello experts,

I'm honoured with a shiny new task:
"Make a Microchip Pic32 display things on an attached TFT."
With this task comes a whole library of stuff I've never seen before, neither has any of my colleagues. It's called the Harmony framework featuring the Graphics Display Designer X.

As long as I only designed to have one empty screen, everything went well. But now I want to add a button to that screen.
Everything is clicked and dragged in place, I hit the "Generate Code" button and then try to compile. That's giving a lot of errors. Here's the first:

error: 'GFX_GOL_BUTTON' undeclared (first use in this function)
But MPLabX knows the definition (Hit Ctrl+B). It's a struct in gfx_gol_button.h
Now that header file isn't included. But there is a file gfx.h that could include it:

C
#ifndef _GFX_H
// DOM-IGNORE-BEGIN
    #define _GFX_H
// DOM-IGNORE-END


/////////////////////// GRAPHICS_LIBRARY_VERSION /////////////////////
// MSB is version, LSB is subversion
#define GRAPHICS_LIBRARY_VERSION    0x0400

////////////////////////////// INCLUDES //////////////////////////////
#include "system_config.h"
#include "gfx/gfx_common.h"
#include "gfx/gfx_types_macros.h"           
#include "gfx/gfx_primitive.h"
#include "gfx/gfx_colors.h"

#ifndef GFX_CONFIG_GOL_DISABLE
#include "gfx/gfx_gol.h"
//#include "gfx/gfx_gol_scan_codes.h"
//#include "gfx/gfx_gol_button.h"
//#include "gfx/gfx_gol_check_box.h"
//#include "gfx/gfx_gol_digital_meter.h"
//#include "gfx/gfx_gol_edit_box.h"
//#include "gfx/gfx_gol_group_box.h"
//#include "gfx/gfx_gol_list_box.h"
//#include "gfx/gfx_gol_meter.h"
//#include "gfx/gfx_gol_picture.h"
//#include "gfx/gfx_gol_custom_control.h"
//#include "gfx/gfx_gol_progress_bar.h"
//#include "gfx/gfx_gol_radio_button.h"
//#include "gfx/gfx_gol_scroll_bar.h"
//#include "gfx/gfx_gol_static_text.h"
//#include "gfx/gfx_gol_surface.h"
//#include "gfx/gfx_gol_text_entry.h"
//#include "gfx/gfx_gol_window.h"
#endif


As you can see, there's quite a bit of stuff commented out.

I hesitate to edit that file uncommenting the gfx_gol_button.h line since this file belongs to the framework. Therefore it ought to stay as it is. Otherwise I would have to change it back and forth whenever I need to work on another project.
The windows file system is with me in this regard as I lack the privileges to change gfx.h.

For those firm in the embedded world: What to do now?
Is there a best practice for this kind of situation?
Should I copy that framework file to my project directory and bend all #include directives accordingly?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900