Simon Posted November 13, 2018 Report Share Posted November 13, 2018 Hi, In the past I have successfully built uGFX using the single file inclusion approach (notwithstanding issues with the sdram code - see later). I want to use the Makefile approach so it is easier to incorporate bug fixes made to uGFX. I have looked at the CibiStudio wiki post to try to replicate the same in Eclipse. The steps I have taken are: created a new C project for the STM32F746-Discovery board including firmware version 1.9 Made a link to the cloned uGFX repository: Added exclude filters for source files in the following folders: boards/addons boards/base (excluding STM32F746-Discovery folder) demos drivers/gdisp (excluding STM32LTDC folder) drivers/ginput (excluding touch/FT5336) drivers/multiple src/gfile Added the ugfx folder linked to above to the Include path Renamed 'board_STM32LTDC_template.h' to 'board_STM32LTDC.h' Added ugfx/drivers/gdisp/STM32LTDC to the Include path to reolve an inclusion issue Created a userfonts.h file in ugfx/src/gdisp to resolve a missing dependency issue Excluded all .c font files in ugfx/src/gdisp/fonts from the build (I figured I could sort the fonts problem out later) Added ugfx/boards/base/STM32F746-Discovery to the Include path On compiling I now get the error: In file included from /home/simon/uGFX-git/ugfx/drivers/gdisp/STM32LTDC/gdisp_lld_STM32LTDC.c:94:0: /home/simon/uGFX-git/ugfx/drivers/gdisp/STM32LTDC/board_STM32LTDC.h:22:20: error: 'SDRAM_DEVICE_ADDR' undeclared here (not in a function) Finished building: /home/simon/uGFX-git/ugfx/drivers/ginput/touch/FT5336/gmouse_lld_FT5336.c (LLDCOLOR_TYPE *)SDRAM_DEVICE_ADDR, // Frame buffer address My problems with the single file include method as mentioned above is the the file stm32f746g_discovery_sdram.c is duplicated in the uGFX repository but with reference to a header file called stm32f746_discovery_sdram.h but the version of stm32f746g_discovery_sdram.c included in the firmware references a header file called stm32746g_discovery_sdram.h If I proceed to try and resolve this problem it becomes very messy and I didn't document how I have resolved it with the single file inclusion method. So, two simple questions (!): is this the correct way to implement the makefile approach in Eclipse? how to correctly resolve the issues caused by the sdram files? Thanks Simon. Link to comment Share on other sites More sharing options...
inmarket Posted November 13, 2018 Report Share Posted November 13, 2018 Use our file instead of the firmware file in your build. STM keep changing their firmware in incompatible ways which is why we include a particular version in our repository. @cpu20 is the expert in getting ide's to include the correct files. He has published a number of guides that may help. The other way is to not rely on the ide's build generator and to instead create a true makefile project in eclipse. It is by far the easiest way to build uGFX and it is where we as developers started. If you are nterested in this have a look at some of the prepared makefiles in the various board example directories. Link to comment Share on other sites More sharing options...
Simon Posted November 14, 2018 Author Report Share Posted November 14, 2018 Thanks @inmarket I appear to be winning, I've got a clean compile but execution is failing in initialisation. I'll post an update when I've sorted all the problems out. Link to comment Share on other sites More sharing options...
cpu20 Posted November 15, 2018 Report Share Posted November 15, 2018 On 13/11/2018 at 14:21, Simon said: is this the correct way to implement the makefile approach in Eclipse? With Makefile approach do you mean using the Makefile system provided by uGFX? Because then you need to make a Makefile project in Eclipse. When you create a C project in Eclipse, it will create a Makefile for you depending on how you configured the project. When you create a Makefile project, Eclipse will not generate any makefiles and use the Makefile you provide. What you are currently doing is manually configuring the whole Eclipse project to compile correctly. That is a very difficult process, but I think it is possible. Link to comment Share on other sites More sharing options...
Simon Posted November 16, 2018 Author Report Share Posted November 16, 2018 21 hours ago, cpu20 said: With Makefile approach do you mean using the Makefile system provided by uGFX? Because then you need to make a Makefile project in Eclipse. I mean the Makefile approach shown here and in the image below rather than the Single file inclusion approach. I guess the issue I have encountered is that I can create a Makefile project and tell it to use the uGFX makefiles but how do I then incorporate my own code and tell Eclipse to include that in the builds. Link to comment Share on other sites More sharing options...
inmarket Posted November 17, 2018 Report Share Posted November 17, 2018 Have a look in the example makefiles. It should be obvious. 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