A small graphics library for embedded systems (mostly Cortex-M devices).
- 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
- 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.
git clone https://github.com/picmaster/mikrogui.git
cd mikrogui
tools/guic.py 320x240_8bpp
make
- 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
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.
All issues are being handled at the project's "Issues" page.