|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Option Function Select (OFS) boot-map inventory for the active RA8 device. More...
#include <stdint.h>Go to the source code of this file.
Enumerations | |
| enum | ra8_ofs_word_t : uint8_t { k_ra8_ofs_word_ofs0 = 0U , k_ra8_ofs_word_ofs1 = 1U , k_ra8_ofs_word_ofs2 = 2U , k_ra8_ofs_word_ofs3 = 3U , k_ra8_ofs_word_count = 4U } |
| Ordinal identity of each option-setting word present on this device. More... | |
| enum | ra8_ofs_addr_t : uintptr_t { k_ra8_ofs0_addr = 0x02C9F040UL , k_ra8_ofs3_addr = 0x12C9F4C4UL , k_ra8_ofs3_sec_addr = 0x02C9F0C4UL , k_ra8_ofs3_sel_addr = 0x02C9F124UL } |
| Runtime-readable addresses of the option-setting words. More... | |
Functions | |
| uint8_t | ra8_ofs_word_count (void) |
| Return the number of option-setting words present on the device. | |
Option Function Select (OFS) boot-map inventory for the active RA8 device.
The RA8 boot ROM latches a fixed set of "option-setting" words out of a dedicated config-flash region before the Cortex-M85 reset vector runs. The writable side of those words is emitted by ra8_ofs.c into the .option_setting_* linker sections; ra8_ofs_addr_t below names the same cells for the read-back direction, so this header is the single C-side home for both.
This header is the single C-side source of truth for which OFS words the RA8 parts carry. Both supported parts carry the identical OFS0 / OFS1 / OFS2 / OFS3 quartet, so the inventory is device-invariant:
OFS3 holds the M33-side (CPU1) WDT1 auto-start fields, and both parts have the WDT1 it configures (RA8P1 datasheet R01DS0439EJ0130: "Watchdog Timer (WDT) x 2", WDT1 at 0x4020_2600).
Definition in file ra8_ofs.h.
| enum ra8_ofs_addr_t : uintptr_t |
Runtime-readable addresses of the option-setting words.
These are the addresses a running image loads from to recover what the boot ROM latched. The option-setting words live in the extra-MRAM "Configuration setting area", which is ordinary addressable memory – HUM Ch 7.1 Figure 7.1 "Option-setting memory area" p 279 maps the whole region, and #315 proved on the bench that extra-MRAM cells read back with valid ECC.
Each constant is the address the HUM prints in that register's own section:
| Word | Address | Region | Section | RA8D2 p | RA8P1 p |
|---|---|---|---|---|---|
| OFS0 | 0x02C9_F040 | Secure | 7.2.1 | 280 | 280 |
| OFS3 | 0x12C9_F4C4 | Non-secure | 7.2.6 | 287 | 288 |
| OFS3_SEC | 0x02C9_F0C4 | Secure | 7.2.6 | 287 | 288 |
| OFS3_SEL | 0x02C9_F124 | Secure | 7.2.7 | 289 | 290 |
Both supported parts place them identically; only the page numbers shift.
| enum ra8_ofs_word_t : uint8_t |
Ordinal identity of each option-setting word present on this device.
The values are contiguous ordinals (0, 1, 2, ...), NOT flash addresses – they name the OFS words the active device exposes so runtime code can iterate or select without a magic-number literal. The programming addresses live in each app's linker_script.ld; the runtime-read addresses live in ra8_ofs_addr_t below.
The quartet is the same on every part this tree supports, so no member is device-conditional.
| uint8_t ra8_ofs_word_count | ( | void | ) |
Return the number of option-setting words present on the device.
Yields k_ra8_ofs_word_count – 4 (OFS0..OFS3) on both RA8D2 and RA8P1. Lets device-agnostic tooling size an OFS iteration without a magic literal.
There is deliberately no companion ra8_ofs_has_ofs3(): both supported parts carry OFS3 (see the file header for the per-part HUM citations), so such a predicate could only ever return true and would assert nothing.
| 4 | OFS0, OFS1, OFS2, OFS3 – the quartet both parts implement. |
Definition at line 230 of file ra8_ofs.c.
References k_ra8_ofs_word_count, and ra8_ofs_word_count().
Referenced by ra8_ofs_word_count().