24#include <unicorn/unicorn.h>
35typedef enum : uint8_t {
42typedef enum : uint32_t {
63typedef enum : uint8_t {
77typedef enum : uint32_t {
84typedef enum : uint32_t {
216 uint32_t rotate_deg);
240 const char* app_name);
Composite board-view renderer: panel framebuffer + a status sidebar.
board_overlay_btn_t
On-screen sidebar control a click landed on.
Bounded raw-descriptor presentation surface and scratch workspace.
void emu_set_primary_core(board_primary_core_t core)
Select the primary core (CLI –primary-core).
void apply_battery_click(board_overlay_btn_t btn, uint16_t cx, uint16_t disp_w)
Apply a POWER-section click to the fuel-gauge / core model.
void set_switch(board_overlay_btn_t btn, bool pressed)
Toggle a user switch's pressed level (active-low) for an on-screen button.
emu_sw_pin_t
EK-RA8D2 user-switch GPIO coordinates (active-low): SW1 P009, SW2 P008.
@ k_emu_sw1_pin
SW1 -> P009.
@ k_emu_sw2_pin
SW2 -> P008.
@ k_emu_sw_port
Both user switches sit on PORT0.
void emu_view_select_console_tab(uint32_t tab_idx)
Switch the visible console channel to tab_idx (tab-bar click).
panel_rotate_t
Display rotation (degrees clockwise) applied to the panel for viewing.
@ k_rotate_0
Native orientation.
@ k_rotate_90
90 deg clockwise (-> portrait).
@ k_rotate_270
90 deg counter-clockwise.
@ k_rotate_180
Upside down.
bool emu_low_power(void)
Whether the M33 4:1-slower low-power clock model is active.
@ k_panel_name_max
Max panel name (incl NUL).
@ k_panel_dim_max
Sanity cap on a panel dimension.
@ k_panel_line_max
Max panel-config line length.
@ k_strtol_base10
Base-10 radix for strtol parses.
bool load_panel(const char *path, board_panel_t *out)
Load a panel descriptor (name / width / height) from a TOML-ish file.
void emu_view_mark_stopped(uint32_t pc)
Mark the run ended: the held frame shows "parked" at pc.
void emu_set_low_power(bool on)
Set the low-power clock model (CLI –low-power / GUI toggle).
board_primary_core_t
Which core the firmware targets: gates the M85-only instruction seams.
@ k_core_m33
Cortex-M33 primary: the M85-only instruction seams stay off.
@ k_core_m85
Cortex-M85 primary (default): MVE/long-shift seams armed.
void emu_view_publish(uint32_t pc, uint32_t chunks)
Publish the run-loop telemetry the board view shows.
@ k_view_default_h
Default window height (EK-RA8D2 panel).
@ k_view_yield_us
Yield this long when a present is skipped.
@ k_record_every
Chunks between recorded frames (1000/20).
@ k_record_fps
Recorded frames per emulated second.
@ k_uart_log_max
Console ring depth (mirrors SCI model).
@ k_view_frame_us
Min wall-us between live presents (~60 Hz).
@ k_view_present_every
Present the frame every Nth chunk.
@ k_view_idle_us
~60 Hz idle pump after the run ends.
@ k_record_ms_per_sec
Emulated ms (= chunks) per second.
@ k_view_max_chunks
Cap in –view; closing the window ends.
@ k_view_default_w
Default window width (EK-RA8D2 panel).
@ k_ns_per_us
Nanoseconds per microsecond.
@ k_us_per_s
Microseconds per second.
@ k_reboot_settle
Chunks to run before a scheduled –reboot.
void emu_view_wheel(int32_t notches)
Page the console scrollback by mouse-wheel notches.
int write_ppm(const char *path, const emu_presentation_workspace_t *presentation)
Write an RGB565 frame to a binary PPM (P6) for headless inspection.
void emu_view_reset_console(void)
Reset the console-scrollback view (warm-reboot support).
bool build_composite(uc_engine *uc, emu_presentation_workspace_t *presentation, const char *app_name)
Stream the panel and status sidebar into a raw-fd surface.
void unrotate_click(uint16_t cx, uint16_t cy, uint16_t panel_w, uint16_t panel_h, uint32_t deg, uint16_t *nx, uint16_t *ny)
Map a click in the rotated displayed panel back to native panel coords.
board_overlay_btn_t route_click(uint16_t cx, uint16_t cy, uint16_t panel_w, uint16_t panel_h, uint16_t disp_w, uint32_t rotate_deg)
Route a composite-space click to the right input model.
board_primary_core_t emu_primary_core(void)
The primary core the firmware targets (label + seam gating).
Annotation-attribute framework macros for ra8-firmware.
Display descriptor loaded from a flat key=value panel file.
uint16_t height
Pixel height.
uint16_t width
Pixel width.
char name[k_panel_name_max]
Name.
One independent owned surface plus non-owning bounded scratch.