How afiskon/stm32-i2s-examples works
Project type and purpose
• This is a collection of bare-metal STM32F4 firmware examples demonstrating I2S audio usage.
• Two sample applications:
• sdcard-wav-example: reads a WAV file from an SD card (using FATFS), drives an ST7735 display, and outputs audio over I2S.
• sine-wave-example: generates a test sine wave in software and outputs it over I2S.
• Purpose: illustrate HAL-based peripheral initialization, DMA streams, file-system integration, and audio output on an STM32F411RE.
File structure
• Top-level: LICENSE, README, two example folders.
• Each example folder has:
• Inc/ : public headers (main.h, HAL config, interrupt prototypes).
• Src/ : application code (main.c, HAL MSP, interrupt handlers, system init).
• startup_stm32f411xe.s, STM32F411RETx_FLASH.ld: MCU startup and linker script.
• Makefile + cubefix.sh: build automation and CubeMX integration hack.
• main.ioc + mx.scratch: STM32CubeMX configuration.
• sdcard-wav-example/fatfs: FATFS file-system sources.
• sdcard-wav-example/sdcard: SD card low-level driver.
• sdcard-wav-example/st7735: TFT LCD display driver and fonts.
Key reminders
• Be very detailed: show each layer, each peripheral interface, and every data path.
• Do not over-simplify: separate the SD card driver, the file-system middleware, the audio pipeline, and the display pipeline into distinct components.