update building script.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1917 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
d21b20835f
commit
c021765b71
|
@ -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
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue