misc: Renamed connect_assert_nrst to clarify usage and align naming

This commit is contained in:
dragonmux 2022-06-15 21:51:29 -04:00 committed by Piotr Esden-Tempski
parent b226c53d13
commit 0dae6a4019
4 changed files with 11 additions and 11 deletions

View File

@ -100,7 +100,7 @@ const struct command_s cmd_list[] = {
{NULL, NULL, NULL}
};
bool connect_assert_srst;
bool connect_assert_nrst;
#if defined(PLATFORM_HAS_DEBUG) && (PC_HOSTED == 0)
bool debug_bmp;
#endif
@ -195,7 +195,7 @@ static bool cmd_jtag_scan(target *t, int argc, char **argv)
irlens[argc-1] = 0;
}
if(connect_assert_srst)
if (connect_assert_nrst)
platform_nrst_set_val(true); /* will be deasserted after attach */
int devs = -1;
@ -236,7 +236,7 @@ bool cmd_swdp_scan(target *t, int argc, char **argv)
if (platform_target_voltage())
gdb_outf("Target voltage: %s\n", platform_target_voltage());
if(connect_assert_srst)
if (connect_assert_nrst)
platform_nrst_set_val(true); /* will be deasserted after attach */
int devs = -1;
@ -276,7 +276,7 @@ bool cmd_auto_scan(target *t, int argc, char **argv)
if (platform_target_voltage())
gdb_outf("Target voltage: %s\n", platform_target_voltage());
if (connect_assert_srst)
if (connect_assert_nrst)
platform_nrst_set_val(true); /* will be deasserted after attach */
int devs = -1;
@ -414,7 +414,7 @@ static bool cmd_connect_srst(target *t, int argc, const char **argv)
if (argc == 1) {
print_status = true;
} else if (argc == 2) {
if (parse_enable_or_disable(argv[1], &connect_assert_srst)) {
if (parse_enable_or_disable(argv[1], &connect_assert_nrst)) {
print_status = true;
}
} else {
@ -422,8 +422,8 @@ static bool cmd_connect_srst(target *t, int argc, const char **argv)
}
if (print_status) {
gdb_outf("Assert SRST during connect: %s\n",
connect_assert_srst ? "enabled" : "disabled");
gdb_outf("Assert nRST during connect: %s\n",
connect_assert_nrst ? "enabled" : "disabled");
}
return true;
}

View File

@ -38,7 +38,7 @@ bool platform_timeout_is_expired(platform_timeout *t);
void platform_delay(uint32_t ms);
#define POWER_CONFLICT_THRESHOLD 5 /* in 0.1V, so 5 stands for 0.5V */
extern bool connect_assert_srst;
extern bool connect_assert_nrst;
uint32_t platform_target_voltage_sense(void);
const char *platform_target_voltage(void);
int platform_hwversion(void);

View File

@ -420,7 +420,7 @@ int cl_execute(BMP_CL_OPTIONS_t *opt)
}
if (opt->opt_connect_under_reset)
DEBUG_INFO("Connecting under reset\n");
connect_assert_srst = opt->opt_connect_under_reset;
connect_assert_nrst = opt->opt_connect_under_reset;
platform_nrst_set_val(opt->opt_connect_under_reset);
if (opt->opt_mode == BMP_MODE_TEST)
DEBUG_INFO("Running in Test Mode\n");

View File

@ -366,7 +366,7 @@ static uint32_t cortexm_initial_halt(ADIv5_AP_t *ap)
if ((dhcsr != 0xffffffff) && /* Invalid read */
((dhcsr & 0xf000fff0) == 0)) {/* Check RAZ bits */
if ((dhcsr & CORTEXM_DHCSR_S_RESET_ST) && !reset_seen) {
if (connect_assert_srst)
if (connect_assert_nrst)
return dhcsr;
reset_seen = true;
continue;
@ -824,7 +824,7 @@ void adiv5_dp_init(ADIv5_DP_t *dp)
* Attach() will halt them again.
*/
for (target *t = target_list; t; t = t->next) {
if (!connect_assert_srst) {
if (!connect_assert_nrst) {
target_halt_resume(t, false);
}
}