70typedef enum : uint32_t {
107typedef enum : uint32_t {
111static_assert((
k_eop_pad_bytes % 16U) == 0U,
"pad must be a multiple of 16");
133typedef enum : uint8_t {
226 const uint32_t digit = (value >> shift) & (uint32_t)
k_eop_hex_mask;
252 buf[n] = (uint8_t)
'0';
256 buf[n] = (uint8_t)((uint32_t)
'0' + (value % (uint32_t)
k_eop_dec_base));
260 for (uint32_t i = 0U; i < n; i++) {
290 k_eop_pad_probe_idx = 0U,
291 k_eop_pad_probe_byte = 0xA5U,
293 s_eop_bss_pad[k_eop_pad_probe_idx] = (uint8_t)k_eop_pad_probe_byte;
294 return (uint32_t)(uintptr_t)&
s_eop_bss_pad[k_eop_pad_probe_idx];
314 __asm__
volatile(
"bkpt #0");
316 __asm__
volatile(
"wfi");
340 uint32_t cpuclk0_hz = 0U;
356 *out_cpuclk_hz = cpuclk0_hz;
409 .num_tx_descriptors = 0U,
410 .num_rx_descriptors = 0U,
424 uint32_t cpuclk0_hz = 0U;
448 __asm__
volatile(
"wfi");
void main(void)
Secure fallback main entry point.
eop_mac_t
Locally-administered MAC the probe opens with.
@ k_eop_mac_0
Octet 0 – locally administered, unicast.
eop_pad_t
Size of the leading .bss pad that steers where the HAL's Ethernet statics land in SRAM.
@ k_eop_pad_bytes
Leading .bss pad, bytes.
static void eop_print(const uint8_t *msg, uint32_t len)
Push bytes at the SCI8 console, discarding the write status.
static const uint8_t k_eop_msg_open_rc[]
static void eop_print_hex(uint32_t value)
Print a 32-bit value as 0x + eight upper-case hex digits.
static void eop_setup_or_halt(uint32_t *out_cpuclk_hz)
Bring up clocks, MSTP, SysTick and the SCI8 console; halt on failure.
static void eop_print_uint(uint32_t value)
Print an unsigned 32-bit value in decimal.
static void eop_log_sink(void *ctx, uint8_t byte)
ra8_log byte sink forwarding every log byte to the console.
static ra8_err_t eop_run_once(void)
Run the board Ethernet bring-up and the one ra8_eth_open call.
static const uint8_t k_eop_msg_padlen[]
static uint32_t eop_bss_pad_anchor(void)
Touch s_eop_bss_pad and report where it starts.
static const uint8_t k_eop_msg_board[]
static const uint8_t k_eop_msg_hw_fail[]
static const uint8_t k_eop_msg_hex_lead[]
static const uint8_t k_eop_msg_fail[]
static const uint8_t k_eop_msg_pass[]
static const uint8_t k_eop_msg_newline[]
static const uint8_t k_eop_msg_opening[]
eop_consts_t
Console + probe knobs (no magic numbers).
@ k_eop_hex_mask
Nibble mask for one hex digit.
@ k_eop_hex_shift
Bits consumed per emitted hex digit.
@ k_eop_dec_max
Digits in the widest uint32 (4294967295).
@ k_eop_hex_chars
Hex digits printed per 32-bit value.
@ k_eop_uart_baud
SCI8 J-Link VCOM console baud.
@ k_eop_channel
EK-RA8D2 RJ45 is ETHA1 / RMAC1.
@ k_eop_dec_base
Decimal base for the status-code printer.
static const uint8_t k_eop_hex_digits[]
static const uint8_t k_eop_msg_boot[]
static volatile uint8_t s_eop_bss_pad[k_eop_pad_bytes]
Leading .bss filler that positions every library static behind it.
static void eop_panic_halt(void)
Print the negative banner and park the CPU.
static const uint8_t k_eop_msg_clock[]
static const uint8_t k_eop_msg_pad[]
Board-support layer for the Renesas EK-RA8D2 v1 evaluation kit.
ra8_err_t ra8_board_ethernet_init(void)
Bring up the on-board RGMII Ethernet PHY and RMAC1/ETHA1.
ra8_err_t ra8_board_uart_console_write(const uint8_t *data, size_t len)
Polled blocking write to the J-Link OB VCOM console.
ra8_err_t ra8_board_uart_console_init(uint32_t baud)
Configure SCI8 + PD02/PD03 as the debug-console UART.
Boot entry points shared between a vector table and its startup code.
High-level Clock Generation Circuit driver.
ra8_err_t ra8_cgc_get_clock_hz(ra8_clock_id_t id, uint32_t *out_hz)
Query the current frequency of a clock-tree domain.
@ k_ra8_clock_id_cpuclk0
Cortex-M85 CPUCLK0.
ra8_err_t ra8_cgc_init(void)
Configure the clock tree to a safe default.
Error Code Definitions for ra8-firmware.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Ethernet Switch Module (ESWM) + frame TX/RX driver.
ra8_err_t ra8_eth_open(const ra8_eth_cfg_t *cfg)
Open the NIC: bring up the controller stack and the descriptor rings.
NVIC + ICU IELSR allocator.
void ra8_isr_globals_enable(void)
Globally enable maskable interrupts (PRIMASK = 0).
Lightweight Logging Interface for ra8-firmware.
void ra8_log_set_byte_sink(ra8_log_byte_sink_fn_t fn, void *ctx)
Install (or clear) an optional byte sink for log output.
Ref-counted Module Stop Control wrapper for the RA8D2.
ra8_err_t ra8_mstp_init(void)
Re-establish the ra8_mstp ref-count table from current hardware state.
SysTick-based tick counter, delay and timestamp helpers.
ra8_err_t ra8_time_init(uint32_t cpu_hz)
Initialise SysTick for a 1 kHz tick interrupt.
Per-channel NIC configuration.