Browse Source

stlink: check read_reg result

Change-Id: I284824aa6f5eae8f6e910a482e9f7435e649fc0d
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/657
Reviewed-by: Peter Stuge <peter@stuge.se>
Tested-by: jenkins
tags/v0.6.0-rc1
Spencer Oliver 12 years ago
committed by Peter Stuge
parent
commit
b908538998
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/target/stm32_stlink.c

+ 2
- 0
src/target/stm32_stlink.c View File

@@ -111,6 +111,8 @@ static int stm32_stlink_load_core_reg_u32(struct target *target,
* it was removed from r1 docs, but still works. * it was removed from r1 docs, but still works.
*/ */
retval = stlink_if->layout->api->read_reg(stlink_if->fd, 20, value); retval = stlink_if->layout->api->read_reg(stlink_if->fd, 20, value);
if (retval != ERROR_OK)
return retval;


switch (num) { switch (num) {
case ARMV7M_PRIMASK: case ARMV7M_PRIMASK:


Loading…
Cancel
Save