Fix ESP-12E flash size // Resolve #333

This commit is contained in:
Ivan Kravets
2015-11-24 13:14:41 +02:00
parent 970ddd44bf
commit dd5a509a99
2 changed files with 8 additions and 2 deletions

View File

@ -7,6 +7,9 @@ PlatformIO 2.0
2.3.6 (2015-??-??)
~~~~~~~~~~~~~~~~~~
* Fixed ESP-12E flash size
(`pull #333 <https://github.com/platformio/platformio/pull/333>`_)
2.3.5 (2015-11-18)
~~~~~~~~~~~~~~~~~~

View File

@ -103,6 +103,8 @@ if "FRAMEWORK" in env:
]
)
_board_max_rom = int(
env.get("BOARD_OPTIONS", {}).get("upload", {}).get("maximum_size", 0))
env.Append(
BUILDERS=dict(
ElfToBin=Builder(
@ -113,8 +115,9 @@ env.Append(
"-bo", "$TARGET",
"-bm", "dio",
"-bf", "${BOARD_OPTIONS['build']['f_cpu'][:2]}",
"-bz", str(int(env.get("BOARD_OPTIONS", {}).get(
"upload", {}).get("maximum_size") / 1024)) + "K",
"-bz",
"%dK" % (_board_max_rom / 1024) if _board_max_rom < 1048576
else "%dM" % (_board_max_rom / 1048576),
"-bs", ".text",
"-bp", "4096",
"-ec",