From a0c253d44da778e359c507c529a319f3f4d18b25 Mon Sep 17 00:00:00 2001 From: areviu Date: Sun, 6 May 2018 14:49:44 +0000 Subject: moved ff and reliance-edge under binding folder git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12008 110e8d01-0319-4d1e-a829-52ad28d1bb01 --- testhal/ATSAMA5D2/SDMMC/Makefile | 15 ++++----------- testhal/ATSAMA5D2/SDMMC/main.c | 15 +++++++++++++-- 2 files changed, 17 insertions(+), 13 deletions(-) (limited to 'testhal/ATSAMA5D2/SDMMC') diff --git a/testhal/ATSAMA5D2/SDMMC/Makefile b/testhal/ATSAMA5D2/SDMMC/Makefile index 1a69f01f9..b9a924d9f 100644 --- a/testhal/ATSAMA5D2/SDMMC/Makefile +++ b/testhal/ATSAMA5D2/SDMMC/Makefile @@ -127,27 +127,20 @@ include $(CHIBIOS)/os/hal/osal/rt/osal.mk include $(CHIBIOS)/os/rt/rt.mk include $(CHIBIOS)/os/common/ports/ARMCAx-TZ/compilers/GCC/mk/port_generic.mk # Other files (optional). -#include $(CHIBIOS)/test/lib/test.mk -#include $(CHIBIOS)/test/rt/rt_test.mk -#include $(CHIBIOS)/test/oslib/oslib_test.mk -include $(CHIBIOS)/os/various/reledge_bindings/reledge.mk -#include $(CHIBIOS)/os/various/fatfs_bindings/fatfs.mk +include $(CHIBIOS)/os/various/reledge_bindings/SAMA5D2x/reledge.mk +include $(CHIBIOS)/os/various/fatfs_bindings/SAMA5D2x/fatfs.mk include $(CHIBIOS)/os/hal/lib/streams/streams.mk # Define linker script file here #LDSCRIPT= $(STARTUPLD)/SAMA5D2.ld LDSCRIPT= $(STARTUPLD)/SAMA5D2ddr.ld -FATFSINC = $(CHIBIOS)/ext/fatfs/src + # C sources that can be compiled in ARM or THUMB mode depending on the global # setting. CSRC = $(ALLCSRC) \ main.c fat32test.c reledgetest.c redconf.c -CSRC += $(CHIBIOS)/os/various/syscalls.c -CSRC += $(CHIBIOS)/os/various/fatfs_bindings/fatfs_syscall.c -CSRC += $(CHIBIOS)/ext/fatfs/src/ff.c -CSRC += $(CHIBIOS)/ext/fatfs/src/ffunicode.c # C++ sources that can be compiled in ARM or THUMB mode depending on the global # setting. @@ -228,7 +221,7 @@ CPPWARN = -Wall -Wextra -Wundef # # List all user C define here, like -D_DEBUG=1 -UDEFS = -DPLATFORM_SDMMC_USE_SDMMC1=1 +UDEFS = -DPLATFORM_SDMMC_USE_SDMMC1=1 -DHAL_USE_TRNG=FALSE -DSDMMC_USE_RELEDGE_LIB=1 -DSDMMC_USE_FF_LIB=1 # Define ASM defines here UADEFS = diff --git a/testhal/ATSAMA5D2/SDMMC/main.c b/testhal/ATSAMA5D2/SDMMC/main.c index 0030167c5..9c2a026c4 100644 --- a/testhal/ATSAMA5D2/SDMMC/main.c +++ b/testhal/ATSAMA5D2/SDMMC/main.c @@ -18,14 +18,20 @@ #include "hal.h" #include "sama_sdmmc_lld.h" #include "chprintf.h" + +#if SDMMC_USE_FF_LIB == 1 #include "fat32test.h" +#endif + +#if SDMMC_USE_RELEDGE_LIB == 1 #include "reledgetest.h" +#endif //----------- DEMO CONFIGURATION ------------------------ //0 (SLOT0) or 1 (SLOT1) #define DEMO_SLOT 0 //1 for FFLib, 0 for Reliance -#define DEMO_FAT 0 +#define DEMO_FAT 1 //---------------------------------------------------------- #define BLOCK_CNT_MAX 32u @@ -118,9 +124,13 @@ int main(void) { if (sdmmcOpenDevice(&SDMMCD1)) { #if DEMO_FAT == 1 +#if SDMMC_USE_FF_LIB == 1 fat32test_demo(); +#endif #else +#if SDMMC_USE_RELEDGE_LIB == 1 relianceedge_demo(); +#endif #endif if (SDMMCD1.config->slot_id == SDMMC_SLOT1) @@ -157,7 +167,8 @@ bool sdmmcGetInstance(uint8_t index, SdmmcDriver **sdmmcp) (void)index; *sdmmcp = &SDMMCD1; - read(); + + //read(); return true; } -- cgit v1.2.3