This repository contains firmware for the STM32F429I-Discovery board that displays a piece of ASCII art on the built-in LCD screen.
The project utilizes the STMicroelectronics HAL libraries and the Board Support Package (BSP) specifically designed for the Discovery board to interact with the LCD and SDRAM.
- STM32F429I-Discovery development board
- USB cable (Type-A to Mini-B) for programming (ST-LINK) and power
- STM32CubeIDE (Recommended, as the project structure appears generated by it)
- Or a compatible toolchain (Keil MDK, IAR EWARM) capable of importing STM32CubeMX projects.
- STMicroelectronics HAL Libraries & BSP (Included/Managed by CubeIDE/CubeMX)
- (Optional) Serial terminal emulator (like PuTTY, Tera Term, Minicom) for viewing debug messages via UART1.
- LCD Display: Initializes and uses the onboard LCD.
- SDRAM Framebuffer: Configures the external SDRAM (connected via FMC) to act as the framebuffer for the LCD (address
0xD0000000
). - BSP Usage: Leverages the
stm32f429i_discovery_lcd.h
BSP for simplified LCD operations (Initialization, Layer Configuration, Clearing, Setting Colors/Fonts, Drawing Strings). - ASCII Art: Displays a multi-line ASCII art graphic centered on the screen.
- Custom Styling: Sets a black background and yellow text color using
BSP_LCD_SetBackColor
andBSP_LCD_SetTextColor
. - Font Selection: Uses
Font8
for rendering the text. - Peripheral Initialization: Includes standard initialization code for necessary peripherals (LTDC, DMA2D, FMC, GPIO, UART, I2C, SPI - though I2C/SPI might not be actively used for the core ASCII art display).
- printf Retargeting: Redirects
printf
output to UART1 (USART1: PA9=TX, PA10=RX, Baud Rate: 115200) for simple debugging messages.
- Clone the repository:
git clone https://github.com/hwkims/32.git cd 32
- Open the project:
- Launch STM32CubeIDE.
- Go to
File
>Open Projects from File System...
. - Select the cloned
32
directory. - Ensure the project is selected and click
Finish
.
- Connect the board: Connect your STM32F429I-Discovery board to your computer using the ST-LINK USB (Mini-B) connector.
- Build the project:
- Right-click on the project (
32
or similar name) in the Project Explorer. - Select
Build Project
(or pressCtrl+B
).
- Right-click on the project (
- Flash the firmware:
- Right-click on the project again.
- Select
Run As
>STM32 Application
orDebug As
>STM32 Application
. This will build (if necessary) and flash the code onto the board.
- Observe: The LCD screen on the Discovery board should initialize and display the yellow ASCII art on a black background.
- (Optional) View Debug Output:
- Connect a USB-to-Serial adapter to the correct pins for USART1 (Typically PA9 for TX, PA10 for RX - check the board schematic if unsure).
- Open a serial terminal program configured for the adapter's COM port at 115200 baud, 8 data bits, no parity, 1 stop bit (8N1).
- Reset the board. You should see the "HELLO, STM32" message printed in the terminal.
- hwkims (KIM HYUN WOO)
(Optional: Consider adding a LICENSE file, e.g., MIT License, if you want to specify how others can use your code.)