How oapraprara/ansa-flasher works
This is a desktop firmware-flashing application: users choose a board and firmware version, configure options, then download, verify, and flash firmware over DFU or ST-Link, with progress reported in the UI. The graph separates the React workflow, Tauri command/backend services, embedded ANSA firmware, and STM32/CMSIS platform layers. Source excerpts show key UI calls and backend command dispatch; several backend modules and firmware support files were not sampled, so their internal relationships are omitted.
Main entry points: App.tsx Workflow UI · main.rs Command gateway · dfu_wrapper.rs DFU flashing · main.c ANSA target firmware
Components 23
Desktop interface
- Workflow UI
frontend/src/App.tsx - Board picker
frontend/src/components/BoardPicker.tsx - Version picker
frontend/src/components/VersionPicker.tsx - Customization form
frontend/src/components/CustomizationForm.tsx - Flash confirmation
frontend/src/components/ConfirmationModal.tsx - Flash progress UI
frontend/src/components/FlashingProgress.tsx - Device status
frontend/src/components/DeviceStatusBar.tsx - Success screen
frontend/src/components/SuccessScreen.tsx
Tauri backend
- Command gateway
src-tauri/src/main.rs - Manifest and downloads
src-tauri/src/downloader.rs - Signature verification
src-tauri/src/crypto.rs - DFU flashing
src-tauri/src/dfu_wrapper.rs - ST-Link flashing
src-tauri/src/stlink_wrapper.rs - Progress parser
src-tauri/src/progress_parser.rs - Progress bridge
src-tauri/src/progress_bridge.rs - USB monitor
src-tauri/src/usb_monitor.rs - UART boot check
src-tauri/src/uart_listener.rs
ANSA firmware
- ANSA target firmware
firmware/ANSA/Core/Src/main.c - Board support drivers
firmware/ANSA/Drivers/ANSA_BSP/Src
MCU platform
- STM32 HAL
firmware/ANSA/Drivers/STM32F4xx_HAL_Driver/Inc - CMSIS device and core
firmware/ANSA/Drivers/CMSIS
Other components
- User
- Firmware host
Connections 22
- User → Workflow UI: uses
- Workflow UI → Board picker: renders
frontend/src/App.tsx - Workflow UI → Version picker: renders
frontend/src/App.tsx - Workflow UI → Customization form: renders
frontend/src/App.tsx - Workflow UI → Flash confirmation: renders
frontend/src/App.tsx - Workflow UI → Flash progress UI: renders
frontend/src/App.tsx - Workflow UI → Device status: renders
frontend/src/App.tsx - Workflow UI → Success screen: renders
frontend/src/App.tsx - Workflow UI → Command gateway: invokes commands
frontend/src/App.tsx - Command gateway → Manifest and downloads: dispatches downloads
src-tauri/src/main.rs - Command gateway → Signature verification: dispatches verification
src-tauri/src/main.rs - Command gateway → DFU flashing: dispatches flashing
src-tauri/src/main.rs - Command gateway → ST-Link flashing: dispatches flashing
src-tauri/src/main.rs - Command gateway → USB monitor: starts monitor
src-tauri/src/main.rs - Command gateway → UART boot check: dispatches boot check
src-tauri/src/main.rs - Manifest and downloads → Firmware host: fetches firmware
src-tauri/src/downloader.rs - DFU flashing → Progress parser: uses parser
src-tauri/src/dfu_wrapper.rs - DFU flashing → Progress bridge: uses bridge
src-tauri/src/dfu_wrapper.rs - ST-Link flashing → Progress bridge: uses bridge
src-tauri/src/stlink_wrapper.rs - ANSA target firmware → STM32 HAL: initializes peripherals
firmware/ANSA/Core/Src/main.c - STM32 HAL → CMSIS device and core: uses device definitions
firmware/ANSA/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h - ANSA target firmware → Board support drivers: uses board drivers