|
29 | 29 | #include "board_driver_led.h"
|
30 | 30 | #include <stdlib.h>
|
31 | 31 |
|
32 |
| -const char RomBOOT_Version[] = SAM_BA_VERSION; |
33 | 32 | // X = Chip Erase, Y = Write Buffer, Z = Checksum Buffer, P = Secure Bit Aware
|
34 |
| -const char RomBOOT_ExtendedCapabilities[] = "[Arduino:XYZP]"; |
| 33 | +#define ROMBOOT_EXTENDEDCAPABILITIES "[Arduino:XYZP]" |
| 34 | +const char ROMBoot_VersionInformation[] = "v" SAM_BA_VERSION " " ROMBOOT_EXTENDEDCAPABILITIES " " __DATE__ " " __TIME__ "\n\r"; |
35 | 35 |
|
36 | 36 | /* Provides one common interface to handle both USART and USB-CDC */
|
37 | 37 | typedef struct
|
@@ -485,12 +485,7 @@ static void sam_ba_monitor_loop(void)
|
485 | 485 | }
|
486 | 486 | else if (command == 'V') // Read version information
|
487 | 487 | {
|
488 |
| - sam_ba_putdata( ptr_monitor_if, "v", 1); |
489 |
| - sam_ba_putdata( ptr_monitor_if, (uint8_t *) RomBOOT_Version, strlen(RomBOOT_Version)); |
490 |
| - sam_ba_putdata( ptr_monitor_if, " ", 1); |
491 |
| - sam_ba_putdata( ptr_monitor_if, (uint8_t *) RomBOOT_ExtendedCapabilities, strlen(RomBOOT_ExtendedCapabilities)); |
492 |
| - ptr = (uint8_t*) &(" " __DATE__ " " __TIME__ "\n\r"); |
493 |
| - sam_ba_putdata( ptr_monitor_if, ptr, strlen(ptr)); |
| 488 | + sam_ba_putdata( ptr_monitor_if, ROMBoot_VersionInformation, sizeof(ROMBoot_VersionInformation) - 1); |
494 | 489 | }
|
495 | 490 | else if (command == 'X') // Erase flash
|
496 | 491 | {
|
|
0 commit comments