提交 c021765b 编写于 作者: B bernard.xiong@gmail.com

update building script.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1917 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 d21b2083
......@@ -2,7 +2,10 @@ import os
import sys
import rtconfig
RTT_ROOT = os.path.normpath(os.getcwd() + '/../..')
if os.getenv('RTT_ROOT'):
RTT_ROOT = os.getenv('RTT_ROOT')
else:
RTT_ROOT = os.path.normpath(os.getcwd() + '/../..')
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
from building import *
......
......@@ -63,7 +63,7 @@ void rt_hw_board_init()
#endif
/* init systick */
SysTick_Config( SystemCoreClock/RT_TICK_PER_SECOND - 1);
SysTick_Config( SystemCoreClock/RT_TICK_PER_SECOND);
/* set pend exception priority */
NVIC_SetPriority(PendSV_IRQn, (1<<__NVIC_PRIO_BITS) - 1);
......@@ -71,8 +71,6 @@ void rt_hw_board_init()
rt_hw_uart_init();
rt_console_set_device("uart0");
#endif
rt_kprintf("\r\n\r\nSystemInit......\r\n");
}
/*@}*/
......@@ -218,7 +218,7 @@ static rt_err_t lpc17xx_emac_init(rt_device_t dev)
switch (lpc17xx_emac_device.phy_mode)
{
case EMAC_PHY_AUTO:
/* Use autonegotiation about the link speed. */
/* Use auto negotiation about the link speed. */
write_PHY (PHY_REG_BMCR, PHY_AUTO_NEG);
/* Wait to complete Auto_Negotiation. */
for (tout = 0; tout < 0x100000; tout++)
......@@ -226,7 +226,7 @@ static rt_err_t lpc17xx_emac_init(rt_device_t dev)
regv = read_PHY (PHY_REG_BMSR);
if (regv & 0x0020)
{
/* Autonegotiation Complete. */
/* Auto negotiation Complete. */
break;
}
}
......@@ -463,7 +463,7 @@ void lpc17xx_emac_hw_init(void)
rt_event_init(&tx_event, "tx_event", RT_IPC_FLAG_FIFO);
rt_sem_init(&sem_lock, "eth_lock", 1, RT_IPC_FLAG_FIFO);
/* set autonegotiation mode */
/* set auto negotiation mode */
lpc17xx_emac_device.phy_mode = EMAC_PHY_AUTO;
// OUI 00-60-37 NXP Semiconductors
......
import os
# toolchains options
ARCH='arm'
CPU='cortex-m3'
CROSS_TOOL='keil'
if os.getenv('RTT_CC'):
CROSS_TOOL = os.getenv('RTT_CC')
if CROSS_TOOL == 'gcc':
PLATFORM = 'gcc'
EXEC_PATH = 'E:/Program Files/CodeSourcery/Sourcery G++ Lite/bin'
......@@ -12,6 +17,10 @@ elif CROSS_TOOL == 'keil':
elif CROSS_TOOL == 'iar':
PLATFORM = 'iar'
EXEC_PATH = 'E:/Program Files/IAR Systems/Embedded Workbench 6.0/arm/bin'
if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH = os.getenv('RTT_EXEC_PATH')
BUILD = 'debug'
if PLATFORM == 'gcc':
......
......@@ -132,9 +132,6 @@ int main(void)
/* disable interrupt first */
rt_hw_interrupt_disable();
/* init system setting */
SystemInit();
/* startup RT-Thread RTOS */
rtthread_startup();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册