Skip to content

Commit ee3b374

Browse files
apicquotd-a-v
authored andcommitted
inconsistent block size for spiffs in board.txt. and ld files (#5412)
block size of 4096 for all boads of flash size <= 1024, or blocks size of 4096 for spiffs < 512, or block size of 8192 for all other boards
1 parent 216680b commit ee3b374

File tree

3 files changed

+101
-98
lines changed

3 files changed

+101
-98
lines changed

boards.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ generic.menu.eesz.2M128.upload.maximum_size=1044464
198198
generic.menu.eesz.2M128.build.rfcal_addr=0x1FC000
199199
generic.menu.eesz.2M128.build.spiffs_start=0x1E0000
200200
generic.menu.eesz.2M128.build.spiffs_end=0x1FB000
201-
generic.menu.eesz.2M128.build.spiffs_blocksize=8192
201+
generic.menu.eesz.2M128.build.spiffs_blocksize=4096
202202
generic.menu.eesz.2M256=2M (256K SPIFFS)
203203
generic.menu.eesz.2M256.build.flash_size=2M
204204
generic.menu.eesz.2M256.build.flash_size_bytes=0x200000
@@ -208,7 +208,7 @@ generic.menu.eesz.2M256.upload.maximum_size=1044464
208208
generic.menu.eesz.2M256.build.rfcal_addr=0x1FC000
209209
generic.menu.eesz.2M256.build.spiffs_start=0x1C0000
210210
generic.menu.eesz.2M256.build.spiffs_end=0x1FB000
211-
generic.menu.eesz.2M256.build.spiffs_blocksize=8192
211+
generic.menu.eesz.2M256.build.spiffs_blocksize=4096
212212
generic.menu.eesz.2M512=2M (512K SPIFFS)
213213
generic.menu.eesz.2M512.build.flash_size=2M
214214
generic.menu.eesz.2M512.build.flash_size_bytes=0x200000
@@ -2546,7 +2546,7 @@ modwifi.menu.eesz.2M128.upload.maximum_size=1044464
25462546
modwifi.menu.eesz.2M128.build.rfcal_addr=0x1FC000
25472547
modwifi.menu.eesz.2M128.build.spiffs_start=0x1E0000
25482548
modwifi.menu.eesz.2M128.build.spiffs_end=0x1FB000
2549-
modwifi.menu.eesz.2M128.build.spiffs_blocksize=8192
2549+
modwifi.menu.eesz.2M128.build.spiffs_blocksize=4096
25502550
modwifi.menu.eesz.2M256=2M (256K SPIFFS)
25512551
modwifi.menu.eesz.2M256.build.flash_size=2M
25522552
modwifi.menu.eesz.2M256.build.flash_size_bytes=0x200000
@@ -2556,7 +2556,7 @@ modwifi.menu.eesz.2M256.upload.maximum_size=1044464
25562556
modwifi.menu.eesz.2M256.build.rfcal_addr=0x1FC000
25572557
modwifi.menu.eesz.2M256.build.spiffs_start=0x1C0000
25582558
modwifi.menu.eesz.2M256.build.spiffs_end=0x1FB000
2559-
modwifi.menu.eesz.2M256.build.spiffs_blocksize=8192
2559+
modwifi.menu.eesz.2M256.build.spiffs_blocksize=4096
25602560
modwifi.menu.eesz.2M512=2M (512K SPIFFS)
25612561
modwifi.menu.eesz.2M512.build.flash_size=2M
25622562
modwifi.menu.eesz.2M512.build.flash_size_bytes=0x200000
@@ -5398,7 +5398,7 @@ wifi_slot.menu.eesz.2M128.upload.maximum_size=1044464
53985398
wifi_slot.menu.eesz.2M128.build.rfcal_addr=0x1FC000
53995399
wifi_slot.menu.eesz.2M128.build.spiffs_start=0x1E0000
54005400
wifi_slot.menu.eesz.2M128.build.spiffs_end=0x1FB000
5401-
wifi_slot.menu.eesz.2M128.build.spiffs_blocksize=8192
5401+
wifi_slot.menu.eesz.2M128.build.spiffs_blocksize=4096
54025402
wifi_slot.menu.eesz.2M256=2M (256K SPIFFS)
54035403
wifi_slot.menu.eesz.2M256.build.flash_size=2M
54045404
wifi_slot.menu.eesz.2M256.build.flash_size_bytes=0x200000
@@ -5408,7 +5408,7 @@ wifi_slot.menu.eesz.2M256.upload.maximum_size=1044464
54085408
wifi_slot.menu.eesz.2M256.build.rfcal_addr=0x1FC000
54095409
wifi_slot.menu.eesz.2M256.build.spiffs_start=0x1C0000
54105410
wifi_slot.menu.eesz.2M256.build.spiffs_end=0x1FB000
5411-
wifi_slot.menu.eesz.2M256.build.spiffs_blocksize=8192
5411+
wifi_slot.menu.eesz.2M256.build.spiffs_blocksize=4096
54125412
wifi_slot.menu.eesz.2M512=2M (512K SPIFFS)
54135413
wifi_slot.menu.eesz.2M512.build.flash_size=2M
54145414
wifi_slot.menu.eesz.2M512.build.flash_size_bytes=0x200000

package/package_esp8266com_index.template.json

+91-91
Original file line numberDiff line numberDiff line change
@@ -15,97 +15,97 @@
1515
"architecture": "esp8266",
1616
"archiveFileName": "",
1717
"boards": [
18-
{
19-
"name": "Generic ESP8266 Module"
20-
},
21-
{
22-
"name": "Generic ESP8285 Module"
23-
},
24-
{
25-
"name": "ESPDuino (ESP-13 Module)"
26-
},
27-
{
28-
"name": "Adafruit Feather HUZZAH ESP8266"
29-
},
30-
{
31-
"name": "Invent One"
32-
},
33-
{
34-
"name": "XinaBox CW01"
35-
},
36-
{
37-
"name": "ESPresso Lite 1.0"
38-
},
39-
{
40-
"name": "ESPresso Lite 2.0"
41-
},
42-
{
43-
"name": "Phoenix 1.0"
44-
},
45-
{
46-
"name": "Phoenix 2.0"
47-
},
48-
{
49-
"name": "NodeMCU 0.9 (ESP-12 Module)"
50-
},
51-
{
52-
"name": "NodeMCU 1.0 (ESP-12E Module)"
53-
},
54-
{
55-
"name": "Olimex MOD-WIFI-ESP8266(-DEV)"
56-
},
57-
{
58-
"name": "SparkFun ESP8266 Thing"
59-
},
60-
{
61-
"name": "SparkFun ESP8266 Thing Dev"
62-
},
63-
{
64-
"name": "SweetPea ESP-210"
65-
},
66-
{
67-
"name": "LOLIN(WEMOS) D1 R2 & mini"
68-
},
69-
{
70-
"name": "LOLIN(WEMOS) D1 mini Pro"
71-
},
72-
{
73-
"name": "LOLIN(WEMOS) D1 mini Lite"
74-
},
75-
{
76-
"name": "WeMos D1 R1"
77-
},
78-
{
79-
"name": "ESPino (ESP-12 Module)"
80-
},
81-
{
82-
"name": "ThaiEasyElec's ESPino"
83-
},
84-
{
85-
"name": "WifInfo"
86-
},
87-
{
88-
"name": "Arduino"
89-
},
90-
{
91-
"name": "4D Systems gen4 IoD Range"
92-
},
93-
{
94-
"name": "Digistump Oak"
95-
},
96-
{
97-
"name": "WiFiduino"
98-
},
99-
{
100-
"name": "Amperka WiFi Slot"
101-
},
102-
{
103-
"name": "Seeed Wio Link"
104-
},
105-
{
106-
"name": "ESPectro Core"
107-
}
108-
],
18+
{
19+
"name": "Generic ESP8266 Module"
20+
},
21+
{
22+
"name": "Generic ESP8285 Module"
23+
},
24+
{
25+
"name": "ESPDuino (ESP-13 Module)"
26+
},
27+
{
28+
"name": "Adafruit Feather HUZZAH ESP8266"
29+
},
30+
{
31+
"name": "Invent One"
32+
},
33+
{
34+
"name": "XinaBox CW01"
35+
},
36+
{
37+
"name": "ESPresso Lite 1.0"
38+
},
39+
{
40+
"name": "ESPresso Lite 2.0"
41+
},
42+
{
43+
"name": "Phoenix 1.0"
44+
},
45+
{
46+
"name": "Phoenix 2.0"
47+
},
48+
{
49+
"name": "NodeMCU 0.9 (ESP-12 Module)"
50+
},
51+
{
52+
"name": "NodeMCU 1.0 (ESP-12E Module)"
53+
},
54+
{
55+
"name": "Olimex MOD-WIFI-ESP8266(-DEV)"
56+
},
57+
{
58+
"name": "SparkFun ESP8266 Thing"
59+
},
60+
{
61+
"name": "SparkFun ESP8266 Thing Dev"
62+
},
63+
{
64+
"name": "SweetPea ESP-210"
65+
},
66+
{
67+
"name": "LOLIN(WEMOS) D1 R2 & mini"
68+
},
69+
{
70+
"name": "LOLIN(WEMOS) D1 mini Pro"
71+
},
72+
{
73+
"name": "LOLIN(WEMOS) D1 mini Lite"
74+
},
75+
{
76+
"name": "WeMos D1 R1"
77+
},
78+
{
79+
"name": "ESPino (ESP-12 Module)"
80+
},
81+
{
82+
"name": "ThaiEasyElec's ESPino"
83+
},
84+
{
85+
"name": "WifInfo"
86+
},
87+
{
88+
"name": "Arduino"
89+
},
90+
{
91+
"name": "4D Systems gen4 IoD Range"
92+
},
93+
{
94+
"name": "Digistump Oak"
95+
},
96+
{
97+
"name": "WiFiduino"
98+
},
99+
{
100+
"name": "Amperka WiFi Slot"
101+
},
102+
{
103+
"name": "Seeed Wio Link"
104+
},
105+
{
106+
"name": "ESPectro Core"
107+
}
108+
],
109109
"toolsDependencies": [
110110
{
111111
"packager": "esp8266",

tools/boards.txt.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1154,7 +1154,10 @@ def flash_map (flashsize_kb, spiffs_kb = 0):
11541154
else:
11551155
max_upload_size = 1024 * 1024 - reserved
11561156
spiffs_start = (flashsize_kb - spiffs_kb) * 1024
1157-
spiffs_blocksize = 8192
1157+
if spiffs_kb < 512:
1158+
spiffs_blocksize = 4096
1159+
else:
1160+
spiffs_blocksize = 8192
11581161

11591162
strsize = str(flashsize_kb / 1024) + 'M' if (flashsize_kb >= 1024) else str(flashsize_kb) + 'K'
11601163
strspiffs = str(spiffs_kb / 1024) + 'M' if (spiffs_kb >= 1024) else str(spiffs_kb) + 'K'

0 commit comments

Comments
 (0)