summaryrefslogtreecommitdiff
path: root/tools/file2carray.py
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2026-06-22 21:30:58 +0200
committerHiFiPhile <[email protected]>2026-06-22 21:30:58 +0200
commit693cdce08e14833f26f4e8a1f26e4fd546be4c35 (patch)
tree7667d2223dc32d9f21b5b60ab200e64ed46e3e20 /tools/file2carray.py
parent41e9eaa65a935136085d78ec4b99c81ff991b560 (diff)
parentcd3561bf158afd5a5718904b8139a338d1e3b67c (diff)
Merge remote-tracking branch 'tinyusb/master' into pr-osal-spin-deinit
Signed-off-by: HiFiPhile <[email protected]>
Diffstat (limited to 'tools/file2carray.py')
-rw-r--r--tools/file2carray.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/file2carray.py b/tools/file2carray.py
index abfb4e21b..7150364bf 100644
--- a/tools/file2carray.py
+++ b/tools/file2carray.py
@@ -35,7 +35,8 @@ def main():
fout_name = fin_name + '.h'
with open(fout_name, 'w') as fout:
print(f"Converting {fin_name} to {fout_name}")
- fout.write(f'const size_t bindata_len = {len(contents)};\n')
+ fout.write(f'enum {{ BINDATA_LEN = {len(contents)} }};\n')
+ fout.write(f'const size_t bindata_len = BINDATA_LEN;\n')
fout.write(f'const uint8_t bindata[] __attribute__((aligned(16))) = {{')
print_carray(fout, contents)
fout.write('};\n')