aboutsummaryrefslogtreecommitdiffstats
path: root/testhal
diff options
context:
space:
mode:
authorareviu <areviu.info@gmail.com>2018-05-06 14:49:44 +0000
committerareviu <areviu.info@gmail.com>2018-05-06 14:49:44 +0000
commita0c253d44da778e359c507c529a319f3f4d18b25 (patch)
treeb61931799dd63a4c504278b5570405095e0d9e00 /testhal
parent7a53508f76c70cd5152bb66f36dbd39f0c7560b1 (diff)
downloadChibiOS-a0c253d44da778e359c507c529a319f3f4d18b25.tar.gz
ChibiOS-a0c253d44da778e359c507c529a319f3f4d18b25.tar.bz2
ChibiOS-a0c253d44da778e359c507c529a319f3f4d18b25.zip
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
Diffstat (limited to 'testhal')
-rw-r--r--testhal/ATSAMA5D2/SDMMC/Makefile15
-rw-r--r--testhal/ATSAMA5D2/SDMMC/main.c15
2 files changed, 17 insertions, 13 deletions
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,10 +124,14 @@ 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;
}