summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorJiaojinxing <jiaojinxing1987@gmail.com>2015-05-05 14:08:24 (GMT)
committer Jiaojinxing <jiaojinxing1987@gmail.com>2015-05-05 14:08:24 (GMT)
commit37ab02a51d52a985455f9fd3795f06f8fede5eed (patch)
tree37bc90b990c0cda110f303078f3998b575ea20af
parent3f43705d78717c9f3af1f7a043c222045d2e350e (diff)
downloadbspam335x-37ab02a51d52a985455f9fd3795f06f8fede5eed.zip
bspam335x-37ab02a51d52a985455f9fd3795f06f8fede5eed.tar.gz
bspam335x-37ab02a51d52a985455f9fd3795f06f8fede5eed.tar.bz2
Update RealCoder project file and SDIO driver.
-rw-r--r--.cproject52
-rw-r--r--.rcsetting5
-rw-r--r--Makefile10
-rw-r--r--SylixOS/bsp/bspInit.c11
-rw-r--r--SylixOS/bsp/config_beaglebone.h6
-rw-r--r--SylixOS/bsp/config_evmAM335x.h6
-rw-r--r--SylixOS/bsp/config_evmskAM335x.h6
-rw-r--r--SylixOS/bsp/config_ok335xd.h6
-rw-r--r--SylixOS/bsp/config_ok335xs.h6
-rw-r--r--SylixOS/driver/netif/am335x_cpsw.c6
-rw-r--r--SylixOS/driver/sdi/am335x_sdi.c8
-rw-r--r--SylixOS/user/main.c3
-rw-r--r--config.mk24
13 files changed, 109 insertions, 40 deletions
diff --git a/.cproject b/.cproject
index a4d1607..855a525 100644
--- a/.cproject
+++ b/.cproject
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
- <cconfiguration id="com.sylixos.realcoder.toolChain.armsylixeabi.438692728">
- <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.sylixos.realcoder.toolChain.armsylixeabi.438692728" moduleId="org.eclipse.cdt.core.settings" name="Default">
+ <cconfiguration id="com.sylixos.realcoder.toolChain.armsylixeabi.2044917939">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.sylixos.realcoder.toolChain.armsylixeabi.2044917939" moduleId="org.eclipse.cdt.core.settings" name="Default">
<macros>
<stringMacro name="SYLIXOS_TOOLCHAIN_PREFIX" type="VALUE_TEXT" value="arm-sylixos-eabi-"/>
- <stringMacro name="SYLIXOS_BASE_PATH" type="VALUE_PATH_DIR" value="D:\workspace_am335x\sylixos"/>
+ <stringMacro name="SYLIXOS_BASE_PATH" type="VALUE_PATH_DIR" value="D:\workspace_bsp\base_a8"/>
</macros>
<externalSettings/>
<extensions>
@@ -17,36 +17,33 @@
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.autotools.core.ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <configuration artifactName="${ProjName}" buildProperties="" description="" id="com.sylixos.realcoder.toolChain.armsylixeabi.438692728" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
- <folderInfo id="com.sylixos.realcoder.toolChain.armsylixeabi.438692728.2121987568" name="/" resourcePath="">
- <toolChain id="com.sylixos.realcoder.toolChain.armsylixeabi.904162025" name="arm-sylixos-toolchain" superClass="com.sylixos.realcoder.toolChain.armsylixeabi">
- <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.GNU_ELF" id="com.sylixos.realcoder.targetPlatform.armsylixoseabi.1789662214" isAbstract="false" name="SylixOS TagetPlagform" osList="win32" superClass="com.sylixos.realcoder.targetPlatform.armsylixoseabi"/>
- <builder id="com.sylixos.realcoder.builder.armsylixeabi.1683840883" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="SylixOS Builder" superClass="com.sylixos.realcoder.builder.armsylixeabi"/>
- <tool id="com.sylixos.realcoder.tool.armsylixeabi.872443989" name="arm-sylixos-eabi-gcc" superClass="com.sylixos.realcoder.tool.armsylixeabi">
- <option id="com.sylixos.realcoder.option.armsylixoseabi.include.2055519244" name="Include paths (-I)" superClass="com.sylixos.realcoder.option.armsylixoseabi.include" valueType="includePath">
+ <configuration artifactName="${ProjName}" buildProperties="" description="" id="com.sylixos.realcoder.toolChain.armsylixeabi.2044917939" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
+ <folderInfo id="com.sylixos.realcoder.toolChain.armsylixeabi.2044917939.230200914" name="/" resourcePath="">
+ <toolChain id="com.sylixos.realcoder.toolChain.armsylixeabi.680397821" name="arm-sylixos-toolchain" superClass="com.sylixos.realcoder.toolChain.armsylixeabi">
+ <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.GNU_ELF" id="com.sylixos.realcoder.targetPlatform.armsylixoseabi.981171852" isAbstract="false" name="SylixOS TagetPlagform" osList="win32" superClass="com.sylixos.realcoder.targetPlatform.armsylixoseabi"/>
+ <builder id="com.sylixos.realcoder.builder.armsylixeabi.1662223933" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="SylixOS Builder" superClass="com.sylixos.realcoder.builder.armsylixeabi"/>
+ <tool id="com.sylixos.realcoder.tool.armsylixeabi.1776629329" name="arm-sylixos-eabi-gcc" superClass="com.sylixos.realcoder.tool.armsylixeabi">
+ <option id="com.sylixos.realcoder.option.armsylixoseabi.include.1155626262" name="Include paths (-I)" superClass="com.sylixos.realcoder.option.armsylixoseabi.include" valueType="includePath">
+ <listOptionValue builtIn="false" value="&quot;${SYLIXOS_BASE_PATH}/libsylixos/SylixOS&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${SYLIXOS_BASE_PATH}/libsylixos/SylixOS/include&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${SYLIXOS_BASE_PATH}/libsylixos/SylixOS/include/inet&quot;"/>
<listOptionValue builtIn="false" value="&quot;D:\ZTHSOFT\arm-sylixos-toolchain/arm-sylixos-eabi/include&quot;"/>
- <listOptionValue builtIn="false" value="&quot;D:\ZTHSOFT\arm-sylixos-toolchain/lib/gcc/arm-sylixos-eabi/4.8.4/include&quot;"/>
- <listOptionValue builtIn="false" value="&quot;D:\workspace_bsp/base_a8/libsylixos/SylixOS&quot;"/>
- <listOptionValue builtIn="false" value="&quot;D:\workspace_bsp/base_a8/libsylixos/SylixOS/include&quot;"/>
- <listOptionValue builtIn="false" value="&quot;D:\workspace_bsp/base_a8/libsylixos/SylixOS/include/inet&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;D:\ZTHSOFT\arm-sylixos-toolchain/lib/gcc/arm-sylixos-eabi/4.9.3/include&quot;"/>
</option>
- <option id="com.sylixos.realcoder.option.armsylixoseabi.DefinedSymbols.1960537595" name="Defined symbols(-D)" superClass="com.sylixos.realcoder.option.armsylixoseabi.DefinedSymbols" valueType="definedSymbols">
+ <option id="com.sylixos.realcoder.option.armsylixoseabi.DefinedSymbols.2122107266" name="Defined symbols(-D)" superClass="com.sylixos.realcoder.option.armsylixoseabi.DefinedSymbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="__GNUC__=4"/>
<listOptionValue builtIn="false" value="SYLIXOS"/>
- <listOptionValue builtIn="false" value="__BOOT_INRAM=1"/>
- <listOptionValue builtIn="false" value="am335x"/>
- <listOptionValue builtIn="false" value="gcc"/>
<listOptionValue builtIn="false" value="DMA_MODE"/>
- <listOptionValue builtIn="false" value="ok335xs"/>
+ <listOptionValue builtIn="false" value="gcc"/>
+ <listOptionValue builtIn="false" value="am335x"/>
<listOptionValue builtIn="false" value="LINK_STATS"/>
- <listOptionValue builtIn="false" value="UINT16=uint16_t"/>
+ <listOptionValue builtIn="false" value="ok335xs"/>
</option>
- <inputType id="com.sylixos.realcoder.inputType.armnsylixeabic.810587937" name="SylixOS Input C" superClass="com.sylixos.realcoder.inputType.armnsylixeabic"/>
- <inputType id="com.sylixos.realcoder.inputType.armnsylixeabicpp.556084934" name="SylixOS Input CPP" superClass="com.sylixos.realcoder.inputType.armnsylixeabicpp"/>
+ <inputType id="com.sylixos.realcoder.inputType.armnsylixeabic.1396598415" name="SylixOS Input C" superClass="com.sylixos.realcoder.inputType.armnsylixeabic"/>
+ <inputType id="com.sylixos.realcoder.inputType.armnsylixeabicpp.1230559761" name="SylixOS Input CPP" superClass="com.sylixos.realcoder.inputType.armnsylixeabicpp"/>
</tool>
</toolChain>
</folderInfo>
@@ -56,16 +53,11 @@
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <project id="bspam335x.null.2144094751" name="bspam335x"/>
+ <project id="bspam335x.null.904566283" name="bspam335x"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
- <storageModule moduleId="refreshScope" versionNumber="2">
- <configuration configurationName="Default">
- <resource resourceType="PROJECT" workspacePath="/bspam335x"/>
- </configuration>
- </storageModule>
- <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
+ <storageModule moduleId="refreshScope"/>
</cproject>
diff --git a/.rcsetting b/.rcsetting
new file mode 100644
index 0000000..e9717b8
--- /dev/null
+++ b/.rcsetting
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="GB2312" standalone="no"?>
+<SylixOSSetting>
+<UploadSetting HostName="" Password="root" UserName="root"/>
+<BaseSetting BasePrjectPath="D:\workspace_bsp\base_a8"/>
+</SylixOSSetting>
diff --git a/Makefile b/Makefile
index cfe46b8..c8bdecd 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,15 @@
# target -> bspam335x.elf
# bspam335x.bin
#*********************************************************************************************************
-SYLIXOS_BASE_PATH = D:/workspace_bsp/base_a8
+
+#*********************************************************************************************************
+# configuration genrated by realcoder
+#*********************************************************************************************************
+include config.mk
+
+#*********************************************************************************************************
+# toolchain setting
+#*********************************************************************************************************
TOOLCHAIN_PREFIX = arm-sylixos-eabi-
#*********************************************************************************************************
diff --git a/SylixOS/bsp/bspInit.c b/SylixOS/bsp/bspInit.c
index 4996017..2b2ac84 100644
--- a/SylixOS/bsp/bspInit.c
+++ b/SylixOS/bsp/bspInit.c
@@ -514,7 +514,7 @@ static VOID halStdDirInit (VOID)
*/
mkdir("/usb", DEFAULT_DIR_PERM);
-#if BSP_CFG_NAND_EN > 0
+#if BSP_CFG_NAND_ROOTFS_EN > 0
if (access("/yaffs2/n0/boot", R_OK) < 0) {
mkdir("/yaffs2/n0/boot", DEFAULT_DIR_PERM);
}
@@ -571,8 +571,9 @@ static VOID halStdDirInit (VOID)
symlink("/yaffs2/n1/var", "/var");
symlink("/yaffs2/n1/tmp", "/var/tmp");
symlink("/yaffs2/n1/tmp", "/tmp");
-#else
+#endif
+#if BSP_CFG_SD_ROOTFS_EN > 0
while (access("/media/sdcard0", R_OK) < 0) {
printk(KERN_WARNING "halStdDirInit(): wait for sdcard insert!\n");
sleep(1);
@@ -720,10 +721,12 @@ static PVOID halBootThread (PVOID pvBootArg)
halMonitorInit();
#endif /* LW_CFG_MONITOR_EN > 0 */
-#if BSP_CFG_NAND_EN > 0
+#if BSP_CFG_NAND_ROOTFS_EN > 0
system("shfile /yaffs2/n0/etc/startup.sh"); /* 执行启动脚本 */
/* 必须在初始化 shell 后调用!! */
-#else
+#endif
+
+#if BSP_CFG_SD_ROOTFS_EN > 0
system("shfile /media/sdcard0/etc/startup.sh"); /* 执行启动脚本 */
/* 必须在初始化 shell 后调用!! */
#endif
diff --git a/SylixOS/bsp/config_beaglebone.h b/SylixOS/bsp/config_beaglebone.h
index cde7306..20a8408 100644
--- a/SylixOS/bsp/config_beaglebone.h
+++ b/SylixOS/bsp/config_beaglebone.h
@@ -57,6 +57,12 @@
NAND 相关配置
*********************************************************************************************************/
#define BSP_CFG_NAND_EN 0
+
+#define BSP_CFG_NAND_ROOTFS_EN 0
+/*********************************************************************************************************
+ SD 相关配置
+*********************************************************************************************************/
+#define BSP_CFG_SD_ROOTFS_EN 1
/*********************************************************************************************************
串口相关配置
*********************************************************************************************************/
diff --git a/SylixOS/bsp/config_evmAM335x.h b/SylixOS/bsp/config_evmAM335x.h
index f4ad233..fc6c40e 100644
--- a/SylixOS/bsp/config_evmAM335x.h
+++ b/SylixOS/bsp/config_evmAM335x.h
@@ -57,6 +57,12 @@
NAND 相关配置
*********************************************************************************************************/
#define BSP_CFG_NAND_EN 1
+
+#define BSP_CFG_NAND_ROOTFS_EN 1
+/*********************************************************************************************************
+ SD 相关配置
+*********************************************************************************************************/
+#define BSP_CFG_SD_ROOTFS_EN 0
/*********************************************************************************************************
串口相关配置
*********************************************************************************************************/
diff --git a/SylixOS/bsp/config_evmskAM335x.h b/SylixOS/bsp/config_evmskAM335x.h
index 041c216..1f3b086 100644
--- a/SylixOS/bsp/config_evmskAM335x.h
+++ b/SylixOS/bsp/config_evmskAM335x.h
@@ -57,6 +57,12 @@
NAND 相关配置
*********************************************************************************************************/
#define BSP_CFG_NAND_EN 0
+
+#define BSP_CFG_NAND_ROOTFS_EN 0
+/*********************************************************************************************************
+ SD 相关配置
+*********************************************************************************************************/
+#define BSP_CFG_SD_ROOTFS_EN 1
/*********************************************************************************************************
串口相关配置
*********************************************************************************************************/
diff --git a/SylixOS/bsp/config_ok335xd.h b/SylixOS/bsp/config_ok335xd.h
index 14ebde8..18d52b5 100644
--- a/SylixOS/bsp/config_ok335xd.h
+++ b/SylixOS/bsp/config_ok335xd.h
@@ -64,6 +64,12 @@
NAND 相关配置
*********************************************************************************************************/
#define BSP_CFG_NAND_EN 1
+
+#define BSP_CFG_NAND_ROOTFS_EN 1
+/*********************************************************************************************************
+ SD 相关配置
+*********************************************************************************************************/
+#define BSP_CFG_SD_ROOTFS_EN 0
/*********************************************************************************************************
串口相关配置
*********************************************************************************************************/
diff --git a/SylixOS/bsp/config_ok335xs.h b/SylixOS/bsp/config_ok335xs.h
index b50f32b..405c581 100644
--- a/SylixOS/bsp/config_ok335xs.h
+++ b/SylixOS/bsp/config_ok335xs.h
@@ -66,6 +66,12 @@
NAND 相关配置
*********************************************************************************************************/
#define BSP_CFG_NAND_EN 1
+
+#define BSP_CFG_NAND_ROOTFS_EN 1
+/*********************************************************************************************************
+ SD 相关配置
+*********************************************************************************************************/
+#define BSP_CFG_SD_ROOTFS_EN 0
/*********************************************************************************************************
串口相关配置
*********************************************************************************************************/
diff --git a/SylixOS/driver/netif/am335x_cpsw.c b/SylixOS/driver/netif/am335x_cpsw.c
index 89a03a6..364794b 100644
--- a/SylixOS/driver/netif/am335x_cpsw.c
+++ b/SylixOS/driver/netif/am335x_cpsw.c
@@ -27,6 +27,10 @@
#include "lwiplib.h"
#include "am335x_cpsw.h"
/*********************************************************************************************************
+ 外部函数
+*********************************************************************************************************/
+extern int netio_main(int argc, char **argv);
+/*********************************************************************************************************
全局变量
*********************************************************************************************************/
__AM335X_CPSW_CONTROLER _G_am335xCpswControlers[MAX_CPSW_INST] = {
@@ -674,6 +678,8 @@ INT arm335xCpswInit (VOID)
API_InterVectorEnable(pCpswControler->CPSWC_ulMiscVector);
}
+ API_TShellKeywordAdd("netio", netio_main);
+
pCpswControler->CPSWC_bIsInit = LW_TRUE;
}
diff --git a/SylixOS/driver/sdi/am335x_sdi.c b/SylixOS/driver/sdi/am335x_sdi.c
index 79c224a..d75c67b 100644
--- a/SylixOS/driver/sdi/am335x_sdi.c
+++ b/SylixOS/driver/sdi/am335x_sdi.c
@@ -68,6 +68,7 @@ typedef struct {
PVOID SDICH_pvRegBase;
LW_SDHCI_HOST_ATTR SDICH_sdhciattr;
PVOID SDICH_pvSdhciHost; /* 创建的 SDHCI 对象 */
+ PVOID SDICH_pvSdmHost; /* 对应的 SDM HOST 对象 */
} __SDI_CHANNEL;
/*********************************************************************************************************
全局变量
@@ -112,6 +113,7 @@ INT am335xSdiDrvInstall (INT iChannel, PAM335X_PINMUX pPinMux, UINT uiCdPin,
{
__SDI_CHANNEL *psdichannel;
PVOID pvSdhciHost;
+ PVOID pvSdmHost;
INT iRet;
am335xPinMuxSetup(pPinMux);
@@ -138,8 +140,10 @@ INT am335xSdiDrvInstall (INT iChannel, PAM335X_PINMUX pPinMux, UINT uiCdPin,
if (!pvSdhciHost) {
return (PX_ERROR);
}
+ pvSdmHost = API_SdhciSdmHostGet(pvSdhciHost);
psdichannel->SDICH_pvSdhciHost = pvSdhciHost;
+ psdichannel->SDICH_pvSdmHost = pvSdmHost;
__sdiHotPlugInit(psdichannel);
@@ -362,12 +366,12 @@ static VOID __sdiCdScan (__SDI_CHANNEL *psdichannel)
if (iStaLast ^ iStaCurr) { /* 插入状态变化 */
if (iStaCurr) {
- API_SdmEventNotify(psdichannel->SDICH_cpcHostName,
+ API_SdmEventNotify(psdichannel->SDICH_pvSdmHost,
SDM_EVENT_DEV_INSERT);
} else {
API_SdhciDeviceCheckNotify(psdichannel->SDICH_pvSdhciHost,
SDHOST_DEVSTA_UNEXIST);
- API_SdmEventNotify(psdichannel->SDICH_cpcHostName,
+ API_SdmEventNotify(psdichannel->SDICH_pvSdmHost,
SDM_EVENT_DEV_REMOVE);
}
diff --git a/SylixOS/user/main.c b/SylixOS/user/main.c
index e3c5c59..3785eeb 100644
--- a/SylixOS/user/main.c
+++ b/SylixOS/user/main.c
@@ -34,8 +34,5 @@ int t_main (void)
//canTestStart();
- extern int netio_main(int argc, char **argv);
- API_TShellKeywordAdd("netio", netio_main);
-
return (0);
}
diff --git a/config.mk b/config.mk
new file mode 100644
index 0000000..555ef2f
--- /dev/null
+++ b/config.mk
@@ -0,0 +1,24 @@
+#*********************************************************************************************************
+#
+# 中国软件开源组织
+#
+# 嵌入式实时操作系统
+#
+# SylixOS(TM) LW : long wing
+#
+# Copyright All Rights Reserved
+#
+#--------------文件信息--------------------------------------------------------------------------------
+#
+# 文 件 名: config.mk
+#
+# 创 建 人: RealCoder
+#
+# 文件创建日期: 2015 年 04 月 19 日
+#
+# 描 述: 本文由RealCoder生成,用于配置Makefile功能,请勿手动修改
+#*********************************************************************************************************
+#*********************************************************************************************************
+# SylixOS Base Project 路径
+#*********************************************************************************************************
+SYLIXOS_BASE_PATH = D:\workspace_bsp\base_a8 \ No newline at end of file