提交 76439372 编写于 作者: B bernard.xiong

update according to RT-Thread 0.3.0 final.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@552 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 6acaf214
......@@ -96,8 +96,6 @@ void rtthread_startup(void)
/* init scheduler system */
rt_system_scheduler_init();
/* init hardware serial device */
rt_hw_usart_init();
/* init sdcard driver */
#if STM32_USE_SDIO
rt_hw_sdcard_init();
......
......@@ -156,31 +156,6 @@ void DMA1_Channel2_IRQHandler(void)
#endif
}
/*******************************************************************************
* Function Name : DMA1_Channel6_IRQHandler
* Description : This function handles DMA1 Channel 6 interrupt request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void DMA1_Channel6_IRQHandler(void)
{
#ifdef RT_USING_UART2
extern struct rt_device uart2_device;
extern void rt_hw_serial_dma_rx_isr(struct rt_device *device);
/* enter interrupt */
rt_interrupt_enter();
/* clear DMA flag */
DMA_ClearFlag(DMA1_FLAG_TC6 | DMA1_FLAG_TE6);
rt_hw_serial_dma_rx_isr(&uart2_device);
/* leave interrupt */
rt_interrupt_leave();
#endif
}
/*******************************************************************************
* Function Name : USART1_IRQHandler
* Description : This function handles USART1 global interrupt request.
......
......@@ -96,8 +96,6 @@ void rtthread_startup(void)
/* init scheduler system */
rt_system_scheduler_init();
/* init hardware serial device */
rt_hw_usart_init();
/* init all device */
rt_device_init_all();
......
......@@ -156,31 +156,6 @@ void DMA1_Channel2_IRQHandler(void)
#endif
}
/*******************************************************************************
* Function Name : DMA1_Channel6_IRQHandler
* Description : This function handles DMA1 Channel 6 interrupt request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void DMA1_Channel6_IRQHandler(void)
{
#ifdef RT_USING_UART2
extern struct rt_device uart2_device;
extern void rt_hw_serial_dma_rx_isr(struct rt_device *device);
/* enter interrupt */
rt_interrupt_enter();
/* clear DMA flag */
DMA_ClearFlag(DMA1_FLAG_TC6 | DMA1_FLAG_TE6);
rt_hw_serial_dma_rx_isr(&uart2_device);
/* leave interrupt */
rt_interrupt_leave();
#endif
}
/*******************************************************************************
* Function Name : USART1_IRQHandler
* Description : This function handles USART1 global interrupt request.
......
/*
* File : board.h
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006, RT-Thread Develop Team
* COPYRIGHT (C) 2009, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
......@@ -50,6 +50,16 @@ void rt_hw_board_led_on(int n);
void rt_hw_board_led_off(int n);
void rt_hw_board_init(void);
#if STM32_CONSOLE_USART == 0
#define CONSOLE_DEVICE "no"
#elif STM32_CONSOLE_USART == 1
#define CONSOLE_DEVICE "uart1"
#elif STM32_CONSOLE_USART == 2
#define CONSOLE_DEVICE "uart2"
#elif STM32_CONSOLE_USART == 3
#define CONSOLE_DEVICE "uart3"
#endif
void rt_hw_usart_init(void);
/* SD Card init function */
......
......@@ -73,8 +73,7 @@
/* SECTION: device filesystem */
#define RT_USING_DFS
#define RT_USING_DFS_EFSL
/* #define RT_USING_DFS_ELMFAT */
#define RT_USING_DFS_ELMFAT
/* the max number of mounted filesystem */
#define DFS_FILESYSTEMS_MAX 2
......
......@@ -97,9 +97,6 @@ void rtthread_startup(void)
/* init scheduler system */
rt_system_scheduler_init();
/* init hardware serial device */
rt_hw_usart_init();
#ifdef RT_USING_DFS
/* init sdcard driver */
#if STM32_USE_SDIO
......
......@@ -156,31 +156,6 @@ void DMA1_Channel2_IRQHandler(void)
#endif
}
/*******************************************************************************
* Function Name : DMA1_Channel6_IRQHandler
* Description : This function handles DMA1 Channel 6 interrupt request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void DMA1_Channel6_IRQHandler(void)
{
#ifdef RT_USING_UART2
extern struct rt_device uart2_device;
extern void rt_hw_serial_dma_rx_isr(struct rt_device *device);
/* enter interrupt */
rt_interrupt_enter();
/* clear DMA flag */
DMA_ClearFlag(DMA1_FLAG_TC6 | DMA1_FLAG_TE6);
rt_hw_serial_dma_rx_isr(&uart2_device);
/* leave interrupt */
rt_interrupt_leave();
#endif
}
/*******************************************************************************
* Function Name : USART1_IRQHandler
* Description : This function handles USART1 global interrupt request.
......
......@@ -2,6 +2,7 @@
### Do not modify !
Target (RT-Thread STM32), 0x0004 // Tools: 'ARM-ADS'
Target (RT-Thread STM32 Simulator), 0x0004 // Tools: 'ARM-ADS'
Group (Startup)
Group (StdPeriph_Driver)
......@@ -16,6 +17,7 @@ File 1,1,<.\startup.c><startup.c>
File 1,1,<.\led.c><led.c>
File 1,5,<.\rtconfig.h><rtconfig.h>
File 1,5,<.\board.h><board.h>
File 1,1,<.\usart.c><usart.c>
File 2,1,<.\Libraries\STM32F10x_StdPeriph_Driver\src\misc.c><misc.c>
File 2,1,<.\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_wwdg.c><stm32f10x_wwdg.c>
File 2,1,<.\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_adc.c><stm32f10x_adc.c>
......@@ -60,6 +62,7 @@ File 5,1,<..\..\libcpu\arm\stm32\stack.c><stack.c>
File 5,2,<..\..\libcpu\arm\stm32\context_rvds.S><context_rvds.S>
File 5,2,<..\..\libcpu\arm\stm32\fault_rvds.S><fault_rvds.S>
File 5,2,<..\..\libcpu\arm\stm32\start_rvds.s><start_rvds.s>
File 5,1,<..\..\libcpu\arm\stm32\serial.c><serial.c>
Options 1,0,0 // Target 'RT-Thread STM32'
......@@ -144,11 +147,101 @@ Options 1,0,0 // Target 'RT-Thread STM32'
ADSLDMC ()
ADSLDIF ()
ADSLDDW ()
OPTDL (SARMCM3.DLL)()(DARMSTM.DLL)(-pSTM32F107xCSchedule)(SARMCM3.DLL)()(TARMSTM.DLL)(-pSTM32F107xC)
OPTDBG 49149,7,()()()()()()()()()() (Segger\JL2CM3.dll)()()()
OPTDL (SARMCM3.DLL)()(DARMSTM.DLL)(-pSTM32F103ZE)(SARMCM3.DLL)()(TARMSTM.DLL)(-pSTM32F103ZE)
OPTDBG 49150,7,()()()()()()()()()() (Segger\JL2CM3.dll)()()()
FLASH1 { 9,0,0,0,1,0,0,0,5,16,0,0,0,0,0,0,0,0,0,0 }
FLASH2 (Segger\JL2CM3.dll)
FLASH3 ("" ())
FLASH4 ()
EndOpt
Options 2,0,0 // Target 'RT-Thread STM32 Simulator'
Device (STM32F103ZE)
Vendor (STMicroelectronics)
Cpu (IRAM(0x20000000-0x2000FFFF) IROM(0x8000000-0x807FFFF) CLOCK(8000000) CPUTYPE("Cortex-M3"))
FlashUt ()
StupF ("STARTUP\ST\STM32F10x.s" ("STM32 Startup Code"))
FlashDR (UL2CM3(-O14 -S0 -C0 -N00("ARM Cortex-M3") -D00(1BA00477) -L00(4) -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F10x_512 -FS08000000 -FL080000))
DevID (4216)
Rgf (stm32f10x_lib.h)
Mem ()
C ()
A ()
RL ()
OH ()
DBC_IFX ()
DBC_CMS ()
DBC_AMS ()
DBC_LMS ()
UseEnv=0
EnvBin ()
EnvInc ()
EnvLib ()
EnvReg (ST\STM32F10x\)
OrgReg (ST\STM32F10x\)
TgStat=16
OutDir (.\obj\)
OutName (rtthread-stm32)
GenApp=1
GenLib=0
GenHex=0
Debug=1
Browse=0
LstDir (.\obj\)
HexSel=1
MG32K=0
TGMORE=0
RunUsr 0 0 <>
RunUsr 1 0 <>
BrunUsr 0 0 <>
BrunUsr 1 0 <>
CrunUsr 0 0 <>
CrunUsr 1 0 <>
SVCSID <>
GLFLAGS=1790
ADSFLGA { 243,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
ACPUTYP ("Cortex-M3")
RVDEV ()
ADSTFLGA { 0,12,0,2,99,0,0,66,0,0,0,0,0,0,0,0,0,0,0,0 }
OCMADSOCM { 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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
OCMADSIRAM { 0,0,0,0,32,0,0,1,0 }
OCMADSIROM { 1,0,0,0,8,0,0,8,0 }
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,8,0,0,8,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,0,1,0,0,0,0,0,0,0,0,0,0 }
RV_STAVEC ()
ADSCCFLG { 5,32,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
ADSCMISC ()
ADSCDEFN (USE_STDPERIPH_DRIVER, STM32F10X_HD, STM32_SIMULATOR)
ADSCUDEF ()
ADSCINCD (.\Libraries\STM32F10x_StdPeriph_Driver\inc;.\Libraries\CMSIS\Core\CM3;..\..\include;.;..\..\libcpu\arm\stm32)
ADSASFLG { 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
ADSAMISC ()
ADSADEFN ()
ADSAUDEF ()
ADSAINCD ()
PropFld { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
IncBld=1
AlwaysBuild=0
GenAsm=0
AsmAsm=0
PublicsOnly=0
StopCode=3
CustArgs ()
LibMods ()
ADSLDFG { 17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
ADSLDTA (0x08000000)
ADSLDDA (0x20000000)
ADSLDSC ()
ADSLDIB ()
ADSLDIC ()
ADSLDMC ()
ADSLDIF ()
ADSLDDW ()
OPTDL (SARMCM3.DLL)()(DARMSTM.DLL)(-pSTM32F103ZE)(SARMCM3.DLL)()(TARMSTM.DLL)(-pSTM32F103ZE)
OPTDBG 49149,7,()()()()()()()()()() (Segger\JL2CM3.dll)()()()
FLASH1 { 9,0,0,0,1,0,0,0,5,16,0,0,0,0,0,0,0,0,0,0 }
FLASH2 (Segger\JLTAgdi.dll)
FLASH3 ("" ())
FLASH4 ()
EndOpt
......@@ -96,12 +96,6 @@ void rtthread_startup(void)
/* init scheduler system */
rt_system_scheduler_init();
/* init hardware serial device */
rt_hw_usart_init();
/* init all device */
rt_device_init_all();
/* init application */
rt_application_init();
......
......@@ -156,31 +156,6 @@ void DMA1_Channel2_IRQHandler(void)
#endif
}
/*******************************************************************************
* Function Name : DMA1_Channel6_IRQHandler
* Description : This function handles DMA1 Channel 6 interrupt request.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void DMA1_Channel6_IRQHandler(void)
{
#ifdef RT_USING_UART2
extern struct rt_device uart2_device;
extern void rt_hw_serial_dma_rx_isr(struct rt_device *device);
/* enter interrupt */
rt_interrupt_enter();
/* clear DMA flag */
DMA_ClearFlag(DMA1_FLAG_TC6 | DMA1_FLAG_TE6);
rt_hw_serial_dma_rx_isr(&uart2_device);
/* leave interrupt */
rt_interrupt_leave();
#endif
}
/*******************************************************************************
* Function Name : USART1_IRQHandler
* Description : This function handles USART1 global interrupt request.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册