misc: Renamed connect_assert_nrst to clarify usage and align naming
This commit is contained in:
parent
b226c53d13
commit
0dae6a4019
|
@ -100,7 +100,7 @@ const struct command_s cmd_list[] = {
|
||||||
{NULL, NULL, NULL}
|
{NULL, NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
bool connect_assert_srst;
|
bool connect_assert_nrst;
|
||||||
#if defined(PLATFORM_HAS_DEBUG) && (PC_HOSTED == 0)
|
#if defined(PLATFORM_HAS_DEBUG) && (PC_HOSTED == 0)
|
||||||
bool debug_bmp;
|
bool debug_bmp;
|
||||||
#endif
|
#endif
|
||||||
|
@ -195,7 +195,7 @@ static bool cmd_jtag_scan(target *t, int argc, char **argv)
|
||||||
irlens[argc-1] = 0;
|
irlens[argc-1] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(connect_assert_srst)
|
if (connect_assert_nrst)
|
||||||
platform_nrst_set_val(true); /* will be deasserted after attach */
|
platform_nrst_set_val(true); /* will be deasserted after attach */
|
||||||
|
|
||||||
int devs = -1;
|
int devs = -1;
|
||||||
|
@ -236,7 +236,7 @@ bool cmd_swdp_scan(target *t, int argc, char **argv)
|
||||||
if (platform_target_voltage())
|
if (platform_target_voltage())
|
||||||
gdb_outf("Target voltage: %s\n", 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 */
|
platform_nrst_set_val(true); /* will be deasserted after attach */
|
||||||
|
|
||||||
int devs = -1;
|
int devs = -1;
|
||||||
|
@ -276,7 +276,7 @@ bool cmd_auto_scan(target *t, int argc, char **argv)
|
||||||
|
|
||||||
if (platform_target_voltage())
|
if (platform_target_voltage())
|
||||||
gdb_outf("Target voltage: %s\n", 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 */
|
platform_nrst_set_val(true); /* will be deasserted after attach */
|
||||||
|
|
||||||
int devs = -1;
|
int devs = -1;
|
||||||
|
@ -414,7 +414,7 @@ static bool cmd_connect_srst(target *t, int argc, const char **argv)
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
print_status = true;
|
print_status = true;
|
||||||
} else if (argc == 2) {
|
} 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;
|
print_status = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -422,8 +422,8 @@ static bool cmd_connect_srst(target *t, int argc, const char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (print_status) {
|
if (print_status) {
|
||||||
gdb_outf("Assert SRST during connect: %s\n",
|
gdb_outf("Assert nRST during connect: %s\n",
|
||||||
connect_assert_srst ? "enabled" : "disabled");
|
connect_assert_nrst ? "enabled" : "disabled");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ bool platform_timeout_is_expired(platform_timeout *t);
|
||||||
void platform_delay(uint32_t ms);
|
void platform_delay(uint32_t ms);
|
||||||
|
|
||||||
#define POWER_CONFLICT_THRESHOLD 5 /* in 0.1V, so 5 stands for 0.5V */
|
#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);
|
uint32_t platform_target_voltage_sense(void);
|
||||||
const char *platform_target_voltage(void);
|
const char *platform_target_voltage(void);
|
||||||
int platform_hwversion(void);
|
int platform_hwversion(void);
|
||||||
|
|
|
@ -420,7 +420,7 @@ int cl_execute(BMP_CL_OPTIONS_t *opt)
|
||||||
}
|
}
|
||||||
if (opt->opt_connect_under_reset)
|
if (opt->opt_connect_under_reset)
|
||||||
DEBUG_INFO("Connecting under reset\n");
|
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);
|
platform_nrst_set_val(opt->opt_connect_under_reset);
|
||||||
if (opt->opt_mode == BMP_MODE_TEST)
|
if (opt->opt_mode == BMP_MODE_TEST)
|
||||||
DEBUG_INFO("Running in Test Mode\n");
|
DEBUG_INFO("Running in Test Mode\n");
|
||||||
|
|
|
@ -366,7 +366,7 @@ static uint32_t cortexm_initial_halt(ADIv5_AP_t *ap)
|
||||||
if ((dhcsr != 0xffffffff) && /* Invalid read */
|
if ((dhcsr != 0xffffffff) && /* Invalid read */
|
||||||
((dhcsr & 0xf000fff0) == 0)) {/* Check RAZ bits */
|
((dhcsr & 0xf000fff0) == 0)) {/* Check RAZ bits */
|
||||||
if ((dhcsr & CORTEXM_DHCSR_S_RESET_ST) && !reset_seen) {
|
if ((dhcsr & CORTEXM_DHCSR_S_RESET_ST) && !reset_seen) {
|
||||||
if (connect_assert_srst)
|
if (connect_assert_nrst)
|
||||||
return dhcsr;
|
return dhcsr;
|
||||||
reset_seen = true;
|
reset_seen = true;
|
||||||
continue;
|
continue;
|
||||||
|
@ -824,7 +824,7 @@ void adiv5_dp_init(ADIv5_DP_t *dp)
|
||||||
* Attach() will halt them again.
|
* Attach() will halt them again.
|
||||||
*/
|
*/
|
||||||
for (target *t = target_list; t; t = t->next) {
|
for (target *t = target_list; t; t = t->next) {
|
||||||
if (!connect_assert_srst) {
|
if (!connect_assert_nrst) {
|
||||||
target_halt_resume(t, false);
|
target_halt_resume(t, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue