Skip to content

inconsistent block size for spiffs in board.txt. and ld files #5412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Dec 4, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ generic.menu.eesz.2M128.upload.maximum_size=1044464
generic.menu.eesz.2M128.build.rfcal_addr=0x1FC000
generic.menu.eesz.2M128.build.spiffs_start=0x1E0000
generic.menu.eesz.2M128.build.spiffs_end=0x1FB000
generic.menu.eesz.2M128.build.spiffs_blocksize=8192
generic.menu.eesz.2M128.build.spiffs_blocksize=4096
generic.menu.eesz.2M256=2M (256K SPIFFS)
generic.menu.eesz.2M256.build.flash_size=2M
generic.menu.eesz.2M256.build.flash_size_bytes=0x200000
Expand All @@ -208,7 +208,7 @@ generic.menu.eesz.2M256.upload.maximum_size=1044464
generic.menu.eesz.2M256.build.rfcal_addr=0x1FC000
generic.menu.eesz.2M256.build.spiffs_start=0x1C0000
generic.menu.eesz.2M256.build.spiffs_end=0x1FB000
generic.menu.eesz.2M256.build.spiffs_blocksize=8192
generic.menu.eesz.2M256.build.spiffs_blocksize=4096
generic.menu.eesz.2M512=2M (512K SPIFFS)
generic.menu.eesz.2M512.build.flash_size=2M
generic.menu.eesz.2M512.build.flash_size_bytes=0x200000
Expand All @@ -218,7 +218,7 @@ generic.menu.eesz.2M512.upload.maximum_size=1044464
generic.menu.eesz.2M512.build.rfcal_addr=0x1FC000
generic.menu.eesz.2M512.build.spiffs_start=0x180000
generic.menu.eesz.2M512.build.spiffs_end=0x1FB000
generic.menu.eesz.2M512.build.spiffs_blocksize=8192
generic.menu.eesz.2M512.build.spiffs_blocksize=4096
generic.menu.eesz.2M1M=2M (1M SPIFFS)
generic.menu.eesz.2M1M.build.flash_size=2M
generic.menu.eesz.2M1M.build.flash_size_bytes=0x200000
Expand Down Expand Up @@ -2546,7 +2546,7 @@ modwifi.menu.eesz.2M128.upload.maximum_size=1044464
modwifi.menu.eesz.2M128.build.rfcal_addr=0x1FC000
modwifi.menu.eesz.2M128.build.spiffs_start=0x1E0000
modwifi.menu.eesz.2M128.build.spiffs_end=0x1FB000
modwifi.menu.eesz.2M128.build.spiffs_blocksize=8192
modwifi.menu.eesz.2M128.build.spiffs_blocksize=4096
modwifi.menu.eesz.2M256=2M (256K SPIFFS)
modwifi.menu.eesz.2M256.build.flash_size=2M
modwifi.menu.eesz.2M256.build.flash_size_bytes=0x200000
Expand All @@ -2556,7 +2556,7 @@ modwifi.menu.eesz.2M256.upload.maximum_size=1044464
modwifi.menu.eesz.2M256.build.rfcal_addr=0x1FC000
modwifi.menu.eesz.2M256.build.spiffs_start=0x1C0000
modwifi.menu.eesz.2M256.build.spiffs_end=0x1FB000
modwifi.menu.eesz.2M256.build.spiffs_blocksize=8192
modwifi.menu.eesz.2M256.build.spiffs_blocksize=4096
modwifi.menu.eesz.2M512=2M (512K SPIFFS)
modwifi.menu.eesz.2M512.build.flash_size=2M
modwifi.menu.eesz.2M512.build.flash_size_bytes=0x200000
Expand All @@ -2566,7 +2566,7 @@ modwifi.menu.eesz.2M512.upload.maximum_size=1044464
modwifi.menu.eesz.2M512.build.rfcal_addr=0x1FC000
modwifi.menu.eesz.2M512.build.spiffs_start=0x180000
modwifi.menu.eesz.2M512.build.spiffs_end=0x1FB000
modwifi.menu.eesz.2M512.build.spiffs_blocksize=8192
modwifi.menu.eesz.2M512.build.spiffs_blocksize=4096
modwifi.menu.eesz.2M1M=2M (1M SPIFFS)
modwifi.menu.eesz.2M1M.build.flash_size=2M
modwifi.menu.eesz.2M1M.build.flash_size_bytes=0x200000
Expand Down Expand Up @@ -5398,7 +5398,7 @@ wifi_slot.menu.eesz.2M128.upload.maximum_size=1044464
wifi_slot.menu.eesz.2M128.build.rfcal_addr=0x1FC000
wifi_slot.menu.eesz.2M128.build.spiffs_start=0x1E0000
wifi_slot.menu.eesz.2M128.build.spiffs_end=0x1FB000
wifi_slot.menu.eesz.2M128.build.spiffs_blocksize=8192
wifi_slot.menu.eesz.2M128.build.spiffs_blocksize=4096
wifi_slot.menu.eesz.2M256=2M (256K SPIFFS)
wifi_slot.menu.eesz.2M256.build.flash_size=2M
wifi_slot.menu.eesz.2M256.build.flash_size_bytes=0x200000
Expand All @@ -5408,7 +5408,7 @@ wifi_slot.menu.eesz.2M256.upload.maximum_size=1044464
wifi_slot.menu.eesz.2M256.build.rfcal_addr=0x1FC000
wifi_slot.menu.eesz.2M256.build.spiffs_start=0x1C0000
wifi_slot.menu.eesz.2M256.build.spiffs_end=0x1FB000
wifi_slot.menu.eesz.2M256.build.spiffs_blocksize=8192
wifi_slot.menu.eesz.2M256.build.spiffs_blocksize=4096
wifi_slot.menu.eesz.2M512=2M (512K SPIFFS)
wifi_slot.menu.eesz.2M512.build.flash_size=2M
wifi_slot.menu.eesz.2M512.build.flash_size_bytes=0x200000
Expand All @@ -5418,7 +5418,7 @@ wifi_slot.menu.eesz.2M512.upload.maximum_size=1044464
wifi_slot.menu.eesz.2M512.build.rfcal_addr=0x1FC000
wifi_slot.menu.eesz.2M512.build.spiffs_start=0x180000
wifi_slot.menu.eesz.2M512.build.spiffs_end=0x1FB000
wifi_slot.menu.eesz.2M512.build.spiffs_blocksize=8192
wifi_slot.menu.eesz.2M512.build.spiffs_blocksize=4096
wifi_slot.menu.eesz.2M1M=2M (1M SPIFFS)
wifi_slot.menu.eesz.2M1M.build.flash_size=2M
wifi_slot.menu.eesz.2M1M.build.flash_size_bytes=0x200000
Expand Down
5 changes: 4 additions & 1 deletion tools/boards.txt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1149,10 +1149,13 @@ def flash_map (flashsize_kb, spiffs_kb = 0):
if flashsize_kb <= 1024:
max_upload_size = (flashsize_kb - (spiffs_kb + eeprom_size_kb + rfcal_size_kb + sdkwifi_size_kb)) * 1024 - reserved
spiffs_start = spiffs_end - spiffs_kb * 1024
spiffs_blocksize = 4096
else:
max_upload_size = 1024 * 1024 - reserved
spiffs_start = (flashsize_kb - spiffs_kb) * 1024

if spiffs_kb < 1024:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be < or <=?

spiffs_blocksize = 4096
else:
spiffs_blocksize = 8192

strsize = str(flashsize_kb / 1024) + 'M' if (flashsize_kb >= 1024) else str(flashsize_kb) + 'K'
Expand Down