How smoothieware/smoothiev2 works
Smoothie V2 is STM32H745/H743 motion-control firmware built on STM32 HAL and FreeRTOS. The primary runtime path is startup and configuration, followed by command handling and motion execution through the robot, planner, and conveyor. The repository also includes networking, SD/FatFs support, and a USB DFU bootloader. The excerpts establish only part of the wiring; dashed, uncited edges mark plausible but unverified links, and unsampled subsystems are represented at their supported directory paths.
Main entry points: main.cpp Firmware startup · Robot.cpp Robot actuators · src Motion planner · CommandShell.h Command shell
Components 18
Firmware runtime
- Firmware startup
Firmware/src/main.cpp - Configuration
Firmware/src/ConfigReader.h - Command shell
Firmware/src/CommandShell.h - G-code processing
Firmware/src/GCodeProcessor.h - Command dispatcher
Firmware/src/Dispatcher.h - Consoles
Firmware/src/Consoles.h - Output stream
Firmware/src/libs/OutputStream.h
Motion control
- Robot actuators
Firmware/src/robot/Robot.cpp - Motion planner
Firmware/src - Motion conveyor
Firmware/src/robot/Conveyor.h
Platform services
- STM32 HAL
Firmware/Hal/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal.h - FreeRTOS kernel
Firmware/RTOS/include - USB DFU bootloader
DFUBootloader/Src/main.c - SD and FatFs
Firmware/Hal/sdmmc/src
Networking
- FreeRTOS networking
Firmware/Hal/network/FreeRTOS_IP.c - Network services
Firmware/Hal/network/services - NTP client
Firmware/src/modules/utils/network/ntpclient.cpp
Other components
- Operator
Connections 17
- Operator → Consoles: sends commands
- Firmware startup → Configuration: configures modules
Firmware/src/main.cpp - Firmware startup → Robot actuators: initializes
Firmware/src/main.cpp - Firmware startup → Motion planner: initializes
Firmware/src/main.cpp - Firmware startup → Motion conveyor: starts
Firmware/src/main.cpp - Firmware startup → Command shell: creates
Firmware/src/main.cpp - Command shell → G-code processing: accepts commands
- G-code processing → Command dispatcher: dispatches
- Command dispatcher → Robot actuators: controls motion
- Robot actuators → Motion planner: provides motor count
Firmware/src/main.cpp - Motion planner → Motion conveyor: precedes startup
Firmware/src/main.cpp - Consoles → Output stream: writes output
- Firmware startup → STM32 HAL: sets up system
Firmware/src/main.cpp - Firmware startup → FreeRTOS kernel: launches task
Firmware/src/main.cpp - USB DFU bootloader → STM32 HAL: uses hardware layer
DFUBootloader/Src/main.c - NTP client → FreeRTOS networking: uses sockets
Firmware/src/modules/utils/network/ntpclient.cpp - Network services → FreeRTOS networking: uses IP services