kpapr1 Posted May 13, 2019 Report Share Posted May 13, 2019 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 More sharing options...
Joel Bodenmann Posted May 14, 2019 Report Share Posted May 14, 2019 Hello & welcome to the µGFX community! Did you include the "gfx.h" header in the files where you call the high-level API functions such as gdispDrawPixel() ? Link to comment Share on other sites More sharing options...
kpapr1 Posted May 14, 2019 Author Report Share Posted May 14, 2019 Yes, "gfx.h" header is in "main.c" Link to comment Share on other sites More sharing options...
inmarket Posted May 14, 2019 Report Share Posted May 14, 2019 Have you edited gfxconf.h to enable GFX_NEED_GDISP (set it to GFX_ON)? Link to comment Share on other sites More sharing options...
kpapr1 Posted May 14, 2019 Author Report Share Posted May 14, 2019 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 More sharing options...
kpapr1 Posted May 14, 2019 Author Report Share Posted May 14, 2019 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 More sharing options...
kpapr1 Posted May 15, 2019 Author Report Share Posted May 15, 2019 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 More sharing options...
Joel Bodenmann Posted May 15, 2019 Report Share Posted May 15, 2019 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 More sharing options...
kpapr1 Posted May 15, 2019 Author Report Share Posted May 15, 2019 I see I'm using version 2.8, so I'll upgrade to the latest one. Thanks! Link to comment Share on other sites More sharing options...
kpapr1 Posted May 16, 2019 Author Report Share Posted May 16, 2019 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 More sharing options...
inmarket Posted May 16, 2019 Report Share Posted May 16, 2019 When you first power on do you see the logo? I would suggest that you start your debugger and follow the chain of execution. It is not expeced or common to see the problem you describe. Link to comment Share on other sites More sharing options...
kpapr1 Posted May 16, 2019 Author Report Share Posted May 16, 2019 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 More sharing options...
Joel Bodenmann Posted May 28, 2019 Report Share Posted May 28, 2019 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now