Skip to content

georgik/esp-idf-component-SDL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

73 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Simple Direct Layer - SDL 3.3.0 (ESP-IDF port)

๐ŸŽฎ Advanced SDL3 Component for ESP32 with universal board support and automatic hardware abstraction.

This is a comprehensive component wrapper for upstream SDL 3.3.0 designed for ESP-IDF, featuring:

  • ๐ŸŒ Universal Board Support - Works across ESP32-S3, ESP32-P4, and other variants
  • ๐ŸŽฏ Automatic Hardware Detection - No manual board configuration needed
  • ๐Ÿ“ฑ Multiple Display Interfaces - SPI, RGB, MIPI-DSI support
  • ๐ŸŽจ Built-in Examples - 4 ready-to-use SDL applications
  • โšก Zero-Configuration Setup - Board selection via menuconfig

๐Ÿš€ Quick Start

Installation

# Add SDL component from registry
idf.py add-dependency "georgik/sdl"

# Add board abstraction layer (GitHub only due to Component Registry limitations)
cd components
git clone --depth 1 https://github.com/georgik/esp-idf-component-SDL_bsp.git georgik__sdl_bsp

# Or add as git submodule
cd components
git submodule add https://github.com/georgik/esp-idf-component-SDL_bsp.git georgik__sdl_bsp

Create Project from Examples

# Create snow simulation project
idf.py create-project-from-example "georgik/sdl:snow"

# Create Conway's Game of Life
idf.py create-project-from-example "georgik/sdl:conway"

# Create Mandelbrot fractal visualizer
idf.py create-project-from-example "georgik/sdl:mandelbrot"

# Create bubble physics simulation
idf.py create-project-from-example "georgik/sdl:bubble"

Basic Setup

# Configure your board
idf.py menuconfig  # Navigate to "ESP-BSP SDL Configuration" > "Select Target Board"
idf.py build flash monitor

Alternative: ESPBrew Multi-Board Manager

๐Ÿบ ESPBrew - Advanced TUI tool for managing builds across multiple boards with SDL examples:

# Install ESPBrew
git clone https://github.com/georgik/espbrew && cd espbrew
cargo build --release

# Use in any SDL example directory
cd your-sdl-project
espbrew .  # Interactive TUI - select boards and press 'b' to build
espbrew --cli-only .  # CLI mode - builds all boards automatically

Perfect for SDL Examples: ESPBrew automatically discovers all board configurations and lets you build SDL examples for multiple boards simultaneously. All built-in SDL examples (snow, conway, mandelbrot, bubble) work seamlessly with ESPBrew.

Features:

  • ๐ŸŽฏ Auto-Discovery - Finds all board configurations automatically
  • ๐Ÿ–ฅ๏ธ TUI Interface - Interactive interface with real-time build monitoring
  • ๐Ÿ“Š Parallel Builds - Build multiple boards simultaneously
  • ๐Ÿ“ Script Generation - Creates build_{board}.sh and flash_{board}.sh scripts
  • ๐Ÿ“ Organized Output - Separate build directories and logs for each board
  • ๐ŸŽฎ SDL-Optimized - Perfect workflow for testing SDL examples across devices

Learn More: https://github.com/georgik/espbrew

๐ŸŽฏ Featured Examples

This component includes 4 built-in examples showcasing different SDL features:

1. โ„๏ธ Snow Simulation (snow)

  • Beautiful particle physics with falling snow
  • Automatic resolution adaptation (128ร—128 to 1280ร—720)
  • Perfect for demonstrating display capabilities

2. ๐Ÿงฌ Conway's Game of Life (conway)

  • Classic cellular automaton with age-based coloring
  • Adaptive grid sizing for any display resolution
  • Demonstrates complex algorithmic visualization

3. ๐ŸŒ€ Mandelbrot Fractal (mandelbrot)

  • Real-time fractal rendering with color cycling
  • Fixed-point arithmetic optimized for embedded systems
  • Progressive rendering with zoom animation

4. ๐Ÿซง Bubble Physics (bubble)

  • Interactive physics simulation with bouncing bubbles
  • Touch support on compatible boards
  • Showcases fluid animation and user interaction

๐Ÿ”ง New ESP-BSP-SDL Abstraction Layer

โš ๏ธ Important: This component now requires the ESP-BSP-SDL abstraction layer for board support.

Why ESP-BSP-SDL?

  • ๐ŸŽฏ Board Agnostic: SDL code works on any supported board without modification
  • ๐Ÿ”ง Menuconfig Integration: Board selection through standard ESP-IDF configuration
  • โšก No Symbol Conflicts: Clean separation prevents BSP function name conflicts
  • ๐Ÿ“ฑ Touch Support: Optional touch interface abstraction

Installation (GitHub Required)

# ESP Component Registry limitations require GitHub installation
cd components
git submodule add https://github.com/georgik/esp-idf-component-SDL_bsp.git georgik__sdl_bsp

๐Ÿ“– Documentation: https://github.com/georgik/esp-idf-component-SDL_bsp

๐ŸŽ›๏ธ Supported Boards

โœ… Fully Supported (Tested & Working)

  • ESP-Box-3 - 320ร—240 ILI9341, FT5x06 Touch, OCTAL PSRAM
  • M5 Atom S3 - 128ร—128 GC9A01, Compact form factor
  • M5Stack Core S3 - 320ร—240 ILI9341, FT5x06 Touch, QUAD PSRAM
  • ESP32-P4 Function EV - 1280ร—800 MIPI-DSI, GT1151 Touch, 32MB PSRAM
  • ESP32-S3-LCD-EV-Board - 800ร—480 RGB, GT1151 Touch, OCTAL PSRAM
  • M5Stack Tab5 - 720ร—1280 MIPI-DSI (portrait), GT911 Touch, 32MB PSRAM

๐Ÿ”ง Additional Support

  • ESP32-C6 DevKit - Generic BSP for custom displays
  • ESP32-C3-LCDkit - ESP32-C3 development kit
  • Universal ESP BSP Generic - Works with any ESP32 + external display

๐Ÿ’ก Examples

C Examples (External)

Embedded Swift Examples (External)

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Your SDL App   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
          โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ georgik/sdl     โ”‚ โ† This component (board-agnostic)
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
          โ”‚  
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ georgik/sdl_bsp โ”‚ โ† Abstraction layer (GitHub only)
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
          โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ ESP-BSP         โ”‚ โ† Board-specific drivers
โ”‚ Components      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Key Benefits

  1. ๐ŸŽฏ Write Once, Run Anywhere - Same SDL code on all boards
  2. โšก Zero Board Configuration - Automatic hardware detection
  3. ๐Ÿ”ง Clean Architecture - Clear separation of concerns
  4. ๐Ÿ“ฑ Touch Ready - Optional touch support abstraction
  5. ๐ŸŽจ Rich Examples - 4 built-in demonstrations

๐Ÿ“– Documentation

About

ESP-IDF Component Wrapper for SDL3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors