kopia lustrzana https://github.com/Wren6991/PicoDVI
Packtiles: explicitly put header assets in .data by default, provide _IMG_ASSET_SECTION macro to override. Regenerate font_8x8 with this change.
rodzic
6dbb99dbe7
commit
7f6f906d4d
|
@ -1,4 +1,8 @@
|
|||
static char __attribute__((aligned(4))) font_8x8[] = {
|
||||
#ifndef _IMG_ASSET_SECTION
|
||||
#define _IMG_ASSET_SECTION ".data"
|
||||
#endif
|
||||
|
||||
static const char __attribute__((aligned(4), section(_IMG_ASSET_SECTION ".font_8x8"))) font_8x8[] = {
|
||||
0x00, 0x18, 0x66, 0x2c, 0x08, 0x42, 0x38, 0x18, 0x30, 0x08, 0x36, 0x00, 0x00, 0x00, 0x00, 0x40,
|
||||
0x3c, 0x10, 0x3c, 0x3c, 0x38, 0x7e, 0x3c, 0x7e, 0x3c, 0x3c, 0x00, 0x00, 0x20, 0x00, 0x0c, 0x1c,
|
||||
0x3c, 0x70, 0x1e, 0x3c, 0x3e, 0x7c, 0x7c, 0x3c, 0x62, 0x38, 0x70, 0x62, 0x06, 0x3f, 0x3e, 0x3c,
|
||||
|
|
|
@ -30,7 +30,12 @@ class BinHeader:
|
|||
arrayname = filename.split(".")[0]
|
||||
self.f = open(filename, "w")
|
||||
self.out_count = 0
|
||||
self.f.write("static char __attribute__((aligned(4))) {}[] = {{\n\t".format(arrayname))
|
||||
self.f.write(
|
||||
"#ifndef _IMG_ASSET_SECTION\n" \
|
||||
"#define _IMG_ASSET_SECTION \".data\"\n" \
|
||||
"#endif\n\n" \
|
||||
f"static const char __attribute__((aligned(4), section(_IMG_ASSET_SECTION \".{arrayname}\"))) {arrayname}[] = {{\n\t"
|
||||
)
|
||||
|
||||
def write(self, bs):
|
||||
for b in bs:
|
||||
|
|
Ładowanie…
Reference in New Issue