diff --git a/firmware/application/app_settings.cpp b/firmware/application/app_settings.cpp index 3e2b133c..3b99b926 100644 --- a/firmware/application/app_settings.cpp +++ b/firmware/application/app_settings.cpp @@ -156,6 +156,7 @@ bool save_settings(std::string_view store_name, const SettingBindings& bindings) File f; auto path = get_settings_path(std::string{store_name}); + make_new_directory(SETTINGS_DIR); auto error = f.create(path); if (error) return false; diff --git a/firmware/application/app_settings.hpp b/firmware/application/app_settings.hpp index 967f83bd..1dc58b2e 100644 --- a/firmware/application/app_settings.hpp +++ b/firmware/application/app_settings.hpp @@ -36,6 +36,9 @@ #include "max283x.hpp" #include "string_format.hpp" +// Folder to store app settings, pmem_fileflag, and date_fileflag +#define SETTINGS_DIR u"/SETTINGS" + // Bring in the string_view literal. using std::literals::operator""sv; diff --git a/firmware/application/ui_navigation.cpp b/firmware/application/ui_navigation.cpp index 023daf22..664e8f2b 100644 --- a/firmware/application/ui_navigation.cpp +++ b/firmware/application/ui_navigation.cpp @@ -395,6 +395,7 @@ void SystemStatusView::rtc_battery_workaround() { } } } else { + make_new_directory(SETTINGS_DIR); make_new_file(DATE_FILEFLAG); year = 1980; diff --git a/firmware/common/portapack_persistent_memory.cpp b/firmware/common/portapack_persistent_memory.cpp index 9271d336..9edfccbf 100644 --- a/firmware/common/portapack_persistent_memory.cpp +++ b/firmware/common/portapack_persistent_memory.cpp @@ -868,6 +868,8 @@ bool should_use_sdcard_for_pmem() { int save_persistent_settings_to_file() { File outfile; + + make_new_directory(SETTINGS_DIR); auto error = outfile.create(PMEM_SETTING_FILE); if (error) return false; @@ -912,7 +914,9 @@ bool debug_dump() { painter.draw_string({0, 320 - 16}, ui::Styles::red, "ERROR DUMPING " + filename.filename().string() + " !"); return false; } - pmem_dump_file.write_line("FW version " VERSION_STRING); + pmem_dump_file.write_line("FW version: " VERSION_STRING); + pmem_dump_file.write_line("Ext APPS version req'd: 0x" + to_string_hex(VERSION_MD5)); + pmem_dump_file.write_line("GCC version: " + to_string_dec_int(__GNUC__) + "." + to_string_dec_int(__GNUC_MINOR__) + "." + to_string_dec_int(__GNUC_PATCHLEVEL__)); // write persistent memory pmem_dump_file.write_line("\n[Persistent Memory]");