ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_off_target_config.h File Reference

Guards for host-compiled unit tests. More...

#include <stdint.h>
Include dependency graph for ra8_off_target_config.h:

Go to the source code of this file.

Enumerations

enum  ra8_off_target_t : uint8_t { k_ra8_off_target = 0U }

Detailed Description

Guards for host-compiled unit tests.

Every firmware .c file that touches a peripheral register block compiles on both the arm-none-eabi cross build (target) and the x86_64 host build (tests). On the host there is no real hardware; the test harness provides mock register pages backed by ordinary SRAM. The switch between the two is a single preprocessor flag added to the compile command for the test build:

-DRA8_OFF_TARGET

Code under #ifdef RA8_OFF_TARGET is allowed to use host-only facilities (stdio, malloc via Unity's heap, pthread) because those paths never compile into the real firmware.

This header does not define RA8_OFF_TARGET itself; it only lifts the guards into the k_ra8_* enum space so clang-tidy's readability-magic-numbers check does not flag them.

Definition in file ra8_off_target_config.h.

Enumeration Type Documentation

◆ ra8_off_target_t

enum ra8_off_target_t : uint8_t
Enumerator
k_ra8_off_target 

Arm-none-eabi firmware build.

(anon).

Definition at line 36 of file ra8_off_target_config.h.