How squadracorsepolito/dashboard works
Purpose and deliverables
This repository builds firmware for the DASH infotainment/dashboard ECU and a separately built OpenBLT bootloader for the same STM32F446RE target. It produces two flashable images: the main dashboard application and a CAN-updatable bootloader. Primary build roots are Makefile and openblt_f446re/Makefile.
Firmware entry and startup
The application entry point is Core/Src/main.c, with MCU startup/vector support in startup_stm32f446xx.s and system initialization in Core/Src/system_stm32f4xx.c. Interrupt dispatch is centralized in Core/Src/stm32f4xx_it.c. The application is bare-metal STM32 firmware based on CMSIS and STM32F4 HAL, rather than a host or web runtime.
Application orchestration and board boundary
Core/Src/bsp.c is the board-support boundary, while Core/Src/main.c coordinates initialization and runtime behavior. Shared application-level configuration and utility interfaces are represented by Core/Inc/conf.h, Core/Inc/bsp.h, and Core/Src/utils.c. Hardware-specific setup is split into Cube-style peripheral units, isolating application/dashboard behavior from HAL register and clock setup.
Dashboard UI and local input/output
The dashboard-facing subsystem is centered on Core/Src/dashboard.c and Core/Inc/dashboard.h. User input is handled through Core/Src/button.c; output capabilities include DAC and display support. The repository includes an ST7032 LCD library at Lib/STM32_HAL_ST7032_LCD_LIBRARY/STM32_ST7032.c and relevant display documentation in Doc/NHD-C0220BiZ-FSW-FBW-3V3M.pdf. This forms the local interaction flow: physical inputs → dashboard logic → display/analog outputs.
Vehicle and peripheral I/O
CAN is a primary external boundary for vehicle-network communication, implemented in Core/Src/can.c with its interface in Core/Inc/can.h; the hardware documentation includes an SN65HVD232 CAN transceiver (Doc/sn65hvd232.pdf). Peripheral drivers configure ADC, DAC, DMA, I2C, SPI, timers, GPIO, and UART—for example Core/Src/adc.c, Core/Src/i2c.c, and Core/Src/usart.c. I2C likely connects board peripherals such as the PCA9555 I/O expander, whose library/documentation are under Lib/PCA9555 and Doc/PCA9555.pdf.
Reliability, hardware platform, and build/flash paths
The target is an STM32F446RE Cortex-M4, defined by STM32F446RETx_FLASH.ld, dashboard.ioc, and CMSIS device headers such as Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f446xx.h. Watchdog handling is explicit in Core/Src/wdg.c and Core/Src/iwdg.c. STM32 HAL is vendored in Drivers/STM32F4xx_HAL_Driver.
The main image is built with GNU Arm tooling and flashed via OpenOCD/ST-LINK using openocd.cfg. The alternate update flow first installs the bootloader, then uses BootCommander/libopenblt over CAN.
Bootloader subsystem
openblt_f446re/ is a standalone firmware project with its own entry point, linker configuration, HAL/CMSIS copies, and OpenOCD configuration. Its core lifecycle and transport components are openblt_f446re/Core/Src/main.c, openblt_f446re/Core/Src/BLT/boot.c, and openblt_f446re/Core/Src/BLT/can.c. OpenBLT manages communication, flash programming, plausibility, and XCP-related update protocol logic through openblt_f446re/Core/Src/BLT/com.c, openblt_f446re/Core/Src/BLT/flash.c, and openblt_f446re/Core/Src/BLT/xcp.c. The application/bootloader boundary is therefore flash-resident image handoff, with CAN as the field-update transport.
Main entry points: main.c Application orchestration · dashboard.c Dashboard UI · Makefile Application build · bsp.c Board support
Components 24
Dashboard application
Main STM32 firmware image.
- Application build
Makefile - Application orchestration
Core/Src/main.c - Board support
Core/Src/bsp.c - App configuration
Core/Inc/conf.h - Dashboard UI
Core/Src/dashboard.c - Physical input
Core/Src/button.c - LCD output
Lib/STM32_HAL_ST7032_LCD_LIBRARY/STM32_ST7032.c - Vehicle CAN
Core/Src/can.c - Peripheral drivers · ADC, DAC, DMA, I2C, SPI, timers, GPIO, and UART.
Core/Src/adc.c - Watchdog
Core/Src/wdg.c
Target platform
STM32F446RE hardware and vendor runtime.
- Startup vectors
startup_stm32f446xx.s - System initialization
Core/Src/system_stm32f4xx.c - Interrupt dispatch
Core/Src/stm32f4xx_it.c - STM32F446RE
Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f446xx.h - STM32 HAL
Drivers/STM32F4xx_HAL_Driver - Application flash layout
STM32F446RETx_FLASH.ld
OpenBLT bootloader
Separately built CAN-update firmware.
- Bootloader build
openblt_f446re/Makefile - Bootloader entry
openblt_f446re/Core/Src/main.c - Boot lifecycle
openblt_f446re/Core/Src/BLT/boot.c - CAN update transport
openblt_f446re/Core/Src/BLT/can.c - Update protocol
openblt_f446re/Core/Src/BLT/xcp.c - Flash programming
openblt_f446re/Core/Src/BLT/flash.c
Other components
- BootCommander · Uses libopenblt to deliver field updates.
- OpenOCD / ST-LINK
openocd.cfg
Connections 26
- Application build → Application orchestration: builds
- Application build → Application flash layout: links with
- Startup vectors → System initialization: starts
- System initialization → Application orchestration: enters
- Application orchestration → Board support: initializes
- Application orchestration → Dashboard UI: runs
- Application orchestration → Vehicle CAN: uses
- Application orchestration → Watchdog: services
- Board support → Peripheral drivers: configures
- App configuration → Application orchestration: configures
- Physical input → Dashboard UI: input
- Dashboard UI → LCD output: renders to
- Dashboard UI → Peripheral drivers: drives analog I/O
- Vehicle CAN → Dashboard UI: vehicle data
- Interrupt dispatch → Vehicle CAN: dispatches events
- STM32 HAL → Board support: hardware API
- STM32F446RE → Startup vectors: target
- Bootloader build → Bootloader entry: builds
- Bootloader entry → Boot lifecycle: runs
- Boot lifecycle → Application orchestration: hands off to image
- BootCommander → CAN update transport: CAN update
- CAN update transport → Update protocol: carries
- Update protocol → Flash programming: authorizes image
- Flash programming → Boot lifecycle: stores application
- OpenOCD / ST-LINK → Application build: flashes image
- OpenOCD / ST-LINK → Bootloader build: installs bootloader