Skip to content

Repository files navigation

CharlieDeck32

Build

A minimalist handheld console powered by an STM32 microcontroller and a Charlieplexed LED matrix, capable of running retro-style games like Flappy Bird, Snake, Pong and Tetris.

Table of Contents

  1. Features
  2. Hardware Overview
  3. Software & Build Instructions
  4. Games Included
  5. Project Roadmap & TODOs
  6. License

Features

  • Ultra-compact and portable
  • Powered by STM32 MCU
  • Efficient LED control via Charlieplexing: drives many LEDs using few pins.
  • Plays classic games like Flappy Bird, Snake, Pong and Tetris and possibly more
  • Open-source under the GPL-3.0 license.

Hardware Overview

DIAGRAM HERE

Software & Build Instructions

Prerequisites

  • Git

  • MSYS2 for Windows

  • ARM None EABI Toolchain

    • STM32CubeCLT contains arm-none-eabi-gcc and arm-none-eabi-gdb and is strongly recommended for further development.

    • For Windows MSYS2 (MinGW64):

      pacman -S --needed --noconfirm mingw-w64-x86_64-arm-none-eabi-gcc mingw-w64-x86_64-arm-none-eabi-gdb
    • For Linux:

      sudo apt install gcc-arm-none-eabi gdb-arm-none-eabi -y
  • CMake and Ninja

    • For Windows MSYS2 (MinGW64):

      pacman -S --needed --noconfirm mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja
    • For Linux:

      sudo apt install cmake ninja-build -y
  • STLink Tools

    • For Windows MSYS2 (MinGW64):

      pacman -S --needed --noconfirm mingw-w64-x86_64-stlink
    • For Linux:

      sudo apt install stlink-tools -y
  • Optional for further development: STM32CubeMX

Building

  • Clone the repo and navigate into it

    git clone https://github.com/chieftain0/CharlieDeck32.git
    cd CharlieDeck32
  • Build the Debug version of the project

    # Configure build files
    cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug -B build/Debug
    
    # Build the project
    ninja -C build/Debug
  • Build the Release version of the project

    # Configure the project
    cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -B build/Release
    
    # Build the project
    ninja -C build/Release

Executable

The build commands will produce a CharlieDeck32.elf file in the CharlieDeck32/bin/Debug and CharlieDeck32/bin/Release directories.

arm-none-eabi-objdump -f bin/Debug/CharlieDeck32.elf
arm-none-eabi-objdump -f bin/Release/CharlieDeck32.elf

Flashing

  • Connect your SWD programmer (ST-Link, etc.)

  • Flash the firmware using your preferred method:

    st-flash write CharlieDeck32.elf 0x8000000

    or use STM32CubeProgrammer for a GUI approach.

Games Included

  • Flappy Bird — tap to flap, dodge obstacles.
  • Snake — collect dots, do not bite yourself.
  • PvP Pong — two players, two paddles, one ball.
  • Tetris — classic tetris.

Project Roadmap & TODOs

  • Program the Tetris game.

License

This project is licensed under the GPL-3.0 license.

About

CharlieDeck32 is a minimalist handheld console powered by an STM32 microcontroller and a Charlieplexed LED matrix, capable of running retro-style games like Flappy Bird, Snake, Pong and Tetris.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages