1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-24 19:42:27 +03:00
Files
esp8266/tools/sdk/ld/eagle.flash.2m512.ld
Earle F. Philhower, III 828857d0e0 Make SPIFFS be an integer number of blocks (#5989)
* Make SPIFFS be an integer number of blocks

boards.txt.py simply calculated the end and start using flash sizes, but
in cases where an 8K page was used (>512KB SPIFFS), this could leave a
4K half-block left at the end of SPIFFS.

mkspiffs and the SPIFFS code uses integer division to calculate the
maximum block number, so it worked fine in practice and the code simply
ignored the extra, fractional block.

Now actually take block size into account when calculating the end of
SPIFFS, ensuring no fractional blocks are passed in.  Does not result in
data loss on pre-existing SPIFFS filesystems.

* Fix the 1m512 case and clean up code

Ensure that no SPIFFS_block in the LD files is modified from the
original to endure correct backwards compatibility

* Factor out common if, clean code

* Make boards.py vars "fs_xx" instead of "spiffs_xx"
2019-07-09 10:24:25 +02:00

23 lines
728 B
Plaintext

/* Flash Split for 2M chips */
/* sketch @0x40200000 (~1019KB) (1044464B) */
/* empty @0x402FEFF0 (~516KB) (528400B) */
/* spiffs @0x40380000 (~488KB) (499712B) */
/* eeprom @0x403FB000 (4KB) */
/* rfcal @0x403FC000 (4KB) */
/* wifi @0x403FD000 (12KB) */
MEMORY
{
dport0_0_seg : org = 0x3FF00000, len = 0x10
dram0_0_seg : org = 0x3FFE8000, len = 0x14000
iram1_0_seg : org = 0x40100000, len = 0x8000
irom0_0_seg : org = 0x40201010, len = 0xfeff0
}
PROVIDE ( _FS_start = 0x40380000 );
PROVIDE ( _FS_end = 0x403FA000 );
PROVIDE ( _FS_page = 0x100 );
PROVIDE ( _FS_block = 0x2000 );
INCLUDE "local.eagle.app.v6.common.ld"