Jump to content

I'm trying port ugfx on nrf52840 nrf5_SDK 17.0.1 but only i added the make file getting lots for error.


Ashwani Kesharwani

Recommended Posts

I'm first time using this library not have much idea how can i port this because there is not a single example for that board. i'm adding my project here if you can check please go through it.

Compiling file: gfx_mk.c
In file included from ./ugfx/src/../src/gfx.h:158,
                 from ./ugfx/src/../gfx.h:7,
                 from ./ugfx/src/gfx.c:16,
                 from ./ugfx/src/gfx_mk.c:14:
./ugfx/src/../src/gos/gos_rules.h:20:3: error: #error "GOS: No operating system has been defined."
   20 |  #error "GOS: No operating system has been defined."
      |   ^~~~~
./ugfx/src/../src/gos/gos_rules.h:24:3: error: #error "GOS: More than 
one operation system has been defined as GFXON."
   24 |  #error "GOS: More than one operation system has been defined 
as GFXON."
      |   ^~~~~
In file included from ./ugfx/src/../src/gfx.h:167,
                 from ./ugfx/src/../gfx.h:7,
                 from ./ugfx/src/gfx.c:16,
                 from ./ugfx/src/gfx_mk.c:14:
./ugfx/src/../src/gos/gos.h:496:3: error: #error "Your operating system is not supported yet"
  496 |  #error "Your operating system is not supported yet"
      |   ^~~~~
./ugfx/src/../src/gos/gos.h:500:10: error: unknown type name 'gDelay' 
  500 |  typedef gDelay   delaytime_t;
      |          ^~~~~~
./ugfx/src/../src/gos/gos.h:506:10: error: unknown type name 'gTicks' 
  506 |  typedef gTicks   systemticks_t;
      |          ^~~~~~
./ugfx/src/../src/gos/gos.h:507:10: error: unknown type name 'gThread'  507 |  typedef gThread   gfxThreadHandle;
      |          ^~~~~~~
./ugfx/src/../src/gos/gos.h:510:10: error: unknown type name 'gThreadreturn'
  510 |  typedef gThreadreturn threadreturn_t;
      |          ^~~~~~~~~~~~~
./ugfx/src/../src/gos/gos.h:512:10: error: unknown type name 'gThreadpriority'
  512 |  typedef gThreadpriority threadpriority_t;
      |          ^~~~~~~~~~~~~~~
./ugfx/src/../src/gos/gos.h:516:10: error: unknown type name 'gSem'   
  516 |  typedef gSem   gfxSem;
      |          ^~~~
./ugfx/src/../src/gos/gos.h:518:10: error: unknown type name 'gMutex' 
  518 |  typedef gMutex   gfxMutex;
      |          ^~~~~~
In file included from ./ugfx/src/gdriver/gdriver_mk.c:8,
                 from ./ugfx/src/gfx_mk.c:16:
./ugfx/src/gdriver/gdriver.c: In function 'gdriverRegister':
./ugfx/src/gdriver/gdriver.c:45:7: warning: implicit declaration of function 'gfxAlloc' [-Wimplicit-function-declaration]
   45 |  pd = gfxAlloc(vmt->objsize);
      |       ^~~~~~~~
./ugfx/src/gdriver/gdriver.c:45:5: warning: assignment to 'GDriver *' 
from 'int' makes pointer from integer without a cast [-Wint-conversio 
]
   45 |  pd = gfxAlloc(vmt->objsize);
      |     ^
./ugfx/src/gdriver/gdriver.c:51:3: warning: implicit declaration of function 'gfxFree' [-Wimplicit-function-declaration]
   51 |   gfxFree(pd);
      |   ^~~~~~~
make: *** [C:\workspace\nRF5_SDK\nRF5_SDK/components/toolchain/gcc/Makefile.common:272: _build/nrf52840_xxaa/gfx_mk.c.o] Error 1

ugfx_nrf52840dk.zip

Link to comment
Share on other sites

Hello!

Can you provide a bit more information regarding your environment? The errors you're getting certainly indicate that you didn't enable a GOS port (the main system abstraction layer). You can read more about that here: https://wiki.ugfx.io/index.php/GOS
If you're using zephyr there is an existing port:  https://wiki.ugfx.io/index.php/Zephyr
If you're using another underlying operating system such as FreeRTOS there are also existing ports for those.
If instead you're not using any underlying operating system (baremetal) you can use the Raw32 port: https://wiki.ugfx.io/index.php/BareMetal

Also, which build system are you using?

Link to comment
Share on other sites

Compiling file: gfx.c
In file included from ./ugfx/src/../src/gfx.h:93,
                 from ./ugfx/src/../gfx.h:7,
                 from ./ugfx/src/gfx.c:16:
./ugfx/src/../src/gfx_compilers.h:956:13: warning: Compiler: "GCC"    
  956 |     COMPILER_WARNING(GFXSTRX(Compiler: GFX_COMPILER_NAME))    
      |             ^~~~~~~~~~~~~~~~~~~
Compiling file: gadc.c
Compiling file: gadc_mk.c
Compiling file: gaudio.c
Compiling file: gaudio_mk.c
Compiling file: DejaVuSans10.c
./ugfx/src/gdisp/fonts/DejaVuSans10.c:11:2: error: #error The font file is not compatible with this version of mcufont.
   11 | #error The font file is not compatible with this version of mcufont.
      |  ^~~~~
./ugfx/src/gdisp/fonts/DejaVuSans10.c:14:14: error: unknown type name 
'gU8'
   14 | static const gU8 mf_bwfont_DejaVuSans10_glyph_data_0[1222] = {      |              ^~~
./ugfx/src/gdisp/fonts/DejaVuSans10.c:94:14: error: unknown type name 
'gU16'
   94 | static const gU16 mf_bwfont_DejaVuSans10_glyph_offsets_0[96] = {
      |              ^~~~
./ugfx/src/gdisp/fonts/DejaVuSans10.c:109:14: error: unknown type name 'gU8'
  109 | static const gU8 mf_bwfont_DejaVuSans10_glyph_widths_0[95] = {      |              ^~~
./ugfx/src/gdisp/fonts/DejaVuSans10.c:118:44: error: array type has incomplete element type 'struct mf_bwfont_char_range_s'
  118 | static const struct mf_bwfont_char_range_s mf_bwfont_DejaVuSans10_char_ranges[] = {
      |                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ugfx/src/gdisp/fonts/DejaVuSans10.c:133:14: error: variable 'mf_bwfont_DejaVuSans10' has initializer but incomplete type
  133 | const struct mf_bwfont_s mf_bwfont_DejaVuSans10 = {
      |              ^~~~~~~~~~~
./ugfx/src/gdisp/fonts/DejaVuSans10.c:134:5: error: extra brace group 
at end of initializer
  134 |     {
      |     ^
./ugfx/src/gdisp/fonts/DejaVuSans10.c:134:5: note: (near initialization for 'mf_bwfont_DejaVuSans10')
./ugfx/src/gdisp/fonts/DejaVuSans10.c:146:6: error: 'mf_bwfont_character_width' undeclared here (not in a function)
  146 |     &mf_bwfont_character_width,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~
./ugfx/src/gdisp/fonts/DejaVuSans10.c:147:6: error: 'mf_bwfont_render_character' undeclared here (not in a function)
  147 |     &mf_bwfont_render_character,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~
./ugfx/src/gdisp/fonts/DejaVuSans10.c:134:5: warning: excess elements 
in struct initializer
  134 |     {
      |     ^
./ugfx/src/gdisp/fonts/DejaVuSans10.c:134:5: note: (near initialization for 'mf_bwfont_DejaVuSans10')
./ugfx/src/gdisp/fonts/DejaVuSans10.c:149:5: warning: excess elements 
in struct initializer
  149 |     4, /* version */
      |     ^
./ugfx/src/gdisp/fonts/DejaVuSans10.c:149:5: note: (near initialization for 'mf_bwfont_DejaVuSans10')
./ugfx/src/gdisp/fonts/DejaVuSans10.c:150:5: warning: excess elements 
in struct initializer
  150 |     1, /* char range count */
      |     ^
./ugfx/src/gdisp/fonts/DejaVuSans10.c:150:5: note: (near initialization for 'mf_bwfont_DejaVuSans10')
./ugfx/src/gdisp/fonts/DejaVuSans10.c:151:5: warning: excess elements 
in struct initializer
  151 |     mf_bwfont_DejaVuSans10_char_ranges,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ugfx/src/gdisp/fonts/DejaVuSans10.c:151:5: note: (near initialization for 'mf_bwfont_DejaVuSans10')
./ugfx/src/gdisp/fonts/DejaVuSans10.c:133:26: error: storage size of  
mf_bwfont_DejaVuSans10' isn't known
  133 | const struct mf_bwfont_s mf_bwfont_DejaVuSans10 = {
      |                          ^~~~~~~~~~~~~~~~~~~~~~
./ugfx/src/gdisp/fonts/DejaVuSans10.c:118:44: warning: 'mf_bwfont_DejaVuSans10_char_ranges' defined but not used [-Wunused-variable]        
  118 | static const struct mf_bwfont_char_range_s mf_bwfont_DejaVuSans10_char_ranges[] = {
      |                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [C:\workspace\nRF5_SDK\nRF5_SDK/components/toolchain/gcc/Makefile.common:272: _build/nrf52840_xxaa/DejaVuSans10.c.o] Error 1

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...