Skip to content

Commit 4795474

Browse files
committed
Merge branch 'release/v2.0.4'
2 parents 8ccda5f + e5992cb commit 4795474

File tree

19 files changed

+80
-377
lines changed

19 files changed

+80
-377
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ env:
99
- PLATFORMIO_PROJECT_DIR=examples/arduino-webserver
1010
- PLATFORMIO_PROJECT_DIR=examples/arduino-wifiscan
1111
- PLATFORMIO_PROJECT_DIR=examples/esp8266-rtos-sdk-blink
12-
- PLATFORMIO_PROJECT_DIR=examples/native-sdk
1312
- PLATFORMIO_PROJECT_DIR=examples/simba-blink
1413

1514
install:

appveyor.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ environment:
66
- PLATFORMIO_PROJECT_DIR: "examples/arduino-webserver"
77
- PLATFORMIO_PROJECT_DIR: "examples/arduino-wifiscan"
88
- PLATFORMIO_PROJECT_DIR: "examples/esp8266-rtos-sdk-blink"
9-
- PLATFORMIO_PROJECT_DIR: "examples/native-sdk"
109
- PLATFORMIO_PROJECT_DIR: "examples/simba-blink"
1110

1211
install:

builder/frameworks/_bare.py

Lines changed: 0 additions & 91 deletions
This file was deleted.

builder/frameworks/esp8266-nonos-sdk.py

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,35 @@
106106
env.Append(ASFLAGS=env.get("CCFLAGS", [])[:])
107107

108108
env.Replace(
109-
LDSCRIPT_PATH=[join(FRAMEWORK_DIR, "ld", "eagle.app.v6.ld")],
110-
UPLOAD_ADDRESS="0x10000"
109+
LDSCRIPT_PATH=join(FRAMEWORK_DIR, "ld", "eagle.app.v6.ld")
111110
)
112111

112+
board_flash_size = int(env.BoardConfig().get("upload.maximum_size", 0))
113+
if board_flash_size > 8388608:
114+
init_data_flash_address = 0xffc000 # for 16 MB
115+
elif board_flash_size > 4194304:
116+
init_data_flash_address = 0x7fc000 # for 8 MB
117+
elif board_flash_size > 2097152:
118+
init_data_flash_address = 0x3fc000 # for 4 MB
119+
elif board_flash_size > 1048576:
120+
init_data_flash_address = 0x1fc000 # for 2 MB
121+
elif board_flash_size > 524288:
122+
init_data_flash_address = 0xfc000 # for 1 MB
123+
else:
124+
init_data_flash_address = 0x7c000 # for 512 kB
125+
126+
env.Append(
127+
FLASH_EXTRA_IMAGES=[
128+
("0x00000", join("$BUILD_DIR", "eagle.flash.bin")),
129+
("0x10000", join("$BUILD_DIR", "eagle.irom0text.bin")),
130+
(hex(init_data_flash_address),
131+
join(FRAMEWORK_DIR, "bin", "esp_init_data_default.bin")),
132+
(hex(init_data_flash_address + 0x2000),
133+
join(FRAMEWORK_DIR, "bin", "blank.bin"))
134+
]
135+
)
136+
137+
113138
#
114139
# Target: Build Driver Library
115140
#

builder/frameworks/esp8266-rtos-sdk.py

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,33 @@
106106
env.Append(ASFLAGS=env.get("CCFLAGS", [])[:])
107107

108108
env.Replace(
109-
LDSCRIPT_PATH=[join(FRAMEWORK_DIR, "ld", "eagle.app.v6.ld")],
110-
UPLOAD_ADDRESS="0x20000"
109+
LDSCRIPT_PATH=join(FRAMEWORK_DIR, "ld", "eagle.app.v6.ld"),
110+
)
111+
112+
# Extra flash images
113+
board_flash_size = int(env.BoardConfig().get("upload.maximum_size", 0))
114+
if board_flash_size > 8388608:
115+
init_data_flash_address = 0xffc000 # for 16 MB
116+
elif board_flash_size > 4194304:
117+
init_data_flash_address = 0x7fc000 # for 8 MB
118+
elif board_flash_size > 2097152:
119+
init_data_flash_address = 0x3fc000 # for 4 MB
120+
elif board_flash_size > 1048576:
121+
init_data_flash_address = 0x1fc000 # for 2 MB
122+
elif board_flash_size > 524288:
123+
init_data_flash_address = 0xfc000 # for 1 MB
124+
else:
125+
init_data_flash_address = 0x7c000 # for 512 kB
126+
127+
env.Append(
128+
FLASH_EXTRA_IMAGES=[
129+
("0x00000", join("$BUILD_DIR", "eagle.flash.bin")),
130+
("0x20000", join("$BUILD_DIR", "eagle.irom0text.bin")),
131+
(hex(init_data_flash_address),
132+
join(FRAMEWORK_DIR, "bin", "esp_init_data_default.bin")),
133+
(hex(init_data_flash_address + 0x2000),
134+
join(FRAMEWORK_DIR, "bin", "blank.bin"))
135+
]
111136
)
112137

113138
#

builder/main.py

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,6 @@ def _update_max_upload_size(env):
142142

143143
ARFLAGS=["rc"],
144144

145-
#
146-
# Packages
147-
#
148-
149-
FRAMEWORK_ARDUINOESP8266_DIR=platform.get_package_dir(
150-
"framework-arduinoespressif8266"),
151-
SDK_ESP8266_DIR=platform.get_package_dir("sdk-esp8266"),
152-
153145
#
154146
# Misc
155147
#
@@ -210,14 +202,21 @@ def _update_max_upload_size(env):
210202
#
211203

212204
if env.subst("$PIOFRAMEWORK") in ("arduino", "simba"):
205+
if "simba" in env.subst("$PIOFRAMEWORK"):
206+
ebootelf_path = join(
207+
platform.get_package_dir("framework-simba") or "", "3pp",
208+
"esp8266Arduino", "2.3.0", "bootloaders", "eboot", "eboot.elf")
209+
else:
210+
ebootelf_path = join(
211+
platform.get_package_dir("framework-arduinoespressif8266") or "",
212+
"bootloaders", "eboot", "eboot.elf")
213+
213214
env.Append(
214215
BUILDERS=dict(
215216
ElfToBin=Builder(
216217
action=env.VerboseAction(" ".join([
217218
'"$OBJCOPY"',
218-
"-eo",
219-
'"%s"' % join("$FRAMEWORK_ARDUINOESP8266_DIR",
220-
"bootloaders", "eboot", "eboot.elf"),
219+
"-eo", '"%s"' % ebootelf_path,
221220
"-bo", "$TARGET",
222221
"-bm", "$BOARD_FLASH_MODE",
223222
"-bf", "${__get_board_f_flash(__env__)}",
@@ -261,9 +260,6 @@ def _update_max_upload_size(env):
261260
)
262261
)
263262

264-
if not env.get("PIOFRAMEWORK"):
265-
env.SConscript("frameworks/_bare.py", exports="env")
266-
267263
#
268264
# Target: Build executable and linkable firmware or SPIFFS image
269265
#
@@ -366,14 +362,9 @@ def _update_max_upload_size(env):
366362
UPLOADCMD='$UPLOADER $UPLOADERFLAGS -cf $SOURCE',
367363
)
368364
if env.subst("$PIOFRAMEWORK") not in ("arduino", "simba"): # SDK
369-
env.Append(
370-
UPLOADERFLAGS=[
371-
"-ca", "0x00000",
372-
"-cf", "${SOURCES[0]}",
373-
"-ca", "$UPLOAD_ADDRESS",
374-
"-cf", "${SOURCES[1]}"
375-
]
376-
)
365+
for image in env.get("FLASH_EXTRA_IMAGES", []):
366+
env.Append(
367+
UPLOADERFLAGS=["-ca", image[0], "-cf", env.subst(image[1])])
377368
env.Replace(UPLOADCMD="$UPLOADER $UPLOADERFLAGS")
378369
elif "uploadfs" in COMMAND_LINE_TARGETS:
379370
env.Append(UPLOADERFLAGS=["-ca", "${hex(SPIFFS_START)}"])

examples/esp8266-nonos-sdk-blink/platformio.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
; Please visit documentation for the other options and examples
99
; http://docs.platformio.org/page/projectconf.html
1010

11+
[env:nodemcuv2]
12+
platform = espressif8266
13+
board = nodemcuv2
14+
framework = esp8266-nonos-sdk
15+
monitor_speed = 74880
16+
1117
[env:esp12e]
1218
platform = espressif8266
1319
board = esp12e

examples/esp8266-rtos-sdk-blink/platformio.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
;
88
; Please visit documentation for the other options and examples
99
; http://docs.platformio.org/page/projectconf.html
10+
11+
[env:nodemcuv2]
12+
platform = espressif8266
13+
framework = esp8266-rtos-sdk
14+
board = nodemcuv2
15+
1016
[env:esp_wroom_02]
1117
platform = espressif8266
1218
framework = esp8266-rtos-sdk

examples/native-sdk/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

examples/native-sdk/.travis.yml

Lines changed: 0 additions & 67 deletions
This file was deleted.

0 commit comments

Comments
 (0)