|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Portable command entry for JOF and RBKC content tooling. More...
#include <stddef.h>#include <stdint.h>#include <unistd.h>#include "ra8_attributes.h"#include "ra8_fmt_host_fd_internal.h"#include "ra8_fmt_portable_main_internal.h"#include "ra8_log.h"Go to the source code of this file.
Enumerations | |
| enum | main_exit_t : uint8_t { k_main_exit_usage = 2U } |
| Process status returned when no supported command owns the input. More... | |
Functions | |
| static void | internal_usage (const ra8_fmt_sink_t *errors) |
| Offer the complete usage banner to the injected diagnostic sink. | |
| static int | internal_dispatch (int argc, char **argv, bool *handled) |
| Try every portable dispatcher in stable command order. | |
| int | main (int argc, char **argv) |
Variables | |
| static ra8_fmt_cli_workspace_t | s_cli_workspace |
| Existing explicit high-water shared by mutually exclusive CLI verbs. | |
| static const char | s_usage [] |
| Established usage banner and supported-format inventory. | |
Portable command entry for JOF and RBKC content tooling.
Dispatches the three JOF verbs and strict RBKC inspection through raw descriptors, injected callbacks, and one named caller workspace.
Definition in file main.c.
| enum main_exit_t : uint8_t |
|
static |
Try every portable dispatcher in stable command order.
Offers the command to convert, verify, and inspect until one path claims ownership of the returned process status.
| [in] | argc | Process argument count. |
| [in] | argv | Process argument vector. |
| [out] | handled | Receives whether a dispatcher owns the result. |
| 0 | A command succeeded or no dispatcher matched. |
| 1 | A selected command failed. |
argv spans argc argument pointers. handled is non-null and writable. handled identifies whether the return value is authoritative. Definition at line 84 of file main.c.
References k_ra8_fmt_cli_convert_arena_bytes, priv_fmt_try_portable_convert(), priv_fmt_try_portable_inspect(), priv_fmt_try_portable_verify(), and s_cli_workspace.
Referenced by main().
|
static |
Offer the complete usage banner to the injected diagnostic sink.
Sends the immutable banner as one exact byte span and deliberately drops a diagnostic-only sink error.
| [in] | errors | Bound raw-descriptor diagnostic sink. |
errors is non-null. Definition at line 61 of file main.c.
References s_usage.
| int main | ( | int | argc, |
| char ** | argv ) |
Definition at line 100 of file main.c.
References internal_dispatch(), internal_usage(), k_main_exit_usage, priv_fmt_host_fd_sink(), priv_fmt_host_log_byte(), and ra8_log_set_byte_sink().
|
static |
Existing explicit high-water shared by mutually exclusive CLI verbs.
JOF conversion uses its first 8 MiB; JOF and RBKC inspection bind disjoint typed views over the same 10,486,016-byte object.
Definition at line 33 of file main.c.
Referenced by internal_dispatch().
|
static |
Established usage banner and supported-format inventory.
Definition at line 36 of file main.c.
Referenced by internal_usage().