Michal Posted December 20, 2016 Report Share Posted December 20, 2016 (edited) Hi everyone I am trying configure SW4STM32 with uGFX but i have some problems. Now I am working on windows 10 system and I implementing ugfx to baremetal stm32f7 disco project and I follow with: - create a new ugfx folder in project tree anc copy content ugfc library and exlude from build - copy gfx_mk.c from ugfx/src to my src folder - copy gfxconf.example.h into iclude and configure as follows: #ifndef _GFXCONF_H #define _GFXCONF_H #define GFX_USE_GDISP TRUE #define GDISP_NEED_VALIDATION FALSE #define GDISP_NEED_CLIP FALSE #define GDISP_NEED_TEXT FALSE #define GDISP_NEED_CIRCLE TRUE #define GDISP_NEED_ELLIPSE FALSE #define GDISP_NEED_ARC FALSE #define GDISP_NEED_SCROLL FALSE #define GDISP_NEED_PIXELREAD FALSE #define GDISP_NEED_CONTROL FALSE #define GDISP_NEED_MULTITHREAD FALSE #define GDISP_NEED_ASYNC FALSE #define GDISP_NEED_MSGAPI FALSE /* Builtin Fonts */ #define GDISP_INCLUDE_FONT_SMALL FALSE #define GDISP_INCLUDE_FONT_LARGER FALSE #define GDISP_INCLUDE_FONT_UI1 FALSE #define GDISP_INCLUDE_FONT_UI2 FALSE #define GDISP_INCLUDE_FONT_LARGENUMBERS FALSE #endif /* _GFXCONF_H */ next i copy follows files into my project add path | properties>> C/C++ Build/settings >> includes "../ugfx""../STM32LTDC" "../FT5336""../STM32F746-Discovery" end in main i include gfx.h Someone could tell me what i do wrong ?? or share simple already configured project redy to compile. Thank Edited December 20, 2016 by Michal Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted December 20, 2016 Report Share Posted December 20, 2016 Hello and welcome to the community! Could you please tell us what problem(s) you're experiencing? You just told us what you did but we don't know yet what your problems are and what your question is. Link to comment Share on other sites More sharing options...
Michal Posted December 20, 2016 Author Report Share Posted December 20, 2016 main problem is the errors make: *** [src/main.o] Error 1 ff C/C++ Problem unknown type name 'UART_HandleTypeDef' stm32746g_discovery.h /ff/Utilities/STM32746G-Discovery line 317 C/C++ bifore adding ugfx libraries there is no errors i think i done somethink wrong Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted December 21, 2016 Report Share Posted December 21, 2016 Please use code-boxes to add code & compiler outputs to your posts. The error you're getting suggests that there's an issue with the inclusion of the CubeHAL. Either you are using incompatible versions or you didn't include the CubeHAL properly. In your case we'd recommend you to use the STM32F746G-Discovery baremetal make based template project. You should be able to just download, compile and run it without any problems at all as it contains everything you need. We definitely need more information on this in order to help you. You should then be able to either import that project into SW4STM32 or create a new project based upon that template. We can create a complete ready-to-run project for your particular setup but it will take us between one and two weeks until we get the time to do that. Link to comment Share on other sites More sharing options...
Michal Posted December 22, 2016 Author Report Share Posted December 22, 2016 Beginings are hard , i still have some troubleI create new project upon project You linked to post, because direction import from workspace is not working , and fatal error: gdisp_lld_config.h: No such file or directory gdisp.h /nnn/ugfx/src/gdisp line 157 C/C++ Problem make: *** [ugfx/src/gwin/gwin.o] Error 1 nnn C/C++ Problem But it exist in workspace , so I add path for src/gdisp/mcufont but occured another errors of this type so i add ewry posible in the end i got aditional 90 errors. should i add this path path or no , maybe will be better if i wait some for complete ready-to-run project which You mentioned or maybe You could create short step-by-stem guide if it is not a big problem. Link to comment Share on other sites More sharing options...
inmarket Posted December 22, 2016 Report Share Posted December 22, 2016 Don't add the mcufont directory to your include path. Instead add the directory that contains your gdisp driver to the include path. Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted December 23, 2016 Report Share Posted December 23, 2016 We'll put together an official ready-to-run project for the STM32F746G-Discovery project using the SW4STM32 / AC6 IDE. It should be ready for download within a week. Link to comment Share on other sites More sharing options...
Slemi Posted May 21, 2017 Report Share Posted May 21, 2017 On 23. 12. 2016 at 07:31, Joel Bodenmann said: We'll put together an official ready-to-run project for the STM32F746G-Discovery project using the SW4STM32 / AC6 IDE. It should be ready for download within a week. Have you managed to make this project? Regards! Link to comment Share on other sites More sharing options...
cpu20 Posted May 22, 2017 Report Share Posted May 22, 2017 @gregor.slemi@gmail.com The SW4STM32 is just Eclipse bundled with tools specifically for STM32. So you should be able to setup a project fairly easily using this method. Don't hesitate to open a new post when you hare having any problems. Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted May 28, 2017 Report Share Posted May 28, 2017 There's now also an official generic Eclipse guide written by @cpu20 in the wiki: https://wiki.ugfx.io/index.php/Using_Eclipse Link to comment Share on other sites More sharing options...
blacktronics Posted May 29, 2017 Report Share Posted May 29, 2017 Ok i am giving in, i am starting to lose my mind. I can't seem to get uGFX to actually work on a STM32F746G-DISCOVERY, i've documented the steps I took in pictures: I am not sure if this is an issue related to this board specifically or not, but i figured adding to this thread makes more sense than making a new one. I mostly followed the eclipse guide. I first created a project using the new c project wizard: I then imported uGFX as described in the guide and excluded everything except for \src\gfx_mk.c I then copied and edited gfxconf.h as per the guide, and included gfx.h in main.c, with a call to gfxInit(); It compiles without errors. So I went on to including the drivers for the board. i removed the drivers/ filter and added all the other filters so drivers/gdisp/STM32LTDC and drivers/ginput/touch/FT5336 are allowed After this step, the project still compiles, although i do not have the board file included yet - most likely no relevant function calls yet. At this step i am not quite sure which board files to include, here is what I did though: I copied the following files from boards/STM32F746-Discovery to my inc folder: board_STM32LTDC.h stm32f7_i2c.c stm32f7_i2c.h stm32f746nghx_flash.ld I am uncertain what do do with stm32f7xx_hal_conf.h from example_raw32, does that go into HAL_Driver/Inc/ ? I also copied gmouse_lld_FT5336_board.h to uGFX/drivers/ginput/touch/FT5336 and deleted gmouse_lld_FT5336_board_template.h Everything still compiles fine. After that, i grabbed the while loop from main.c and the gfxconf.h from this template: When i now try to compile it does this: I am completely stuck, really close to setting stuff on fire, send help. Link to comment Share on other sites More sharing options...
Slemi Posted May 29, 2017 Report Share Posted May 29, 2017 (edited) In your gfxconf.h you need to uncomment #define GFX_USE_GDISP and change value from FALSE to TRUE. But then all hell breaks loose!!! I get 693 errors after that. If it helps here is the first error: expected declaration specifiers or '...' before '(' token gdisp_colors.h /F7_uGFX_005/uGFX/src/gdisp line 313 C/C++ Problem it points to function: #define HTML2COLOR_R(h) (((h) & ((0xFFL & ~((1<<(8-COLOR_BITS_R))-1))<<16)) >> (24-(COLOR_BITS_R+COLOR_SHIFT_R))) on line 313 in gdisp_colors.h Edited May 29, 2017 by Slemi Link to comment Share on other sites More sharing options...
blacktronics Posted May 29, 2017 Report Share Posted May 29, 2017 (edited) I encountered that situation as well while messing around Edited May 29, 2017 by blacktronics Link to comment Share on other sites More sharing options...
cpu20 Posted May 29, 2017 Report Share Posted May 29, 2017 (edited) 4 hours ago, blacktronics said: I am completely stuck, really close to setting stuff on fire, send help. No need for a fire here We are here to help you! 4 hours ago, blacktronics said: At this step i am not quite sure which board files to include, here is what I did though: I copied the following files from boards/STM32F746-Discovery to my inc folder: You did everything correctly so far. But here we'll have to take another approach as all the board files for the STM32F746-DISCO are already written and ready to be used. So first there is no need to do this: 4 hours ago, blacktronics said: I also copied gmouse_lld_FT5336_board.h to uGFX/drivers/ginput/touch/FT5336 and deleted gmouse_lld_FT5336_board_template.h Normally you don't mess with the files in the library itself. You should keep the µGFX library untouched and copy any board files needed to your inc folder. But!!!! don't do that yet in this case! Here it is much easier to just go back to Project -> properties -> C/C++ General -> Paths and Symbols -> Includes. Here you should add the folder /boards/STM32F746-Discovery for all languages again. Doing this will include both the gmouse_lld_FT5336_board.h and board_STM32LTDC.h into your project. One tip I was planning to add in the tutorial: If you want to easily exclude files from your build without having to constantly go back to the filter, you can select them in your Project Explorer, right click and choose Resource Configurations -> Exclude from Build... That will give you this dialog: Deselect all the check boxes here and click OK. The files should now be included in your project. If you want to exclude them again do the exact same thing, but check all the check boxes in the "Exclude from build" dialog. I'll explain it here with the method from the guide but you can also use the above method to include the files. So next go back to Project -> properties -> C/C++ General -> Paths and Symbols -> Source Location tab. First delete the boards entry form the filter list. Now also include the boards/STM32F746-Discovery folder. Here we will have to add a filter also because there are files SW4STM32 already generated that are also in the folder and keeping them both will give conflicts. So in the filter exclude everything in the boards folder except for the following files in the STM32F746-Discovery folder: - stm32f7_i2c.c - stm32f746g_discovery_sdram.c - stm32f746g_raw32_system.c - stm32f746g_raw32_ugfx.c Now you should be able to enable #define GFX_USE_GDISP without getting compiler errors. Let us know if this doesn't work out! Edit: One thing I didn't see is if you included the driver folders (STM32LTDC and FT5336) to your Includes. Edited May 29, 2017 by cpu20 Link to comment Share on other sites More sharing options...
Slemi Posted May 29, 2017 Report Share Posted May 29, 2017 I have it like in screenshot but still doesn't work Are these correct settings? Link to comment Share on other sites More sharing options...
cpu20 Posted May 29, 2017 Report Share Posted May 29, 2017 Yes, could you give me the output of your error messages? (Console) Link to comment Share on other sites More sharing options...
Slemi Posted May 29, 2017 Report Share Posted May 29, 2017 (edited) 9 minutes ago, cpu20 said: Yes, could you give me the output of your error messages? (Console) Hi! I still have the same error as before. Starting to loose my mind triyng to get this to work for last six hours. I have enough for today, or my board might meet my hammer. Will try again tomorrow. Not sure anymore what I have already changed and what not. Tried everything five times already from scratch. Wish there was someone who knows that would create step-by-step tutorial for this for us who don't know. Edited May 29, 2017 by Slemi Link to comment Share on other sites More sharing options...
cpu20 Posted May 29, 2017 Report Share Posted May 29, 2017 @Slemi Don't worry, we'll find a way to make it work. I just downloaded SW4STM32 and I get the same errors. The problem lies in the fact that the suite includes alot of files for the board that are giving conflicts. I am trying to resolve everything but it will take some time. Link to comment Share on other sites More sharing options...
blacktronics Posted May 29, 2017 Report Share Posted May 29, 2017 I am getting the same errors, fun. Link to comment Share on other sites More sharing options...
cpu20 Posted May 30, 2017 Report Share Posted May 30, 2017 I've looked a little bit further into it and it seems there is an incompatibility between the HAL-driver used by SW4STM32 and the stm32f746_discovery_sdram.c file used for the board. The problem is temporarily fixed by manually editing the inclusions: Use this to get started with and I'll look into fixing the issue properly when I have more time. You will see that when initializing there is some glitching on the screen which gets resolved after the initialization. To use the project just do Import -> Existing project into workspace. Link to comment Share on other sites More sharing options...
blacktronics Posted May 30, 2017 Report Share Posted May 30, 2017 Amazing, thank you a lot! Link to comment Share on other sites More sharing options...
blacktronics Posted May 30, 2017 Report Share Posted May 30, 2017 Okay, sorry to bother you again - the template you provided works fine. However, how do I now use the output from studio? I just copied the contents of the output folder into my inc folder, and copied the code from main_example.c into main.c It went apocalypse on me: Link to comment Share on other sites More sharing options...
cpu20 Posted May 30, 2017 Report Share Posted May 30, 2017 7 hours ago, blacktronics said: Okay, sorry to bother you again No problem, happy to help anywhere I can. All the .h files generated by µGFX studio should be copied into your inc dir. However the gui.c file as well as the rsc folder should be copied into your src folder. The compiler is also saying there are some problems in your gfxconf.h. Maybe something went wrong when generating the file in the studio. If changing what I said here does not work, post your gfxconf.h here and I'll take a look where there might be a problem. Link to comment Share on other sites More sharing options...
blacktronics Posted May 31, 2017 Report Share Posted May 31, 2017 yup, still unhappy, throws 170 errorstest.zip Link to comment Share on other sites More sharing options...
cpu20 Posted May 31, 2017 Report Share Posted May 31, 2017 First you'll have to copy and paste the GOS settings from the original gfxconf.h. This is because the studio does not generate these. /////////////////////////////////////////////////////////////////////////// // GOS - One of these must be defined, preferably in your Makefile // /////////////////////////////////////////////////////////////////////////// So copy everything from the original gfxconf.h below this GOS header (and above the GDISP header) and copy it into your new gfxconf.h file. Next for using font stuff you must add uGFX/src/gdisp/mcufont to your include paths in your project settings. Move the rsc folder (containing the font file DejaVuSans16.c) to the root directory of your project and also add it to your include paths. This should be the result. Don't forget to add HAL_Init(); to the beginning of your main program! gfxconf.h 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