Jump to content

First uGFX Studio derived application


Recommended Posts

Posted

Hello,

I am modifying the ChibiStudio  stm32f4-discovery project - which I have running --- to use the output files from uGFX Studio.

How do I set this up ? - I copied all the files, and the resources directory.

It looks like I need to modify main() , and add guiInit().. and remove a few things.

I thought I saw instructions somewhere , but I misplaced them.

But, in case you have an already modified main.c somewhere....

Jim

Posted

Hello Jim,

It's correct that you copy all the files of the generated output directory (generated by the µGFX-Studio) to your project. Once you added the necessary files you just have to add the call to guiInit() to your main.c. Here's the most minimalistic main.c that we use for testing purposes:

int main(void)
{
	gfxInit();

	guiInit();

	guiShowPage(DISPLAY_PAGE);

	while(1) {
		gfxYield();
	}
}

of course your main() can contain other things as well. You really just add the functions you can find in gui.h to interact with the GUI.

I hope that helps. Don't hesitate to ask if you have any further questions.

Posted

There seems to be a conflict in font names in _RESOURCES_MANAGER_H, and gui.h.

 

gui.h

font_t DejaVuSans12;
font_t phpoXxi1Y;
font_t DejaVuSans24;

 

_RESOURCES_MANAGER_H

#define DejaVuSans12 0
#define phpoXxi1Y 1
#define DejaVuSans24 2
 

What to do ?

Jim

Posted

Hello Jim,

I just fixed that in the software. Will be part of v0.20.6 that should be released in a few hours. Simply delete the font_t declarations in gui.h. They are not needed. Use gstudioGetFont() if you need access to a font in your code. Example:

font_t f = gstudioGetFont(DejaVuSans12);

 

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...