summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-10-03 11:26:14 +0700
committerhathach <[email protected]>2025-10-03 11:26:14 +0700
commit3b007249cfd9649db2ad28e9a285d7a8ace8854e (patch)
treeb2788dadf93387fbaf6bbdc3f3e4c20abaf4c6c2 /tools
parente2dbf2bdd19f8e125f27223b874f9f8f68eb4f4c (diff)
fix iar build
Diffstat (limited to 'tools')
-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')