• This repository has been archived on 11/Jun/2023
  • Stars
    star
    102
  • Rank 335,584 (Top 7 %)
  • Language
    C++
  • License
    BSD 2-Clause "Sim...
  • Created over 10 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

VGA-style video generation for STM32F4 processors

This is my original, C++-based attempt at embedded high quality video. For a newer, more featureful, and far more robust version, see:

https://github.com/cbiffle/m4vga-rs

Original Readme

This library provides high-quality, high-resolution color graphics output from STM32F40x/1x microcontrollers, using very few external components.

This repository contains only the reusable library bits. To try it out, or just see an example of how it's used, see the m4vgalib-demos repository.

Brief Overview

The STM32F407 is a Cortex-M4 microcontroller that has neither a video controller, nor enough RAM for a framebuffer at any reasonable resolution.

m4vgalib works around this to produce stable 800x600 (or 640x480) video with 256 colors. Instead of a video controller, m4vgalib uses two timers, one DMA controller, and a GPIO port. Instead of a framebuffer, m4vgalib uses a modular rasterization system that lets applications "race the beam" -- prepare video output on the fly from some compact representation.

Out of the box, m4vgalib includes canned rasterizers for both palettized pixel graphics and attributed text graphics, with various formats and depths. Applications can change rasterizers at any scanline to achieve split-screen or raster effects.

Even though m4vgalib is maintaining a 320Mb/s data stream on a processor not designed for anything of the sort, most of the CPU and hardware resources are left available to applications. To avoid introducing jitter, applications must only agree to keep their filthy hands off AHB1 during certain phases of execution. (Interrupts are available to notify the application of this.)

The application runs as a "thread" parallel to m4vgalib, and it's even possible to run an application using an RTOS with a bit of porting effort. (Hint: the RTOS must coordinate with m4vgalib on the use of the PendSV handler.)

More Repositories

1

lilos

A wee async RTOS for Cortex-M
Rust
399
star
2

m4vga-rs

VGA-style video output for STM32F4 processors, in Rust
Rust
141
star
3

keybrain

Drop-in replacement controller for WASD CODE v2B keyboard
Rust
74
star
4

etl

Embedded Template Library
C++
56
star
5

rtiow-rust

Ray tracer from Peter Shirley's Ray Tracing In One Weekend / The Next Week, but in Rust.
Rust
49
star
6

ruckus

Procedural CAD for Weirdos
Racket
44
star
7

bare-metal-wasm-example

Full code from my "Tiny WebAssembly graphics demos" blog post. http://cliffle.com/blog/bare-metal-wasm/
HTML
44
star
8

catibo

Rust implementation of the CTB/CBDDLP/PHZ 3d printing file formats.
Rust
43
star
9

cfm

A 16-bit CPU and self-hosting Forth system for the Lattice ICE40 FPGA, written in Haskell.
Haskell
41
star
10

m4vgalib-demos

Assorted demos for m4vgalib
C++
40
star
11

rp2040-rustboot

RP2040 bootloader in Rust
Rust
36
star
12

swddude

A SWD programmer for ARM Cortex microcontrollers.
C++
36
star
13

minimal-embedded-rust

Example code and build environment for Rust on Cortex-M4.
Rust
24
star
14

brittle-kernel

A security-oriented microkernel for Cortex-M microcontrollers
C++
21
star
15

httpd2

A fast modern static file server, patterned after Publicfile, written in Rust.
Rust
19
star
16

lilosdbg

Prototype debugger for lilos
Rust
14
star
17

rp2040-usb-device-in-one-file

Shows how to implement USB device on RP2040 in Rust, in a single file, with no hidden parts.
Rust
11
star
18

rs80

A fairly speedy emulator for the Intel 8080, written in safe Rust
Rust
11
star
19

corncobs

Corny COBS encode/decode for Rust no_std targets
Rust
10
star
20

debugdb

DWARF program analysis crate
Rust
10
star
21

cobble-build

A simple build system for modular software.
Python
9
star
22

lilist

A Rust doubly-linked intrusive list with Miri tests
Rust
9
star
23

hubpack

Predictable serde format for embedded (or larger) systems
Rust
7
star
24

visit-diff

Efficiently discover and report differences between data structures (in Rust).
Rust
6
star
25

pushr-for-android

[obsolete] Simple, easy way to push photos to Flickr from your Android-powered phone. Based loosely on the iPhone program of the same name.
Java
5
star
26

lilos1

A tiny bare-bones OS for AVR.
C++
5
star
27

httpd1

A static HTTP server, in the style of Publicfile, written in Rust.
Rust
5
star
28

propasm

Assembler for the Parallax Propeller microcontroller
Java
5
star
29

gcc-arm-embedded

Mirror of ARM's GCC project on Launchpad
Shell
4
star
30

seff

Decent text rendering for resource-constrained devices.
Rust
3
star
31

uf2l

A tool (2l, get it?) for working with UF2 firmware images.
Rust
3
star
32

WatchMaestro

A Java library for controlling the MetaWatch
Java
3
star
33

runcible

eBook reader firmware based on Qt
C++
3
star
34

s3g-toolkit

Command-line tools for manipulating RepRap/MakerBot S3G files.
C++
3
star
35

rxbanish

Hide the X11 mouse pointer while you're typing.
Rust
3
star
36

xmonad-config

My configuration for the XMonad window manager.
Haskell
2
star
37

bsrv

Bluespec RISC-V tinkering
Bluespec
2
star
38

lasgrav

Simple raster image to laser engraver tool
Rust
1
star
39

flabbergast-hs

Variations on a theme in word game solving.
Haskell
1
star
40

docker-tensorflow

1
star
41

kallisti

The settings and software that I use to operate my MakerBot Cupcake.
1
star
42

Swamp-Thing

Laser-cut swamp cooler design.
1
star
43

wordier

Wordier names for standard library operations, for clarity.
Rust
1
star
44

stm32c0-metapac-example

Me figuring out how to use stm32-metapac on the stm32c0
Rust
1
star