[FL-977] Internal Storage (#455)

* Add littlefs submodule
* Furi: add mutex in logging, fix issues with corrupted printf
* ApiHal: disable debug traces in ble glue
* App-loader: more logs
* Passport: fix invalid DolphinState usage
* ApiHal, linker script: flash API is now aware of free space, complete abstraction layer for storage
* Internal Storage: littlefs based storage services with key value API. Migrate dolphin state to new storage API.
This commit is contained in:
あく
2021-05-11 11:29:44 +03:00
committed by GitHub
parent 29d10e1b0a
commit aa24484b99
19 changed files with 583 additions and 86 deletions

View File

@@ -58,7 +58,7 @@ void app_loader_thread_state_callback(FuriThreadState state, void* context) {
}
int32_t app_loader(void* p) {
FURI_LOG_I("APPLOADER", "Started");
FURI_LOG_I("app-loader", "Starting");
state.thread = furi_thread_alloc();
furi_thread_set_state_context(state.thread, &state);
furi_thread_set_state_callback(state.thread, app_loader_thread_state_callback);
@@ -67,6 +67,7 @@ int32_t app_loader(void* p) {
state.cli = furi_record_open("cli");
// Main menu
FURI_LOG_I("app-loader", "Building main menu");
with_value_mutex(
menu_mutex, (Menu * menu) {
for(size_t i = 0; i < FLIPPER_APPS_COUNT; i++) {
@@ -93,6 +94,7 @@ int32_t app_loader(void* p) {
});
// Plugins
FURI_LOG_I("app-loader", "Building plugins menu");
with_value_mutex(
menu_mutex, (Menu * menu) {
MenuItem* menu_plugins =
@@ -124,6 +126,7 @@ int32_t app_loader(void* p) {
});
// Debug
FURI_LOG_I("app-loader", "Building debug menu");
with_value_mutex(
menu_mutex, (Menu * menu) {
MenuItem* menu_debug =
@@ -159,7 +162,7 @@ int32_t app_loader(void* p) {
(*FLIPPER_ON_SYSTEM_START[i])();
}
FURI_LOG_I("APPLOADER", "OK");
FURI_LOG_I("app-loader", "Started");
while(1) {
osThreadSuspend(osThreadGetId());