Skip to main content
peter239955_stm1
Associate
February 8, 2014
Question

A simple 2D graphics library for STM32F429 MCU (CooCox project)

  • February 8, 2014
  • 2 replies
  • 1089 views
Posted on February 08, 2014 at 19:07

DMA2D accelerated, the sources are here: https://github.com/true-grue/stm32f429_graphics

Tested on STM32F429I-DISCO board with external 480x272 LCD. Hope someone will find it helpful.

    This topic has been closed for replies.

    2 replies

    warcatz
    Associate III
    February 8, 2014
    Posted on February 08, 2014 at 20:38

    I see some useful functions in the library.

    But i see some thing you can improve , like check if you try to set a pixel out the screen.

    This kind of mistake made me crash sometime the st429 :)

    It's why i do a clipping.

    If you want add other functionality to your lib you can check my source here :

    https://sites.google.com/site/suprabotics/source-code

    Cheers.

    PS : is the st429 fully supported by Coocox now ??

    peter239955_stm1
    Associate
    February 9, 2014
    Posted on February 09, 2014 at 11:14

    Thank you for your interest!

    To prevent crashing I use bitwise & mask when accessing to the video buffer. Quick and dirty :) I don't know why, but when I use only DMA2D with negative coordinates there is no crashing. I found that it's easier to test the code (for clipping etc) on PC with a SDL-based simulator (it's on github now too) for the graphics library. Also I've added Python scripts for converting png and font (created with BMFont utilty) data to C code.

    It's my own, custom CooCox project. It was made with help of flash loader (2 mb support) from here http://olek.tk/blog/index.php?post/2013/11/10/STM32F429I-FLASH-driver-for-CooCox

    P.S. I'll check your library soon, thanks for the link!