ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
main.c File Reference

CPU0 (M85) Secure world bootloader/fallback for the e-reader. More...

#include <stdint.h>
#include "ra8_boot_entry.h"
Include dependency graph for main.c:

Go to the source code of this file.

Functions

void main (void)
 Secure fallback main entry point.

Variables

volatile uint32_t g_ra8_secure_fallback_count = 0U
 Diagnostic counter incremented if Secure fallback main is reached.

Detailed Description

CPU0 (M85) Secure world bootloader/fallback for the e-reader.

Tag
[Ring 6 / APP] {World: S}

On normal execution, this function is not reached. SystemInit calls ra8_trustzone_init, which configures the SAU regions and transitions the CPU to the Non-Secure world to run the actual e-reader firmware.

If the transition fails or is bypassed (e.g. on off-target builds), main() runs as a fallback, increments a diagnostic counter, and parks the CPU safely.

Since
0.1.0

Definition in file main.c.

Function Documentation

◆ main()

Variable Documentation

◆ g_ra8_secure_fallback_count

volatile uint32_t g_ra8_secure_fallback_count = 0U

Diagnostic counter incremented if Secure fallback main is reached.

Since
0.1.0

Definition at line 31 of file main.c.

Referenced by main().