# infineon/mtb-example-ce240783-secureboot architecture

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

- Interactive diagram: https://gitdiagram.com/infineon/mtb-example-ce240783-secureboot
- Repository: https://github.com/infineon/mtb-example-ce240783-secureboot

## Overview

This is a PSOC Control MCU secure-boot example: its documented goal is to provision boot policy and an OEM key, sign an application image, and have BootROM verify it before launch. After launch, the demo reports boot status over UART and blinks the user LED; terminal Enter input pauses or resumes blinking. The README also describes an optional Edge Protect Bootloader (EPB) verification stage. Signing and provisioning are documented product stages, though their implementation details were not sampled; the runtime links below are visible in main.c.

Main entry points: [`main.c`](https://github.com/infineon/mtb-example-ce240783-secureboot/blob/master/main.c) (Application runtime), [`secureboot_policy/policy_oem_provisioning.json`](https://github.com/infineon/mtb-example-ce240783-secureboot/blob/master/secureboot_policy/policy_oem_provisioning.json) (OEM provisioning), [`postbuild.mk`](https://github.com/infineon/mtb-example-ce240783-secureboot/blob/master/postbuild.mk) (Image signing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_boot["Secure boot"]
  node_oem["OEM provisioning"]
  node_sign["Image signing<br/>[postbuild.mk]"]
  node_image["Signed application<br/>[main.c]"]
  node_bootrom{{"BootROM"}}
  node_epb{{"Edge Protect Bootloader"}}
end

subgraph group_demo["Running demo"]
  node_runtime["Application runtime<br/>[main.c]"]
  node_terminal(("Serial terminal"))
  node_timer["Blink timer and ISR<br/>[main.c]"]
  node_led(("User LED"))
end

node_oem -.->|"sets policy"| node_bootrom
node_sign -.->|"signs image"| node_image
node_bootrom -->|"verifies then launches"| node_image
node_bootrom -.->|"validates"| node_epb
node_epb -.->|"verifies and launches"| node_image
node_image -->|"runs"| node_runtime
node_runtime -->|"prints status; reads input"| node_terminal
node_runtime -->|"configures and controls"| node_timer
node_timer -->|"toggles"| node_led
node_terminal -->|"Enter input"| node_runtime

click node_oem "https://github.com/infineon/mtb-example-ce240783-secureboot/blob/master/secureboot_policy/policy_oem_provisioning.json"
click node_sign "https://github.com/infineon/mtb-example-ce240783-secureboot/blob/master/postbuild.mk"
click node_image "https://github.com/infineon/mtb-example-ce240783-secureboot/blob/master/main.c"
click node_runtime "https://github.com/infineon/mtb-example-ce240783-secureboot/blob/master/main.c"
click node_timer "https://github.com/infineon/mtb-example-ce240783-secureboot/blob/master/main.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_oem,node_sign,node_image,node_bootrom,node_epb toneBlue
class node_runtime,node_terminal,node_timer,node_led toneAmber
```

## Components

### Secure boot

- [OEM provisioning](https://github.com/infineon/mtb-example-ce240783-secureboot/blob/master/secureboot_policy/policy_oem_provisioning.json): `secureboot_policy/policy_oem_provisioning.json`
- [Image signing](https://github.com/infineon/mtb-example-ce240783-secureboot/blob/master/postbuild.mk): `postbuild.mk`
- [Signed application](https://github.com/infineon/mtb-example-ce240783-secureboot/blob/master/main.c): `main.c`
- **BootROM**
- **Edge Protect Bootloader**

### Running demo

- [Application runtime](https://github.com/infineon/mtb-example-ce240783-secureboot/blob/master/main.c): `main.c`
- **Serial terminal**
- [Blink timer and ISR](https://github.com/infineon/mtb-example-ce240783-secureboot/blob/master/main.c): `main.c`
- **User LED**

## Connections

- OEM provisioning → BootROM: sets policy
- Image signing → Signed application: signs image (evidence: `main.c`)
- BootROM → Signed application: verifies then launches (evidence: `README.md`)
- BootROM → Edge Protect Bootloader: validates (evidence: `README.md`)
- Edge Protect Bootloader → Signed application: verifies and launches (evidence: `README.md`)
- Signed application → Application runtime: runs (evidence: `README.md`)
- Application runtime → Serial terminal: prints status; reads input (evidence: `main.c`)
- Application runtime → Blink timer and ISR: configures and controls (evidence: `main.c`)
- Blink timer and ISR → User LED: toggles (evidence: `main.c`)
- Serial terminal → Application runtime: Enter input (evidence: `main.c`)
