by checking for the full word, not just the first two chars.
if(sl == NULL) return 1;
break;
}
if(sl == NULL) return 1;
break;
}
printf("Chip ID is %08x, Core ID is %08x.\n", sl->chip_id, sl->core_id);
sl->verbose=0;
printf("Chip ID is %08x, Core ID is %08x.\n", sl->chip_id, sl->core_id);
sl->verbose=0;
* DWT_COMP0 0xE0001020
* DWT_MASK0 0xE0001024
* DWT_FUNCTION0 0xE0001028
* DWT_COMP0 0xE0001020
* DWT_MASK0 0xE0001024
* DWT_FUNCTION0 0xE0001028
#endif
// set trcena in debug command to turn on dwt unit
#endif
// set trcena in debug command to turn on dwt unit
- stlink_write_debug32(sl, 0xE000EDFC,
+ stlink_write_debug32(sl, 0xE000EDFC,
stlink_read_debug32(sl, 0xE000EDFC) | (1<<24));
// make sure all watchpoints are cleared
stlink_read_debug32(sl, 0xE000EDFC) | (1<<24));
// make sure all watchpoints are cleared
} else {
params = separator + 1;
}
} else {
params = separator + 1;
}
- if (!strncmp(params,"7265",4)) {// resume
+
+ if (!strncmp(params,"726573756d65",12)) {// resume
#ifdef DEBUG
printf("Rcmd: resume\n");
#endif
stlink_run(sl);
reply = strdup("OK");
#ifdef DEBUG
printf("Rcmd: resume\n");
#endif
stlink_run(sl);
reply = strdup("OK");
- } else if (!strncmp(params,"6861",4)) { //half
+ } else if (!strncmp(params,"68616c74",8)) { //halt
stlink_force_debug(sl);
#ifdef DEBUG
printf("Rcmd: halt\n");
#endif
stlink_force_debug(sl);
#ifdef DEBUG
printf("Rcmd: halt\n");
#endif
- } else if (!strncmp(params,"7265",4)) { //reset
+ } else if (!strncmp(params,"7265736574",10)) { //reset
stlink_force_debug(sl);
stlink_reset(sl);
init_code_breakpoints(sl);
init_data_watchpoints(sl);
stlink_force_debug(sl);
stlink_reset(sl);
init_code_breakpoints(sl);
init_data_watchpoints(sl);
#ifdef DEBUG
printf("Rcmd: reset\n");
#endif
#ifdef DEBUG
printf("Rcmd: reset\n");
#endif