Arduino-stk500v2-bootloader
Arduino-stk500v2-bootloader copied to clipboard
permit start address to be specified in monitor mode.
The attached patch allows one to enter "#3c00 " ('#', followed by a hex number, followed by space (or any non-hex digit, actually)) to set the initial address used by 'E', 'F', and 'R' commands.
Um. No attachments?
diff --git a/stk500boot.c b/stk500boot.c
index 2c868e2..fef0bf2 100755
--- a/stk500boot.c
+++ b/stk500boot.c
@@ -2020,6 +2020,30 @@ int ii, jj;
PrintFromPROGMEMln(gTextMsg_HELP_MSG_AT, 2);
EEPROMtest();
break;
+ case '#':
+ gFlashIndex = 0;
+ do {
+ theChar = recchar();
+ if (theChar >= 0x60) {
+ theChar = theChar & 0x5F; // uppercase
+ }
+ if (theChar >= 0x20)
+ {
+ sendchar(theChar); //echo
+ }
+
+ if (theChar >= '0' && theChar <= '9') {
+ gFlashIndex = 16 * gFlashIndex + (theChar - '0');
+ } else if (theChar >= 'A' && theChar <= 'F') {
+ gFlashIndex = 16 * gFlashIndex + 10 + (theChar - 'A');
+ } else {
+ break;
+ }
+ } while (1);
+ PrintNewLine();
+ gRamIndex = gEepromIndex = gFlashIndex;
+ break;
+
case 'B':
PrintFromPROGMEMln(gTextMsg_HELP_MSG_B, 2);