# wolfssl/wolfboot-examples architecture

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

- Interactive diagram: https://gitdiagram.com/wolfssl/wolfboot-examples
- Repository: https://github.com/wolfssl/wolfboot-examples

## Overview

wolfBoot-examples is a collection of embedded secure-boot demonstrations, not one application: each example shows a different way to deliver an update or measure boot state. The README documents six capabilities, from Contiki DTLS and FreeRTOS HTTPS/SCP to RIOT USB, BLE GATT, and STM32 measured boot. The graph preserves those branches and points to source files where available. Source excerpts are incomplete, so internal calls and detailed stage-to-stage flows are omitted where they are not evidenced.

Main entry points: [`contiki-nrf52/dtls-ota/dtls-ota.c`](https://github.com/wolfssl/wolfboot-examples/blob/master/contiki-nrf52/dtls-ota/dtls-ota.c) (nRF52 updater), [`freeRTOS-Freescale-K64F-https-TLS1.3/src/main.c`](https://github.com/wolfssl/wolfboot-examples/blob/master/freeRTOS-Freescale-K64F-https-TLS1.3/src/main.c) (HTTPS updater), [`freeRTOS-Freescale-K64F-scp/src/main.c`](https://github.com/wolfssl/wolfboot-examples/blob/master/freeRTOS-Freescale-K64F-scp/src/main.c) (SCP updater), [`riotOS-samr21/fw-update/main.c`](https://github.com/wolfssl/wolfboot-examples/blob/master/riotOS-samr21/fw-update/main.c) (SAM-R21 updater)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_contiki["Contiki DTLS OTA"]
  node_contiki_device["nRF52 updater<br/>[dtls-ota.c]"]
  node_contiki_server["OTA server<br/>[ota-server.c]"]
end

subgraph group_freertos["FreeRTOS K64F"]
  node_https_app["HTTPS updater<br/>[main.c]"]
  node_scp_app["SCP updater<br/>[main.c]"]
end

subgraph group_riot["RIOT updates"]
  node_sam_device["SAM-R21 updater<br/>[main.c]"]
  node_sam_server["USB update server<br/>[server.c]"]
end

subgraph group_ble["BLE GATT FOTA"]
  node_ble_host["BlueZ updater<br/>[fwupdate.py]"]
  node_ble_service["nRF52 GATT service<br/>[gatt-srv.c]"]
  node_ble_boot["Boot integration<br/>[libwolfboot.c]"]
end

subgraph group_sim["Simulated OTA"]
  node_sim_client["MQTT firmware client<br/>[fwclient.c]"]
  node_sim_server["MQTT firmware server<br/>[fwpush.c]"]
  node_sim_hal["Simulation HAL<br/>[sim.c]"]
end

subgraph group_measured["Measured boot"]
  node_measured_demo["STM32 measured boot<br/>[app_stm32f4.c]"]
end

node_user(("Update initiator"))

node_user -->|"initiates update"| node_contiki_device
node_user -->|"initiates update"| node_https_app
node_user -->|"initiates update"| node_scp_app
node_user -->|"initiates update"| node_sam_device
node_user -->|"requests FOTA"| node_ble_service
node_user -->|"runs demo"| node_measured_demo

click node_contiki_device "https://github.com/wolfssl/wolfboot-examples/blob/master/contiki-nrf52/dtls-ota/dtls-ota.c"
click node_contiki_server "https://github.com/wolfssl/wolfboot-examples/blob/master/contiki-nrf52/ota-server/ota-server.c"
click node_https_app "https://github.com/wolfssl/wolfboot-examples/blob/master/freeRTOS-Freescale-K64F-https-TLS1.3/src/main.c"
click node_scp_app "https://github.com/wolfssl/wolfboot-examples/blob/master/freeRTOS-Freescale-K64F-scp/src/main.c"
click node_sam_device "https://github.com/wolfssl/wolfboot-examples/blob/master/riotOS-samr21/fw-update/main.c"
click node_sam_server "https://github.com/wolfssl/wolfboot-examples/blob/master/riotOS-samr21/fw-update-server/server.c"
click node_ble_host "https://github.com/wolfssl/wolfboot-examples/blob/master/riotOS-nrf52840dk-ble/linux-bluez/fwupdate.py"
click node_ble_service "https://github.com/wolfssl/wolfboot-examples/blob/master/riotOS-nrf52840dk-ble/nrf52-gatt-service/gatt-srv.c"
click node_ble_boot "https://github.com/wolfssl/wolfboot-examples/blob/master/riotOS-nrf52840dk-ble/nrf52-gatt-service/libwolfboot/libwolfboot.c"
click node_sim_client "https://github.com/wolfssl/wolfboot-examples/blob/master/sim-OTA/app/fwclient.c"
click node_sim_server "https://github.com/wolfssl/wolfboot-examples/blob/master/sim-OTA/fwserver/fwpush.c"
click node_sim_hal "https://github.com/wolfssl/wolfboot-examples/blob/master/sim-OTA/hal-sim/sim.c"
click node_measured_demo "https://github.com/wolfssl/wolfboot-examples/blob/master/test-app-STM32F4-measured-boot/src/app_stm32f4.c"

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_contiki_device,node_contiki_server toneBlue
class node_https_app,node_scp_app toneAmber
class node_sam_device,node_sam_server toneMint
class node_ble_host,node_ble_service,node_ble_boot toneRose
class node_sim_client,node_sim_server,node_sim_hal,node_user toneIndigo
class node_measured_demo toneTeal
```

## Components

### Contiki DTLS OTA

- [nRF52 updater](https://github.com/wolfssl/wolfboot-examples/blob/master/contiki-nrf52/dtls-ota/dtls-ota.c): `contiki-nrf52/dtls-ota/dtls-ota.c`
- [OTA server](https://github.com/wolfssl/wolfboot-examples/blob/master/contiki-nrf52/ota-server/ota-server.c): `contiki-nrf52/ota-server/ota-server.c`

### FreeRTOS K64F

- [HTTPS updater](https://github.com/wolfssl/wolfboot-examples/blob/master/freeRTOS-Freescale-K64F-https-TLS1.3/src/main.c): `freeRTOS-Freescale-K64F-https-TLS1.3/src/main.c`
- [SCP updater](https://github.com/wolfssl/wolfboot-examples/blob/master/freeRTOS-Freescale-K64F-scp/src/main.c): `freeRTOS-Freescale-K64F-scp/src/main.c`

### RIOT updates

- [SAM-R21 updater](https://github.com/wolfssl/wolfboot-examples/blob/master/riotOS-samr21/fw-update/main.c): `riotOS-samr21/fw-update/main.c`
- [USB update server](https://github.com/wolfssl/wolfboot-examples/blob/master/riotOS-samr21/fw-update-server/server.c): `riotOS-samr21/fw-update-server/server.c`

### BLE GATT FOTA

- [BlueZ updater](https://github.com/wolfssl/wolfboot-examples/blob/master/riotOS-nrf52840dk-ble/linux-bluez/fwupdate.py): `riotOS-nrf52840dk-ble/linux-bluez/fwupdate.py`
- [nRF52 GATT service](https://github.com/wolfssl/wolfboot-examples/blob/master/riotOS-nrf52840dk-ble/nrf52-gatt-service/gatt-srv.c): `riotOS-nrf52840dk-ble/nrf52-gatt-service/gatt-srv.c`
- [Boot integration](https://github.com/wolfssl/wolfboot-examples/blob/master/riotOS-nrf52840dk-ble/nrf52-gatt-service/libwolfboot/libwolfboot.c): `riotOS-nrf52840dk-ble/nrf52-gatt-service/libwolfboot/libwolfboot.c`

### Simulated OTA

- [MQTT firmware client](https://github.com/wolfssl/wolfboot-examples/blob/master/sim-OTA/app/fwclient.c): `sim-OTA/app/fwclient.c`
- [MQTT firmware server](https://github.com/wolfssl/wolfboot-examples/blob/master/sim-OTA/fwserver/fwpush.c): `sim-OTA/fwserver/fwpush.c`
- [Simulation HAL](https://github.com/wolfssl/wolfboot-examples/blob/master/sim-OTA/hal-sim/sim.c): `sim-OTA/hal-sim/sim.c`

### Measured boot

- [STM32 measured boot](https://github.com/wolfssl/wolfboot-examples/blob/master/test-app-STM32F4-measured-boot/src/app_stm32f4.c): `test-app-STM32F4-measured-boot/src/app_stm32f4.c`

### Other components

- **Update initiator**

## Connections

- Update initiator → nRF52 updater: initiates update
- Update initiator → HTTPS updater: initiates update
- Update initiator → SCP updater: initiates update
- Update initiator → SAM-R21 updater: initiates update
- Update initiator → nRF52 GATT service: requests FOTA
- Update initiator → STM32 measured boot: runs demo
