add sdram driver

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1754 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
wuyangyong committed 2011-10-11 05:06:46 +00:00
1 parent c17931ad60
commit f9a41a9686
8 files changed
+307 -19

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@ import rtconfig
Import('RTT_ROOT')
from building import *
src_bsp = ['application.c', 'startup.c', 'board.c']
src_bsp = ['application.c', 'startup.c', 'sdram.c', 'board.c']
src_drv = []
if GetDepend('RT_USING_DFS'):
+15 -4
View File
@@ -58,9 +58,16 @@ void rt_hw_timer_handler(void)
void rt_hw_eth_handler(void)
{
#ifdef RT_USING_LWIP
/* luminary ethernet interface */
extern void luminaryif_isr(void);
luminaryif_isr();
extern void luminaryif_isr(void);
/* enter interrupt */
rt_interrupt_enter();
/* luminary ethernet interface */
luminaryif_isr();
/* leave interrupt */
rt_interrupt_leave();
#endif
}
@@ -79,8 +86,12 @@ void rt_hw_board_init()
SysTickEnable();
/* enable ssio */
//SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI0);
//SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI0);
#if LM3S_EXT_SRAM == 1
/* init SDRAM */
rt_hw_sdram_init();
#endif
/* init console */
rt_hw_console_init();
+14 -2
View File
@@ -15,11 +15,23 @@
// <<< Use Configuration Wizard in Context Menu >>>
#ifndef __BOARD_H__
#define __BOARD_H__
#define __BOARD_H__
/* whether use board external SRAM memory */
// <e>Use external SRAM memory on the board
// <i>Enable External SRAM memory
#define LM3S_EXT_SRAM 0
// <o>Begin Address of External SRAM
// <i>Default: 0x60000000
#define LM3S_EXT_SRAM_BEGIN 0x60000000 /* the begining address of external SRAM */
// <o>End Address of External SRAM
// <i>Default: 0x60000000
#define LM3S_EXT_SRAM_END 0x607FFFFF /* the end address of external SRAM */
// </e>
// <o> Internal SRAM memory size[Kbytes] <8-64>
// <i>Default: 64
#define LM3S_SRAM_SIZE 64
#define LM3S_SRAM_SIZE 96
#define LM3S_SRAM_END (0x20000000 + LM3S_SRAM_SIZE * 1024)
// For lm3s8962, it should be SYSCTL_XTAL_8MHZ
+2 -1
View File
@@ -13,6 +13,7 @@ Group (library)
File 1,1,<.\application.c><application.c>
File 1,1,<.\startup.c><startup.c>
File 1,1,<.\board.c><board.c>
File 1,1,<.\sdram.c><sdram.c>
File 1,1,<.\luminaryif.c><luminaryif.c>
File 2,1,<..\..\src\clock.c><clock.c>
File 2,1,<..\..\src\device.c><device.c>
@@ -202,7 +203,7 @@ Options 1,0,0 // Target 'RT-Thread-lm3s'
ADSLDIF ()
ADSLDDW ()
OPTDL (SARMCM3.DLL)()(DLM.DLL)(-pLM3S9B96)(SARMCM3.DLL)()(TLM.DLL)(-pLM3S9B96)
OPTDBG 48118,4,()()()()()()()()()() (BIN\lmidk-agdi.dll)()()()
OPTDBG 49142,7,()()()()()()()()()() (Segger\JL2CM3.dll)()()()
FLASH1 { 1,0,0,0,1,0,0,0,1,16,0,0,0,0,0,0,0,0,0,0 }
FLASH2 (BIN\lmidk-agdi.dll)
FLASH3 ("" ())
+9 -5
View File
@@ -113,9 +113,6 @@
/* Ethernet padding size */
#define RT_LWIP_ETH_PAD_SIZE 2
/* TCP sender buffer space*/
#define RT_LWIP_TCP_SND_BUF 1024*8
/* Enable SNMP protocol*/
#define RT_LWIP_SNMP
@@ -143,12 +140,19 @@
#define RT_LWIP_MSKADDR3 0
/* tcp thread options */
#define RT_LWIP_TCPTHREAD_PRIORITY 22
#define RT_LWIP_TCPTHREAD_PRIORITY 12
#define RT_LWIP_TCPTHREAD_MBOX_SIZE 4
#define RT_LWIP_TCPTHREAD_STACKSIZE 1024
/* ethernet if thread options */
#define RT_LWIP_ETHTHREAD_PRIORITY 23
#define RT_LWIP_ETHTHREAD_PRIORITY 15
#define RT_LWIP_ETHTHREAD_MBOX_SIZE 4
#define RT_LWIP_ETHTHREAD_STACKSIZE 512
/* TCP sender buffer space */
#define RT_LWIP_TCP_SND_BUF 8192
/* TCP receive window. */
#define RT_LWIP_TCP_WND 8192
#endif
File diff suppressed because it is too large. Load diff
+9 -5
View File
@@ -56,7 +56,7 @@ extern int __bss_end;
* Output : None
* Return : None
*******************************************************************************/
void assert_failed(u8* file, u32 line)
void __error__(char* file, unsigned long line)
{
rt_kprintf("\n\r Wrong parameter value detected on\r\n");
rt_kprintf(" file %s\r\n", file);
@@ -87,6 +87,10 @@ void rtthread_startup(void)
rt_system_timer_init();
#ifdef RT_USING_HEAP
#if LM3S_EXT_SRAM == 1
/* init sdram */
rt_system_heap_init((void*)LM3S_EXT_SRAM_BEGIN, (void*)LM3S_EXT_SRAM_END);
#else
#ifdef __CC_ARM
rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)LM3S_SRAM_END);
#elif __ICCARM__
@@ -95,6 +99,7 @@ void rtthread_startup(void)
/* init memory system */
rt_system_heap_init((void*)&__bss_end, (void*)LM3S_SRAM_END);
#endif
#endif
#endif
/* init scheduler system */
@@ -139,12 +144,11 @@ void rtthread_startup(void)
int main(void)
{
rt_uint32_t level UNUSED;
/* disable interrupt first */
level = rt_hw_interrupt_disable();
rt_hw_interrupt_disable();
rtthread_startup();
return 0;
}
+1 -1
View File
@@ -60,7 +60,7 @@ Options 1,0,0 // Target 'RT-Thread-lm3s'
OCMADSXRAM { 0,0,0,0,0,0,0,0,0 }
OCR_RVCT { 1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,4,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,128,1,0,0,0,0,0,0,0,0,0,0 }
RV_STAVEC ()
ADSCCFLG { 9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
ADSCCFLG { 13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
ADSCMISC ()
ADSCDEFN ()
ADSCUDEF ()