# mkmike07/embed2 architecture

> Architecture diagram of the GitHub repository mkmike07/embed2, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mkmike07/embed2
- Repository: https://github.com/mkmike07/embed2

## Overview

SJSU-Dev2 is a cross-platform C++ firmware framework. The main workflow is an application using common framework interfaces and device drivers, backed by platform-specific startup, system-control, and peripheral implementations; results can be logged or presented through devices and graphics. The tree and README also show storage, networking, and FreeRTOS support. Edges are limited to README statements and relationships listed in the SOURCE INDEX; unsampled modules are represented at their enclosing directories, without asserting unverified calls.

Main entry points: [`library/peripherals`](https://github.com/mkmike07/embed2/tree/master/library/peripherals) (Platform Controllers), [`library/peripherals/system_controller.hpp`](https://github.com/mkmike07/embed2/blob/master/library/peripherals/system_controller.hpp) (System Controller API), [`library/utility/log.hpp`](https://github.com/mkmike07/embed2/blob/master/library/utility/log.hpp) (Logging), [`projects/hello_world/source/main.cpp`](https://github.com/mkmike07/embed2/blob/master/projects/hello_world/source/main.cpp) (Firmware Application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Applications"]
  node_application["Firmware Application<br/>[main.cpp]"]
end

subgraph group_core["Framework Core"]
  node_module["Module Lifecycle<br/>[module.hpp]"]
  node_configuration["Framework Configuration<br/>[config.hpp]"]
  node_system_controller["System Controller API"]
  node_peripheral_api["Peripheral Interfaces"]
  node_storage["Storage Interface<br/>[storage.hpp]"]
end

subgraph group_platform["Platform Support"]
  node_startup["Startup Runtime<br/>[startup.hpp]"]
  node_platform_controller["Platform Controllers"]
  node_target_registers["MCU Register Definitions"]
  node_cortex_core["Cortex-M Core<br/>[core_cm4.h]"]
  node_peripheral_impl["MCU Peripheral Drivers"]
end

subgraph group_devices["Device Drivers"]
  node_device_drivers["Sensors and Actuators"]
  node_communication["Network and Communication"]
  node_sd_driver["SD Card Driver<br/>[sd.hpp]"]
  node_graphics["Graphics System<br/>[graphics.hpp]"]
  node_display_drivers["Display Drivers"]
end

subgraph group_services["Runtime Services"]
  node_rtos["FreeRTOS Support"]
  node_logging["Logging<br/>[log.hpp]"]
  node_debug["Debug Utilities<br/>[debug.hpp]"]
  node_error_handling["Error Handling<br/>[error_handling.hpp]"]
  node_time["Time Utilities<br/>[time.hpp]"]
  node_units["Physical Units<br/>[units.hpp]"]
  node_build_info["Build Information<br/>[build_info.hpp]"]
  node_enum["Enum Utilities<br/>[enum.hpp]"]
  node_bit["Bit Utilities<br/>[bit.hpp]"]
end

node_user(("Firmware Developer"))

node_user -->|"develops"| node_application
node_application -->|"uses"| node_logging
node_application -->|"uses"| node_time
node_startup -->|"uses"| node_build_info
node_startup -.->|"starts"| node_application
node_platform_controller -->|"implements"| node_system_controller
node_platform_controller -->|"accesses"| node_target_registers
node_target_registers -->|"includes"| node_cortex_core
node_peripheral_impl -.->|"implements"| node_peripheral_api
node_device_drivers -.->|"uses"| node_module
node_communication -.->|"provides"| node_device_drivers
node_sd_driver -->|"uses"| node_storage
node_graphics -->|"uses"| node_display_drivers
node_rtos -->|"uses"| node_error_handling
node_debug -->|"uses"| node_configuration
node_debug -->|"uses"| node_build_info
node_logging -->|"uses"| node_configuration
node_logging -->|"uses"| node_error_handling
node_logging -->|"uses"| node_time
node_time -->|"uses"| node_units
node_time -->|"uses"| node_build_info
node_configuration -->|"uses"| node_units
node_system_controller -->|"uses"| node_error_handling
node_system_controller -->|"uses"| node_units
node_platform_controller -->|"implements"| node_system_controller
node_platform_controller -->|"implements"| node_system_controller
node_platform_controller -->|"implements"| node_system_controller
node_platform_controller -->|"implements"| node_system_controller
node_platform_controller -->|"uses"| node_bit
node_platform_controller -->|"uses"| node_enum

click node_application "https://github.com/mkmike07/embed2/blob/master/projects/hello_world/source/main.cpp"
click node_startup "https://github.com/mkmike07/embed2/blob/master/library/platforms/utility/startup.hpp"
click node_module "https://github.com/mkmike07/embed2/blob/master/library/module.hpp"
click node_configuration "https://github.com/mkmike07/embed2/blob/master/library/config.hpp"
click node_system_controller "https://github.com/mkmike07/embed2/blob/master/library/peripherals/system_controller.hpp"
click node_platform_controller "https://github.com/mkmike07/embed2/tree/master/library/peripherals"
click node_target_registers "https://github.com/mkmike07/embed2/tree/master/library/platforms/targets"
click node_cortex_core "https://github.com/mkmike07/embed2/blob/master/library/platforms/processors/arm_cortex/m4/core_cm4.h"
click node_peripheral_api "https://github.com/mkmike07/embed2/tree/master/library/peripherals"
click node_peripheral_impl "https://github.com/mkmike07/embed2/tree/master/library/peripherals"
click node_device_drivers "https://github.com/mkmike07/embed2/tree/master/library/devices"
click node_communication "https://github.com/mkmike07/embed2/tree/master/library/devices/communication"
click node_storage "https://github.com/mkmike07/embed2/blob/master/library/peripherals/storage.hpp"
click node_sd_driver "https://github.com/mkmike07/embed2/blob/master/library/devices/memory/sd.hpp"
click node_graphics "https://github.com/mkmike07/embed2/blob/master/library/systems/graphics/graphics.hpp"
click node_display_drivers "https://github.com/mkmike07/embed2/tree/master/library/devices/displays"
click node_rtos "https://github.com/mkmike07/embed2/tree/master/library/utility/rtos/freertos"
click node_logging "https://github.com/mkmike07/embed2/blob/master/library/utility/log.hpp"
click node_debug "https://github.com/mkmike07/embed2/blob/master/library/utility/debug.hpp"
click node_error_handling "https://github.com/mkmike07/embed2/blob/master/library/utility/error_handling.hpp"
click node_time "https://github.com/mkmike07/embed2/blob/master/library/utility/time/time.hpp"
click node_units "https://github.com/mkmike07/embed2/blob/master/library/utility/math/units.hpp"
click node_build_info "https://github.com/mkmike07/embed2/blob/master/library/utility/build_info.hpp"
click node_enum "https://github.com/mkmike07/embed2/blob/master/library/utility/enum.hpp"
click node_bit "https://github.com/mkmike07/embed2/blob/master/library/utility/math/bit.hpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_application toneBlue
class node_module,node_configuration,node_system_controller,node_peripheral_api,node_storage toneAmber
class node_startup,node_platform_controller,node_target_registers,node_cortex_core,node_peripheral_impl toneMint
class node_device_drivers,node_communication,node_sd_driver,node_graphics,node_display_drivers toneRose
class node_rtos,node_logging,node_debug,node_error_handling,node_time,node_units,node_build_info,node_enum,node_bit,node_user toneIndigo
```

## Components

### Applications

- [Firmware Application](https://github.com/mkmike07/embed2/blob/master/projects/hello_world/source/main.cpp): `projects/hello_world/source/main.cpp`

### Framework Core

- [Module Lifecycle](https://github.com/mkmike07/embed2/blob/master/library/module.hpp): `library/module.hpp`
- [Framework Configuration](https://github.com/mkmike07/embed2/blob/master/library/config.hpp): `library/config.hpp`
- [System Controller API](https://github.com/mkmike07/embed2/blob/master/library/peripherals/system_controller.hpp): `library/peripherals/system_controller.hpp`
- [Peripheral Interfaces](https://github.com/mkmike07/embed2/tree/master/library/peripherals): `library/peripherals`
- [Storage Interface](https://github.com/mkmike07/embed2/blob/master/library/peripherals/storage.hpp): `library/peripherals/storage.hpp`

### Platform Support

- [Startup Runtime](https://github.com/mkmike07/embed2/blob/master/library/platforms/utility/startup.hpp): `library/platforms/utility/startup.hpp`
- [Platform Controllers](https://github.com/mkmike07/embed2/tree/master/library/peripherals): `library/peripherals`
- [MCU Register Definitions](https://github.com/mkmike07/embed2/tree/master/library/platforms/targets): `library/platforms/targets`
- [Cortex-M Core](https://github.com/mkmike07/embed2/blob/master/library/platforms/processors/arm_cortex/m4/core_cm4.h): `library/platforms/processors/arm_cortex/m4/core_cm4.h`
- [MCU Peripheral Drivers](https://github.com/mkmike07/embed2/tree/master/library/peripherals): `library/peripherals`

### Device Drivers

- [Sensors and Actuators](https://github.com/mkmike07/embed2/tree/master/library/devices): `library/devices`
- [Network and Communication](https://github.com/mkmike07/embed2/tree/master/library/devices/communication): `library/devices/communication`
- [SD Card Driver](https://github.com/mkmike07/embed2/blob/master/library/devices/memory/sd.hpp): `library/devices/memory/sd.hpp`
- [Graphics System](https://github.com/mkmike07/embed2/blob/master/library/systems/graphics/graphics.hpp): `library/systems/graphics/graphics.hpp`
- [Display Drivers](https://github.com/mkmike07/embed2/tree/master/library/devices/displays): `library/devices/displays`

### Runtime Services

- [FreeRTOS Support](https://github.com/mkmike07/embed2/tree/master/library/utility/rtos/freertos): `library/utility/rtos/freertos`
- [Logging](https://github.com/mkmike07/embed2/blob/master/library/utility/log.hpp): `library/utility/log.hpp`
- [Debug Utilities](https://github.com/mkmike07/embed2/blob/master/library/utility/debug.hpp): `library/utility/debug.hpp`
- [Error Handling](https://github.com/mkmike07/embed2/blob/master/library/utility/error_handling.hpp): `library/utility/error_handling.hpp`
- [Time Utilities](https://github.com/mkmike07/embed2/blob/master/library/utility/time/time.hpp): `library/utility/time/time.hpp`
- [Physical Units](https://github.com/mkmike07/embed2/blob/master/library/utility/math/units.hpp): `library/utility/math/units.hpp`
- [Build Information](https://github.com/mkmike07/embed2/blob/master/library/utility/build_info.hpp): `library/utility/build_info.hpp`
- [Enum Utilities](https://github.com/mkmike07/embed2/blob/master/library/utility/enum.hpp): `library/utility/enum.hpp`
- [Bit Utilities](https://github.com/mkmike07/embed2/blob/master/library/utility/math/bit.hpp): `library/utility/math/bit.hpp`

### Other components

- **Firmware Developer**

## Connections

- Firmware Developer → Firmware Application: develops
- Firmware Application → Logging: uses (evidence: `projects/hello_world/source/main.cpp`)
- Firmware Application → Time Utilities: uses (evidence: `projects/hello_world/source/main.cpp`)
- Startup Runtime → Build Information: uses (evidence: `library/platforms/utility/startup.hpp`)
- Startup Runtime → Firmware Application: starts
- Platform Controllers → System Controller API: implements (evidence: `library/peripherals/lpc17xx/system_controller.hpp`)
- Platform Controllers → MCU Register Definitions: accesses (evidence: `library/peripherals/lpc17xx/system_controller.hpp`)
- MCU Register Definitions → Cortex-M Core: includes (evidence: `library/platforms/targets/lpc40xx/LPC40xx.h`)
- MCU Peripheral Drivers → Peripheral Interfaces: implements
- Sensors and Actuators → Module Lifecycle: uses (evidence: `library/devices/communication/esp8266.hpp`)
- Network and Communication → Sensors and Actuators: provides (evidence: `library/devices/communication/esp8266.hpp`)
- SD Card Driver → Storage Interface: uses (evidence: `library/devices/memory/sd.hpp`)
- Graphics System → Display Drivers: uses (evidence: `library/systems/graphics/graphics.hpp`)
- FreeRTOS Support → Error Handling: uses (evidence: `library/testing/testing_frameworks.hpp`)
- Debug Utilities → Framework Configuration: uses (evidence: `library/utility/debug.hpp`)
- Debug Utilities → Build Information: uses (evidence: `library/utility/debug.hpp`)
- Logging → Framework Configuration: uses (evidence: `library/utility/log.hpp`)
- Logging → Error Handling: uses (evidence: `library/utility/log.hpp`)
- Logging → Time Utilities: uses (evidence: `library/utility/log.hpp`)
- Time Utilities → Physical Units: uses (evidence: `library/utility/time/time.hpp`)
- Time Utilities → Build Information: uses (evidence: `library/utility/time/time.hpp`)
- Framework Configuration → Physical Units: uses (evidence: `library/config.hpp`)
- System Controller API → Error Handling: uses (evidence: `library/peripherals/system_controller.hpp`)
- System Controller API → Physical Units: uses (evidence: `library/peripherals/system_controller.hpp`)
- Platform Controllers → System Controller API: implements (evidence: `library/peripherals/lpc40xx/system_controller.hpp`)
- Platform Controllers → System Controller API: implements (evidence: `library/peripherals/msp432p401r/system_controller.hpp`)
- Platform Controllers → System Controller API: implements (evidence: `library/peripherals/stm32f10x/system_controller.hpp`)
- Platform Controllers → System Controller API: implements (evidence: `library/peripherals/stm32f4xx/system_controller.hpp`)
- Platform Controllers → Bit Utilities: uses (evidence: `library/peripherals/lpc17xx/system_controller.hpp`)
- Platform Controllers → Enum Utilities: uses (evidence: `library/peripherals/lpc17xx/system_controller.hpp`)
