From 4cd45f48b138c8af126a12a248fc07539ef03b5f Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Mon, 15 Feb 2016 10:39:56 +0200 Subject: [PATCH] cc3200: Fix breakage after VfsFat refactor. --- cc3200/application.mk | 1 - cc3200/mods/moduos.c | 2 +- cc3200/mpconfigport.h | 1 + extmod/vfs_fat_file.c | 4 +++- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cc3200/application.mk b/cc3200/application.mk index 0f393bd541..7393bccc54 100644 --- a/cc3200/application.mk +++ b/cc3200/application.mk @@ -157,7 +157,6 @@ APP_LIB_SRC_C = $(addprefix lib/,\ APP_STM_SRC_C = $(addprefix stmhal/,\ bufhelper.c \ - file.c \ builtin_open.c \ import.c \ input.c \ diff --git a/cc3200/mods/moduos.c b/cc3200/mods/moduos.c index 1601ee5b03..9538b679e2 100644 --- a/cc3200/mods/moduos.c +++ b/cc3200/mods/moduos.c @@ -37,7 +37,7 @@ #include "moduos.h" #include "diskio.h" #include "sflash_diskio.h" -#include "file.h" +#include "extmod/vfs_fat_file.h" #include "random.h" #include "mpexception.h" #include "version.h" diff --git a/cc3200/mpconfigport.h b/cc3200/mpconfigport.h index 97c89c6fe4..fd645618da 100644 --- a/cc3200/mpconfigport.h +++ b/cc3200/mpconfigport.h @@ -70,6 +70,7 @@ #define MICROPY_FATFS_REENTRANT (1) #define MICROPY_FATFS_TIMEOUT (2500) #define MICROPY_FATFS_SYNC_T SemaphoreHandle_t +#define MICROPY_FSUSERMOUNT_ADHOC (1) #define MICROPY_STREAMS_NON_BLOCK (1) #define MICROPY_MODULE_WEAK_LINKS (1) diff --git a/extmod/vfs_fat_file.c b/extmod/vfs_fat_file.c index 0c0ea84b31..f5dc565d1b 100644 --- a/extmod/vfs_fat_file.c +++ b/extmod/vfs_fat_file.c @@ -25,7 +25,9 @@ */ #include "py/mpconfig.h" -#if MICROPY_FSUSERMOUNT +// *_ADHOC part is for cc3200 port which doesn't use general uPy +// infrastructure and instead duplicates code. TODO: Resolve. +#if MICROPY_FSUSERMOUNT || MICROPY_FSUSERMOUNT_ADHOC #include #include