From c0c6c4b8c3511efe8ff152693b2c0b87534388b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20Daleck=C3=BD?= Date: Sat, 11 Dec 2021 10:04:08 +0100 Subject: [PATCH] Remove icon file and autorun on low flash space targets --- src/main/msc/emfat_file.c | 6 ++---- src/main/target/common_pre.h | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/msc/emfat_file.c b/src/main/msc/emfat_file.c index 80b569f28..f7c6b4db9 100644 --- a/src/main/msc/emfat_file.c +++ b/src/main/msc/emfat_file.c @@ -45,10 +45,6 @@ #define FILESYSTEM_SIZE_MB 256 #define HDR_BUF_SIZE 32 -#define USE_EMFAT_AUTORUN -#define USE_EMFAT_ICON -//#define USE_EMFAT_README - #ifdef USE_EMFAT_AUTORUN static const char autorun_file[] = "[autorun]\r\n" @@ -231,6 +227,7 @@ static const char icon_file[] = #define CMA_TIME EMFAT_ENCODE_CMA_TIME(1,1,2018, 13,0,0) #define CMA { CMA_TIME, CMA_TIME, CMA_TIME } +#if defined (USE_EMFAT_AUTORUN) || defined (USE_EMFAT_ICON) || defined (USE_EMFAT_README) static void memory_read_proc(uint8_t *dest, int size, uint32_t offset, emfat_entry_t *entry) { int len; @@ -247,6 +244,7 @@ static void memory_read_proc(uint8_t *dest, int size, uint32_t offset, emfat_ent memcpy(dest, &((char *)entry->user_data)[offset], len); } +#endif static void bblog_read_proc(uint8_t *dest, int size, uint32_t offset, emfat_entry_t *entry) { diff --git a/src/main/target/common_pre.h b/src/main/target/common_pre.h index b49123814..68e5de4d6 100644 --- a/src/main/target/common_pre.h +++ b/src/main/target/common_pre.h @@ -414,4 +414,6 @@ extern uint8_t _dmaram_end__; #define USE_ESCSERIAL_SIMONK #define USE_SERIAL_4WAY_SK_BOOTLOADER #define USE_DASHBOARD +#define USE_EMFAT_AUTORUN +#define USE_EMFAT_ICON #endif