chankour Posted June 21, 2017 Report Share Posted June 21, 2017 Hi, I am trying to get uGFX working using an ILI9341 in SPI mode on an STM32F767 Nucelo board. I am getting stuck compiling what I put together, and would appreciate any help or pointers. I followed the instructions at this link (single file inclusion) https://wiki.ugfx.io/index.php/Using_Eclipse I am attaching a snapshot of the eclipse project (eclipse.jpg) that combines the main.c source code, the project tree on the left (showing what is included and filtered) and the error messages at the bottom. I looks like the uGFX\src folder is not being build, but I did filter out the gfx_mk.c file there, see attchment filters.jpg showing that this is the case. Path for uGFX is included as well in "Include directories". What am I missing? Thanks, Chafik Link to comment Share on other sites More sharing options...
chankour Posted June 21, 2017 Author Report Share Posted June 21, 2017 Additional info: uGFX/src/gfx_mk.c was greyed out for some reason, so I went back to the filters and "unfiltered" it. Now, a couple errors are gone: rc/main.o: In function `main': D:\STM32F7\Nucleo\Debug/../Src/main.c:61: undefined reference to `gdispOpenFont' D:\STM32F7\Nucleo\Debug/../Src/main.c:62: undefined reference to `gdispOpenFont' D:\STM32F7\Nucleo\Debug/../Src/main.c:64: undefined reference to `gdispDrawString' D:\STM32F7\Nucleo\Debug/../Src/main.c:65: undefined reference to `gdispDrawString' D:\STM32F7\Nucleo\Debug/../Src/main.c:66: undefined reference to `gdispDrawString' collect2.exe: error: ld returned 1 exit status make: *** [Nucleo.elf] Error 1 I also checked the Debug compiler output folder, and there are objects files under uGFX/drivers and uGFX/src, but nothing for uGFX/src/gdisp (where the "undefined" errors point to), I do have have: #define GFX_USE_GDISP TRUE set in my gfxconf.h. Link to comment Share on other sites More sharing options...
cpu20 Posted June 21, 2017 Report Share Posted June 21, 2017 Seems like you just found the solution for your first problem! The second problem you are having, is that your are using fonts and drawing routines from GDISP without enabling them. To keep code size as small as possible most things in the µGFX library are disabled by default. In your gfxconf.h you should set: #define GDISP_NEED_VALIDATION TRUE #define GDISP_NEED_CLIP TRUE #define GDISP_NEED_TEXT TRUE #define GDISP_INCLUDE_FONT_DEJAVUSANS10 TRUE #define GDISP_INCLUDE_FONT_DEJAVUSANS12 TRUE Normally when you enable all the right components it should compile. I am not sure if I mentioned everything here you need. Link to comment Share on other sites More sharing options...
chankour Posted June 21, 2017 Author Report Share Posted June 21, 2017 Thanks for the suggestions, it makes sense now that you mentioned it, that fixed the errors I was getting, now I got a completely different problem. Throwing it in here maybe someone has a clue. I believe I know what the problem is, but not sure how to fix it: According to the instructions; in the filters, you remove /drivers, then you selectively filter everything out under /drivers, except your actual driver, in my case ILI9341, I did that, and made sure it's no longer greyed out in the project explorer. The undefined errors below seem to point to this folder, I checked it, and it is greyed out again, I checked my filters, and it is the only one not listed there, so it shouldn't be.... I cleared all filters and re-did them again, and it is still greyed out... Building target: Nucleo.elf Invoking: MCU GCC Linker arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=hard -mfpu=fpv5-d16 -specs=nosys.specs -specs=nano.specs -T"../STM32F767ZITx_FLASH.ld" -Wl,-Map=output.map -Wl,--gc-sections -o "Nucleo.elf" @"objects.list" -lm uGFX/src/gfx_mk.o: In function `hline_clip': D:\STM32F7\Nucleo\Debug/../uGFX/src/gdisp/gdisp.c:319: undefined reference to `gdisp_lld_write_start' D:\STM32F7\Nucleo\Debug/../uGFX/src/gdisp/gdisp.c:320: undefined reference to `gdisp_lld_write_color' D:\STM32F7\Nucleo\Debug/../uGFX/src/gdisp/gdisp.c:321: undefined reference to `gdisp_lld_write_stop' uGFX/src/gfx_mk.o: In function `gdispGClear': D:\STM32F7\Nucleo\Debug/../uGFX/src/gdisp/gdisp.c:1051: undefined reference to `gdisp_lld_write_start' D:\STM32F7\Nucleo\Debug/../uGFX/src/gdisp/gdisp.c:1059: undefined reference to `gdisp_lld_write_color' D:\STM32F7\Nucleo\Debug/../uGFX/src/gdisp/gdisp.c:1060: undefined reference to `gdisp_lld_write_stop' uGFX/src/gfx_mk.o: In function `_gdispInit': D:\STM32F7\Nucleo\Debug/../uGFX/src/gdisp/gdisp.c:606: undefined reference to `GDISPVMT_OnlyOne' collect2.exe: error: ld returned 1 exit status make: *** [Nucleo.elf] Error 1 Link to comment Share on other sites More sharing options...
chankour Posted June 21, 2017 Author Report Share Posted June 21, 2017 Ok, filter problem solved, if anyone has a similar problem: I was doing a click top item, Shift, then click last item to select everything under drivers, after, I click on CTRL and the item I want to exclude, it looks fine under the filters, but it doesn't get excluded in project explorer. Manually clicking on every item and skipping the excluded one under filter seems to work, or maybe I was doing something wrong with my shift selection? Thanks again CPU20 for your help, It builds now. Chafik Link to comment Share on other sites More sharing options...
cpu20 Posted June 21, 2017 Report Share Posted June 21, 2017 8 minutes ago, chankour said: I was doing a click top item, Shift, then click last item to select everything under drivers When using the shift click to select everything under drivers you must make sure to unselect the top folders gdisp and ILI9341 again. If you don't do this, then it indeed looks fine in the project explorer, but everything in the folder is still excluded. It's pretty annoying and maybe I should file a bug report. Good to hear you figured it out! Don't hesitate to ask if you have any other problems or questions! Link to comment Share on other sites More sharing options...
chankour Posted June 22, 2017 Author Report Share Posted June 22, 2017 I did check that I wasn't inadvertently selecting anything else, and I would always go visually inspect the list of folders in the filter box to make sure after all the selections/deselections are ultimately what they are supposed to be. Anyway, it's building now, time to pull out the logic analyzer to figure out what's going on on the SPI bus. 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