93typedef enum : uint32_t {
111typedef enum : uint32_t {
150 __asm__
volatile(
"wfi");
197 uint32_t cpuclk0_hz = 0U;
217#ifndef RA8_OFF_TARGET
339 (void)first_unused_memory;
343 static CHAR s_queue_name[] =
"ipc_demo_q";
344 static CHAR s_producer_name[] =
"producer";
345 static CHAR s_consumer_name[] =
"consumer";
411#ifndef RA8_OFF_TARGET
void main(void)
Secure fallback main entry point.
void tx_application_define(void *first_unused_memory)
ThreadX system-define hook: build worker thread + byte pool.
static void ipc_demo_panic_halt(void)
Halt forever in WFI on a fatal init failure.
static uint8_t s_producer_stack[k_ipc_demo_thread_stack]
static void ipc_consumer_thread_entry(ULONG thread_input)
Consumer thread body – blocking receive + log.
static uint8_t s_consumer_stack[k_ipc_demo_thread_stack]
static TX_QUEUE s_ipc_queue
ThreadX queue control block + backing storage.
static TX_THREAD s_consumer_thread
ThreadX control block + stack for the consumer thread.
static void ipc_demo_log(const uint8_t *s, uint32_t len)
Write a static ASCII string to SCI8.
static const uint8_t k_ipc_demo_recv_msg[]
static ULONG s_ipc_queue_storage[k_ipc_demo_queue_capacity]
ipc_demo_payload_t
32-bit ASCII payload tags exchanged across the queue.
@ k_ipc_demo_payload_ping
"ping" little-endian.
@ k_ipc_demo_payload_pong
"pong" little-endian.
static void ipc_demo_setup_or_halt(void)
Bring CGC + SCI8 up.
volatile uint32_t g_ipc_demo_tick
HIL liveness counter – incremented per consumer wakeup.
ipc_demo_cfg_t
Compile-time configuration for the ThreadX IPC demo.
@ k_ipc_demo_period_ms
Ipc demo period ms.
@ k_ipc_demo_thread_stack
Ipc demo thread stack.
@ k_ipc_demo_producer_prio
Ipc demo producer prio.
@ k_ipc_demo_period_ticks
1000 ticks @ 1 kHz SysTick = 1 s.
@ k_ipc_demo_queue_capacity
Slots in the inter-thread queue.
@ k_ipc_demo_baud
Ipc demo baud.
@ k_ipc_demo_consumer_prio
Higher prio -> blocks on receive.
static const uint8_t k_ipc_demo_banner[]
Static log lines streamed over SCI8 (must remain ASCII).
static void ipc_producer_thread_entry(ULONG thread_input)
Producer thread body – 1 Hz "ping" enqueue.
static TX_THREAD s_producer_thread
ThreadX control block + stack for the producer thread.
static const uint8_t k_ipc_demo_send_msg[]
Board-support layer for the Renesas EK-RA8D2 v1 evaluation kit.
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.
NVIC + ICU IELSR allocator.
void ra8_isr_globals_enable(void)
Globally enable maskable interrupts (PRIMASK = 0).
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.
unsigned int UINT
ThreadX-compatible unsigned int (host stub).
char CHAR
ThreadX-compatible CHAR (host stub).
unsigned long ULONG
ThreadX-compatible unsigned long (host stub).
Opaque thread stand-in for the host build.