Skip to content

Commit cee458a

Browse files
authored
restore SPIFFS symbols when null-sized (#5122)
fix comments fix cc0bfa0#commitcomment-30462616
1 parent ce28a76 commit cee458a

25 files changed

+110
-436
lines changed

Diff for: boards.txt

-348
Large diffs are not rendered by default.

Diff for: tools/boards.txt.py

+17-19
Original file line numberDiff line numberDiff line change
@@ -1118,12 +1118,12 @@ def flash_map (flashsize_kb, spiffs_kb = 0):
11181118
( menu + '.upload.maximum_size', "%i" % max_upload_size ),
11191119
( menub + 'rfcal_addr', "0x%X" % rfcal_addr)
11201120
])
1121-
if spiffs_kb > 0:
1122-
d.update(collections.OrderedDict([
1123-
( menub + 'spiffs_start', "0x%05X" % spiffs_start ),
1124-
( menub + 'spiffs_end', "0x%05X" % spiffs_end ),
1125-
( menub + 'spiffs_blocksize', "%i" % spiffs_blocksize ),
1126-
]))
1121+
#if spiffs_kb > 0:
1122+
# d.update(collections.OrderedDict([
1123+
# ( menub + 'spiffs_start', "0x%05X" % spiffs_start ),
1124+
# ( menub + 'spiffs_end', "0x%05X" % spiffs_end ),
1125+
# ( menub + 'spiffs_blocksize', "%i" % spiffs_blocksize ),
1126+
# ]))
11271127

11281128
if ldshow:
11291129
if ldgen:
@@ -1150,14 +1150,13 @@ def flash_map (flashsize_kb, spiffs_kb = 0):
11501150

11511151
print("/* Flash Split for %s chips */" % strsize)
11521152
print("/* sketch @0x%X (~%dKB) (%dB) */" % (spi, (max_upload_size / 1024), max_upload_size))
1153-
if spiffs_kb > 0:
1154-
empty_size = spiffs_start - max_upload_size
1155-
if empty_size > 1024:
1156-
print("/* empty @0x%X (~%dKB) (%dB) */" % (spi + max_upload_size, empty_size / 1024, empty_size))
1157-
print("/* spiffs @0x%X (~%dKB) (%dB) */" % (spi + spiffs_start, ((spiffs_end - spiffs_start) / 1024), spiffs_end - spiffs_start))
1158-
print("/* eeprom @0x%X (=%dKB) */" % (spi + rfcal_addr - eeprom_size_kb * 1024, eeprom_size_kb))
1159-
print("/* rfcal @0x%X (=%dKB) */" % (spi + rfcal_addr, rfcal_size_kb))
1160-
print("/* wifi @0x%X (=%dKB) */" % (spi + rfcal_addr + rfcal_size_kb * 1024, sdkwifi_size_kb))
1153+
empty_size = spiffs_start - max_upload_size
1154+
if empty_size > 0:
1155+
print("/* empty @0x%X (~%dKB) (%dB) */" % (spi + max_upload_size, empty_size / 1024, empty_size))
1156+
print("/* spiffs @0x%X (~%dKB) (%dB) */" % (spi + spiffs_start, ((spiffs_end - spiffs_start) / 1024), spiffs_end - spiffs_start))
1157+
print("/* eeprom @0x%X (%dKB) */" % (spi + rfcal_addr - eeprom_size_kb * 1024, eeprom_size_kb))
1158+
print("/* rfcal @0x%X (%dKB) */" % (spi + rfcal_addr, rfcal_size_kb))
1159+
print("/* wifi @0x%X (%dKB) */" % (spi + rfcal_addr + rfcal_size_kb * 1024, sdkwifi_size_kb))
11611160
print("")
11621161
print("MEMORY")
11631162
print("{")
@@ -1167,11 +1166,10 @@ def flash_map (flashsize_kb, spiffs_kb = 0):
11671166
print(" irom0_0_seg : org = 0x40201010, len = 0x%x" % max_upload_size)
11681167
print("}")
11691168
print("")
1170-
if spiffs_kb > 0:
1171-
print("PROVIDE ( _SPIFFS_start = 0x%08X );" % (0x40200000 + spiffs_start))
1172-
print("PROVIDE ( _SPIFFS_end = 0x%08X );" % (0x40200000 + spiffs_end))
1173-
print("PROVIDE ( _SPIFFS_page = 0x%X );" % page)
1174-
print("PROVIDE ( _SPIFFS_block = 0x%X );" % block)
1169+
print("PROVIDE ( _SPIFFS_start = 0x%08X );" % (0x40200000 + spiffs_start))
1170+
print("PROVIDE ( _SPIFFS_end = 0x%08X );" % (0x40200000 + spiffs_end))
1171+
print("PROVIDE ( _SPIFFS_page = 0x%X );" % page)
1172+
print("PROVIDE ( _SPIFFS_block = 0x%X );" % block)
11751173
print("")
11761174
print('INCLUDE "eagle.app.v6.common.ld"')
11771175

Diff for: tools/sdk/ld/eagle.flash.16m14m.ld

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
/* sketch @0x40200000 (~1019KB) (1044464B) */
33
/* empty @0x402FEFF0 (~1028KB) (1052688B) */
44
/* spiffs @0x40400000 (~14316KB) (14659584B) */
5-
/* eeprom @0x411FB000 (=4KB) */
6-
/* rfcal @0x411FC000 (=4KB) */
7-
/* wifi @0x411FD000 (=12KB) */
5+
/* eeprom @0x411FB000 (4KB) */
6+
/* rfcal @0x411FC000 (4KB) */
7+
/* wifi @0x411FD000 (12KB) */
88

99
MEMORY
1010
{

Diff for: tools/sdk/ld/eagle.flash.16m15m.ld

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
/* sketch @0x40200000 (~1019KB) (1044464B) */
33
/* empty @0x402FEFF0 (~4KB) (4112B) */
44
/* spiffs @0x40300000 (~15340KB) (15708160B) */
5-
/* eeprom @0x411FB000 (=4KB) */
6-
/* rfcal @0x411FC000 (=4KB) */
7-
/* wifi @0x411FD000 (=12KB) */
5+
/* eeprom @0x411FB000 (4KB) */
6+
/* rfcal @0x411FC000 (4KB) */
7+
/* wifi @0x411FD000 (12KB) */
88

99
MEMORY
1010
{

Diff for: tools/sdk/ld/eagle.flash.1m.ld

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
/* Flash Split for 1M chips */
22
/* sketch @0x40200000 (~999KB) (1023984B) */
3-
/* eeprom @0x402FB000 (=4KB) */
4-
/* rfcal @0x402FC000 (=4KB) */
5-
/* wifi @0x402FD000 (=12KB) */
3+
/* empty @0x402F9FF0 (~4KB) (4112B) */
4+
/* spiffs @0x402FB000 (~0KB) (0B) */
5+
/* eeprom @0x402FB000 (4KB) */
6+
/* rfcal @0x402FC000 (4KB) */
7+
/* wifi @0x402FD000 (12KB) */
68

79
MEMORY
810
{
@@ -12,5 +14,9 @@ MEMORY
1214
irom0_0_seg : org = 0x40201010, len = 0xf9ff0
1315
}
1416

17+
PROVIDE ( _SPIFFS_start = 0x402FB000 );
18+
PROVIDE ( _SPIFFS_end = 0x402FB000 );
19+
PROVIDE ( _SPIFFS_page = 0x0 );
20+
PROVIDE ( _SPIFFS_block = 0x0 );
1521

1622
INCLUDE "eagle.app.v6.common.ld"

Diff for: tools/sdk/ld/eagle.flash.1m128.ld

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
/* sketch @0x40200000 (~871KB) (892912B) */
33
/* empty @0x402D9FF0 (~4KB) (4112B) */
44
/* spiffs @0x402DB000 (~128KB) (131072B) */
5-
/* eeprom @0x402FB000 (=4KB) */
6-
/* rfcal @0x402FC000 (=4KB) */
7-
/* wifi @0x402FD000 (=12KB) */
5+
/* eeprom @0x402FB000 (4KB) */
6+
/* rfcal @0x402FC000 (4KB) */
7+
/* wifi @0x402FD000 (12KB) */
88

99
MEMORY
1010
{

Diff for: tools/sdk/ld/eagle.flash.1m144.ld

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
/* sketch @0x40200000 (~855KB) (876528B) */
33
/* empty @0x402D5FF0 (~4KB) (4112B) */
44
/* spiffs @0x402D7000 (~144KB) (147456B) */
5-
/* eeprom @0x402FB000 (=4KB) */
6-
/* rfcal @0x402FC000 (=4KB) */
7-
/* wifi @0x402FD000 (=12KB) */
5+
/* eeprom @0x402FB000 (4KB) */
6+
/* rfcal @0x402FC000 (4KB) */
7+
/* wifi @0x402FD000 (12KB) */
88

99
MEMORY
1010
{

Diff for: tools/sdk/ld/eagle.flash.1m160.ld

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
/* sketch @0x40200000 (~839KB) (860144B) */
33
/* empty @0x402D1FF0 (~4KB) (4112B) */
44
/* spiffs @0x402D3000 (~160KB) (163840B) */
5-
/* eeprom @0x402FB000 (=4KB) */
6-
/* rfcal @0x402FC000 (=4KB) */
7-
/* wifi @0x402FD000 (=12KB) */
5+
/* eeprom @0x402FB000 (4KB) */
6+
/* rfcal @0x402FC000 (4KB) */
7+
/* wifi @0x402FD000 (12KB) */
88

99
MEMORY
1010
{

Diff for: tools/sdk/ld/eagle.flash.1m192.ld

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
/* sketch @0x40200000 (~807KB) (827376B) */
33
/* empty @0x402C9FF0 (~4KB) (4112B) */
44
/* spiffs @0x402CB000 (~192KB) (196608B) */
5-
/* eeprom @0x402FB000 (=4KB) */
6-
/* rfcal @0x402FC000 (=4KB) */
7-
/* wifi @0x402FD000 (=12KB) */
5+
/* eeprom @0x402FB000 (4KB) */
6+
/* rfcal @0x402FC000 (4KB) */
7+
/* wifi @0x402FD000 (12KB) */
88

99
MEMORY
1010
{

Diff for: tools/sdk/ld/eagle.flash.1m256.ld

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
/* sketch @0x40200000 (~743KB) (761840B) */
33
/* empty @0x402B9FF0 (~4KB) (4112B) */
44
/* spiffs @0x402BB000 (~256KB) (262144B) */
5-
/* eeprom @0x402FB000 (=4KB) */
6-
/* rfcal @0x402FC000 (=4KB) */
7-
/* wifi @0x402FD000 (=12KB) */
5+
/* eeprom @0x402FB000 (4KB) */
6+
/* rfcal @0x402FC000 (4KB) */
7+
/* wifi @0x402FD000 (12KB) */
88

99
MEMORY
1010
{

Diff for: tools/sdk/ld/eagle.flash.1m512.ld

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
/* sketch @0x40200000 (~487KB) (499696B) */
33
/* empty @0x40279FF0 (~4KB) (4112B) */
44
/* spiffs @0x4027B000 (~512KB) (524288B) */
5-
/* eeprom @0x402FB000 (=4KB) */
6-
/* rfcal @0x402FC000 (=4KB) */
7-
/* wifi @0x402FD000 (=12KB) */
5+
/* eeprom @0x402FB000 (4KB) */
6+
/* rfcal @0x402FC000 (4KB) */
7+
/* wifi @0x402FD000 (12KB) */
88

99
MEMORY
1010
{

Diff for: tools/sdk/ld/eagle.flash.1m64.ld

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
/* sketch @0x40200000 (~935KB) (958448B) */
33
/* empty @0x402E9FF0 (~4KB) (4112B) */
44
/* spiffs @0x402EB000 (~64KB) (65536B) */
5-
/* eeprom @0x402FB000 (=4KB) */
6-
/* rfcal @0x402FC000 (=4KB) */
7-
/* wifi @0x402FD000 (=12KB) */
5+
/* eeprom @0x402FB000 (4KB) */
6+
/* rfcal @0x402FC000 (4KB) */
7+
/* wifi @0x402FD000 (12KB) */
88

99
MEMORY
1010
{

Diff for: tools/sdk/ld/eagle.flash.2m.ld

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
/* Flash Split for 2M chips */
22
/* sketch @0x40200000 (~1019KB) (1044464B) */
3-
/* eeprom @0x403FB000 (=4KB) */
4-
/* rfcal @0x403FC000 (=4KB) */
5-
/* wifi @0x403FD000 (=12KB) */
3+
/* empty @0x402FEFF0 (~1028KB) (1052688B) */
4+
/* spiffs @0x40400000 (~-20KB) (-20480B) */
5+
/* eeprom @0x403FB000 (4KB) */
6+
/* rfcal @0x403FC000 (4KB) */
7+
/* wifi @0x403FD000 (12KB) */
68

79
MEMORY
810
{
@@ -12,5 +14,9 @@ MEMORY
1214
irom0_0_seg : org = 0x40201010, len = 0xfeff0
1315
}
1416

17+
PROVIDE ( _SPIFFS_start = 0x40400000 );
18+
PROVIDE ( _SPIFFS_end = 0x403FB000 );
19+
PROVIDE ( _SPIFFS_page = 0x0 );
20+
PROVIDE ( _SPIFFS_block = 0x0 );
1521

1622
INCLUDE "eagle.app.v6.common.ld"

Diff for: tools/sdk/ld/eagle.flash.2m1m.ld

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
/* sketch @0x40200000 (~1019KB) (1044464B) */
33
/* empty @0x402FEFF0 (~4KB) (4112B) */
44
/* spiffs @0x40300000 (~1004KB) (1028096B) */
5-
/* eeprom @0x403FB000 (=4KB) */
6-
/* rfcal @0x403FC000 (=4KB) */
7-
/* wifi @0x403FD000 (=12KB) */
5+
/* eeprom @0x403FB000 (4KB) */
6+
/* rfcal @0x403FC000 (4KB) */
7+
/* wifi @0x403FD000 (12KB) */
88

99
MEMORY
1010
{

Diff for: tools/sdk/ld/eagle.flash.2m512.ld

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
/* sketch @0x40200000 (~1019KB) (1044464B) */
33
/* empty @0x402FEFF0 (~516KB) (528400B) */
44
/* spiffs @0x40380000 (~492KB) (503808B) */
5-
/* eeprom @0x403FB000 (=4KB) */
6-
/* rfcal @0x403FC000 (=4KB) */
7-
/* wifi @0x403FD000 (=12KB) */
5+
/* eeprom @0x403FB000 (4KB) */
6+
/* rfcal @0x403FC000 (4KB) */
7+
/* wifi @0x403FD000 (12KB) */
88

99
MEMORY
1010
{

Diff for: tools/sdk/ld/eagle.flash.4m.ld

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
/* Flash Split for 4M chips */
22
/* sketch @0x40200000 (~1019KB) (1044464B) */
3-
/* eeprom @0x405FB000 (=4KB) */
4-
/* rfcal @0x405FC000 (=4KB) */
5-
/* wifi @0x405FD000 (=12KB) */
3+
/* empty @0x402FEFF0 (~3076KB) (3149840B) */
4+
/* spiffs @0x40600000 (~-20KB) (-20480B) */
5+
/* eeprom @0x405FB000 (4KB) */
6+
/* rfcal @0x405FC000 (4KB) */
7+
/* wifi @0x405FD000 (12KB) */
68

79
MEMORY
810
{
@@ -12,5 +14,9 @@ MEMORY
1214
irom0_0_seg : org = 0x40201010, len = 0xfeff0
1315
}
1416

17+
PROVIDE ( _SPIFFS_start = 0x40600000 );
18+
PROVIDE ( _SPIFFS_end = 0x405FB000 );
19+
PROVIDE ( _SPIFFS_page = 0x0 );
20+
PROVIDE ( _SPIFFS_block = 0x0 );
1521

1622
INCLUDE "eagle.app.v6.common.ld"

Diff for: tools/sdk/ld/eagle.flash.4m1m.ld

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
/* sketch @0x40200000 (~1019KB) (1044464B) */
33
/* empty @0x402FEFF0 (~2052KB) (2101264B) */
44
/* spiffs @0x40500000 (~1004KB) (1028096B) */
5-
/* eeprom @0x405FB000 (=4KB) */
6-
/* rfcal @0x405FC000 (=4KB) */
7-
/* wifi @0x405FD000 (=12KB) */
5+
/* eeprom @0x405FB000 (4KB) */
6+
/* rfcal @0x405FC000 (4KB) */
7+
/* wifi @0x405FD000 (12KB) */
88

99
MEMORY
1010
{

Diff for: tools/sdk/ld/eagle.flash.4m2m.ld

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
/* sketch @0x40200000 (~1019KB) (1044464B) */
33
/* empty @0x402FEFF0 (~1028KB) (1052688B) */
44
/* spiffs @0x40400000 (~2028KB) (2076672B) */
5-
/* eeprom @0x405FB000 (=4KB) */
6-
/* rfcal @0x405FC000 (=4KB) */
7-
/* wifi @0x405FD000 (=12KB) */
5+
/* eeprom @0x405FB000 (4KB) */
6+
/* rfcal @0x405FC000 (4KB) */
7+
/* wifi @0x405FD000 (12KB) */
88

99
MEMORY
1010
{

Diff for: tools/sdk/ld/eagle.flash.4m3m.ld

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
/* sketch @0x40200000 (~1019KB) (1044464B) */
33
/* empty @0x402FEFF0 (~4KB) (4112B) */
44
/* spiffs @0x40300000 (~3052KB) (3125248B) */
5-
/* eeprom @0x405FB000 (=4KB) */
6-
/* rfcal @0x405FC000 (=4KB) */
7-
/* wifi @0x405FD000 (=12KB) */
5+
/* eeprom @0x405FB000 (4KB) */
6+
/* rfcal @0x405FC000 (4KB) */
7+
/* wifi @0x405FD000 (12KB) */
88

99
MEMORY
1010
{

Diff for: tools/sdk/ld/eagle.flash.512k.ld

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
/* Flash Split for 512K chips */
22
/* sketch @0x40200000 (~487KB) (499696B) */
3-
/* eeprom @0x4027B000 (=4KB) */
4-
/* rfcal @0x4027C000 (=4KB) */
5-
/* wifi @0x4027D000 (=12KB) */
3+
/* empty @0x40279FF0 (~4KB) (4112B) */
4+
/* spiffs @0x4027B000 (~0KB) (0B) */
5+
/* eeprom @0x4027B000 (4KB) */
6+
/* rfcal @0x4027C000 (4KB) */
7+
/* wifi @0x4027D000 (12KB) */
68

79
MEMORY
810
{
@@ -12,5 +14,9 @@ MEMORY
1214
irom0_0_seg : org = 0x40201010, len = 0x79ff0
1315
}
1416

17+
PROVIDE ( _SPIFFS_start = 0x4027B000 );
18+
PROVIDE ( _SPIFFS_end = 0x4027B000 );
19+
PROVIDE ( _SPIFFS_page = 0x0 );
20+
PROVIDE ( _SPIFFS_block = 0x0 );
1521

1622
INCLUDE "eagle.app.v6.common.ld"

Diff for: tools/sdk/ld/eagle.flash.512k128.ld

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
/* sketch @0x40200000 (~359KB) (368624B) */
33
/* empty @0x40259FF0 (~4KB) (4112B) */
44
/* spiffs @0x4025B000 (~128KB) (131072B) */
5-
/* eeprom @0x4027B000 (=4KB) */
6-
/* rfcal @0x4027C000 (=4KB) */
7-
/* wifi @0x4027D000 (=12KB) */
5+
/* eeprom @0x4027B000 (4KB) */
6+
/* rfcal @0x4027C000 (4KB) */
7+
/* wifi @0x4027D000 (12KB) */
88

99
MEMORY
1010
{

Diff for: tools/sdk/ld/eagle.flash.512k32.ld

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
/* sketch @0x40200000 (~455KB) (466928B) */
33
/* empty @0x40271FF0 (~4KB) (4112B) */
44
/* spiffs @0x40273000 (~32KB) (32768B) */
5-
/* eeprom @0x4027B000 (=4KB) */
6-
/* rfcal @0x4027C000 (=4KB) */
7-
/* wifi @0x4027D000 (=12KB) */
5+
/* eeprom @0x4027B000 (4KB) */
6+
/* rfcal @0x4027C000 (4KB) */
7+
/* wifi @0x4027D000 (12KB) */
88

99
MEMORY
1010
{

Diff for: tools/sdk/ld/eagle.flash.512k64.ld

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
/* sketch @0x40200000 (~423KB) (434160B) */
33
/* empty @0x40269FF0 (~4KB) (4112B) */
44
/* spiffs @0x4026B000 (~64KB) (65536B) */
5-
/* eeprom @0x4027B000 (=4KB) */
6-
/* rfcal @0x4027C000 (=4KB) */
7-
/* wifi @0x4027D000 (=12KB) */
5+
/* eeprom @0x4027B000 (4KB) */
6+
/* rfcal @0x4027C000 (4KB) */
7+
/* wifi @0x4027D000 (12KB) */
88

99
MEMORY
1010
{

Diff for: tools/sdk/ld/eagle.flash.8m6m.ld

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
/* sketch @0x40200000 (~1019KB) (1044464B) */
33
/* empty @0x402FEFF0 (~1028KB) (1052688B) */
44
/* spiffs @0x40400000 (~6124KB) (6270976B) */
5-
/* eeprom @0x409FB000 (=4KB) */
6-
/* rfcal @0x409FC000 (=4KB) */
7-
/* wifi @0x409FD000 (=12KB) */
5+
/* eeprom @0x409FB000 (4KB) */
6+
/* rfcal @0x409FC000 (4KB) */
7+
/* wifi @0x409FD000 (12KB) */
88

99
MEMORY
1010
{

Diff for: tools/sdk/ld/eagle.flash.8m7m.ld

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
/* sketch @0x40200000 (~1019KB) (1044464B) */
33
/* empty @0x402FEFF0 (~4KB) (4112B) */
44
/* spiffs @0x40300000 (~7148KB) (7319552B) */
5-
/* eeprom @0x409FB000 (=4KB) */
6-
/* rfcal @0x409FC000 (=4KB) */
7-
/* wifi @0x409FD000 (=12KB) */
5+
/* eeprom @0x409FB000 (4KB) */
6+
/* rfcal @0x409FC000 (4KB) */
7+
/* wifi @0x409FD000 (12KB) */
88

99
MEMORY
1010
{

0 commit comments

Comments
 (0)