X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/8a2b0da07c62b1ab1d9d2240268fbf71f59421dd..f66d9570ec64ecaa1f879619a0e4fed8d5fa7803:/avr/main.c diff --git a/avr/main.c b/avr/main.c index 1e5a6f9..1fba3cb 100644 --- a/avr/main.c +++ b/avr/main.c @@ -67,15 +67,17 @@ void print_reset_reason(void) uint8_t r = mcusr & 0x1f; const FLASH char * const FLASH *p = rreasons; - printf_P(PSTR("### Reset reason(s): %s"), r ? "" : "none"); + my_puts_P(PSTR("### Reset reason(s): ")); + if (r == 0) + my_puts_P(PSTR("none")); for ( ; r; p++, r >>= 1) { if (r & 1) { my_puts_P(*p); if (r & ~1) - printf_P(PSTR(", ")); + my_puts_P(PSTR(", ")); } } - printf_P(PSTR(".\n")); + my_puts_P(PSTR(".\n")); } #endif @@ -223,7 +225,7 @@ const char *bootdelay_process(void) static void autoboot_command(const char *s) { - debug("### main_loop: bootcmd=\"%s\"\n", s ? s : ""); + debug("### main_loop: bootcmd=\"%s\"\n", s ? s : ""); _delay_ms(20); if (stored_bootdelay != -1 && s && !abortboot(stored_bootdelay)) { @@ -246,6 +248,7 @@ int main(void) { extern void setup_mmc(void); + __malloc_margin = CONFIG_SYS_MALLOC_MARGIN; setup_avr(); for (int i = 0; i < GPIO_MAX; i++) gpio_config(i, INPUT_PULLUP);