Skip to content

Commit

Permalink
flash/nor/numicro: remove useless architecture check
Browse files Browse the repository at this point in the history
target_to_armv7m() just returns a type-cast of target->arch_info,
so the test has no value.

Following target_run_algorithm() checks magic number so
we need not worry about execution on mismatched architecture.

Change-Id: Ic9892a488a42af1d8e8731eddb39240deeb26020
Signed-off-by: Tomas Vanek <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/6755
Tested-by: jenkins
Reviewed-by: Antonio Borneo <[email protected]>
  • Loading branch information
tom-van authored and borneoa committed Jun 10, 2022
1 parent 822097a commit e78b964
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/flash/nor/numicro.c
Original file line number Diff line number Diff line change
Expand Up @@ -1385,13 +1385,6 @@ static int numicro_writeblock(struct flash_bank *bank, const uint8_t *buffer,
init_reg_param(&reg_params[1], "r1", 32, PARAM_OUT); /* faddr */
init_reg_param(&reg_params[2], "r2", 32, PARAM_OUT); /* number of words to program */

struct armv7m_common *armv7m = target_to_armv7m(target);
if (!armv7m) {
/* something is very wrong if armv7m is NULL */
LOG_ERROR("unable to get armv7m target");
return retval;
}

/* write code buffer and use Flash programming code within NuMicro */
/* Set breakpoint to 0 with time-out of 1000 ms */
while (count > 0) {
Expand Down

0 comments on commit e78b964

Please sign in to comment.