Skip to content

Commit 87e5c37

Browse files
author
Guillaume Revaillot
committed
STM32Device: dbg trace fixes
1 parent 79fe2cd commit 87e5c37

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/org/stm32flash/STM32Device.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ public boolean eraseFlash(int startAddress, int len) throws IOException, Timeout
227227
int endAddress = startAddress + len;
228228

229229
if (pagesSizes.length > 1) {
230-
System.err.println("eraseFlash: target has multiple pages size, no support yet, use EraseAll.");
230+
System.err.println("eraseFlash: target has multiple pages size, no support yet, use eraseAllFlash.");
231231
return false;
232232
}
233233

@@ -298,7 +298,7 @@ public boolean readAllFlash(byte[] flash) throws IOException, TimeoutException {
298298
int len = min(count - read, CMD_READ_MAX_SIZE);
299299
byte[] b = new byte[len];
300300
if (!cmdReadMemory(mSTM32DevInfo.getFlashStart() + read, b)) {
301-
System.out.println("\ncould not cmdReadMemory, abort.");
301+
System.err.println("\ncould not cmdReadMemory, abort.");
302302
return false;
303303
}
304304
System.arraycopy(b, 0, flash, read, len);
@@ -332,7 +332,7 @@ public boolean writeFlash(byte[] flash, boolean compare) throws IOException, Tim
332332
byte[] v = new byte[len];
333333

334334
if (!cmdReadMemory(mSTM32DevInfo.getFlashStart() + written, v)) {
335-
System.out.println("\ncould not cmdReadMemory, abort.");
335+
System.err.println("\ncould not cmdReadMemory, abort.");
336336
complete(false);
337337
return false;
338338
}

0 commit comments

Comments
 (0)