]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - avr/main.c
New debug command: dump heap
[z180-stamp.git] / avr / main.c
index 86dcc50caa6c506476e333ed06434c5bb1509552..450e2bad324b08161c55e47baed790ee4d706bca 100644 (file)
@@ -24,6 +24,8 @@
 #include "time.h"
 #include "rtc.h"
 #include "debug.h"
+#include "cmd_fat.h"
+
 
 uint8_t mcusr __attribute__ ((section (".noinit")));
 
@@ -146,16 +148,6 @@ void setup_system_time(void)
 }
 
 
-
-static void setup_fatfs(void)
-{
-       static FATFS FatFs0;
-       static FATFS FatFs1;
-
-       f_mount(&FatFs0, "0:", 0);
-       f_mount(&FatFs1, "1:", 0);
-}
-
 /*--------------------------------------------------------------------------*/
 
 /* Stored value of bootdelay, used by autoboot_command() */
@@ -254,6 +246,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);