Skip to content

Commit 23ea21c

Browse files
earlephilhowerivankravets
authored andcommitted
Include TEXT1 in generated bins, avoid boot loop (#144)
The Arduino 8266 code recently split .text into .text and .text1 to enable placing certain functions in IRAM automatically (required for callbacks in IRQs). Update the binary creation and size calculation to account for this. Without this change, infinite boot loops will occur because the main code will never be uploaded to the chip. Fixes #143
1 parent 3e77597 commit 23ea21c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

builder/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def _update_max_upload_size(env):
148148

149149
MKSPIFFSTOOL="mkspiffs",
150150

151-
SIZEPROGREGEXP=r"^(?:\.irom0\.text|\.text|\.data|\.rodata|)\s+([0-9]+).*",
151+
SIZEPROGREGEXP=r"^(?:\.irom0\.text|\.text|\.text1|\.data|\.rodata|)\s+([0-9]+).*",
152152
SIZEDATAREGEXP=r"^(?:\.data|\.rodata|\.bss)\s+([0-9]+).*",
153153
SIZECHECKCMD="$SIZETOOL -A -d $SOURCES",
154154
SIZEPRINTCMD='$SIZETOOL -B -d $SOURCES',
@@ -227,6 +227,7 @@ def _update_max_upload_size(env):
227227
"-eo", "$SOURCES",
228228
"-bs", ".irom0.text",
229229
"-bs", ".text",
230+
"-bs", ".text1",
230231
"-bs", ".data",
231232
"-bs", ".rodata",
232233
"-bc", "-ec"
@@ -248,6 +249,7 @@ def _update_max_upload_size(env):
248249
"-bf", "${__get_board_f_flash(__env__)}",
249250
"-bz", "${__get_flash_size(__env__)}",
250251
"-bs", ".text",
252+
"-bs", ".text1",
251253
"-bs", ".data",
252254
"-bs", ".rodata",
253255
"-bc", "-ec",

0 commit comments

Comments
 (0)