diff --git a/applications/external/swd_probe/swd_probe_app.c b/applications/external/swd_probe/swd_probe_app.c index c53500ae4..9795f12de 100644 --- a/applications/external/swd_probe/swd_probe_app.c +++ b/applications/external/swd_probe/swd_probe_app.c @@ -6,6 +6,8 @@ #include "jep106.h" #include "adi.h" +#define SWD_PATH EXT_PATH("apps_data/swd") + static void render_callback(Canvas* const canvas, void* cb_ctx); static bool swd_message_process(AppFSM* ctx); static uint8_t swd_transfer(AppFSM* const ctx, bool ap, bool write, uint8_t a23, uint32_t* data); @@ -2927,10 +2929,9 @@ static bool swd_message_process(AppFSM* ctx) { break; case ModePageScan: { - FuriString* result_path = furi_string_alloc_printf(EXT_PATH("swd_scripts")); + FuriString* result_path = furi_string_alloc_printf(SWD_PATH); FuriString* preselected = furi_string_alloc_printf( - (strlen(ctx->script_detected) > 0) ? ctx->script_detected : - EXT_PATH("swd_scripts")); + (strlen(ctx->script_detected) > 0) ? ctx->script_detected : SWD_PATH); DialogsFileBrowserOptions options; dialog_file_browser_set_basic_options(&options, "swd", &I_swd); @@ -3000,10 +3001,9 @@ static bool swd_message_process(AppFSM* ctx) { } } else if((ctx->mode_page == ModePageScan) || (ctx->mode_page == ModePageFound)) { uint32_t mode_page = ctx->mode_page; - FuriString* result_path = furi_string_alloc_printf(EXT_PATH("swd_scripts")); + FuriString* result_path = furi_string_alloc_printf(SWD_PATH); FuriString* preselected = furi_string_alloc_printf( - (strlen(ctx->script_detected) > 0) ? ctx->script_detected : - EXT_PATH("swd_scripts")); + (strlen(ctx->script_detected) > 0) ? ctx->script_detected : SWD_PATH); DialogsFileBrowserOptions options; dialog_file_browser_set_basic_options(&options, "swd", &I_swd); @@ -3102,6 +3102,7 @@ int32_t swd_probe_app_main(void* p) { app->gui = furi_record_open(RECORD_GUI); app->dialogs = furi_record_open(RECORD_DIALOGS); app->storage = furi_record_open(RECORD_STORAGE); + storage_common_migrate(app->storage, EXT_PATH("swd_scripts"), SWD_PATH); DBGS("furi_mutex_alloc"); app->swd_mutex = furi_mutex_alloc(FuriMutexTypeNormal); @@ -3129,7 +3130,7 @@ int32_t swd_probe_app_main(void* p) { notification_message(app->notification, &sequence_display_backlight_enforce_on); DBGS("swd_execute_script"); - swd_execute_script(app, EXT_PATH("swd_scripts/startup.swd")); + swd_execute_script(app, SWD_PATH "/startup.swd"); // dolphin_deed(DolphinDeedPluginGameStart); diff --git a/assets/resources/swd_scripts/100us.swd b/assets/resources/apps_data/swd/100us.swd similarity index 100% rename from assets/resources/swd_scripts/100us.swd rename to assets/resources/apps_data/swd/100us.swd diff --git a/assets/resources/swd_scripts/call_test_1.swd b/assets/resources/apps_data/swd/call_test_1.swd similarity index 100% rename from assets/resources/swd_scripts/call_test_1.swd rename to assets/resources/apps_data/swd/call_test_1.swd diff --git a/assets/resources/swd_scripts/call_test_2.swd b/assets/resources/apps_data/swd/call_test_2.swd similarity index 100% rename from assets/resources/swd_scripts/call_test_2.swd rename to assets/resources/apps_data/swd/call_test_2.swd diff --git a/assets/resources/swd_scripts/dump_0x00000000_1k.swd b/assets/resources/apps_data/swd/dump_0x00000000_1k.swd similarity index 55% rename from assets/resources/swd_scripts/dump_0x00000000_1k.swd rename to assets/resources/apps_data/swd/dump_0x00000000_1k.swd index a8870fe30..0c75d8e1b 100644 --- a/assets/resources/swd_scripts/dump_0x00000000_1k.swd +++ b/assets/resources/apps_data/swd/dump_0x00000000_1k.swd @@ -1,6 +1,6 @@ ap_select 0 max_tries 50 block_size 4 -mem_dump /ext/swd_scripts/flash.bin 0x00000000 0x100000 2 +mem_dump /ext/apps_data/swd/flash.bin 0x00000000 0x100000 2 beep 1 message 5 "Reading sucessful" diff --git a/assets/resources/swd_scripts/dump_0x00000000_4b.swd b/assets/resources/apps_data/swd/dump_0x00000000_4b.swd similarity index 100% rename from assets/resources/swd_scripts/dump_0x00000000_4b.swd rename to assets/resources/apps_data/swd/dump_0x00000000_4b.swd diff --git a/assets/resources/swd_scripts/dump_STM32.swd b/assets/resources/apps_data/swd/dump_STM32.swd similarity index 100% rename from assets/resources/swd_scripts/dump_STM32.swd rename to assets/resources/apps_data/swd/dump_STM32.swd diff --git a/assets/resources/swd_scripts/goto_test.swd b/assets/resources/apps_data/swd/goto_test.swd similarity index 100% rename from assets/resources/swd_scripts/goto_test.swd rename to assets/resources/apps_data/swd/goto_test.swd diff --git a/assets/resources/swd_scripts/halt.swd b/assets/resources/apps_data/swd/halt.swd similarity index 100% rename from assets/resources/swd_scripts/halt.swd rename to assets/resources/apps_data/swd/halt.swd diff --git a/assets/resources/swd_scripts/reset.swd b/assets/resources/apps_data/swd/reset.swd similarity index 100% rename from assets/resources/swd_scripts/reset.swd rename to assets/resources/apps_data/swd/reset.swd diff --git a/assets/resources/swd_scripts/test_write.swd b/assets/resources/apps_data/swd/test_write.swd similarity index 100% rename from assets/resources/swd_scripts/test_write.swd rename to assets/resources/apps_data/swd/test_write.swd