diff options
author | areviu <areviu.info@gmail.com> | 2018-05-06 14:49:44 +0000 |
---|---|---|
committer | areviu <areviu.info@gmail.com> | 2018-05-06 14:49:44 +0000 |
commit | a0c253d44da778e359c507c529a319f3f4d18b25 (patch) | |
tree | b61931799dd63a4c504278b5570405095e0d9e00 | |
parent | 7a53508f76c70cd5152bb66f36dbd39f0c7560b1 (diff) | |
download | ChibiOS-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
-rw-r--r-- | os/hal/ports/SAMA/LLD/SDMMCv1/driver.mk | 10 | ||||
-rw-r--r-- | os/hal/ports/SAMA/LLD/SDMMCv1/sama_sdmmc_conf.h | 8 | ||||
-rw-r--r-- | os/various/fatfs_bindings/SAMA5D2x/ch_sdmmc_ff.c (renamed from os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc_ff.c) | 0 | ||||
-rw-r--r-- | os/various/fatfs_bindings/SAMA5D2x/fatfs.mk | 12 | ||||
-rw-r--r-- | os/various/fatfs_bindings/SAMA5D2x/readme.txt | 13 | ||||
-rw-r--r-- | os/various/reledge_bindings/SAMA5D2x/ch_sdmmc_reledge.c (renamed from os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc_reledge.c) | 0 | ||||
-rw-r--r-- | os/various/reledge_bindings/SAMA5D2x/ch_sdmmc_reledge.h (renamed from os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc_reledge.h) | 0 | ||||
-rw-r--r-- | os/various/reledge_bindings/SAMA5D2x/osassert.c (renamed from os/hal/ports/SAMA/LLD/SDMMCv1/osassert.c) | 0 | ||||
-rw-r--r-- | os/various/reledge_bindings/SAMA5D2x/osbdev.c (renamed from os/hal/ports/SAMA/LLD/SDMMCv1/osbdev.c) | 0 | ||||
-rw-r--r-- | os/various/reledge_bindings/SAMA5D2x/osclock.c (renamed from os/hal/ports/SAMA/LLD/SDMMCv1/osclock.c) | 0 | ||||
-rw-r--r-- | os/various/reledge_bindings/SAMA5D2x/osmutex.c (renamed from os/hal/ports/SAMA/LLD/SDMMCv1/osmutex.c) | 0 | ||||
-rw-r--r-- | os/various/reledge_bindings/SAMA5D2x/osoutput.c (renamed from os/hal/ports/SAMA/LLD/SDMMCv1/osoutput.c) | 0 | ||||
-rw-r--r-- | os/various/reledge_bindings/SAMA5D2x/ostask.c (renamed from os/hal/ports/SAMA/LLD/SDMMCv1/ostask.c) | 0 | ||||
-rw-r--r-- | os/various/reledge_bindings/SAMA5D2x/readme.txt (renamed from os/various/reledge_bindings/readme.txt) | 4 | ||||
-rw-r--r-- | os/various/reledge_bindings/SAMA5D2x/redosdeviations.h (renamed from os/hal/ports/SAMA/LLD/SDMMCv1/redosdeviations.h) | 0 | ||||
-rw-r--r-- | os/various/reledge_bindings/SAMA5D2x/redostypes.h (renamed from os/hal/ports/SAMA/LLD/SDMMCv1/redostypes.h) | 0 | ||||
-rw-r--r-- | os/various/reledge_bindings/SAMA5D2x/redtypes.h (renamed from os/hal/ports/SAMA/LLD/SDMMCv1/redtypes.h) | 0 | ||||
-rw-r--r-- | os/various/reledge_bindings/SAMA5D2x/reledge.mk | 41 | ||||
-rw-r--r-- | os/various/reledge_bindings/reledge.mk | 30 | ||||
-rw-r--r-- | testhal/ATSAMA5D2/SDMMC/Makefile | 15 | ||||
-rw-r--r-- | testhal/ATSAMA5D2/SDMMC/main.c | 15 |
21 files changed, 86 insertions, 62 deletions
diff --git a/os/hal/ports/SAMA/LLD/SDMMCv1/driver.mk b/os/hal/ports/SAMA/LLD/SDMMCv1/driver.mk index 06bb80865..32695db51 100644 --- a/os/hal/ports/SAMA/LLD/SDMMCv1/driver.mk +++ b/os/hal/ports/SAMA/LLD/SDMMCv1/driver.mk @@ -4,15 +4,7 @@ PLATFORMSRC += $(CHIBIOS)/os/hal/ports/SAMA/LLD/SDMMCv1/sama_sdmmc_lld.c \ $(CHIBIOS)/os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc_cmds.c \
$(CHIBIOS)/os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc_mmc.c \
$(CHIBIOS)/os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc_sd.c \
- $(CHIBIOS)/os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc.c \
- $(CHIBIOS)/os/hal/ports/SAMA/LLD/SDMMCv1/osassert.c \
- $(CHIBIOS)/os/hal/ports/SAMA/LLD/SDMMCv1/osoutput.c \
- $(CHIBIOS)/os/hal/ports/SAMA/LLD/SDMMCv1/osclock.c \
- $(CHIBIOS)/os/hal/ports/SAMA/LLD/SDMMCv1/osbdev.c \
- $(CHIBIOS)/os/hal/ports/SAMA/LLD/SDMMCv1/osmutex.c \
- $(CHIBIOS)/os/hal/ports/SAMA/LLD/SDMMCv1/ostask.c \
- $(CHIBIOS)/os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc_reledge.c \
- $(CHIBIOS)/os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc_ff.c
+ $(CHIBIOS)/os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc.c
PLATFORMINC += $(CHIBIOS)/os/hal/ports/SAMA/LLD/SDMMCv1
diff --git a/os/hal/ports/SAMA/LLD/SDMMCv1/sama_sdmmc_conf.h b/os/hal/ports/SAMA/LLD/SDMMCv1/sama_sdmmc_conf.h index 74dde4632..9df0b5d9e 100644 --- a/os/hal/ports/SAMA/LLD/SDMMCv1/sama_sdmmc_conf.h +++ b/os/hal/ports/SAMA/LLD/SDMMCv1/sama_sdmmc_conf.h @@ -24,13 +24,5 @@ #endif
-#ifndef SDMMC_USE_FF_LIB
-#define SDMMC_USE_FF_LIB 1
-#endif
-
-#ifndef SDMMC_USE_RELEDGE_LIB
-#define SDMMC_USE_RELEDGE_LIB 1
-#endif
-
#endif //SAMA_SDMMC_CONF_H
diff --git a/os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc_ff.c b/os/various/fatfs_bindings/SAMA5D2x/ch_sdmmc_ff.c index d4e98b885..d4e98b885 100644 --- a/os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc_ff.c +++ b/os/various/fatfs_bindings/SAMA5D2x/ch_sdmmc_ff.c diff --git a/os/various/fatfs_bindings/SAMA5D2x/fatfs.mk b/os/various/fatfs_bindings/SAMA5D2x/fatfs.mk new file mode 100644 index 000000000..fbdeeece2 --- /dev/null +++ b/os/various/fatfs_bindings/SAMA5D2x/fatfs.mk @@ -0,0 +1,12 @@ +# FATFS files.
+FATFSSRC = $(CHIBIOS)/os/various/syscalls.c \
+ $(CHIBIOS)/os/various/fatfs_bindings/SAMA5D2x/ch_sdmmc_ff.c \
+ $(CHIBIOS)/os/various/fatfs_bindings/fatfs_syscall.c \
+ $(CHIBIOS)/ext/fatfs/src/ff.c \
+ $(CHIBIOS)/ext/fatfs/src/ffunicode.c
+
+FATFSINC = $(CHIBIOS)/ext/fatfs/src
+
+# Shared variables
+ALLCSRC += $(FATFSSRC)
+ALLINC += $(FATFSINC)
diff --git a/os/various/fatfs_bindings/SAMA5D2x/readme.txt b/os/various/fatfs_bindings/SAMA5D2x/readme.txt new file mode 100644 index 000000000..b44f832ef --- /dev/null +++ b/os/various/fatfs_bindings/SAMA5D2x/readme.txt @@ -0,0 +1,13 @@ +This directory contains the ChibiOS/RT "official" bindings with the FatFS for the
+library by ChaN: http://elm-chan.org
+
+In order to use FatFS within ChibiOS/RT project:
+1. unzip FatFS under ./ext/fatfs [See Note 2]
+2. include $(CHIBIOS)/os/various/fatfs_bindings/SAMA5D2x/fatfs.mk in your makefile.
+3. Add $(FATFSSRC) to $(CSRC)
+4. Add $(FATFSINC) to $(INCDIR)
+
+Note:
+1. These files modified for use with version 0.13 of fatfs.
+2. In the original distribution, the source directory is called 'source' rather than 'src'
+3. this implementation is for SAMA5D2X
diff --git a/os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc_reledge.c b/os/various/reledge_bindings/SAMA5D2x/ch_sdmmc_reledge.c index 31630c081..31630c081 100644 --- a/os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc_reledge.c +++ b/os/various/reledge_bindings/SAMA5D2x/ch_sdmmc_reledge.c diff --git a/os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc_reledge.h b/os/various/reledge_bindings/SAMA5D2x/ch_sdmmc_reledge.h index 04ed471cf..04ed471cf 100644 --- a/os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc_reledge.h +++ b/os/various/reledge_bindings/SAMA5D2x/ch_sdmmc_reledge.h diff --git a/os/hal/ports/SAMA/LLD/SDMMCv1/osassert.c b/os/various/reledge_bindings/SAMA5D2x/osassert.c index c4cc20497..c4cc20497 100644 --- a/os/hal/ports/SAMA/LLD/SDMMCv1/osassert.c +++ b/os/various/reledge_bindings/SAMA5D2x/osassert.c diff --git a/os/hal/ports/SAMA/LLD/SDMMCv1/osbdev.c b/os/various/reledge_bindings/SAMA5D2x/osbdev.c index 645201521..645201521 100644 --- a/os/hal/ports/SAMA/LLD/SDMMCv1/osbdev.c +++ b/os/various/reledge_bindings/SAMA5D2x/osbdev.c diff --git a/os/hal/ports/SAMA/LLD/SDMMCv1/osclock.c b/os/various/reledge_bindings/SAMA5D2x/osclock.c index e140e6e28..e140e6e28 100644 --- a/os/hal/ports/SAMA/LLD/SDMMCv1/osclock.c +++ b/os/various/reledge_bindings/SAMA5D2x/osclock.c diff --git a/os/hal/ports/SAMA/LLD/SDMMCv1/osmutex.c b/os/various/reledge_bindings/SAMA5D2x/osmutex.c index b921a8aa9..b921a8aa9 100644 --- a/os/hal/ports/SAMA/LLD/SDMMCv1/osmutex.c +++ b/os/various/reledge_bindings/SAMA5D2x/osmutex.c diff --git a/os/hal/ports/SAMA/LLD/SDMMCv1/osoutput.c b/os/various/reledge_bindings/SAMA5D2x/osoutput.c index bff230522..bff230522 100644 --- a/os/hal/ports/SAMA/LLD/SDMMCv1/osoutput.c +++ b/os/various/reledge_bindings/SAMA5D2x/osoutput.c diff --git a/os/hal/ports/SAMA/LLD/SDMMCv1/ostask.c b/os/various/reledge_bindings/SAMA5D2x/ostask.c index f06f00f22..f06f00f22 100644 --- a/os/hal/ports/SAMA/LLD/SDMMCv1/ostask.c +++ b/os/various/reledge_bindings/SAMA5D2x/ostask.c diff --git a/os/various/reledge_bindings/readme.txt b/os/various/reledge_bindings/SAMA5D2x/readme.txt index 4489695c1..9cd07d397 100644 --- a/os/various/reledge_bindings/readme.txt +++ b/os/various/reledge_bindings/SAMA5D2x/readme.txt @@ -2,8 +2,8 @@ This directory contains the ChibiOS/RT "official" bindings with the RelianceEdge library by Datalight : https://github.com/datalightinc/reliance-edge
In order to use Reliance Edge within ChibiOS/RT project:
-1. unzip Reliance Edge under reliance-edge
-2. include $(CHIBIOS)/os/various/reledge_bindings/reledge.mk in your makefile.
+1. unzip Reliance Edge under $(CHIBIOS)/ext/reliance-edge
+2. include $(CHIBIOS)/os/various/reledge_bindings/SAMA5D2x/reledge.mk in your makefile.
3. Add $(RELEDGESRC) to $(CSRC)
4. Add $(RELEDGEINC) to $(INCDIR)
diff --git a/os/hal/ports/SAMA/LLD/SDMMCv1/redosdeviations.h b/os/various/reledge_bindings/SAMA5D2x/redosdeviations.h index b00fc4184..b00fc4184 100644 --- a/os/hal/ports/SAMA/LLD/SDMMCv1/redosdeviations.h +++ b/os/various/reledge_bindings/SAMA5D2x/redosdeviations.h diff --git a/os/hal/ports/SAMA/LLD/SDMMCv1/redostypes.h b/os/various/reledge_bindings/SAMA5D2x/redostypes.h index 687b2d167..687b2d167 100644 --- a/os/hal/ports/SAMA/LLD/SDMMCv1/redostypes.h +++ b/os/various/reledge_bindings/SAMA5D2x/redostypes.h diff --git a/os/hal/ports/SAMA/LLD/SDMMCv1/redtypes.h b/os/various/reledge_bindings/SAMA5D2x/redtypes.h index bb5606eef..bb5606eef 100644 --- a/os/hal/ports/SAMA/LLD/SDMMCv1/redtypes.h +++ b/os/various/reledge_bindings/SAMA5D2x/redtypes.h diff --git a/os/various/reledge_bindings/SAMA5D2x/reledge.mk b/os/various/reledge_bindings/SAMA5D2x/reledge.mk new file mode 100644 index 000000000..d014120cb --- /dev/null +++ b/os/various/reledge_bindings/SAMA5D2x/reledge.mk @@ -0,0 +1,41 @@ +# RELIANCE EDGE files.
+
+RELEDGESRC= \
+ $(CHIBIOS)/ext/reliance-edge/core/driver/blockio.c \
+ $(CHIBIOS)/ext/reliance-edge/core/driver/buffer.c \
+ $(CHIBIOS)/ext/reliance-edge/core/driver/core.c \
+ $(CHIBIOS)/ext/reliance-edge/core/driver/dir.c \
+ $(CHIBIOS)/ext/reliance-edge/core/driver/format.c \
+ $(CHIBIOS)/ext/reliance-edge/core/driver/imap.c \
+ $(CHIBIOS)/ext/reliance-edge/core/driver/imapextern.c \
+ $(CHIBIOS)/ext/reliance-edge/core/driver/imapinline.c \
+ $(CHIBIOS)/ext/reliance-edge/core/driver/inode.c \
+ $(CHIBIOS)/ext/reliance-edge/core/driver/inodedata.c \
+ $(CHIBIOS)/ext/reliance-edge/core/driver/volume.c \
+ $(CHIBIOS)/ext/reliance-edge/fse/fse.c \
+ $(CHIBIOS)/ext/reliance-edge/posix/path.c \
+ $(CHIBIOS)/ext/reliance-edge/posix/posix.c \
+ $(CHIBIOS)/ext/reliance-edge/util/bitmap.c \
+ $(CHIBIOS)/ext/reliance-edge/util/crc.c \
+ $(CHIBIOS)/ext/reliance-edge/util/memory.c \
+ $(CHIBIOS)/ext/reliance-edge/util/namelen.c \
+ $(CHIBIOS)/ext/reliance-edge/util/sign.c \
+ $(CHIBIOS)/ext/reliance-edge/util/string.c
+
+RELEDGEINC = $(CHIBIOS)/ext/reliance-edge/include \
+ $(CHIBIOS)/ext/reliance-edge/core/include
+
+RELEDGEBINDINC = $(CHIBIOS)/os/various/reledge_bindings/SAMA5D2x
+
+RELEDGEBINDSRC = \
+ $(CHIBIOS)/os/various/reledge_bindings/SAMA5D2x/ch_sdmmc_reledge.c \
+ $(CHIBIOS)/os/various/reledge_bindings/SAMA5D2x/osassert.c \
+ $(CHIBIOS)/os/various/reledge_bindings/SAMA5D2x/osbdev.c \
+ $(CHIBIOS)/os/various/reledge_bindings/SAMA5D2x/osclock.c \
+ $(CHIBIOS)/os/various/reledge_bindings/SAMA5D2x/osmutex.c \
+ $(CHIBIOS)/os/various/reledge_bindings/SAMA5D2x/osoutput.c \
+ $(CHIBIOS)/os/various/reledge_bindings/SAMA5D2x/ostask.c
+
+# Shared variables
+ALLCSRC += $(RELEDGESRC) $(RELEDGEBINDSRC)
+ALLINC += $(RELEDGEINC) $(RELEDGEBINDINC)
\ No newline at end of file diff --git a/os/various/reledge_bindings/reledge.mk b/os/various/reledge_bindings/reledge.mk deleted file mode 100644 index c85b7f659..000000000 --- a/os/various/reledge_bindings/reledge.mk +++ /dev/null @@ -1,30 +0,0 @@ -# RELIANCE EDGE files.
-
-RELEDGESRC= \
- $(CHIBIOS)/ext/reliance-edge/core/driver/blockio.c \
- $(CHIBIOS)/ext/reliance-edge/core/driver/buffer.c \
- $(CHIBIOS)/ext/reliance-edge/core/driver/core.c \
- $(CHIBIOS)/ext/reliance-edge/core/driver/dir.c \
- $(CHIBIOS)/ext/reliance-edge/core/driver/format.c \
- $(CHIBIOS)/ext/reliance-edge/core/driver/imap.c \
- $(CHIBIOS)/ext/reliance-edge/core/driver/imapextern.c \
- $(CHIBIOS)/ext/reliance-edge/core/driver/imapinline.c \
- $(CHIBIOS)/ext/reliance-edge/core/driver/inode.c \
- $(CHIBIOS)/ext/reliance-edge/core/driver/inodedata.c \
- $(CHIBIOS)/ext/reliance-edge/core/driver/volume.c \
- $(CHIBIOS)/ext/reliance-edge/fse/fse.c \
- $(CHIBIOS)/ext/reliance-edge/posix/path.c \
- $(CHIBIOS)/ext/reliance-edge/posix/posix.c \
- $(CHIBIOS)/ext/reliance-edge/util/bitmap.c \
- $(CHIBIOS)/ext/reliance-edge/util/crc.c \
- $(CHIBIOS)/ext/reliance-edge/util/memory.c \
- $(CHIBIOS)/ext/reliance-edge/util/namelen.c \
- $(CHIBIOS)/ext/reliance-edge/util/sign.c \
- $(CHIBIOS)/ext/reliance-edge/util/string.c
-
-RELEDGEINC = $(CHIBIOS)/ext/reliance-edge/include \
- $(CHIBIOS)/ext/reliance-edge/core/include
-
-# Shared variables
-ALLCSRC += $(RELEDGESRC)
-ALLINC += $(RELEDGEINC)
\ No newline at end of file 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;
}
|