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

Injected flash backend (so tests do not need real MRAM). More...

#include <ra8_ota.h>

Data Fields

ra8_err_t(* erase )(void *ctx, uint32_t addr, uint32_t len)
 Erase len bytes starting at addr in the inactive bank.
ra8_err_t(* program )(void *ctx, uint32_t addr, const uint8_t *src, uint32_t len)
 Program len bytes at addr (must be 32-byte aligned).
ra8_err_t(* set_startup )(void *ctx, uint8_t which_bank, bool persistent)
 Pick the bank to boot from at the next reset.
ra8_err_t(* readback )(void *ctx, uint32_t addr, uint8_t *dst, uint32_t len)
 Read back len bytes (used by verification re-hash).
uint32_t inactive_bank_addr
 Base address of the inactive bank in the MRAM window.
uint32_t bank_size_bytes
 Size of one bank in bytes.
uint8_t inactive_bank_index
 Bank index set_startup should select on commit.
void * ctx
 Opaque context passed back to every callback.

Detailed Description

Injected flash backend (so tests do not need real MRAM).

The default production wiring is a 4-line shim that forwards to ra8_flash_erase / ra8_flash_write / ra8_flash_set_startup_area and lives outside this module so libs/ra8_ota does not transitively pull in libs/ra8_hal at link time. Unit tests register an in-RAM mock backend.

Definition at line 228 of file ra8_ota.h.

Field Documentation

◆ bank_size_bytes

uint32_t ra8_ota_flash_iface_t::bank_size_bytes

Size of one bank in bytes.

Definition at line 241 of file ra8_ota.h.

Referenced by app_make_cfg(), and internal_validate_cfg_flash().

◆ ctx

void* ra8_ota_flash_iface_t::ctx

Opaque context passed back to every callback.

Definition at line 246 of file ra8_ota.h.

Referenced by app_make_cfg().

◆ erase

ra8_err_t(* ra8_ota_flash_iface_t::erase) (void *ctx, uint32_t addr, uint32_t len)

Erase len bytes starting at addr in the inactive bank.

Definition at line 230 of file ra8_ota.h.

Referenced by app_make_cfg(), and internal_validate_cfg_flash().

◆ inactive_bank_addr

uint32_t ra8_ota_flash_iface_t::inactive_bank_addr

Base address of the inactive bank in the MRAM window.

Definition at line 239 of file ra8_ota.h.

Referenced by app_make_cfg().

◆ inactive_bank_index

uint8_t ra8_ota_flash_iface_t::inactive_bank_index

Bank index set_startup should select on commit.

Definition at line 243 of file ra8_ota.h.

Referenced by app_make_cfg().

◆ program

ra8_err_t(* ra8_ota_flash_iface_t::program) (void *ctx, uint32_t addr, const uint8_t *src, uint32_t len)

Program len bytes at addr (must be 32-byte aligned).

Definition at line 232 of file ra8_ota.h.

Referenced by app_make_cfg(), and internal_validate_cfg_flash().

◆ readback

ra8_err_t(* ra8_ota_flash_iface_t::readback) (void *ctx, uint32_t addr, uint8_t *dst, uint32_t len)

Read back len bytes (used by verification re-hash).

Definition at line 236 of file ra8_ota.h.

Referenced by app_make_cfg(), and internal_validate_cfg_flash().

◆ set_startup

ra8_err_t(* ra8_ota_flash_iface_t::set_startup) (void *ctx, uint8_t which_bank, bool persistent)

Pick the bank to boot from at the next reset.

Definition at line 234 of file ra8_ota.h.

Referenced by app_make_cfg(), and internal_validate_cfg_flash().


The documentation for this struct was generated from the following file: