update the sam7x project
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2189 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
6c19a26481
commit
a97ed29249
|
@ -1,19 +1,12 @@
|
||||||
import rtconfig
|
|
||||||
Import('RTT_ROOT')
|
|
||||||
from building import *
|
from building import *
|
||||||
|
|
||||||
src_bsp = ['application.c', 'startup.c', 'board.c']
|
cwd = GetCurrentDir()
|
||||||
src_drv = ['serial.c']
|
objs = []
|
||||||
|
list = os.listdir(cwd)
|
||||||
|
|
||||||
if GetDepend('RT_USING_DFS'):
|
for d in list:
|
||||||
src_drv += ['sd.c']
|
path = os.path.join(cwd, d)
|
||||||
|
if os.path.isfile(os.path.join(path, 'SConscript')):
|
||||||
|
objs = objs + SConscript(os.path.join(d, 'SConscript'))
|
||||||
|
|
||||||
if GetDepend('RT_USING_LWIP'):
|
Return('objs')
|
||||||
src_drv += ['sam7x_emac.c']
|
|
||||||
|
|
||||||
|
|
||||||
src = File(src_bsp + src_drv)
|
|
||||||
CPPPATH = [RTT_ROOT + '/bsp/sam7x']
|
|
||||||
group = DefineGroup('Startup', src, depend = [''], CPPPATH = CPPPATH)
|
|
||||||
|
|
||||||
Return('group')
|
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
from building import *
|
||||||
|
|
||||||
|
cwd = GetCurrentDir()
|
||||||
|
src = Glob('*.c')
|
||||||
|
CPPPATH = [cwd, str(Dir('#'))]
|
||||||
|
|
||||||
|
group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH)
|
||||||
|
|
||||||
|
Return('group')
|
|
@ -30,7 +30,9 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef RT_USING_LWIP
|
#ifdef RT_USING_LWIP
|
||||||
#include <lwip/sys.h>
|
#include <lwip/sys.h>
|
||||||
|
#include <netif/ethernetif.h>
|
||||||
|
#include "sam7x_emac.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef RT_USING_RTGUI
|
#ifdef RT_USING_RTGUI
|
|
@ -0,0 +1,16 @@
|
||||||
|
from building import *
|
||||||
|
|
||||||
|
cwd = GetCurrentDir()
|
||||||
|
src = Glob('*.c')
|
||||||
|
|
||||||
|
# remove no need file.
|
||||||
|
if GetDepend('RT_USING_LWIP') == False:
|
||||||
|
SrcRemove(src, 'sam7x_emac.c')
|
||||||
|
if GetDepend('RT_USING_DFS') == False:
|
||||||
|
SrcRemove(src, 'ssd.c')
|
||||||
|
|
||||||
|
CPPPATH = [cwd]
|
||||||
|
|
||||||
|
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
|
||||||
|
|
||||||
|
Return('group')
|
|
@ -4,9 +4,6 @@
|
||||||
//#define DM9161
|
//#define DM9161
|
||||||
#define RTL8201
|
#define RTL8201
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef DM9161
|
#ifdef DM9161
|
||||||
#define AT91C_PHY_ADDR 31
|
#define AT91C_PHY_ADDR 31
|
||||||
#else
|
#else
|
||||||
|
@ -94,7 +91,6 @@
|
||||||
#define DM9161_DUPLEX_MODE (1 << 8) // 1 = Full duplex operation 0 = Normal operation
|
#define DM9161_DUPLEX_MODE (1 << 8) // 1 = Full duplex operation 0 = Normal operation
|
||||||
#define DM9161_COLLISION_TEST (1 << 7) // 1 = Collision test enabled 0 = Normal operation
|
#define DM9161_COLLISION_TEST (1 << 7) // 1 = Collision test enabled 0 = Normal operation
|
||||||
|
|
||||||
|
|
||||||
#define DM9161_NP (1 << 15) // Next page Indication
|
#define DM9161_NP (1 << 15) // Next page Indication
|
||||||
#define DM9161_ACK (1 << 14) // Acknowledge
|
#define DM9161_ACK (1 << 14) // Acknowledge
|
||||||
#define DM9161_RF (1 << 13) // Remote Fault
|
#define DM9161_RF (1 << 13) // Remote Fault
|
|
@ -61,6 +61,8 @@
|
||||||
<UserProg2Name></UserProg2Name>
|
<UserProg2Name></UserProg2Name>
|
||||||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||||
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
||||||
|
<nStopU1X>0</nStopU1X>
|
||||||
|
<nStopU2X>0</nStopU2X>
|
||||||
</BeforeCompile>
|
</BeforeCompile>
|
||||||
<BeforeMake>
|
<BeforeMake>
|
||||||
<RunUserProg1>0</RunUserProg1>
|
<RunUserProg1>0</RunUserProg1>
|
||||||
|
@ -346,7 +348,7 @@
|
||||||
<MiscControls></MiscControls>
|
<MiscControls></MiscControls>
|
||||||
<Define></Define>
|
<Define></Define>
|
||||||
<Undefine></Undefine>
|
<Undefine></Undefine>
|
||||||
<IncludePath>.;..\..\components\finsh;..\..\components\net\lwip\src;..\..\components\net\lwip\src\arch\include;..\..\components\net\lwip\src\include;..\..\components\net\lwip\src\include\ipv4;..\..\components\net\lwip\src\include\netif;..\..\include;..\..\libcpu\arm\AT91SAM7X;..\..\libcpu\arm\common</IncludePath>
|
<IncludePath>.;..\..\components\finsh;..\..\components\net\lwip\src;..\..\components\net\lwip\src\arch\include;..\..\components\net\lwip\src\include;..\..\components\net\lwip\src\include\ipv4;..\..\components\net\lwip\src\include\netif;..\..\include;..\..\libcpu\arm\AT91SAM7X;..\..\libcpu\arm\common;applications;drivers</IncludePath>
|
||||||
</VariousControls>
|
</VariousControls>
|
||||||
</Cads>
|
</Cads>
|
||||||
<Aads>
|
<Aads>
|
||||||
|
@ -384,32 +386,37 @@
|
||||||
</TargetOption>
|
</TargetOption>
|
||||||
<Groups>
|
<Groups>
|
||||||
<Group>
|
<Group>
|
||||||
<GroupName>Startup</GroupName>
|
<GroupName>Applications</GroupName>
|
||||||
<Files>
|
<Files>
|
||||||
<File>
|
<File>
|
||||||
<FileName>application.c</FileName>
|
<FileName>application.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>.\application.c</FilePath>
|
<FilePath>applications\application.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>startup.c</FileName>
|
<FileName>startup.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>.\startup.c</FilePath>
|
<FilePath>applications\startup.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
|
</Files>
|
||||||
|
</Group>
|
||||||
|
<Group>
|
||||||
|
<GroupName>Drivers</GroupName>
|
||||||
|
<Files>
|
||||||
<File>
|
<File>
|
||||||
<FileName>board.c</FileName>
|
<FileName>board.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>.\board.c</FilePath>
|
<FilePath>drivers\board.c</FilePath>
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<FileName>serial.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>.\serial.c</FilePath>
|
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>sam7x_emac.c</FileName>
|
<FileName>sam7x_emac.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>.\sam7x_emac.c</FilePath>
|
<FilePath>drivers\sam7x_emac.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>serial.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>drivers\serial.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
|
@ -451,11 +458,6 @@
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\..\src\mem.c</FilePath>
|
<FilePath>..\..\src\mem.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
<File>
|
|
||||||
<FileName>memheap.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\src\memheap.c</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
<File>
|
||||||
<FileName>mempool.c</FileName>
|
<FileName>mempool.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
|
|
|
@ -1,21 +1,17 @@
|
||||||
import os
|
import os
|
||||||
|
|
||||||
# panel options
|
|
||||||
# 'PNL_A70','PNL_N35', 'PNL_T35'
|
|
||||||
RT_USING_LCD_TYPE = 'PNL_T35'
|
|
||||||
|
|
||||||
# toolchains options
|
# toolchains options
|
||||||
ARCH = 'arm'
|
ARCH = 'arm'
|
||||||
CPU = 'AT91SAM7X'
|
CPU = 'AT91SAM7X'
|
||||||
|
|
||||||
CROSS_TOOL = 'gcc'
|
CROSS_TOOL = 'gcc'
|
||||||
|
|
||||||
if os.getenv('RTT_CC'):
|
if os.getenv('RTT_CC'):
|
||||||
CROSS_TOOL = os.getenv('RTT_CC')
|
CROSS_TOOL = os.getenv('RTT_CC')
|
||||||
|
|
||||||
if CROSS_TOOL == 'gcc':
|
if CROSS_TOOL == 'gcc':
|
||||||
PLATFORM = 'gcc'
|
PLATFORM = 'gcc'
|
||||||
EXEC_PATH = 'C:/Program Files/CodeSourcery/Sourcery G++ Lite/bin'
|
EXEC_PATH = 'C:/Program Files/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin'
|
||||||
elif CROSS_TOOL == 'keil':
|
elif CROSS_TOOL == 'keil':
|
||||||
PLATFORM = 'armcc'
|
PLATFORM = 'armcc'
|
||||||
EXEC_PATH = 'C:/Keil'
|
EXEC_PATH = 'C:/Keil'
|
||||||
|
|
Loading…
Reference in New Issue