GUI-Library for microcontroller [closed]

2019-01-21 08:40发布

问题:

I want to create a GUI driven application for a micro-controller (Atmel XMEGA) that is connected to a 128x64 dots graphics LCD (EA DOGL128-6) and 4 buttons for navigation.

Controlling the display itself (e.g. drawing pixels and characters) is no problem but in order to prevent me from reinventing the wheel I was googling for a GUI-Library/-Toolkit that is written in c, includes its source code, will run on a 32 MHz 8-bit micro-controller and provides at least the following controls:

  • panel (to group elements)
  • menu (scrollable)
  • icon
  • label
  • button
  • line-graph (optional)

But I didn't find any thing useful. Does anyone know (or better uses) such a library(preferably for free)?

回答1:

I would consider rolling your own "immediate mode" GUI. Jari Komppa has a good tutorial about them. It's a lot easier than you may think, and you'll probably find most GUI libraries--even those targeting embedded systems--are a bit heavy-weight for your system.

If you insist on using a third-party library, below are a few I found. I've never used any of them and they are probably fairly expensive.

  • emWin
  • C/PEG
  • easyGUI


回答2:

I personally used PEG (at work), but it is not for free. You just need to write a small layer of adaptation and use it. You can also look at Qt or minigui.



回答3:

I also wrote a library which supports nearly any display technology: µGUI

http://www.embeddedlightning.com/ugui/

µGUI is a free and open source graphic library for embedded systems. It is platform-independent and can be easily ported to almost every micro-controller system. As long as the display is capable of showing graphics, µGUI is not restricted to a certain display technology. Therefore display technologies such as LCD, TFT, E-Paper, LED or OLED are supported. The whole module consists of two files: ugui.c and ugui.h.

This might be helpful as well



回答4:

You should take a look at Contiki [wikipedia.org]

Besides being a small and elegant operating system for many 8/16/32-bit microcontrollers, it also features a GUI toolkit. It runs on the Atmel AVR!

For your convenience, here is a direct link to the The Contiki Toolkit (CTK) source code.



回答5:

In addition to Judge Maygarden's list RAMTEX provide libraries specifically aimed at small graphic LCDs. Again not free, but is this is for commercial use, remember that if you did it yourself, it may take many man hours to achieve a polished product, so consider that before building your own.

At the rates my company accounts for my time (as opposed to my pay rate), if it took more than five hours, I'd be better off buying the Ramtex library (about two days if you only take my pay rate into account). If however you have the time and inclination, it is not a difficult task, and probably fun.



回答6:

NuttX is a real-time operating system for microcontrollers. The author has starting a developing some gui primitives for LCD displays for it.



回答7:

Atmel actually makes a GUI library targeted at their microcontrollers.



回答8:

You may want to have a look at the Nano-X framework (formerly known as Microwindows): http://www.microwindows.org/

It claims to support down to a 16-bit DOS system, so I'm not sure if it's suitable for an 8-bit, but maybe the library can be pared down to just what you need.

I haven't used it, but at one point was considering looking into using it for some simple display UI (though on a 32-bit ARM system). Unfortunately, the project shifted gears before I actually did anything with it. I'd be interested in what your take on it is (or how well it works if you decide to try to use it).



回答9:

We've started using easyGui and it seems good. You design the screens in a PC app then it generates the source code - making the design stage really easy.

It does most of the things on the list. Line graphs are coming soon. You can make up buttons pretty easily as reusable structures.

It comes with template drivers for lots of displays - depending on how closely the template matches your display (colour depth & interface are the biggest issues) you might be able to use the code unmodified or change it to suit.



回答10:

I have been working on a similar project. Closest thing I could find are in the following links, but I doubt you will find a library with all the features you desire. These will only setup basic drawing functions, but it's a start. There are also some useful tools for bitmap converting and font creators if you dig around.

http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/glcd_dcf77/index.html

http://en.radzio.dxp.pl/

Almost everything else I have seen here is way overkill for what the poster seems to be asking for.



回答11:

Rich Quinnell mentions "... I saw a demonstration of Java applications running on an STM32-F3 MCU..." http://www.microcontrollercentral.com/author.asp?section_id=1741&doc_id=253618

I guess it is what you are looking for?



回答12:

The CodeVisionAVR development environment now has graphical libraries for XMEGA.

The CodeVisionAVR C Compiler features a powerful graphic library for LCDs with resolutions from 84x48 up to 800x480 pixels.

However, it is not free.



回答13:

You can use the "Microchip Graphics Library" for free.

This includes GUI tool "Graphics Display Designer X" for designing screens and this outputs the "C" files for your designed screen.

I am using this tool which is very user friendly, but some of the widgets what you are looking you may not find.

Here is the link for GUI tool: Click here!