summaryrefslogtreecommitdiff
path: root/bsp
diff options
context:
space:
mode:
authorqiuyiuestc <[email protected]>2010-11-30 12:56:03 +0000
committerqiuyiuestc <[email protected]>2010-11-30 12:56:03 +0000
commit400c012e4d08cb470ad290b48100cdccb5f2838e (patch)
treebd7300c55b723686f7d9d91c433fa0ab9cda23d0 /bsp
parentfad87e1f80e0c1486dd992f98eb0ab540ab3d041 (diff)
update lm3s project files & fix sd card read fail issue
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1161 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'bsp')
-rw-r--r--bsp/lm3s/project.Uv26
-rw-r--r--bsp/lm3s/rtconfig.h4
-rw-r--r--bsp/lm3s/sdcard.c6
-rw-r--r--bsp/lm3s/template.Uv26
4 files changed, 10 insertions, 12 deletions
diff --git a/bsp/lm3s/project.Uv2 b/bsp/lm3s/project.Uv2
index 25d8eb4a73..4164d5737b 100644
--- a/bsp/lm3s/project.Uv2
+++ b/bsp/lm3s/project.Uv2
@@ -201,9 +201,9 @@ Options 1,0,0 // Target 'RT-Thread-lm3s'
ADSLDIF ()
ADSLDDW ()
OPTDL (SARMCM3.DLL)()(DLM.DLL)(-pLM3S6918)(SARMCM3.DLL)()(TLM.DLL)(-pLM3S6918)
- OPTDBG 48118,7,()()()()()()()()()() (Segger\JL2CM3.dll)()()()
- FLASH1 { 1,0,0,0,1,0,0,0,5,16,0,0,0,0,0,0,0,0,0,0 }
- FLASH2 (Segger\JLTAgdi.dll)
+ OPTDBG 48118,4,()()()()()()()()()() (BIN\lmidk-agdi.dll)()()()
+ FLASH1 { 1,0,0,0,1,0,0,0,3,16,0,0,0,0,0,0,0,0,0,0 }
+ FLASH2 (BIN\lmidk-agdi.dll)
FLASH3 ("" ())
FLASH4 ()
EndOpt
diff --git a/bsp/lm3s/rtconfig.h b/bsp/lm3s/rtconfig.h
index 2f0c86e9c2..0ddeff81fc 100644
--- a/bsp/lm3s/rtconfig.h
+++ b/bsp/lm3s/rtconfig.h
@@ -133,13 +133,13 @@
/* ip address of target*/
#define RT_LWIP_IPADDR0 192
#define RT_LWIP_IPADDR1 168
-#define RT_LWIP_IPADDR2 0
+#define RT_LWIP_IPADDR2 1
#define RT_LWIP_IPADDR3 30
/* gateway address of target*/
#define RT_LWIP_GWADDR0 192
#define RT_LWIP_GWADDR1 168
-#define RT_LWIP_GWADDR2 0
+#define RT_LWIP_GWADDR2 1
#define RT_LWIP_GWADDR3 1
/* mask address of target*/
diff --git a/bsp/lm3s/sdcard.c b/bsp/lm3s/sdcard.c
index 7a7688de9b..673b94fa04 100644
--- a/bsp/lm3s/sdcard.c
+++ b/bsp/lm3s/sdcard.c
@@ -691,13 +691,11 @@ static rt_err_t rt_sdcard_close(rt_device_t dev)
return RT_EOK;
}
-/* set sector size to 512 */
-#define SECTOR_SIZE 512
static rt_size_t rt_sdcard_read(rt_device_t dev, rt_off_t pos, void* buffer, rt_size_t size)
{
DRESULT status;
- status = sdcard_read(0, buffer, part.offset + pos / SECTOR_SIZE, size / SECTOR_SIZE);
+ status = sdcard_read(0, buffer, part.offset + pos, size);
if (status != RES_OK)
{
rt_kprintf("sd card read failed\n");
@@ -711,7 +709,7 @@ static rt_size_t rt_sdcard_write (rt_device_t dev, rt_off_t pos, const void* buf
{
DRESULT status;
- status = sdcard_write(0, buffer, part.offset + pos / SECTOR_SIZE, size / SECTOR_SIZE);
+ status = sdcard_write(0, buffer, part.offset + pos, size);
if (status != RES_OK)
{
rt_kprintf("sd card write failed\n");
diff --git a/bsp/lm3s/template.Uv2 b/bsp/lm3s/template.Uv2
index 983ed2099b..93f43b513e 100644
--- a/bsp/lm3s/template.Uv2
+++ b/bsp/lm3s/template.Uv2
@@ -89,9 +89,9 @@ Options 1,0,0 // Target 'RT-Thread-lm3s'
ADSLDIF ()
ADSLDDW ()
OPTDL (SARMCM3.DLL)()(DLM.DLL)(-pLM3S6918)(SARMCM3.DLL)()(TLM.DLL)(-pLM3S6918)
- OPTDBG 48118,7,()()()()()()()()()() (Segger\JL2CM3.dll)()()()
- FLASH1 { 1,0,0,0,1,0,0,0,5,16,0,0,0,0,0,0,0,0,0,0 }
- FLASH2 (Segger\JLTAgdi.dll)
+ OPTDBG 48118,4,()()()()()()()()()() (BIN\lmidk-agdi.dll)()()()
+ FLASH1 { 1,0,0,0,1,0,0,0,3,16,0,0,0,0,0,0,0,0,0,0 }
+ FLASH2 (BIN\lmidk-agdi.dll)
FLASH3 ("" ())
FLASH4 ()
EndOpt