How oshe-github/ups works
This repository is an early STM32L1 firmware scaffold for a Raspberry Pi UPS hat, not a finished UPS controller. The visible workflow is MCU startup and peripheral configuration; the README does not describe battery monitoring, power-fail handling, or host communication, and the sampled application excerpt does not establish those behaviors. The map therefore focuses on the firmware entry point and its platform layers. Several platform components are represented by their existing source directories because their implementation files were not sampled; links are limited to relationships shown in the excerpts or source index.
Main entry points: Inc HAL interfaces · stm32l1xx.h STM32L1 device · main.h App definitions · main.c Firmware entry
Components 13
Application
- Firmware entry
STM32CubeIDE/Core/Src/main.c - App definitions
STM32CubeIDE/Core/Inc/main.h
STM32 Platform
- HAL configuration
STM32CubeIDE/Core/Inc/stm32l1xx_hal_conf.h - Interrupt handlers
STM32CubeIDE/Core/Src/stm32l1xx_it.c - Peripheral setup
STM32CubeIDE/Core/Src/stm32l1xx_hal_msp.c - HAL drivers
STM32CubeIDE/Drivers/STM32L1xx_HAL_Driver/Src - HAL interfaces
STM32CubeIDE/Drivers/STM32L1xx_HAL_Driver/Inc - STM32L1 device
STM32CubeIDE/Drivers/CMSIS/Device/ST/STM32L1xx/Include/stm32l1xx.h - L152 definitions
STM32CubeIDE/Drivers/CMSIS/Device/ST/STM32L1xx/Include/stm32l152xc.h - CMSIS core support
STM32CubeIDE/Drivers/CMSIS/Include - System initialization
STM32CubeIDE/Core/Src/system_stm32l1xx.c
Runtime Support
- C syscall stubs
STM32CubeIDE/Core/Src/syscalls.c - Heap support
STM32CubeIDE/Core/Src/sysmem.c
Connections 11
- Firmware entry → App definitions: includes
STM32CubeIDE/Core/Src/main.c - Firmware entry → HAL drivers: initializes peripherals
STM32CubeIDE/Core/Src/main.c - App definitions → HAL interfaces: includes HAL
STM32CubeIDE/Core/Inc/main.h - HAL configuration → HAL interfaces: configures modules
STM32CubeIDE/Core/Inc/stm32l1xx_hal_conf.h - Interrupt handlers → App definitions: includes
STM32CubeIDE/Core/Src/stm32l1xx_it.c - Peripheral setup → App definitions: includes
STM32CubeIDE/Core/Src/stm32l1xx_hal_msp.c - HAL drivers → HAL interfaces: implements APIs
STM32CubeIDE/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_i2c.c - HAL interfaces → STM32L1 device: uses device layer
STM32CubeIDE/Drivers/STM32L1xx_HAL_Driver/Inc/stm32l1xx_hal_def.h - STM32L1 device → L152 definitions: selects definitions
STM32CubeIDE/Drivers/CMSIS/Device/ST/STM32L1xx/Include/stm32l1xx.h - STM32L1 device → HAL interfaces: included by HAL
STM32CubeIDE/Drivers/CMSIS/Device/ST/STM32L1xx/Include/stm32l1xx.h - System initialization → STM32L1 device: uses device definitions
STM32CubeIDE/Core/Src/system_stm32l1xx.c