Skip to content

Commit efcc5c9

Browse files
committed
To allow the MKR VIDOR 4000 loader to build to less than 8 KByte, the string handling of compile time DATE and TIME had to be concatinated in source code.
The side effect is that the code is much more concise and readable.
1 parent 9cb10ad commit efcc5c9

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

bootloaders/zero/sam_ba_monitor.c

+2-13
Original file line numberDiff line numberDiff line change
@@ -450,19 +450,8 @@ static void sam_ba_monitor_loop(void)
450450
sam_ba_putdata( ptr_monitor_if, (uint8_t *) RomBOOT_Version, strlen(RomBOOT_Version));
451451
sam_ba_putdata( ptr_monitor_if, " ", 1);
452452
sam_ba_putdata( ptr_monitor_if, (uint8_t *) RomBOOT_ExtendedCapabilities, strlen(RomBOOT_ExtendedCapabilities));
453-
sam_ba_putdata( ptr_monitor_if, " ", 1);
454-
ptr = (uint8_t*) &(__DATE__);
455-
i = 0;
456-
while (*ptr++ != '\0')
457-
i++;
458-
sam_ba_putdata( ptr_monitor_if, (uint8_t *) &(__DATE__), i);
459-
sam_ba_putdata( ptr_monitor_if, " ", 1);
460-
i = 0;
461-
ptr = (uint8_t*) &(__TIME__);
462-
while (*ptr++ != '\0')
463-
i++;
464-
sam_ba_putdata( ptr_monitor_if, (uint8_t *) &(__TIME__), i);
465-
sam_ba_putdata( ptr_monitor_if, "\n\r", 2);
453+
ptr = (uint8_t*) &(" " __DATE__ " " __TIME__ "\n\r");
454+
sam_ba_putdata( ptr_monitor_if, ptr, strlen(ptr));
466455
}
467456
else if (command == 'X') // Erase flash
468457
{

0 commit comments

Comments
 (0)