Browse Source

Support for 2MB boards with 1MB SPIFFS and 4 sectors for EEPROM

ech1560
Xose Pérez 6 years ago
parent
commit
5104b4ced3
9 changed files with 56 additions and 14 deletions
  1. +1
    -1
      code/eagle.flash.1m0m1s.ld
  2. +3
    -3
      code/eagle.flash.1m0m2s.ld
  3. +20
    -0
      code/eagle.flash.2m1m4s.ld
  4. +1
    -1
      code/eagle.flash.4m1m4s.ld
  5. +1
    -1
      code/eagle.flash.4m3m4e.ld
  6. +1
    -1
      code/eagle.flash.512k0m1s.ld
  7. +0
    -4
      code/espurna/utils.ino
  8. +1
    -1
      code/ota.py
  9. +28
    -2
      code/platformio.ini

+ 1
- 1
code/eagle.flash.1m0m1s.ld View File

@ -1,4 +1,4 @@
/* Flash Split for 1M chips */
/* Flash Split for 1M chips, no SPIFFS, 1 sector for EEPROM */
/* sketch 999KB */
/* eeprom 4KB */
/* reserved 16KB */


+ 3
- 3
code/eagle.flash.1m0m2s.ld View File

@ -1,4 +1,4 @@
/* Flash Split for 1M chips, no SPIFFS */
/* Flash Split for 1M chips, no SPIFFS, 2 sectors for EEPROM */
/* sketch 995KB */
/* eeprom 8KB */
/* reserved 16KB */
@ -13,7 +13,7 @@ MEMORY
PROVIDE ( _SPIFFS_start = 0x402FA000 );
PROVIDE ( _SPIFFS_end = 0x402FA000 );
PROVIDE ( _SPIFFS_page = 0 );
PROVIDE ( _SPIFFS_block = 0 );
PROVIDE ( _SPIFFS_page = 0x0 );
PROVIDE ( _SPIFFS_block = 0x0 );
INCLUDE "../ld/eagle.app.v6.common.ld"

+ 20
- 0
code/eagle.flash.2m1m4s.ld View File

@ -0,0 +1,20 @@
/* Flash Split for 2M chips, ~1M SPIFFS, 4 sectors for EEPROM */
/* sketch 1019KB */
/* spiffs 992KB */
/* eeprom 16KB */
/* reserved 16KB */
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 ( _SPIFFS_start = 0x40300000 );
PROVIDE ( _SPIFFS_end = 0x403F8000 );
PROVIDE ( _SPIFFS_page = 0x100 );
PROVIDE ( _SPIFFS_block = 0x2000 );
INCLUDE "../ld/eagle.app.v6.common.ld"

+ 1
- 1
code/eagle.flash.4m1m4s.ld View File

@ -1,4 +1,4 @@
/* Flash Split for 4M chips */
/* Flash Split for 4M chips, ~1M for SPIFFS, 4 sectors for EEPROM */
/* sketch 1019KB */
/* empty/ota? 2048KB */
/* spiffs 992KB */


+ 1
- 1
code/eagle.flash.4m3m4e.ld View File

@ -1,4 +1,4 @@
/* Flash Split for 4M chips */
/* Flash Split for 4M chips, ~3M for SPIFFS, 4 sectors for EEPROM */
/* sketch 1019KB */
/* spiffs 3040KB */
/* eeprom 16KB */


+ 1
- 1
code/eagle.flash.512k0m1s.ld View File

@ -1,4 +1,4 @@
/* Flash Split for 512K chips */
/* Flash Split for 512K chips, no SPIFFS, 1 sector for EEPROM */
/* sketch 487KB */
/* eeprom 4KB */
/* reserved 16KB */


+ 0
- 4
code/espurna/utils.ino View File

@ -52,10 +52,6 @@ String getCoreRevision() {
#endif
}
unsigned long maxSketchSpace() {
return (ESP.getFreeSketchSpace() - 0x1000) & 0xFFFFF000;
}
// WTF
// Calling ESP.getFreeHeap() is making the system crash on a specific
// AiLight bulb, but anywhere else...


+ 1
- 1
code/ota.py View File

@ -209,7 +209,7 @@ def input_board():
# Choose board size of none before
if board.get('size', 0) == 0:
try:
board['size'] = int(input("Board memory size (1 for 1M, 4 for 4M): "))
board['size'] = int(input("Board memory size (1 for 1M, 2 for 2M, 4 for 4M): "))
except ValueError:
print("Wrong memory size")
return None


+ 28
- 2
code/platformio.ini View File

@ -41,6 +41,7 @@ debug_flags = -DDEBUG_ESP_CORE -DDEBUG_ESP_SSL -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP
build_flags = -g -w -DMQTT_MAX_PACKET_SIZE=400 -DNO_GLOBAL_EEPROM ${sysenv.ESPURNA_FLAGS} -DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH
build_flags_512k = ${common.build_flags} -Wl,-Teagle.flash.512k0m1s.ld
build_flags_1m0m = ${common.build_flags} -Wl,-Teagle.flash.1m0m1s.ld
build_flags_2m1m = ${common.build_flags} -Wl,-Teagle.flash.2m1m4s.ld
build_flags_4m1m = ${common.build_flags} -Wl,-Teagle.flash.4m1m4s.ld
build_flags_4m3m = ${common.build_flags} -Wl,-Teagle.flash.4m3m4s.ld
@ -55,6 +56,7 @@ upload_flags = --auth="${sysenv.ESPURNA_AUTH}"
# ------------------------------------------------------------------------------
framework = arduino
board_1m = esp01_1m
board_2m = esp_wroom_02
board_4m = esp12e
flash_mode = dout
monitor_speed = 115200
@ -108,6 +110,17 @@ build_flags = ${common.build_flags_1m0m} -DESPURNA_CORE
monitor_speed = ${common.monitor_speed}
extra_scripts = ${common.extra_scripts}
[env:espurna-core-2MB]
platform = ${common.platform}
framework = ${common.framework}
board = ${common.board_2m}
board_build.flash_mode = ${common.flash_mode}
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_2m1m} -DESPURNA_CORE
monitor_speed = ${common.monitor_speed}
extra_scripts = ${common.extra_scripts}
[env:espurna-core-4MB]
platform = ${common.platform}
framework = ${common.framework}
@ -136,6 +149,19 @@ upload_port = ${common.upload_port}
upload_flags = ${common.upload_flags}
extra_scripts = ${common.extra_scripts}
[env:esp8266-2m-ota]
platform = ${common.platform}
framework = ${common.framework}
board = ${common.board_2m}
board_build.flash_mode = ${common.flash_mode}
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_2m1m} -D${sysenv.ESPURNA_BOARD}
upload_speed = ${common.upload_speed}
upload_port = ${common.upload_port}
upload_flags = ${common.upload_flags}
extra_scripts = ${common.extra_scripts}
[env:esp8266-4m-ota]
platform = ${common.platform}
framework = ${common.framework}
@ -2529,7 +2555,7 @@ board = ${common.board_1m}
board_build.flash_mode = ${common.flash_mode}
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m0m} -DALLTERCO_SHELLY1
build_flags = ${common.build_flags_2m1m} -DALLTERCO_SHELLY1
monitor_speed = ${common.monitor_speed}
extra_scripts = ${common.extra_scripts}
@ -2540,7 +2566,7 @@ board = ${common.board_1m}
board_build.flash_mode = ${common.flash_mode}
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m0m} -DALLTERCO_SHELLY1
build_flags = ${common.build_flags_2m1m} -DALLTERCO_SHELLY1
upload_speed = ${common.upload_speed}
upload_port = ${common.upload_port}
upload_flags = ${common.upload_flags}


Loading…
Cancel
Save