Browse Source

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
qiuyiuestc 14 years ago
parent
commit
400c012e4d
4 changed files with 10 additions and 12 deletions
  1. 3 3
      bsp/lm3s/project.Uv2
  2. 2 2
      bsp/lm3s/rtconfig.h
  3. 2 4
      bsp/lm3s/sdcard.c
  4. 3 3
      bsp/lm3s/template.Uv2

+ 3 - 3
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

+ 2 - 2
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*/

+ 2 - 4
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");

+ 3 - 3
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