Jump to content

Compilation error


kpapr1

Recommended Posts

Hi, I have a custom board with an SSD1322 OLED display and an STM32F103 MCU. I'm using Keil and have setup the ugfx. Everything is fine and I get a successful compilation when I include the gfxInit() command. But all other commands, like gdispDrawPixel or gdispFillCircle give a "warning:  #223-D: function "gdispDrawPixel" declared implicitly" and "L6218E: Undefined symbol gdispDrawPixel (referred from main.o).", which means that these functions are not referenced. But I don't understand why. I have included in my project "gfxconfig.h", "gfx_mk.c", "SSD1322.h", and "gdisk_IId_SSD1322.c". I have also included the paths "..\ugfx" and "..\ugfx\drivers\gdisp\SSD1322". What am I missing?

 

Link to comment
Share on other sites

16 minutes ago, inmarket said:

Have you edited gfxconf.h to enable GFX_NEED_GDISP (set it to GFX_ON)?

I don't see "GFX_NEED_GDISP" anywhere in my gfxconfig.h, but I have enabled this option -->    "#define GFX_USE_GDISP                                TRUE".

 

 

Link to comment
Share on other sites

OK, what I found out is that I copied the gfxconfig.h file to my project's SRC dir (as the installation guide for Keil said), but the compiler still reads this header file from its original location (where all header definitions are commented out). Now I got a bunch of different errors that I'll try to sort out. I have followed the instructions for installing ugfx in Keil, but it seems it's not working out for me or I have done some things wrong. I'll check it out and come back. Thanks everyone for trying to help me! 

 

?

Link to comment
Share on other sites

 So, compilation errors are all sorted out. Now I need to understand how to make ugfx know where my SPI interface is, as well as the reset and /CS signals. Also, I have a 3-wire SPI interface, which means I need to send a 9-bit word. Any help on this would be greatly appreciated! ?

 

Link to comment
Share on other sites

15 hours ago, kpapr1 said:

I don't see "GFX_NEED_GDISP" anywhere in my gfxconfig.h, but I have enabled this option -->    "#define GFX_USE_GDISP                                TRUE".

You're using an older version of the library. We'd recommend using the latest master branch of the official repository or getting the latest stable v2.9 release from the downloads section.

Link to comment
Share on other sites

Hello again! So, I upgraded to version 2.9 but I still didn't find the "GFX_NEED_GDISP" definition anywhere, so I set the "GFX_USE_GDISP" to "GFXON". Anyway, the problem now is that any draw command causes a hard fault. The function call that generates the hard fault is in "gdisp.c" and it's "drawpixel_clip(g);". I don't know why this happens or how to fix it, so any help would be greatly appreciated!

 

 

Link to comment
Share on other sites

No logo at power on... I start the debugger and take it step by step, the program goes through the "gfxInit();" command and then goes to the "gdispDrawPixel(10, 10, White);" command. I step into this command which finally leads me to the "drawpixel_clip(g);" command and then I get the hard fault error. I'll have a look again tomorrow. Thanks.

Link to comment
Share on other sites

  • 2 weeks later...

That sounds an awful lot like an issue in / related to the GDISP driver that you're using.

You can use the GDISP TestStub driver to compile & run with that. It's an empty driver that doesn't do anything but allows to pass compilation of the GDISP module. This way you can ensure that the rest of the system is running properly.

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...