Browse Source

Changing partition-layout to get bigger NVS-storage

master
Torsten Stauder 4 years ago
parent
commit
10555b16fb
  1. 9
      README.md
  2. 7
      changelog.md
  3. 9
      custom_16mb_ota.csv
  4. 5
      custom_4mb_noota.csv
  5. 25
      platformio.ini
  6. 1
      src/LogMessages_DE.cpp
  7. 2
      src/LogMessages_EN.cpp
  8. 12
      src/System.cpp
  9. 1
      src/System.h
  10. 1
      src/logmessages.h
  11. 8
      src/main.cpp

9
README.md

@ -5,11 +5,14 @@
* DE: Ich habe ein primär deutschsprachiges Forum aufgesetzt, welches ich mit reichlich Doku versehen habe. Würde mich freuen, euch dort zu sehen: https://forum.espuino.de. Ihr könnt euch dort mit eurem Github-Login einloggen, jedoch auch "normal" anmelden. Dokumenation findet ihr insbesondere hier: https://forum.espuino.de/c/dokumentation/anleitungen/10
## Build status
![build workflow](https://github.com/biologist79/ESPuino/actions/workflows/build.yml/badge.svg)
## IMPORTANT!!!
* Partition-layout for ESP32 is changed along with this branch. This step was necessary in order to resize (enlarge) the memory-region where especially the assignments for the RFID-tags are saved. As all permanent settings (e.g. WiFi-settings) are saved there too, it's necessary to re-enter WiFi-credentials after update. But the most important thing is to recover the assignments for the RFID-tags. Please consult my [migration-document](https://forum.espuino.de/t/wechsel-zum-refactoring-branch-was-ist-zu-beachten/510).
## Changelog
Last three events:
* 19.03.2021: Added support for port-expander PCA9555. Can be used for everything, that is "button-like": buttons, headphone-detect, PN5180.IRQ.
* 28.03.2021: Added support for fileseek. With commands `CMD_SEEK_FORWARDS` and `CMD_SEEK_BACKWARDS` it's possible to jump a number of seconds defined in `jumpOffset`.
* 30.03.2021: Added support for stereo/mono via `PLAY_MONO_SPEAKER`. If active, mono is used while headphones remain stereo (if `HEADPHONE_ADJUST_ENABLE` is active).
* 22.06.2021: Changed ESP32' partition-layout in order to provider bigger NVS-storage.
* 15.06.2021: Added interrupt-handling to PCA9555
* 08.06.2021: Added global support for PA/HP-enable
## Known bugs
* Some webstreams don't run. Guess it's a combination of saturated connection-pool and lack of heap-memory. Works probably better if ESP32-WROVER (e.g. Lolin D32 pro) is used, as this chip has PSRAM. Advice: Don't enable modules (e.g. MQTT) if you don't need them as this could save memory (and trouble).
## ESPuino - what's that?

7
changelog.md

@ -1,3 +1,10 @@
## New (modules)
* 22.04.2021: Introduced refactoring-branch
* xx.05.2021: Fixing/stabilizing code
* 08.06.2021: Added global support for PA/HP-enable
* 15.06.2021: Added interrupt-handling to PCA9555
* 22.06.2021: Changed ESP32's partition-layout in order to provider bigger NVS-storage.
## Old (monolithic main.cpp)
* 11.07.2020: Added support for reversed Neopixel addressing.
* 09.10.2020: mqttUser / mqttPassword can now be configured via webgui.
* 16.10.2020: Added English as supported lanuage.

9
custom_16mb_ota.csv

@ -0,0 +1,9 @@
# 256 kB (instead of 24 kB) for nvs, the rest is used by application
# Infos: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/partition-tables.html
# Name, Type, SubType, Offset, Size, Flags
otadata, data, ota, 0x9000 , 0x2000,
phy_init, data, phy, 0xb000 , 0x1000
app0, app, ota_0, 0x10000, 0x640000,
app1, app, ota_1, , 0x640000,
nvs, data, nvs, , 0x40000,
storage, data, spiffs, , 0x330000,

5
custom_4mb_noota.csv

@ -0,0 +1,5 @@
# 256 kB (instead of 24 kB) for nvs, the rest is used by application
# Infos: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/partition-tables.html
# Name, Type, SubType, Offset, Size, Flags
app0, app, factory, 0x10000, 0x3B0000,
nvs, data, nvs, , 0x40000,

25
platformio.ini

@ -39,7 +39,8 @@ platform = espressif32
board = esp-wrover-kit
framework = arduino
monitor_speed = 115200
board_build.partitions = huge_app.csv
;board_build.partitions = huge_app.csv
board_build.partitions = custom_4mb_noota.csv
build_flags = -DHAL=2
-DBOARD_HAS_PSRAM
-mfix-esp32-psram-cache-issue
@ -59,7 +60,8 @@ platform = espressif32
board = lolin32
framework = arduino
monitor_speed = 115200
board_build.partitions = huge_app.csv
;board_build.partitions = huge_app.csv
board_build.partitions = custom_4mb_noota.csv
build_flags = -DHAL=1
lib_deps =
${common.lib_deps_builtin}
@ -77,7 +79,8 @@ platform = espressif32
board = lolin_d32
framework = arduino
monitor_speed = 115200
board_build.partitions = huge_app.csv
;board_build.partitions = huge_app.csv
board_build.partitions = custom_4mb_noota.csv
build_flags = -DHAL=3
lib_deps =
${common.lib_deps_builtin}
@ -95,7 +98,9 @@ platform = espressif32
board = lolin_d32_pro
framework = arduino
monitor_speed = 115200
board_build.partitions = huge_app.csv
;board_build.partitions = huge_app.csv
;board_build.partitions = custom_4mb_noota.csv
board_build.partitions = custom_16mb_ota.csv
lib_deps =
${common.lib_deps_builtin}
${common.lib_deps_external}
@ -117,7 +122,8 @@ platform = espressif32
board = nodemcu-32s
framework = arduino
monitor_speed = 115200
board_build.partitions = huge_app.csv
;board_build.partitions = huge_app.csv
board_build.partitions = custom_4mb_noota.csv
lib_deps =
${common.lib_deps_builtin}
${common.lib_deps_external}
@ -134,7 +140,8 @@ platform = espressif32
board = az-delivery-devkit-v4
framework = arduino
monitor_speed = 115200
board_build.partitions = huge_app.csv
;board_build.partitions = huge_app.csv
board_build.partitions = custom_4mb_noota.csv
lib_deps =
${common.lib_deps_builtin}
${common.lib_deps_external}
@ -151,7 +158,8 @@ platform = espressif32
board = esp-wrover-kit
framework = arduino
monitor_speed = 115200
board_build.partitions = huge_app.csv
;board_build.partitions = huge_app.csv
board_build.partitions = custom_4mb_noota.csv
lib_deps =
${common.lib_deps_builtin}
${common.lib_deps_external}
@ -171,7 +179,8 @@ platform = espressif32
board = esp-wrover-kit
framework = arduino
monitor_speed = 115200
board_build.partitions = huge_app.csv
;board_build.partitions = huge_app.csv
board_build.partitions = custom_16mb_ota.csv
lib_deps =
${common.lib_deps_builtin}
${common.lib_deps_external}

1
src/LogMessages_DE.cpp

@ -188,5 +188,6 @@
const char portExpanderFound[] PROGMEM = "Port-expander gefunden";
const char portExpanderNotFound[] PROGMEM = "Port-expander nicht gefunden";
const char portExpanderInterruptEnabled[] PROGMEM = "Interrupt für Port-Expander aktiviert";
const char warningRefactoring[] PROGMEM = "!!!!WICHTIG!!!! Beachte bitte https://forum.espuino.de/t/wechsel-zum-refactoring-branch-was-ist-zu-beachten/510 !!!!WICHTIG!!!!";
#endif

2
src/LogMessages_EN.cpp

@ -188,5 +188,7 @@
const char portExpanderFound[] PROGMEM = "Port-expander found";
const char portExpanderNotFound[] PROGMEM = "Unable to detect port-expander";
const char portExpanderInterruptEnabled[] PROGMEM = "Enabled interrupt-handling for port-expander";
const char warningRefactoring[] PROGMEM = "!!!!IMPORTANT!!!! Please review https://forum.espuino.de/t/wechsel-zum-refactoring-branch-was-ist-zu-beachten/510 !!!!IMPORTANT!!!!";
#endif

12
src/System.cpp

@ -215,3 +215,15 @@ void System_DeepSleepManager(void) {
esp_deep_sleep_start();
}
}
// Shows warning after upgrade
void System_ShowUpgradeWarning(void) {
uint32_t nvsShowUpgradeWarningCount = gPrefsSettings.getUInt("wcountrefact", 0);
if (!nvsShowUpgradeWarningCount) {
gPrefsSettings.putUInt("wcountrefact", 1);
Log_Println((char *) FPSTR(warningRefactoring), LOGLEVEL_ERROR);
} else if (nvsShowUpgradeWarningCount < 5) {
gPrefsSettings.putUInt("wcountrefact", ++nvsShowUpgradeWarningCount);
Log_Println((char *) FPSTR(warningRefactoring), LOGLEVEL_ERROR);
}
}

1
src/System.h

@ -23,3 +23,4 @@ void System_IndicateOk(void);
void System_SetOperationMode(uint8_t opMode);
uint8_t System_GetOperationMode(void);
uint8_t System_GetOperationModeFromNvs(void);
void System_ShowUpgradeWarning(void);

1
src/logmessages.h

@ -184,3 +184,4 @@ extern const char newPlayModeMono[];
extern const char portExpanderFound[];
extern const char portExpanderNotFound[];
extern const char portExpanderInterruptEnabled[];
extern const char warningRefactoring[];

8
src/main.cpp

@ -150,7 +150,7 @@ void setup()
Serial.println(F(" | |___ ___) | | __/ | |_| | | | | | | | | (_) |"));
Serial.println(F(" |_____| |____/ |_| \\__,_| |_| |_| |_| \\___/ "));
Serial.println(F(" Rfid-controlled musicplayer\n"));
Serial.println(F(" Rev 20210615-1\n"));
Serial.println(F(" Rev 20210622-1\n"));
// print wake-up reason
printWakeUpReason();
@ -192,7 +192,11 @@ void setup()
snprintf(Log_Buffer, Log_BufferLength, "%s: %u", (char *) FPSTR(freeHeapAfterSetup), ESP.getFreeHeap());
Log_Println(Log_Buffer, LOGLEVEL_DEBUG);
Serial.printf("PSRAM: %u bytes\n", ESP.getPsramSize());
snprintf(Log_Buffer, Log_BufferLength, "PSRAM: %u bytes", ESP.getPsramSize());
Log_Println(Log_Buffer, LOGLEVEL_DEBUG);
snprintf(Log_Buffer, Log_BufferLength, "Flash-size: %u bytes", ESP.getFlashChipSize());
Log_Println(Log_Buffer, LOGLEVEL_DEBUG);
System_ShowUpgradeWarning();
}
void loop() {

Loading…
Cancel
Save