71typedef enum : uint16_t {
181 const uint8_t* bytes = (
const uint8_t*)buf;
182 uint32_t shown = len;
189 for (uint32_t i = 0U; i < shown; i++) {
202 for (uint8_t d = 0U; d < digits; d++) {
203 line[pos] = nibbles[d];
246 (expr ==
nullptr) ?
"(expr)" : expr,
251#ifndef RA8_OFF_TARGET
252 __asm__
volatile(
"wfi");
262 uint32_t available = 0U;
263 uint32_t fragments = 0U;
267 "%s: pool free %u bytes in %u fragments",
268 (label ==
nullptr) ?
"(unnamed)" : label,
269 (
unsigned int)available,
270 (
unsigned int)fragments);
279 "%s: pool cannot serve %zu bytes",
280 (func ==
nullptr) ?
"(unnamed)" : func,
ESP-IDF-compatible logging surface, implemented by this port.
@ ESP_LOG_NONE
Threshold only: suppress every line.
@ ESP_LOG_WARN
Something unexpected that was handled anyway.
@ ESP_LOG_VERBOSE
Per-frame and per-edge tracing.
@ ESP_LOG_INFO
Normal life-cycle milestones.
@ ESP_LOG_ERROR
A fault the caller cannot recover from itself.
Annotation-attribute framework macros for ra8-firmware.
#define RA8_PRIV
Module-private helper: shared across TUs but only inside one library.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
uint8_t priv_ra8_esp_hosted_fmt_utoa(char *buf, uint64_t value, uint8_t base, bool upper)
Implementation of priv_ra8_esp_hosted_fmt_utoa() – divides down and reverses in place,...
uint32_t priv_ra8_esp_hosted_fmt_vformat(char *out, uint32_t cap, const char *fmt, va_list ap)
Implementation of priv_ra8_esp_hosted_fmt_vformat() – single pass, every loop bounded,...
Bounded, heap-free printf-subset formatter for the esp-hosted port.
@ k_ra8_esp_hosted_fmt_digits_max
Widest digit run the supported bases produce, from UINT64_MAX in base ten.
void ra8_esp_hosted_log_fatal(const char *tag, const char *expr, int code)
Implementation of ra8_esp_hosted_log_fatal() – reports and parks; the caller's check already proved t...
void ra8_esp_hosted_log_level_set(const char *tag, int level)
Implementation of ra8_esp_hosted_log_level_set() – one global threshold rather than the per-tag table...
static int s_ra8_esp_hosted_log_level
Runtime verbosity threshold for the esp-hosted bridge.
int priv_ra8_esp_hosted_log_level_get(void)
Implementation of priv_ra8_esp_hosted_log_level_get() – reads the threshold the setter last clamped.
void ra8_esp_hosted_log_write(int level, const char *tag, const char *fmt,...)
Implementation of ra8_esp_hosted_log_write() – the varargs face of priv_ra8_esp_hosted_log_vwrite().
void ra8_esp_hosted_log_hexdump(int level, const char *tag, const void *buf, uint32_t len)
Implementation of ra8_esp_hosted_log_hexdump() – renders at most k_ra8_esp_hosted_log_dump_bytes byte...
void ra8_esp_hosted_mem_dump(const char *label)
Implementation of ra8_esp_hosted_mem_dump() – reads the live ThreadX byte-pool statistics,...
void priv_ra8_esp_hosted_log_vwrite(int level, const char *tag, const char *fmt, va_list ap)
Implementation of priv_ra8_esp_hosted_log_vwrite() – formats onto a bounded stack line,...
bool priv_ra8_esp_hosted_log_accepts(int level)
Implementation of priv_ra8_esp_hosted_log_accepts() – the single runtime level decision,...
static const char *const s_ra8_esp_hosted_log_tag
Fallback tag used when a caller passes none.
ra8_esp_hosted_log_bound_t
Fixed sizes the log bridge works within.
@ k_ra8_esp_hosted_log_dump_cost
Characters one dumped byte costs: two nibbles and a separator.
@ k_ra8_esp_hosted_log_dump_bytes
Bytes of a buffer a single hexdump line renders.
@ k_ra8_esp_hosted_log_line_max
Bytes of stack the formatted line may occupy, terminator included.
void ra8_esp_hosted_alloc_failed(const char *func, size_t bytes)
Implementation of ra8_esp_hosted_alloc_failed() – names the requester and the size,...
static void internal_emit(int level, const char *tag, const char *line)
Hand a finished line to the project logger at the mapped level.
Library-private surface of the esp-hosted logging bridge.
@ k_ra8_esp_hosted_log_dump_nibbles
Digits one byte renders as.
@ k_ra8_esp_hosted_log_dump_radix
Hexadecimal.
Public entry point of the RA8D2 + ThreadX port of esp-hosted.
Module-private contract of the esp-hosted RTOS abstraction slice.
void priv_ra8_esp_hosted_rtos_pool_stats(uint32_t *out_available, uint32_t *out_fragments)
Read live transport-pool occupancy.
Lightweight Logging Interface for ra8-firmware.
#define ra8_log_warn(tag, message)
RA8 log warn.
#define ra8_log_info(tag, message)
RA8 log info.
#define ra8_log_debug(tag, message)
RA8 log debug.
#define ra8_log_error(tag, message)
RA8 log error.