ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
main.c
Go to the documentation of this file.
1
34
35#include <stdint.h>
36
37#include "ra8_attributes.h"
38#include "ra8_board_ra8p1.h"
39#include "ra8_boot_entry.h"
40#include "ra8_device.h"
41#include "ra8_err.h"
42#include "ra8_isr.h"
43#include "ra8_time.h"
44
45/*
46 * Compile-time proof that the RA8P1 toolchain selection reached this TU: the
47 * NPU feature flag is only defined for RA8_DEVICE_RA8P1. If this app is ever
48 * built with the RA8D2 toolchain, the build fails loudly here instead of
49 * silently producing an RA8D2 image under an RA8P1 name.
50 */
51#ifndef RA8_HAS_NPU
52#error "blink_ra8p1 must be built with cmake/toolchain-ra8p1.cmake (RA8_DEVICE_RA8P1)."
53#endif
54
58typedef enum : uint32_t {
62
73volatile uint32_t g_blink_ra8p1_tick = 0U;
74
88{
89 while (1) {
90 __asm__ volatile("wfi");
91 }
92}
93
void main(void)
Secure fallback main entry point.
Definition main.c:37
Annotation-attribute framework macros for ra8-firmware.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
ra8_err_t ra8_board_led_toggle(ra8_board_led_id_t led)
Toggle led's output state.
ra8_err_t ra8_board_led_init(ra8_board_led_id_t led)
Configure led as a digital output, initial level low (off).
@ k_ra8_board_led1
LED1, BLUE, P600 (jumper E27).
Board-support layer for the Renesas RA8P1 (R7KA8P1KFLCAC) target board.
Boot entry points shared between a vector table and its startup code.
Compile-time device selection for the RA8 multi-chip build (RA8D2 / RA8P1).
Error Code Definitions for ra8-firmware.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
Definition ra8_err.h:119
NVIC + ICU IELSR allocator.
void ra8_isr_globals_enable(void)
Globally enable maskable interrupts (PRIMASK = 0).
Definition ra8_isr.c:439
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.
Definition ra8_time.c:59
void ra8_delay_ms(uint32_t ms)
Busy-wait for at least ms milliseconds.
Definition ra8_time.c:129