Jump to content

UGFX + Xilinx Virtex-5


Alamart

Recommended Posts

Hello! I am new to uGFX and would like to use it in a new project.

I have an ML506 board on the Virtex-5 from Xilinx. And the monitor connected to the motherboard via a TFT controller. I do not have the OS.

I want to connect UGFX library. I use this "drivers \ gdisp \ framebuffer".

The file "src \ gos \ gos_raw32.s" I realize the function:
void _gosInit (void),
void timer_handler (void * callback, u8 timer_number),
systemticks_t gfxSystemTicks (void),
systemticks_t gfxMillisecondsToTicks (delaytime_t ms).

The file "drivers \ gdisp \ framebuffer \ board_framebuffer.h" I realize the function:
board_init () - Initializing the framebuffer and the return address, and display properties.

Please tell me whether you want to sell something else to connect to your library.

Thank you.

Link to comment
Share on other sites

Hello and welcome to the community!

I'm not sure what your exact question is. What you are saying makes sense and is correct. Except that you don't have to implement the timer_handler() function. Everything else is correct.
You can find additional information on how to implement the two functions for the systick (gfxSystemTicks() and gfxMillisecondsToTicks()) in the corresponding documentation. Everything else should just work out of the box if you are running a generic 32-bit (soft-)CPU.

I'm not sure whether this answers your questions. Please let us know if you have any other questions.

Link to comment
Share on other sites

I'll try to describe the situation, the sequence of our actions and questions.

We run the uGFX library on Xilinx ML506 board:

- processor core Microblaze (32-bit),
- IDE XilinxSDK 14.7 based on Eclipse
- GCC compiler
- no operating system
- the display device driver – framebuffer. 

1. As you know the GCC compiler uses makefiles, but there are problems with the paths to the header files when we add the uGFX in project (the IDE does not see header files, even though they were registered in the corresponding makefiles), e.g.:

https://pp.vk.me/c631527/v631527291/46353/5LJ2VlW0J7U.jpg

This problem we solve by writing manually the paths to the necessary files, or as it did now, we solve the problem by putting in the project settings the paths to the necessary header files:

https://pp.vk.me/c631527/v631527291/4635d/R1x5Lpzqr0E.jpg

https://pp.vk.me/c631527/v631527291/46367/d4Hq-Mv2X_g.jpg

 

To do in this way is not quite right, but, unfortunately, we don't know why the makefiles don't work correctly.

System configuration file gfxconf.h the following:

#ifndef _GFXCONF_H
#define _GFXCONF_H

/* The operating system to use. One of these must be defined - preferably in your Makefile */
//#define GFX_USE_OS_CHIBIOS FALSE
//#define GFX_USE_OS_WIN32   FALSE
//#define GFX_USE_OS_LINUX   FALSE
//#define GFX_USE_OS_OSX     FALSE
#define GFX_USE_OS_RAW32     TRUE

/ GFX sub-systems to turn on /
#define GFX_USE_GDISP   TRUE
#define GFX_USE_GWIN    TRUE
#define GFX_USE_GMISC   TRUE

/ Features for the GDISP sub-system. /
#define GDISP_NEED_VALIDATION TRUE
#define GDISP_NEED_CLIP       TRUE

/ Features for the GWIN subsystem. /
#define GWIN_NEED_WINDOWMANAGER TRUE
#define GWIN_NEED_GRAPH         TRUE

/ Features for the GMISC subsystem. /
#define GMISC_NEED_FASTTRIG  TRUE

#endif / _GFXCONF_H /

2. We use the version without an operating system. For this we implemented the functions gfxMillisecondsToTicks() and gfxSystemTicks() in the file "src\gos\gos_raw32." and the function board_init () in the file "drivers\gdisp\framebuffer\board_framebuffer.h"

The problem is that the function board_init() is not compiled due to the fact that the code in #ifdef GDISP_DRIVER_VMT not active:
https://pp.vk.me/c631527/v631527291/4633f/_jDE7TNe6_E.jpg

But at the same time #define IN_DRIVER in the file "src/gdisp/gdisp_driver.h" is defined.
See screenshot:

https://pp.vk.me/c631527/v631527291/46349/v5vj5Pa0hYI.jpg

Had someone experience with uGFX on Microblaze core in the development environment based on Eclipse?
I'm attaching to the message the archive with the project in Xilinx SDK 14.7, the source code files are in the archive: “..\workspace\ugfx\src\”

 

SDK_xilinx_standart.zip

Edited by timandr
Link to comment
Share on other sites

Hello @timandr and welcome to the community!

 

9 hours ago, timandr said:

This problem we solve by writing manually the paths to the necessary files, or as it did now, we solve the problem by putting in the project settings the paths to the necessary header files:

That is actually the expected behavior when manually adding files to a project. Judging from your screenshots you are doing the right thing. You always have to tell the compiler/linker which paths it should include. This is "normal" and is nothing special with Eclipse or your particular setup. However, note that in general you could also just use the Makefile(s) that come with the µGFX library. We are currently working on a project that uses an Altera FPGA and the NIOS-II soft CPU. It too comes with an Eclipse environment and generates Makefiles for the project. At least with our project it is possible to just include the µGFX makefiles in that generated makefile. Apparently the Altera tools are smart enough to keep manual changes made by the user.
But that's just additional information. You are in no way obligated to include the µGFX library by using the built-in makefiles. You can just include it by manually adding all files an paths. It's just a very tedious job.

 

9 hours ago, timandr said:

The problem is that the function board_init() is not compiled due to the fact that the code in #ifdef GDISP_DRIVER_VMT not active:
https://pp.vk.me/c631527/v631527291/4633f/_jDE7TNe6_E.jpg

But at the same time #define IN_DRIVER in the file "src/gdisp/gdisp_driver.h" is defined.

Don't trust the highlighting of Eclipse. The µGFX build system is way too complex for this. Many of those macros get defined and undefined dynamically during the compilation process. Eclipse only knows about the state of those prior to compilation. Just ignore the Eclipse highlighting.

 

9 hours ago, timandr said:

Had someone experience with uGFX on Microblaze core in the development environment based on Eclipse?

We never worked on the Microblaze architecture itself but as mentioned above we ourselves as well as a few of our customers are running µGFX on FPGAs with soft-CPUs successfully without any problems. Getting this to work should definitely not be a big problem. Usually it's a bit of a pain until it compiles the first time because each SDK of those soft-core/FPGA vendors works a bit differently.

 

9 hours ago, timandr said:

I'm attaching to the message the archive with the project in Xilinx SDK 14.7, the source code files are in the archive: “..\workspace\ugfx\src\”

All in all, what you are describing is correct. You are definitely approaching this the right way.
The compilation error you are getting (the one about gfx.h: No such file or directory) is most likely caused by the fact that you are not adding the path to ugfx/src to your compiler include paths list. Can you please try adding the that path and making a clean build?

 

I hope that helps. Please don't hesitate to ask if you have any other questions.

Link to comment
Share on other sites

  • 2 weeks later...

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