|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Headless on-silicon HIL gate for <table> grid layout (#107). More...
#include <stddef.h>#include <stdint.h>#include "font_fixture.h"#include "ra8_board_ek_ra8d2.h"#include "ra8_boot_entry.h"#include "ra8_cgc.h"#include "ra8_err.h"#include "ra8_isr.h"#include "ra8_mstp.h"#include "ra8_time.h"#include "reflow.h"Go to the source code of this file.
Enumerations | |
| enum | tb_consts_t : uint32_t { k_tb_view_w = 280U , k_tb_view_h = 360U , k_tb_font_px = 16U , k_tb_ink = 0xFF101010U , k_tb_link_col = 0xFF2A52BEU , k_tb_uart_baud = 115200U , k_tb_fnv_offset = 2166136261U , k_tb_fnv_prime = 16777619U , k_tb_hex_nibbles = 8U , k_tb_nibble_bits = 4U , k_tb_nibble_mask = 0x0FU , k_tb_dec_ten = 10U } |
| Viewport / console / hash knobs (no magic numbers). More... | |
Functions | |
| static void | tb_print (const uint8_t *msg, uint32_t len) |
| Emit a byte run on the SCI8 console. | |
| static void | tb_panic_halt (const uint8_t *msg, uint32_t len) |
| Print the fail banner and trap (ra8_emulator halts on the BKPT). | |
| static void | tb_print_hex (uint32_t value) |
| Print a 32-bit value as 8 upper-case hex digits. | |
| static void | tb_print_uint (uint32_t value) |
| Print a small unsigned integer in decimal. | |
| static uint32_t | tb_geom_hash (void) |
| FNV-1a-32 over every laid-out glyph's (x, y) position. | |
| static void | tb_setup_or_halt (void) |
| Bring up clocks/MSTP/time + the SCI8 console; halt on failure. | |
| void | main (void) |
| App entry: lay out the table chapter, hash the geometry, print. | |
Variables | |
| static reflow_t | s_engine |
| Reflow engine (large – file-scope, not on the stack). | |
| static const char | k_tb_chapter [] |
| Baked chapter: a heading, a 2-column table, and a trailing paragraph. | |
| static const uint8_t | k_msg_boot [] = "ereader-table-hil: boot\r\n" |
| static const uint8_t | k_msg_fail [] = "ereader-table-hil: FAIL init\r\n" |
| static const uint8_t | k_msg_lerr [] = "ereader-table-hil: FAIL layout\r\n" |
| static const uint8_t | k_msg_pre [] = "ereader-table-hil: glyphs=" |
| static const uint8_t | k_msg_geom [] = " geom=" |
| static const uint8_t | k_msg_eol [] = "\r\n" |
Headless on-silicon HIL gate for <table> grid layout (#107).
Closes the real-hardware gap for the table layout: tokenize table/tr/td/th, size equal columns, flow each cell, stack rows (with row-level page breaks) – no panel / SD / touch needed. The app lays out a baked chapter with a 2-column table (plus a heading and trailing paragraph) through reflow with the fixed-metric Ahem face, folds an FNV-1a-32 hash over the laid-out glyph geometry (every glyph's x + y), and prints a banner on the SCI8 J-Link OB console:
ereader-table-hil: glyphs=<N> geom=<8 hex>
Ahem's fixed metrics make the grid deterministic; the banner is identical every boot and matches the host / ra8_emulator run, so any drift in the column sizing, cell flow, or row stacking changes the hash.
[Ring 7 / App] {World: NS}
Definition in file main.c.
| enum tb_consts_t : uint32_t |
Viewport / console / hash knobs (no magic numbers).
| void main | ( | void | ) |
App entry: lay out the table chapter, hash the geometry, print.
The application entry point Reset_Handler hands control to.
Definition at line 166 of file main.c.
References k_ahem_ttf, k_ahem_ttf_len, k_msg_boot, k_msg_eol, k_msg_fail, k_msg_geom, k_msg_lerr, k_msg_pre, k_ra8_ok, k_tb_chapter, k_tb_font_px, k_tb_ink, k_tb_link_col, k_tb_view_h, k_tb_view_w, ra8_isr_globals_enable(), reflow_init(), reflow_layout_chapter(), s_engine, tb_geom_hash(), tb_panic_halt(), tb_print(), tb_print_hex(), tb_print_uint(), and tb_setup_or_halt().
|
static |
FNV-1a-32 over every laid-out glyph's (x, y) position.
Definition at line 126 of file main.c.
References k_tb_fnv_offset, k_tb_fnv_prime, and s_engine.
Referenced by main().
|
static |
Print the fail banner and trap (ra8_emulator halts on the BKPT).
Definition at line 85 of file main.c.
References tb_print().
Referenced by main(), and tb_setup_or_halt().
|
static |
Emit a byte run on the SCI8 console.
Definition at line 79 of file main.c.
References ra8_board_uart_console_write().
Referenced by main(), tb_panic_halt(), tb_print_hex(), and tb_print_uint().
|
static |
Print a 32-bit value as 8 upper-case hex digits.
Definition at line 95 of file main.c.
References k_tb_dec_ten, k_tb_hex_nibbles, k_tb_nibble_bits, k_tb_nibble_mask, and tb_print().
Referenced by main().
|
static |
Print a small unsigned integer in decimal.
Definition at line 107 of file main.c.
References k_tb_dec_ten, and tb_print().
Referenced by main().
|
static |
Bring up clocks/MSTP/time + the SCI8 console; halt on failure.
Definition at line 141 of file main.c.
References k_msg_fail, k_ra8_clock_id_cpuclk0, k_ra8_ok, k_tb_uart_baud, ra8_board_uart_console_init(), ra8_cgc_get_clock_hz(), ra8_cgc_init(), ra8_mstp_init(), ra8_time_init(), and tb_panic_halt().
Referenced by main().
|
static |
|
static |
|
static |
|
static |
|
static |
Baked chapter: a heading, a 2-column table, and a trailing paragraph.
Definition at line 61 of file main.c.
Referenced by main().