diff options
| author | Aetias <aetias@outlook.com> | 2023-10-15 18:02:34 +0200 |
|---|---|---|
| committer | Aetias <aetias@outlook.com> | 2023-10-15 18:02:34 +0200 |
| commit | cfbb047e9778f42ea70ec6abfcb268d9377c3e85 (patch) | |
| tree | d00c35be6f88b3a713f6cf33921f66824709eef0 /tools | |
| parent | d12600c65a65c375cfa0277bef22cda1c4e22326 (diff) | |
Write ROM size
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/rom/build.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/rom/build.c b/tools/rom/build.c index d1ea3ca3..bd5bf893 100644 --- a/tools/rom/build.c +++ b/tools/rom/build.c @@ -640,7 +640,8 @@ int main(int argc, const char **argv) { return 1; } - header.capacity = 15 - __builtin_clz(address); + header.romSize = address; + header.capacity = 15 - __builtin_clz(header.romSize); size_t romEnd = 1 << (17 + header.capacity); if (!Align(romEnd, fpRom, &address)) return 1; |
