Skip to content

Commit 747729d

Browse files
committed
Change FlashSize to eesz as per breaking change described in esp8266/Arduino#5572
(fixes kash4kev#8)
1 parent c42b971 commit 747729d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

esp8266fs.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ function getTarget(arduinoJson, preferences) {
506506
if (!["esp8266", "esp32"].includes(target.architecture))
507507
throw `Current Arduino package/architecture is not ESP8266 or ESP32.`;
508508

509-
target.flashSize = getPreference(arduinoJson, preferences, "FlashSize");
509+
target.flashSize = getPreference(arduinoJson, preferences, "eesz");
510510
target.flashMode = getPreference(arduinoJson, preferences, "FlashMode", "keep");
511511
target.flashFreq = getPreference(arduinoJson, preferences, "FlashFreq", "keep");
512512

@@ -580,7 +580,7 @@ function getSpiffsOptions(packagesPath, target, arduinoJson, preferences) {
580580
readLines(path.join(packagesPath, "boards.txt"))
581581
.forEach(line => {
582582
const match = line.match(`${target.board}\\.(?:build|upload)\\.(\\S+)=(\\S+)`)
583-
|| line.match(`${target.board}\\.menu\\.FlashSize\\.${target.flashSize}\\.(?:build|upload)\\.(\\S+)=(\\S+)`)
583+
|| line.match(`${target.board}\\.menu\\.eesz\\.${target.flashSize}\\.(?:build|upload)\\.(\\S+)=(\\S+)`)
584584
|| line.match(`${target.board}\\.menu\\.PartitionScheme\\.${arduinoJson.PartitionScheme}\\.(?:build|upload)\\.(\\S+)=(\\S+)`);
585585

586586
if (match)

0 commit comments

Comments
 (0)