update files according to STM32 FW lib v3.1.0.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@57 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
bernard.xiong 2009-09-29 14:07:29 +00:00
parent ae66982b92
commit a386f191a9
3 changed files with 154 additions and 148 deletions

View File

@ -1,7 +1,7 @@
### uVision2 Project, (C) Keil Software ### uVision2 Project, (C) Keil Software
### Do not modify ! ### Do not modify !
Target (RT-Thread/STMSky), 0x0004 // Tools: 'ARM-ADS' Target (RT-Thread STMSky), 0x0004 // Tools: 'ARM-ADS'
Group (Startup) Group (Startup)
Group (Library) Group (Library)
@ -78,7 +78,7 @@ File 5,1,<..\..\finsh\symbol.c><symbol.c>
File 5,1,<..\..\finsh\cmd.c><cmd.c> File 5,1,<..\..\finsh\cmd.c><cmd.c>
Options 1,0,0 // Target 'RT-Thread/STMSky' Options 1,0,0 // Target 'RT-Thread STMSky'
Device (STM32F103ZE) Device (STM32F103ZE)
Vendor (STMicroelectronics) Vendor (STMicroelectronics)
Cpu (IRAM(0x20000000-0x2000FFFF) IROM(0x8000000-0x807FFFF) CLOCK(8000000) CPUTYPE("Cortex-M3")) Cpu (IRAM(0x20000000-0x2000FFFF) IROM(0x8000000-0x807FFFF) CLOCK(8000000) CPUTYPE("Cortex-M3"))
@ -161,9 +161,9 @@ Options 1,0,0 // Target 'RT-Thread/STMSky'
ADSLDIF () ADSLDIF ()
ADSLDDW () ADSLDDW ()
OPTDL (SARMCM3.DLL)()(DARMSTM.DLL)(-pSTM32F103ZE)(SARMCM3.DLL)()(TARMSTM.DLL)(-pSTM32F103ZE) OPTDL (SARMCM3.DLL)()(DARMSTM.DLL)(-pSTM32F103ZE)(SARMCM3.DLL)()(TARMSTM.DLL)(-pSTM32F103ZE)
OPTDBG 48117,7,()()()()()()()()()() (Segger\JL2CM3.dll)()()() OPTDBG 48118,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 } 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) FLASH2 (Segger\JL2CM3.dll)
FLASH3 ("" ()) FLASH3 ("" ())
FLASH4 () FLASH4 ()
EndOpt EndOpt

View File

@ -1,156 +1,156 @@
/* /*
* File : startup.c * File : startup.c
* This file is part of RT-Thread RTOS * This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006, RT-Thread Develop Team * COPYRIGHT (C) 2006, RT-Thread Develop Team
* *
* The license and distribution terms for this file may be * The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at * found in the file LICENSE in this distribution or at
* http://openlab.rt-thread.com/license/LICENSE * http://openlab.rt-thread.com/license/LICENSE
* *
* Change Logs: * Change Logs:
* Date Author Notes * Date Author Notes
* 2006-08-31 Bernard first implementation * 2006-08-31 Bernard first implementation
*/ */
#include <rthw.h> #include <rthw.h>
#include <rtthread.h> #include <rtthread.h>
#include "board.h" #include "board.h"
#include "rtc.h" #include "rtc.h"
#ifdef RT_USING_LWIP #ifdef RT_USING_LWIP
#include <netif/ethernetif.h> #include <netif/ethernetif.h>
#include "enc28j60.h" #include "enc28j60.h"
#endif
/**
* @addtogroup STM32
*/
/*@{*/
#ifdef RT_USING_FINSH
extern void finsh_system_init(void);
extern void finsh_set_device(char* device);
#endif
extern int rt_application_init(void);
#ifndef RT_USING_BOARD_SRAM
#ifdef __CC_ARM
extern int Image$$RW_IRAM1$$ZI$$Limit;
#elif __ICCARM__
#pragma section="HEAP"
#else
extern int __bss_end;
#endif
#endif #endif
#ifdef DEBUG /**
/******************************************************************************* * @addtogroup STM32
* Function Name : assert_failed */
* Description : Reports the name of the source file and the source line number
* where the assert error has occurred. /*@{*/
* Input : - file: pointer to the source file name #ifdef RT_USING_FINSH
* - line: assert error line source number extern void finsh_system_init(void);
* Output : None extern void finsh_set_device(char* device);
* Return : None #endif
*******************************************************************************/
void assert_failed(u8* file, u32 line) extern int rt_application_init(void);
{
rt_kprintf("\n\r Wrong parameter value detected on\r\n"); #ifndef RT_USING_BOARD_SRAM
rt_kprintf(" file %s\r\n", file); #ifdef __CC_ARM
rt_kprintf(" line %d\r\n", line); extern int Image$$RW_IRAM1$$ZI$$Limit;
#elif __ICCARM__
while (1) ; #pragma section="HEAP"
} #else
#endif extern int __bss_end;
#endif
/** #endif
* This function will startup RT-Thread RTOS.
*/ #ifdef DEBUG
void rtthread_startup(void) /*******************************************************************************
{ * Function Name : assert_failed
/* init board */ * Description : Reports the name of the source file and the source line number
rt_hw_board_init(); * where the assert error has occurred.
* Input : - file: pointer to the source file name
/* show version */ * - line: assert error line source number
rt_show_version(); * Output : None
* Return : None
/* init tick */ *******************************************************************************/
rt_system_tick_init(); void assert_failed(u8* file, u32 line)
{
/* init kernel object */ rt_kprintf("\n\r Wrong parameter value detected on\r\n");
rt_system_object_init(); rt_kprintf(" file %s\r\n", file);
rt_kprintf(" line %d\r\n", line);
/* init timer system */
rt_system_timer_init(); while (1) ;
}
#endif
/**
* This function will startup RT-Thread RTOS.
*/
void rtthread_startup(void)
{
/* init board */
rt_hw_board_init();
/* show version */
rt_show_version();
/* init tick */
rt_system_tick_init();
/* init kernel object */
rt_system_object_init();
/* init timer system */
rt_system_timer_init();
#ifdef RT_USING_HEAP #ifdef RT_USING_HEAP
#ifdef RT_USING_BOARD_SRAM #ifdef RT_USING_BOARD_SRAM
rt_system_heap_init((void*)BOARD_SRAM_BEGIN, (void*)BOARD_SRAM_END); rt_system_heap_init((void*)BOARD_SRAM_BEGIN, (void*)BOARD_SRAM_END);
#else #else
#ifdef __CC_ARM #ifdef __CC_ARM
rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)0x20010000); rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)0x20010000);
#elif __ICCARM__ #elif __ICCARM__
rt_system_heap_init(__segment_end("HEAP"), (void*)0x20010000); rt_system_heap_init(__segment_end("HEAP"), (void*)0x20010000);
#else #else
/* init memory system */ /* init memory system */
rt_system_heap_init((void*)&__bss_end, (void*)0x20010000); rt_system_heap_init((void*)&__bss_end, (void*)0x20010000);
#endif #endif
#endif
#endif
/* init scheduler system */
rt_system_scheduler_init();
#ifdef RT_USING_LWIP
eth_system_device_init();
/* register ethernetif device */
rt_hw_enc28j60_init();
#endif #endif
#endif
/* init scheduler system */
rt_system_scheduler_init();
#ifdef RT_USING_LWIP
eth_system_device_init();
/* register ethernetif device */
rt_hw_enc28j60_init();
#endif
rt_hw_rtc_init(); rt_hw_rtc_init();
/* init hardware serial device */ /* init hardware serial device */
rt_hw_usart_init(); rt_hw_usart_init();
#ifdef RT_USING_DFS #ifdef RT_USING_DFS
rt_hw_sdcard_init(); rt_hw_sdcard_init();
#endif #endif
/* init all device */ /* init all device */
rt_device_init_all(); rt_device_init_all();
/* init application */ /* init application */
rt_application_init(); rt_application_init();
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
/* init finsh */ /* init finsh */
finsh_system_init(); finsh_system_init();
#ifdef RT_USING_DEVICE #ifdef RT_USING_DEVICE
finsh_set_device("uart1"); finsh_set_device("uart1");
#endif #endif
#endif #endif
/* init idle thread */ /* init idle thread */
rt_thread_idle_init(); rt_thread_idle_init();
/* start scheduler */ /* start scheduler */
rt_system_scheduler_start(); rt_system_scheduler_start();
/* never reach here */ /* never reach here */
return ; return ;
} }
int main(void) int main(void)
{ {
rt_uint32_t UNUSED level; rt_uint32_t UNUSED level;
/* disable interrupt first */ /* disable interrupt first */
level = rt_hw_interrupt_disable(); level = rt_hw_interrupt_disable();
rtthread_startup(); rtthread_startup();
return 0; return 0;
} }
/*@}*/ /*@}*/

View File

@ -0,0 +1,6 @@
#ifndef __STM32F10X_H__
#define __STM32F10X_H__
#include <stm32f10x_lib.h>
#endif