summaryrefslogtreecommitdiff
path: root/esp8266/makeimg.py
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-04-03 15:40:53 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-04-03 15:45:14 +0300
commit8d2bcaf3cdf5f908dd44bf822b65d807c8215bcc (patch)
treef9385db2274cb7765cacd899756d6d4eae5352a1 /esp8266/makeimg.py
parent9698a60591b47798e24040d61df809f9d6e3584b (diff)
esp8266: Minimize gap between Inst/DataRAM segments and FlashROM segment.
With .rodata being in FlashROM now, gap can be much smaller now. InstRAM can be max 32K, and with segment headers, that already makes it more than 32K. Then there's some .data still, and the next Flash page boundary is 0x9000. That figure should be more or less future-proof. TODO: Refactor makeimg to take FlashROM segment offset from file name.
Diffstat (limited to 'esp8266/makeimg.py')
-rw-r--r--esp8266/makeimg.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/esp8266/makeimg.py b/esp8266/makeimg.py
index 1ac681cb7..e63f956bd 100644
--- a/esp8266/makeimg.py
+++ b/esp8266/makeimg.py
@@ -1,5 +1,7 @@
import sys
+SEGS_MAX_SIZE = 0x9000
+
assert len(sys.argv) == 4
with open(sys.argv[3], 'wb') as fout:
@@ -9,7 +11,7 @@ with open(sys.argv[3], 'wb') as fout:
fout.write(data_flash)
print('flash ', len(data_flash))
- pad = b'\xff' * (0x10000 - len(data_flash))
+ pad = b'\xff' * (SEGS_MAX_SIZE - len(data_flash))
fout.write(pad)
print('padding ', len(pad))
@@ -18,4 +20,4 @@ with open(sys.argv[3], 'wb') as fout:
fout.write(data_rom)
print('irom0text', len(data_rom))
- print('total ', 0x10000 + len(data_rom))
+ print('total ', SEGS_MAX_SIZE + len(data_rom))