Jump to content

Makefile Inclusion with Existing Project in Eclipse IDE (SW4STM32)


Andrew W

Recommended Posts

Hello uGFX community!

I have uGFX running on custom board that is in the early stages of prototype development. This board is powered by a STM32F769, running without an OS, and controls a simple LCD display (no touch input). We are using system workbench (SW4STM32) and have configured most of our setup using the CubeMX software. Currently, I have uGFX integrated using the single file inclusion method and have written my own board driver file. Right now, I am able to print some sample text to the screen just to prove that the system is functional and it works quite well. Once integrated and running, I've found uGFX very flexible and user friendly to work with :D.

I know that down the road as the user interface gets more complicated, it will be necessary to deal with screen tearing. It will very likely not be possible for our processor to update the screen buffer within the narrow time window between screen refreshes. So, using pixmaps and a little bit more ram seems like the ideal solution.

But, as I quickly found out, pixmaps and multiple displays are not supported by the single file inclusion method :(. Has anyone integrated uGFX with makefiles into System Workbench or Eclipse? The Using Eclipse guide mentions that it is possible, but that section is not yet written. Our project is based on the CubeMX generated functions and we would definitely prefer to keep the autogenerated make files for the rest of the project if at all possible. As a possible alternative, is there any way to make pixmaps work when using the single file inclusion method?

Thanks you in advance,

Andrew W.

Link to comment
Share on other sites

Pixmaps cannot be built with single file make and the current uGFX - the build requirements for multiple displays (and pixmaps is effectively a 2nd display) are just too complex for single file building. One such issue is the symbol space. Most drivers use similar or identical function names resulting in it being impossible to build two or more drivers in the same compilation unit.

All hope is not lost however, in the upcoming uGFX v3 these issues will be resolved by a redesigned driver interface. In v3 makefile builds will internally use single file make.

Having said that, using makefile builds in eclipse is very easy - just start a makefile project. This is actually our preferred and best supported mechanism. Creating a project using the eclipse automatic makefile building process and intergrating a custom uGFX makefile is I believe possible but NOT simple requiring careful modification of the automatic makefile.

Link to comment
Share on other sites

Another thing you might want to look at...

There are some forum posts of a person who updated the stm32 ltdc driver to support a 2nd page which was drawn into by uGFX rather than to the primary display surface. They then used the display sync period to DMA data from the 2nd buffer to the primary display surface using the DMA2D controller in the 746. This prevented tearing and allowed uGFX to work without the need for pixmaps.

Link to comment
Share on other sites

Thank you for the response! I am excited for the release of uGFX v3. Glad to hear that the solution for this is already in the works! For now, I do have just enough memory available that I can run two frame buffers and DMA one into the other. Perhaps at a later time I'll take a stab at setting up a makefile project in eclipse. Thank you for your help!

-Andrew W.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...