|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
RA boot-ROM Option Function Select register defaults. More...
Go to the source code of this file.
Macros | |
| #define | BSP_CFG_OPTION_SETTING_OFS0 (0xFFFFFFFFU) |
| BSP CFG OPTION SETTING OFS0. | |
| #define | BSP_CFG_OPTION_SETTING_OFS1 (0xFFFFFFFFU) |
| BSP CFG OPTION SETTING OFS1. | |
| #define | BSP_CFG_OPTION_SETTING_OFS2 (0xFFFFFFFFU) |
| BSP CFG OPTION SETTING OFS2. | |
| #define | BSP_CFG_OPTION_SETTING_OFS3 (0xFFFFFFFFU) |
| BSP CFG OPTION SETTING OFS3. | |
| #define | BSP_CFG_OPTION_SETTING_SAS (0xFFFFFFFFU) |
| BSP CFG OPTION SETTING SAS. | |
| #define | BSP_CFG_OPTION_SETTING_OFS1_SEC (0xFFFFFFFFU) |
| BSP CFG OPTION SETTING OFS1 SEC. | |
| #define | BSP_CFG_OPTION_SETTING_OFS1_SEL (0xFFFFFFFFU) |
| BSP CFG OPTION SETTING OFS1 SEL. | |
| #define | BSP_CFG_OPTION_SETTING_OFS3_SEC (0xFFFFFFFFU) |
| BSP CFG OPTION SETTING OFS3 SEC. | |
| #define | BSP_CFG_OPTION_SETTING_OFS3_SEL (0xFFFFFFFFU) |
| BSP CFG OPTION SETTING OFS3 SEL. | |
| #define | BSP_CFG_OPTION_SETTING_BPS (0xFFFFFFFFU) |
| BSP CFG OPTION SETTING BPS. | |
| #define | BSP_CFG_OPTION_SETTING_BPS_SEC (0xFFFFFFFFU) |
| BSP CFG OPTION SETTING BPS SEC. | |
| #define | BSP_CFG_OPTION_SETTING_OTP_FSBLCTRL0 (0xFFFFFFFFU) |
| BSP CFG OPTION SETTING OTP FSBLCTRL0. | |
| #define | BSP_CFG_OPTION_SETTING_OTP_FSBLCTRL1 (0xFFFFFFFFU) |
| BSP CFG OPTION SETTING OTP FSBLCTRL1. | |
| #define | BSP_CFG_OPTION_SETTING_OTP_FSBLCTRL2 (0xFFFFFFFFU) |
| BSP CFG OPTION SETTING OTP FSBLCTRL2. | |
| #define | BSP_CFG_OPTION_SETTING_OTP_SAMR (0xFFFFFFFFU) |
| BSP CFG OPTION SETTING OTP SAMR. | |
| #define | BSP_CFG_OPTION_SETTING_OTP_PBPS (0xFFFFFFFFU) |
| BSP CFG OPTION SETTING OTP PBPS. | |
| #define | BSP_CFG_OPTION_SETTING_OTP_PBPS_SEC (0xFFFFFFFFU) |
| BSP CFG OPTION SETTING OTP PBPS SEC. | |
| #define | BSP_CFG_OPTION_SETTING_OTP_ZHUK (0xFFFFFFFFU) |
| BSP CFG OPTION SETTING OTP ZHUK. | |
| #define | RA8_SECTION(name) |
| RA8 SECTION. | |
Functions | |
| uint8_t | ra8_ofs_word_count (void) |
| Return the number of option-setting words present on the device. | |
Variables | |
| static const uint32_t | s_ra8_ofs0 = (0xFFFFFFFFU) |
| static const uint32_t | s_ra8_ofs1 = (0xFFFFFFFFU) |
| static const uint32_t | s_ra8_ofs2 = (0xFFFFFFFFU) |
| static const uint32_t | s_ra8_ofs3 = (0xFFFFFFFFU) |
| static const uint32_t | s_ra8_sas = (0xFFFFFFFFU) |
| static const uint32_t | s_ra8_ofs1_sec = (0xFFFFFFFFU) |
| static const uint32_t | s_ra8_ofs1_sel = (0xFFFFFFFFU) |
| static const uint32_t | s_ra8_ofs3_sec = (0xFFFFFFFFU) |
| static const uint32_t | s_ra8_ofs3_sel = (0xFFFFFFFFU) |
| static const uint32_t | s_ra8_bps = (0xFFFFFFFFU) |
| static const uint32_t | s_ra8_bps_sec = (0xFFFFFFFFU) |
| static const uint32_t | s_ra8_otp_fsblctrl0 = (0xFFFFFFFFU) |
| static const uint32_t | s_ra8_otp_fsblctrl1 = (0xFFFFFFFFU) |
| static const uint32_t | s_ra8_otp_fsblctrl2 = (0xFFFFFFFFU) |
| static const uint32_t | s_ra8_otp_samr = (0xFFFFFFFFU) |
| static const uint32_t | s_ra8_otp_pbps = (0xFFFFFFFFU) |
| static const uint32_t | s_ra8_otp_pbps_sec = (0xFFFFFFFFU) |
| static const uint32_t | s_ra8_otp_zhuk = (0xFFFFFFFFU) |
RA boot-ROM Option Function Select register defaults.
Emits 32-bit constants into the .option_setting_* linker sections defined in src/linker_script.ld. The RA8D2 boot ROM reads these regions directly out of MRAM before the Cortex-M85 reset vector runs, so they configure:
Every entry here is defined as 0xFFFFFFFF which is the "erased / default / permissive" value – exactly what a freshly erased MRAM part would contain. This means:
Safe for bring-up, NOT appropriate for production. A real deployment should override each of these with a vetted value in a tamper-resistant build step.
The OFS3 word – plus its OFS3_SEC / OFS3_SEL TrustZone selectors – carries the M33-side (CPU1) WDT1 auto-start fields, and is present on BOTH supported parts at the same addresses with the same bit fields: RA8D2 HUM R01UH1065EJ0130 Ch 7.2.6 p 287 / Ch 7.2.7 p 289, and RA8P1 HUM R01UH1064EJ0130 Ch 7.2.6 p 288 / Ch 7.2.7 p 290. The whole OFS3 family is therefore emitted unconditionally.
Issue #223 previously gated these three emissions out of RA8P1 builds behind RA8_HAS_OFS3, on the strength of FSP's BSP_FEATURE_BSP_HAS_OFS3 == 0 for ra8p1 – a value that contradicts Renesas' own RA8P1 manual. The effect was an RA8P1 image with no OFS3 word at all, leaving WDT1's boot-latched configuration unprogrammed. Removed in #516; see ra8_ofs.h.
The easy way: #define BSP_CFG_OPTION_SETTING_OFS0 (0x12345678U) before including this file from another translation unit. For compile-time programming, define the same macros via -D in CMakeLists.txt.
Each entry uses __attribute__((section(".option_setting_xxx"))) matching the section names in src/linker_script.ld. The used attribute prevents the linker from discarding the constants even though nothing references them from C.
Definition in file ra8_ofs.c.
| #define BSP_CFG_OPTION_SETTING_BPS (0xFFFFFFFFU) |
| #define BSP_CFG_OPTION_SETTING_BPS_SEC (0xFFFFFFFFU) |
| #define BSP_CFG_OPTION_SETTING_OFS0 (0xFFFFFFFFU) |
| #define BSP_CFG_OPTION_SETTING_OFS1 (0xFFFFFFFFU) |
| #define BSP_CFG_OPTION_SETTING_OFS1_SEC (0xFFFFFFFFU) |
| #define BSP_CFG_OPTION_SETTING_OFS1_SEL (0xFFFFFFFFU) |
| #define BSP_CFG_OPTION_SETTING_OFS2 (0xFFFFFFFFU) |
| #define BSP_CFG_OPTION_SETTING_OFS3 (0xFFFFFFFFU) |
| #define BSP_CFG_OPTION_SETTING_OFS3_SEC (0xFFFFFFFFU) |
| #define BSP_CFG_OPTION_SETTING_OFS3_SEL (0xFFFFFFFFU) |
| #define BSP_CFG_OPTION_SETTING_OTP_FSBLCTRL0 (0xFFFFFFFFU) |
| #define BSP_CFG_OPTION_SETTING_OTP_FSBLCTRL1 (0xFFFFFFFFU) |
| #define BSP_CFG_OPTION_SETTING_OTP_FSBLCTRL2 (0xFFFFFFFFU) |
| #define BSP_CFG_OPTION_SETTING_OTP_PBPS (0xFFFFFFFFU) |
| #define BSP_CFG_OPTION_SETTING_OTP_PBPS_SEC (0xFFFFFFFFU) |
| #define BSP_CFG_OPTION_SETTING_OTP_SAMR (0xFFFFFFFFU) |
| #define BSP_CFG_OPTION_SETTING_OTP_ZHUK (0xFFFFFFFFU) |
| #define BSP_CFG_OPTION_SETTING_SAS (0xFFFFFFFFU) |
| #define RA8_SECTION | ( | name | ) |
| 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().