stm32h7: Don't tc_printf from flash functions (#747)
* stm32h7: Don't tc_printf from flash functions Receving an 'O' packet while flashing confuses GDB and then weird stuff happens. * Replace tc_printf with DEBUG_WARN
This commit is contained in:
parent
9bba3165fb
commit
dc8924a2bc
|
@ -250,10 +250,10 @@ static bool stm32h7_flash_unlock(target *t, uint32_t addr)
|
|||
if(target_check_error(t))
|
||||
return false;
|
||||
}
|
||||
uint32_t sr = target_mem_read32(t, regbase + FLASH_SR);
|
||||
if (sr & FLASH_SR_ERROR_MASK) {
|
||||
tc_printf(t, "Error 0x%08lx", sr & FLASH_SR_ERROR_MASK);
|
||||
target_mem_write32(t, regbase + FLASH_CCR, sr & FLASH_SR_ERROR_MASK);
|
||||
uint32_t sr = target_mem_read32(t, regbase + FLASH_SR) & FLASH_SR_ERROR_MASK;
|
||||
if (sr) {
|
||||
DEBUG_WARN("%s error 0x%08" PRIx32, __func__, sr);
|
||||
target_mem_write32(t, regbase + FLASH_CCR, sr);
|
||||
return false;
|
||||
}
|
||||
if (target_mem_read32(t, regbase + FLASH_CR) & FLASH_CR_LOCK) {
|
||||
|
|
Loading…
Reference in New Issue