Skip to content

Small graphics library for embedded systems (mostly cortex-m)

License

Notifications You must be signed in to change notification settings

picmaster/mikrogui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is mikrogui?

A small graphics library for embedded systems (mostly Cortex-M devices).

Features

  • modular, extensible design
  • provides access to the raster display via framebuffer, allowing the drawing of graphics objects like dots, lines, rectangles, images, monospaced font rendering
  • fast rendering in "deferred" mode, which means all drawing happens against the framebuffer, and the framebuffer is flushed only once per frame to the platform display
  • a menu system, capable of handling input events and drawing widgets. The
  • simple and small source code, allowing easy code review
  • small resource usage on the target (TODO: Add specific numbers from the ARM build)
  • code generation based on formal specifications

Dependencies

  • C99-capable compiler (gcc, Keil MDK-ARM, IAR Embedded Workbench). So far I've tested with gcc-4.7.2 on Linux. (TODO: Add IAR & Keil versions)
  • Python 2.7. I've tested the code generation on Linux and Windows 7.

How to compile

git clone https://github.com/picmaster/mikrogui.git
cd mikrogui
tools/guic.py 320x240_8bpp
make

How to use

  • Create a display configuration (configs/display/mydisplay.conf)
  • Create GUI forms (forms/*.form)
  • Invoke code generator to generate C-code:

tools/guic.py mydisplay form1

Code generator

The code generator (tools/guic.py) is used to convert formal specifications to source code. My initial intention was to automatically generate all the straight-forward code that doesn't need human creativity, thus reducing the error-prone work, and also speeding-up re-designs. The code generator is used to generate:

  • hardware-specific framebuffer (framebuffer_gen.[ch])
  • GUI forms instances (form_*_gen.[ch])
  • resources (still TBD)

The code generator uses text templates (located in "templates" directory) to generate source code. I intentionally try to avoid fuzzy preprocessor hacks as much as possible, in order to improve code readability.

Bug tracking

All issues are being handled at the project's "Issues" page.

About

Small graphics library for embedded systems (mostly cortex-m)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages