Skip to content

Commit

Permalink
Only copy flash algo to ram once
Browse files Browse the repository at this point in the history
On each flash algorithm call the flash algorithm blob is copied to ram.
This is unnecessary and slows down flash programming. This patch
removes the code in swd_write_debug_state responsible for this
copy on every flash algo call.
  • Loading branch information
c1728p9 committed Sep 25, 2017
1 parent 6d4c22f commit 527fb6a
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions source/daplink/interface/swd_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -585,12 +585,6 @@ static uint8_t swd_write_debug_state(DEBUG_STATE *state)
return 0;
}

if (!swd_write_memory(target_device.flash_algo->algo_start,
(uint8_t *)target_device.flash_algo->algo_blob,
target_device.flash_algo->algo_size)) {
return 0;
}

if (!swd_write_word(DBG_HCSR, DBGKEY | C_DEBUGEN)) {
return 0;
}
Expand Down

0 comments on commit 527fb6a

Please sign in to comment.