Oguzhan Posted November 16, 2016 Report Posted November 16, 2016 Hi Ugfx forum members, I am trying to make a gui for my STM32F429 board. But I should use Keil in my project. I want to ask can I make gui with UGFX studio and compile it with keil? If yes how can I do this? If no which free gui designer should I use? Thanks for everything..
Joel Bodenmann Posted November 16, 2016 Report Posted November 16, 2016 Hello @Oguzhan and welcome to the community! Keil µVision is known to work very well with µGFX. We are using it ourselves to develop certain features and projects from time to time. There's a complete step by step guide that explains how you can integrate the µGFX library into an existing Keil µVision project: https://wiki.ugfx.io/index.php/Using_Keil_µVision_5_MDK-ARM You can use the µGFX-Studio to develop your GUI and compile it with Keil µVision. The code generated by the studio is fully portable. You can simply copy/paste the files generated by the studio to your Keil project. In fact, you can automate the process by using post-generation scripts as explained here: You might also be interested in this post of our community member @king2 which explains how he's working with the µGFX-Studio in a real-world project:
Oguzhan Posted November 16, 2016 Author Report Posted November 16, 2016 Thanks for your answer. I will try this method.
Oguzhan Posted November 16, 2016 Author Report Posted November 16, 2016 Hi again, I followed the steps. I added ugfx libraries, drivers and gui. But I have two compile errors at the end. I cant find any solution on the internet. Error: L6218E: Undefined symbol guiEventLoop() (referred from main.o). Error: L6218E: Undefined symbol guiCreate() (referred from main.o). How can I solve these. Thanks very much..
Joel Bodenmann Posted November 16, 2016 Report Posted November 16, 2016 Those functions are part of the files gui.h and gui.c that are generated by the µGFX-Studio. It appears that the compiler/linker is not seeing these files. Please make sure that these files are part of the compilation & linking process. For the source file this means that you have to add it to the project tree in the navigation on the left side of Keil µVision. The folder that contains the header file must be added to the compiler include path.
Oguzhan Posted November 16, 2016 Author Report Posted November 16, 2016 Thanks for reply. I am sure to added all files to include path and project tree. But same error still occur. You can see in the attachment. Thanks again..
Joel Bodenmann Posted November 16, 2016 Report Posted November 16, 2016 Did you forget to include the gui.h file in main.c? #include "gui.h"
Oguzhan Posted November 16, 2016 Author Report Posted November 16, 2016 (edited) No, I added this line to my main.cpp. I' am using mbed os so my main file extension is cpp. Can this cause a problem? But other libraries compiled succesfully. Edited November 16, 2016 by Oguzhan
Joel Bodenmann Posted November 16, 2016 Report Posted November 16, 2016 Ah yes, that might very well be the problem. It appears that the code generated by the µGFX-Studio is lacking the wrappers for C++ inclusion. The fix is easy though: Open the file gui.h and wrap the function declarations in the corresponding wrapper: #ifdef __cplusplus extern "C" { #endif // Function prototypes ... #ifdef __cplusplus } #endif Don't forget to make a clean build afterwards.
Oguzhan Posted November 16, 2016 Author Report Posted November 16, 2016 (edited) I can compile my project now. Thanks very much. I downloaded code to board but nothing appeared. When I debug, I saw dissambley window 'Hardfault_Handler'. I think mbed os is causing same problem. Is Ugfx library compatible with mbed os? Edited November 16, 2016 by Oguzhan
Joel Bodenmann Posted November 16, 2016 Report Posted November 16, 2016 mbed os is currently not official supported. You have to write a GOS port in order to use µGFX with it. It's actually quite straight forward and not as complicated as it might look on first glance. The forum contains many information about this. Furthermore, there are plenty of porting examples available in the /src/gos directory. Please don't hesitate to open a new forum topic if you have any questions regarding writing an mbed OS port.
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