@@ -978,7 +978,7 @@ def flash_size (display, optname, ld, desc, max_upload_size, spiffs_start = 0, s
978
978
( menub + 'spiffs_pagesize' , '256' ),
979
979
( menu + '.upload.maximum_size' , "%i" % max_upload_size ),
980
980
])
981
- if spiffs_start > 0 :
981
+ if spiffs_size > 0 :
982
982
d .update (collections .OrderedDict ([
983
983
( menub + 'spiffs_start' , "0x%05X" % spiffs_start ),
984
984
( menub + 'spiffs_end' , "0x%05X" % (spiffs_start + spiffs_size ) ),
@@ -1008,15 +1008,24 @@ def flash_size (display, optname, ld, desc, max_upload_size, spiffs_start = 0, s
1008
1008
else :
1009
1009
page = 0x100
1010
1010
block = 0x2000
1011
- print "/* file %s */" % ld
1012
- print "/* Flash Split for %s chips */" % optname
1011
+
1012
+ print "/* Flash Split for %s chips */" % display
1013
+ print "/* sketch %dKB */" % (max_upload_size / 1024 )
1014
+ if spiffs_size > 0 :
1015
+ empty_size = spiffs_start - max_upload_size - 4096
1016
+ if empty_size > 1024 :
1017
+ print "/* empty %dKB */" % (empty_size / 1024 )
1018
+ print "/* spiffs %dKB */" % (spiffs_size / 1024 )
1019
+ print "/* eeprom 20KB */"
1020
+ print ""
1013
1021
print "MEMORY"
1014
1022
print "{"
1015
1023
print " dport0_0_seg : org = 0x3FF00000, len = 0x10"
1016
1024
print " dram0_0_seg : org = 0x3FFE8000, len = 0x14000"
1017
1025
print " iram1_0_seg : org = 0x40100000, len = 0x8000"
1018
1026
print " irom0_0_seg : org = 0x40201010, len = 0x%x" % max_upload_size
1019
1027
print "}"
1028
+ print ""
1020
1029
print "PROVIDE ( _SPIFFS_start = 0x%08X );" % (0x40200000 + spiffs_start )
1021
1030
print "PROVIDE ( _SPIFFS_end = 0x%08X );" % (0x40200000 + spiffs_start + spiffs_size )
1022
1031
print "PROVIDE ( _SPIFFS_page = 0x%X );" % page
@@ -1031,10 +1040,10 @@ def flash_size (display, optname, ld, desc, max_upload_size, spiffs_start = 0, s
1031
1040
return d
1032
1041
1033
1042
def all_flash_size ():
1034
- f512 = flash_size ('512K' , '512K0' , 'eagle.flash.512k0.ld' , 'no SPIFFS' , 499696 )
1043
+ f512 = flash_size ('512K' , '512K0' , 'eagle.flash.512k0.ld' , 'no SPIFFS' , 499696 , 0x7B000 )
1035
1044
f512 .update (flash_size ('512K' , '512K64' , 'eagle.flash.512k64.ld' , '64K SPIFFS' , 434160 , 0x6B000 , 0x10000 , 4096 ))
1036
1045
f512 .update (flash_size ('512K' , '512K128' , 'eagle.flash.512k128.ld' , '128K SPIFFS' , 368624 , 0x5B000 , 0x20000 , 4096 ))
1037
- f1m = flash_size ( '1M' , '1M0' , 'eagle.flash.1m0.ld' , 'no SPIFFS' , 1023984 )
1046
+ f1m = flash_size ( '1M' , '1M0' , 'eagle.flash.1m0.ld' , 'no SPIFFS' , 1023984 , 0xFB000 )
1038
1047
f1m .update ( flash_size ( '1M' , '1M64' , 'eagle.flash.1m64.ld' , '64K SPIFFS' , 958448 , 0xEB000 , 0x10000 , 4096 ))
1039
1048
f1m .update ( flash_size ( '1M' , '1M128' , 'eagle.flash.1m128.ld' , '128K SPIFFS' , 892912 , 0xDB000 , 0x20000 , 4096 ))
1040
1049
f1m .update ( flash_size ( '1M' , '1M144' , 'eagle.flash.1m144.ld' , '144K SPIFFS' , 876528 , 0xD7000 , 0x24000 , 4096 ))
0 commit comments