From fce4a99dbfab5af623bb05d9e10807efeced5a47 Mon Sep 17 00:00:00 2001 From: Mel Date: Thu, 22 Jan 2026 18:27:28 +0100 Subject: Implement file embedding into compiler sources during build Signed-off-by: Mel --- boot/common.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'boot/common.c') diff --git a/boot/common.c b/boot/common.c index 095aaa6..79f5d63 100644 --- a/boot/common.c +++ b/boot/common.c @@ -48,6 +48,13 @@ #define NORETURN _Noreturn +// macro used as target for embedding binary files during build into a byte array. +// usage: `const byte test_data[] = CATSKILL_EMBED(./files/test_data.txt);` +// the array will be filled with hexadecimal values of the file contents, +// with a nil byte appended at the end. +// the size of the array can be retrieved through `strlen(array)`, or `ARRAY_SIZE(array)-1`. +#define CATSKILL_EMBED(...) {0} + // ansi escape codes for terminal color and style #define ANSI(code) "\33[" code "m" -- cgit 1.4.1