jrelder Posted March 14, 2017 Report Share Posted March 14, 2017 (edited) Hi, I am trying to use ugfx with an STM32f413 Nucleo board, SSD1289 LCD and the Keil IDE. I have successfully managed to follow the setup instructions and compile a basic project with this setup, as discussed in the wiki. Now, since then, I have created a GUI using uGFX Studio and I have imported the created files to my Keil project, and modified the main.c to suit. However when compiling I get the following error: compiling DejaVuSans12.c... ..\..\..\uGFX\colourdis\output\rsc\DejaVuSans12.c(11): error: #35: #error directive: The font file is not compatible with this version of mcufont. #error The font file is not compatible with this version of mcufont. Please can you advise me as to how to fix this? Thanks, James Edited March 14, 2017 by jrelder Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted March 14, 2017 Report Share Posted March 14, 2017 Hello James and welcome to the µGFX community! We're glad to hear that you managed to get everything working inside Keil µVision. My first question to resolve this problem is: Are you able to successfully display some text (rendering strings) on your hardware when using the built-in fonts? Are you getting that compilation error only when using µGFX-Studio code? Link to comment Share on other sites More sharing options...
jrelder Posted March 14, 2017 Author Report Share Posted March 14, 2017 Hi Joel, thanks for the prompt reply! Sorry if this sounds stupid, but what do you mean by the built in fonts? I believe the font I've used in my project DejaVuSans12, is a built in uGFX font. Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted March 14, 2017 Report Share Posted March 14, 2017 Ah sorry for the confusion. I thought you were trying to use a custom font (after all you can use a custom DejaVuSans12 font in case of you're playing with different conversion parameters). So, if I understand you correctly you were never able to display any string on your hardware right? The issue is known for when you're not including the proper files or when the order of the inclusion isn't right. Unfortunately I don't have access to a Keil µVision right now. Could you provide us with a screenshot of your C/C++ include paths? Also, never forget to make clean builds when changing something in the configuration file. Link to comment Share on other sites More sharing options...
jrelder Posted March 14, 2017 Author Report Share Posted March 14, 2017 Haha no I haven't got that far yet, I'm hoping it won't take me long to learn how to use custom fonts though. No I haven't actually displayed anything on my hardware yet. Iliterally followed the guide to using/configuring uGFX with Keil/Hardware (https://wiki.ugfx.io/index.php/Using_Keil_µVision_5_MDK-ARM) and checked it compiles correctly as discussed in the guide. Then I imported my output files and any necessary library files, as created by uGFX Studio, and everything else is fine except for this one error about the font file not being compatible. It doesn't seem to complain about not finding the font file or mcufont though. Also I wanted to point out that although i'm using a default font, for some reason uGFX Studio has output a userfonts.h file and the DejauSans12.c file. Aso and the gfxconf.h file defines user fonts as true. I thought this was a bit strange considering I used the inbuilt fonts in uGFX Studio? Anyway attached are my project tree and the include directories. Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted March 14, 2017 Report Share Posted March 14, 2017 There's your problem. You must not include \..\..ugfx\src in your include paths. Note that it's also not shown in the guide Link to comment Share on other sites More sharing options...
jrelder Posted March 14, 2017 Author Report Share Posted March 14, 2017 Oh and just to mention in the above you will notice the font files displayed under rsc are DejaVuSans16, 20_aa and 32_aa. I changed the fonts in uGFX Studio to see if the error happens with all of them and it does. I just didn't delete the font files from the rsc folder that's all. Link to comment Share on other sites More sharing options...
jrelder Posted March 14, 2017 Author Report Share Posted March 14, 2017 I've removed that from my includes but the error is still there. I think I''m confused as to the reason for the includes, and maybe I've included the others incorrectly too. When you say in the guide "we need to add the top level uGFX library directory to the compiler include path" do you mean the ugfx group directory which we have just created or do you mean the directory location from where we imported the gfx_mk.c file (which was obtained from the gfx/src folder)? This may sound basic but I've never used an IDE before now, and it's been a long time since I've coded in any other language than Python. In which I would use includes to specify the location of the header file relative to the position of the current file... Link to comment Share on other sites More sharing options...
jrelder Posted March 14, 2017 Author Report Share Posted March 14, 2017 (edited) I believe I may have fixed this, after noticing this post: https://community.ugfx.io/topic/284-custom-online-converted-font-not-supported-by-mcufont/ It seems that as I had added the font files to the project tree in Keil, then Keil was trying to compile them out of context. So I have removed them from the tree, but the rsc folder is in the include path such that the correct files discover them. I think this has solved my problem, now I get to the linking stage and then receive the following error: ColourDIS2\ColourDIS2.axf: Error: L6218E: Undefined symbol GMOUSEVMT_OnlyOne (referred from gfx_mk.o). EDIT: Solved by setting GINPUT_NEED_MOUSE to FALSE. I believe the error is because I was asking for the mouse but I hadn't defined anything in my code for the hardware configuration of the touch screen. Edited March 14, 2017 by jrelder Link to comment Share on other sites More sharing options...
inmarket Posted March 15, 2017 Report Share Posted March 15, 2017 Yes, that is correct. Well done on getting it working. Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted March 15, 2017 Report Share Posted March 15, 2017 Yes indeed. Glad to hear that you managed to get everything up and running! Link to comment Share on other sites More sharing options...
jrelder Posted March 15, 2017 Author Report Share Posted March 15, 2017 1 hour ago, inmarket said: Yes, that is correct. Well done on getting it working. 29 minutes ago, Joel Bodenmann said: Yes indeed. Glad to hear that you managed to get everything up and running! Thanks, although it turned out that even after all this, and the code compiling correctly with no errors/warnings, the screen of the LCD just stayed blank (white). So I have gone back to basics and instead of my own GUI, I'm just trying to get the Basic demo working for now (I'm having some troubles with that, blank white screen): https://community.ugfx.io/topic/684-basic-demo-blank-white-screen/ Any help on this would be greatly appreciated, thanks 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