@@ -94,7 +94,7 @@ void run_openocd(void)
9494 int argc = 3 ;
9595
9696 char iface [32 ] = {0 };
97- sprintf (iface , "interface/esp_gpio_%s.cfg" , g_app_params .interface == 0 ? "jtag" : "swd" );
97+ sprintf (iface , "interface/esp_gpio_%s.cfg" , g_app_params .interface == '0' ? "jtag" : "swd" );
9898 argv [argc ++ ] = "-f" ;
9999 argv [argc ++ ] = iface ;
100100
@@ -139,9 +139,9 @@ void load_openocd_params(void)
139139
140140 err = storage_read (OOCD_INTERFACE_KEY , & g_app_params .interface , 1 );
141141 if (err != ESP_OK ) {
142- g_app_params .interface = CONFIG_OPENOCD_INTERFACE ;
142+ g_app_params .interface = CONFIG_OPENOCD_INTERFACE + '0' ;
143143 }
144- ui_update_interface_dropdown (g_app_params .interface );
144+ ui_update_interface_dropdown (g_app_params .interface - '0' );
145145
146146 read_param = NULL ;
147147 err = storage_alloc_and_read (OOCD_RTOS_TYPE_KEY , & read_param );
@@ -196,7 +196,7 @@ void load_openocd_params(void)
196196 ESP_LOGI (TAG , "rtos type (%s)" , g_app_params .rtos_type );
197197 ESP_LOGI (TAG , "flash size (%s)" , g_app_params .flash_size );
198198 ESP_LOGI (TAG , "dual core (%c)" , g_app_params .dual_core );
199- ESP_LOGI (TAG , "interface (%s)" , g_app_params .interface == 0 ? "jtag" : "swd" );
199+ ESP_LOGI (TAG , "interface (%s)" , g_app_params .interface == '0' ? "jtag" : "swd" );
200200 ESP_LOGI (TAG , "command arg (%s)" , g_app_params .command_arg );
201201 ESP_LOGI (TAG , "debug_level (%c)" , g_app_params .debug_level );
202202}
0 commit comments