mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-08 12:11:09 +08:00
[BSP] fix the finsh_system_init issue in BSP
This commit is contained in:
parent
37c6eac27b
commit
f74cde045b
@ -35,6 +35,11 @@
|
|||||||
#include <rtgui/driver.h>
|
#include <rtgui/driver.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef RT_USING_FINSH
|
||||||
|
#include <shell.h>
|
||||||
|
#include <finsh.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* thread phase init */
|
/* thread phase init */
|
||||||
void rt_init_thread_entry(void *parameter)
|
void rt_init_thread_entry(void *parameter)
|
||||||
{
|
{
|
||||||
@ -97,6 +102,11 @@ void rt_init_thread_entry(void *parameter)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef RT_USING_FINSH
|
||||||
|
/* initialize finsh */
|
||||||
|
finsh_system_init();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// init led
|
// init led
|
||||||
|
@ -20,10 +20,6 @@
|
|||||||
#include "board.h"
|
#include "board.h"
|
||||||
|
|
||||||
extern int rt_application_init(void);
|
extern int rt_application_init(void);
|
||||||
#ifdef RT_USING_FINSH
|
|
||||||
extern int finsh_system_init(void);
|
|
||||||
extern void finsh_set_device(const char* device);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __CC_ARM
|
#ifdef __CC_ARM
|
||||||
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
||||||
@ -81,12 +77,6 @@ void rtthread_startup(void)
|
|||||||
/* initialize application */
|
/* initialize application */
|
||||||
rt_application_init();
|
rt_application_init();
|
||||||
|
|
||||||
#ifdef RT_USING_FINSH
|
|
||||||
/* initialize finsh */
|
|
||||||
finsh_system_init();
|
|
||||||
finsh_set_device( FINSH_DEVICE_NAME );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* initialize timer */
|
/* initialize timer */
|
||||||
rt_system_timer_init();
|
rt_system_timer_init();
|
||||||
|
|
||||||
|
@ -19,6 +19,11 @@
|
|||||||
*/
|
*/
|
||||||
/*@{*/
|
/*@{*/
|
||||||
|
|
||||||
|
#ifdef RT_USING_FINSH
|
||||||
|
#include <shell.h>
|
||||||
|
#include <finsh.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef RT_USING_DFS
|
#ifdef RT_USING_DFS
|
||||||
/* dfs init */
|
/* dfs init */
|
||||||
#include <dfs.h>
|
#include <dfs.h>
|
||||||
@ -41,16 +46,31 @@
|
|||||||
/* thread phase init */
|
/* thread phase init */
|
||||||
void rt_init_thread_entry(void *parameter)
|
void rt_init_thread_entry(void *parameter)
|
||||||
{
|
{
|
||||||
|
#ifdef RT_USING_DEVICE
|
||||||
|
#ifdef RT_USING_DFS
|
||||||
|
/* init sd card */
|
||||||
|
rt_hw_sdcard_init();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef RT_USING_LWIP
|
||||||
|
eth_system_device_init();
|
||||||
|
/* init ethernetif device */
|
||||||
|
rt_hw_dm9000_init();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* init hardware serial device */
|
||||||
|
rt_hw_serial_init();
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Filesystem Initialization */
|
/* Filesystem Initialization */
|
||||||
#ifdef RT_USING_DFS
|
#ifdef RT_USING_DFS
|
||||||
{
|
{
|
||||||
/* init the device filesystem */
|
/* init the device filesystem */
|
||||||
dfs_init();
|
dfs_init();
|
||||||
/* init the efsl filesystam*/
|
elm_init();
|
||||||
efsl_init();
|
|
||||||
|
|
||||||
/* mount sd card fat partition 1 as root directory */
|
/* mount sd card fat partition 1 as root directory */
|
||||||
if (dfs_mount("sd0", "/", "efs", 0, 0) == 0)
|
if (dfs_mount("sd0", "/", "elm", 0, 0) == 0)
|
||||||
rt_kprintf("File System initialized!\n");
|
rt_kprintf("File System initialized!\n");
|
||||||
else
|
else
|
||||||
rt_kprintf("File System init failed!\n");
|
rt_kprintf("File System init failed!\n");
|
||||||
@ -67,6 +87,10 @@ void rt_init_thread_entry(void *parameter)
|
|||||||
rt_kprintf("TCP/IP initialized!\n");
|
rt_kprintf("TCP/IP initialized!\n");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef RT_USING_FINSH
|
||||||
|
finsh_system_init();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/************** LED BLINK *******************/
|
/************** LED BLINK *******************/
|
||||||
@ -78,53 +102,53 @@ void rt_init_thread_entry(void *parameter)
|
|||||||
|
|
||||||
ALIGN(4) char thread_led1_stack[512];
|
ALIGN(4) char thread_led1_stack[512];
|
||||||
struct rt_thread thread_led1;
|
struct rt_thread thread_led1;
|
||||||
void thread_led1_entry(void* parameter)
|
void thread_led1_entry(void *parameter)
|
||||||
{
|
{
|
||||||
unsigned int count=0;
|
unsigned int count = 0;
|
||||||
|
|
||||||
IO1DIR |= LED1;
|
IO1DIR |= LED1;
|
||||||
while(1)
|
while (1)
|
||||||
{
|
{
|
||||||
/* led1 on */
|
/* led1 on */
|
||||||
IO1CLR = LED1;
|
IO1CLR = LED1;
|
||||||
#ifndef RT_USING_FINSH
|
#ifndef RT_USING_FINSH
|
||||||
rt_kprintf("led1 on, count : %d\r\n",count);
|
rt_kprintf("led1 on, count : %d\r\n", count);
|
||||||
#endif
|
#endif
|
||||||
count++;
|
count++;
|
||||||
rt_thread_delay( RT_TICK_PER_SECOND/3 ); /* delay 0.3s */
|
rt_thread_delay(RT_TICK_PER_SECOND / 3); /* delay 0.3s */
|
||||||
|
|
||||||
/* led1 off */
|
/* led1 off */
|
||||||
IO1SET = LED1;
|
IO1SET = LED1;
|
||||||
#ifndef RT_USING_FINSH
|
#ifndef RT_USING_FINSH
|
||||||
rt_kprintf("led1 off\r\n");
|
rt_kprintf("led1 off\r\n");
|
||||||
#endif
|
#endif
|
||||||
rt_thread_delay( RT_TICK_PER_SECOND/3 );
|
rt_thread_delay(RT_TICK_PER_SECOND / 3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ALIGN(4) char thread_led2_stack[512];
|
ALIGN(4) char thread_led2_stack[512];
|
||||||
struct rt_thread thread_led2;
|
struct rt_thread thread_led2;
|
||||||
void thread_led2_entry(void* parameter)
|
void thread_led2_entry(void *parameter)
|
||||||
{
|
{
|
||||||
unsigned int count=0;
|
unsigned int count = 0;
|
||||||
|
|
||||||
IO1DIR |= LED2;
|
IO1DIR |= LED2;
|
||||||
while(1)
|
while (1)
|
||||||
{
|
{
|
||||||
/* led2 on */
|
/* led2 on */
|
||||||
IO1CLR = LED2;
|
IO1CLR = LED2;
|
||||||
#ifndef RT_USING_FINSH
|
#ifndef RT_USING_FINSH
|
||||||
rt_kprintf("led2 on, count : %d\r\n",count);
|
rt_kprintf("led2 on, count : %d\r\n", count);
|
||||||
#endif
|
#endif
|
||||||
count++;
|
count++;
|
||||||
rt_thread_delay( RT_TICK_PER_SECOND/2 ); /* delay 0.5s */
|
rt_thread_delay(RT_TICK_PER_SECOND / 2); /* delay 0.5s */
|
||||||
|
|
||||||
/* led2 off */
|
/* led2 off */
|
||||||
IO1SET = LED2;
|
IO1SET = LED2;
|
||||||
#ifndef RT_USING_FINSH
|
#ifndef RT_USING_FINSH
|
||||||
rt_kprintf("led1 off\r\n");
|
rt_kprintf("led1 off\r\n");
|
||||||
#endif
|
#endif
|
||||||
rt_thread_delay( RT_TICK_PER_SECOND/2 );
|
rt_thread_delay(RT_TICK_PER_SECOND / 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/************** LED BLINK *******************/
|
/************** LED BLINK *******************/
|
||||||
|
@ -33,18 +33,11 @@
|
|||||||
|
|
||||||
/*@{*/
|
/*@{*/
|
||||||
|
|
||||||
#ifdef RT_USING_FINSH
|
|
||||||
extern int finsh_system_init(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern int rt_application_init(void);
|
extern int rt_application_init(void);
|
||||||
extern void rt_show_version(void);
|
extern void rt_show_version(void);
|
||||||
#ifdef RT_USING_DEVICE
|
#ifdef RT_USING_DEVICE
|
||||||
extern rt_err_t rt_hw_serial_init(void);
|
extern rt_err_t rt_hw_serial_init(void);
|
||||||
#endif
|
#endif
|
||||||
#ifdef RT_USING_FINSH
|
|
||||||
extern int finsh_system_init(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __CC_ARM
|
#ifdef __CC_ARM
|
||||||
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
||||||
@ -76,41 +69,19 @@ void rtthread_startup(void)
|
|||||||
|
|
||||||
#ifdef RT_USING_HEAP
|
#ifdef RT_USING_HEAP
|
||||||
#ifdef __CC_ARM
|
#ifdef __CC_ARM
|
||||||
rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)0x40008000);
|
rt_system_heap_init((void *)&Image$$RW_IRAM1$$ZI$$Limit, (void *)0x40008000);
|
||||||
#else
|
#else
|
||||||
/* init memory system */
|
/* init memory system */
|
||||||
rt_system_heap_init((void*)&__bss_end, (void*)0x40008000);
|
rt_system_heap_init((void *)&__bss_end, (void *)0x40008000);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* init scheduler system */
|
/* init scheduler system */
|
||||||
rt_system_scheduler_init();
|
rt_system_scheduler_init();
|
||||||
|
|
||||||
#ifdef RT_USING_DEVICE
|
|
||||||
#ifdef RT_USING_DFS
|
|
||||||
/* init sd card */
|
|
||||||
rt_hw_sdcard_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef RT_USING_LWIP
|
|
||||||
eth_system_device_init();
|
|
||||||
/* init ethernetif device */
|
|
||||||
rt_hw_dm9000_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* init hardware serial device */
|
|
||||||
rt_hw_serial_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* init application */
|
/* init application */
|
||||||
rt_application_init();
|
rt_application_init();
|
||||||
|
|
||||||
#ifdef RT_USING_FINSH
|
|
||||||
/* init finsh */
|
|
||||||
finsh_system_init();
|
|
||||||
finsh_set_device("uart1");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* init idle thread */
|
/* init idle thread */
|
||||||
rt_thread_idle_init();
|
rt_thread_idle_init();
|
||||||
|
|
||||||
@ -121,7 +92,7 @@ void rtthread_startup(void)
|
|||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main (void)
|
int main(void)
|
||||||
{
|
{
|
||||||
/* invoke rtthread_startup */
|
/* invoke rtthread_startup */
|
||||||
rtthread_startup();
|
rtthread_startup();
|
||||||
|
@ -14,13 +14,23 @@
|
|||||||
|
|
||||||
#include <rtthread.h>
|
#include <rtthread.h>
|
||||||
|
|
||||||
|
#ifdef RT_USING_FINSH
|
||||||
|
#include <shell.h>
|
||||||
|
#include <finsh.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup LPC2478
|
* @addtogroup LPC2478
|
||||||
*/
|
*/
|
||||||
/*@{*/
|
/*@{*/
|
||||||
int rt_application_init()
|
int rt_application_init()
|
||||||
{
|
{
|
||||||
return 0;
|
#ifdef RT_USING_FINSH
|
||||||
|
/* init finsh */
|
||||||
|
finsh_system_init();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*@}*/
|
/*@}*/
|
||||||
|
@ -16,13 +16,7 @@
|
|||||||
#include <rthw.h>
|
#include <rthw.h>
|
||||||
#include <rtthread.h>
|
#include <rtthread.h>
|
||||||
|
|
||||||
#ifdef RT_USING_FINSH
|
|
||||||
#include <finsh.h>
|
|
||||||
extern int finsh_system_init(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <LPC24xx.h>
|
#include <LPC24xx.h>
|
||||||
#include <board.h>
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup LPC2478
|
* @addtogroup LPC2478
|
||||||
@ -30,9 +24,6 @@ extern int finsh_system_init(void);
|
|||||||
/*@{*/
|
/*@{*/
|
||||||
|
|
||||||
extern int rt_application_init(void);
|
extern int rt_application_init(void);
|
||||||
#ifdef RT_USING_DEVICE
|
|
||||||
extern rt_err_t rt_hw_serial_init(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __CC_ARM
|
#ifdef __CC_ARM
|
||||||
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
||||||
@ -45,67 +36,61 @@ extern int __bss_end;
|
|||||||
*/
|
*/
|
||||||
void rtthread_startup(void)
|
void rtthread_startup(void)
|
||||||
{
|
{
|
||||||
/* init hardware interrupt */
|
/* init hardware interrupt */
|
||||||
rt_hw_interrupt_init();
|
rt_hw_interrupt_init();
|
||||||
|
|
||||||
/* init board */
|
/* init board */
|
||||||
rt_hw_board_init();
|
rt_hw_board_init();
|
||||||
|
|
||||||
/* init tick */
|
/* init tick */
|
||||||
rt_system_tick_init();
|
rt_system_tick_init();
|
||||||
|
|
||||||
/* init kernel object */
|
/* init kernel object */
|
||||||
rt_system_object_init();
|
rt_system_object_init();
|
||||||
|
|
||||||
rt_show_version();
|
rt_show_version();
|
||||||
|
|
||||||
/* init timer system */
|
/* init timer system */
|
||||||
rt_system_timer_init();
|
rt_system_timer_init();
|
||||||
|
|
||||||
/* init memory system */
|
/* init memory system */
|
||||||
#ifdef RT_USING_HEAP
|
#ifdef RT_USING_HEAP
|
||||||
#ifdef __CC_ARM
|
#ifdef __CC_ARM
|
||||||
rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)0x40010000);
|
rt_system_heap_init((void *)&Image$$RW_IRAM1$$ZI$$Limit, (void *)0x40010000);
|
||||||
#else
|
#else
|
||||||
rt_system_heap_init((void*)&__bss_end, (void*)0x40010000);
|
rt_system_heap_init((void *)&__bss_end, (void *)0x40010000);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* init scheduler system */
|
/* init scheduler system */
|
||||||
rt_system_scheduler_init();
|
rt_system_scheduler_init();
|
||||||
|
|
||||||
/* init application */
|
/* init application */
|
||||||
rt_application_init();
|
rt_application_init();
|
||||||
|
|
||||||
#ifdef RT_USING_FINSH
|
/* init soft timer thread */
|
||||||
/* init finsh */
|
rt_system_timer_thread_init();
|
||||||
finsh_system_init();
|
|
||||||
finsh_set_device("uart1");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* init soft timer thread */
|
/* init idle thread */
|
||||||
rt_system_timer_thread_init();
|
rt_thread_idle_init();
|
||||||
|
|
||||||
/* init idle thread */
|
/* start scheduler */
|
||||||
rt_thread_idle_init();
|
rt_system_scheduler_start();
|
||||||
|
|
||||||
/* start scheduler */
|
/* never reach here */
|
||||||
rt_system_scheduler_start();
|
return ;
|
||||||
|
|
||||||
/* never reach here */
|
|
||||||
return ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __CC_ARM
|
#ifdef __CC_ARM
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
/* disable interrupt first */
|
/* disable interrupt first */
|
||||||
rt_hw_interrupt_disable();
|
rt_hw_interrupt_disable();
|
||||||
|
|
||||||
/* invoke rtthread_startup */
|
/* invoke rtthread_startup */
|
||||||
rtthread_startup();
|
rtthread_startup();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -18,16 +18,16 @@
|
|||||||
#include <shell.h>
|
#include <shell.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
extern int demo_init(void);
|
extern int demo_init(void);
|
||||||
|
|
||||||
void rt_init_thread_entry(void* parameter)
|
void rt_init_thread_entry(void* parameter)
|
||||||
{
|
{
|
||||||
|
#ifdef RT_USING_FINSH
|
||||||
/* initialization finsh shell Component */
|
/* initialization finsh shell Component */
|
||||||
finsh_system_init();
|
finsh_system_init();
|
||||||
|
#endif
|
||||||
|
|
||||||
demo_init();
|
demo_init();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int rt_application_init()
|
int rt_application_init()
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
*
|
*
|
||||||
* 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://www.rt-thread.org/license/LICENSE
|
||||||
*
|
*
|
||||||
* Change Logs:
|
* Change Logs:
|
||||||
* Date Author Notes
|
* Date Author Notes
|
||||||
|
@ -25,10 +25,6 @@
|
|||||||
/*@{*/
|
/*@{*/
|
||||||
|
|
||||||
extern int rt_application_init(void);
|
extern int rt_application_init(void);
|
||||||
#ifdef RT_USING_FINSH
|
|
||||||
extern int finsh_system_init(void);
|
|
||||||
extern void finsh_set_device(const char* device);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __CC_ARM
|
#ifdef __CC_ARM
|
||||||
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
||||||
|
@ -20,6 +20,11 @@
|
|||||||
#include <board.h>
|
#include <board.h>
|
||||||
#include <rtthread.h>
|
#include <rtthread.h>
|
||||||
|
|
||||||
|
#ifdef RT_USING_FINSH
|
||||||
|
#include <shell.h>
|
||||||
|
#include <finsh.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef RT_USING_DFS
|
#ifdef RT_USING_DFS
|
||||||
/* dfs init */
|
/* dfs init */
|
||||||
#include <dfs.h>
|
#include <dfs.h>
|
||||||
@ -41,6 +46,14 @@ void rt_init_thread_entry(void* parameter)
|
|||||||
/* Filesystem Initialization */
|
/* Filesystem Initialization */
|
||||||
#ifdef RT_USING_DFS
|
#ifdef RT_USING_DFS
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/* init sdcard driver */
|
||||||
|
#if STM32_USE_SDIO
|
||||||
|
rt_hw_sdcard_init();
|
||||||
|
#else
|
||||||
|
rt_hw_msd_init();
|
||||||
|
#endif
|
||||||
|
|
||||||
/* init the device filesystem */
|
/* init the device filesystem */
|
||||||
dfs_init();
|
dfs_init();
|
||||||
|
|
||||||
@ -75,6 +88,13 @@ void rt_init_thread_entry(void* parameter)
|
|||||||
rt_kprintf("TCP/IP initialized!\n");
|
rt_kprintf("TCP/IP initialized!\n");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
rt_hw_rtc_init();
|
||||||
|
|
||||||
|
#ifdef RT_USING_FINSH
|
||||||
|
/* init finsh */
|
||||||
|
finsh_system_init();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int rt_application_init()
|
int rt_application_init()
|
||||||
|
@ -25,10 +25,6 @@
|
|||||||
/*@{*/
|
/*@{*/
|
||||||
|
|
||||||
extern int rt_application_init(void);
|
extern int rt_application_init(void);
|
||||||
#ifdef RT_USING_FINSH
|
|
||||||
extern int finsh_system_init(void);
|
|
||||||
extern void finsh_set_device(const char* device);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __CC_ARM
|
#ifdef __CC_ARM
|
||||||
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
||||||
@ -96,26 +92,9 @@ void rtthread_startup(void)
|
|||||||
/* init scheduler system */
|
/* init scheduler system */
|
||||||
rt_system_scheduler_init();
|
rt_system_scheduler_init();
|
||||||
|
|
||||||
#ifdef RT_USING_DFS
|
|
||||||
/* init sdcard driver */
|
|
||||||
#if STM32_USE_SDIO
|
|
||||||
rt_hw_sdcard_init();
|
|
||||||
#else
|
|
||||||
rt_hw_msd_init();
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
rt_hw_rtc_init();
|
|
||||||
|
|
||||||
/* init application */
|
/* init application */
|
||||||
rt_application_init();
|
rt_application_init();
|
||||||
|
|
||||||
#ifdef RT_USING_FINSH
|
|
||||||
/* init finsh */
|
|
||||||
finsh_system_init();
|
|
||||||
finsh_set_device("uart1");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* init timer thread */
|
/* init timer thread */
|
||||||
rt_system_timer_thread_init();
|
rt_system_timer_thread_init();
|
||||||
|
|
||||||
|
@ -23,6 +23,11 @@
|
|||||||
#include "stm32f4xx_eth.h"
|
#include "stm32f4xx_eth.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef RT_USING_FINSH
|
||||||
|
#include <shell.h>
|
||||||
|
#include <finsh.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef RT_USING_GDB
|
#ifdef RT_USING_GDB
|
||||||
#include <gdb_stub.h>
|
#include <gdb_stub.h>
|
||||||
#endif
|
#endif
|
||||||
@ -50,6 +55,11 @@ void rt_init_thread_entry(void* parameter)
|
|||||||
rt_kprintf("TCP/IP initialized!\n");
|
rt_kprintf("TCP/IP initialized!\n");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef RT_USING_FINSH
|
||||||
|
/* init finsh */
|
||||||
|
finsh_system_init();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int rt_application_init()
|
int rt_application_init()
|
||||||
@ -65,5 +75,3 @@ int rt_application_init()
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*@}*/
|
|
||||||
|
@ -26,10 +26,6 @@
|
|||||||
/*@{*/
|
/*@{*/
|
||||||
|
|
||||||
extern int rt_application_init(void);
|
extern int rt_application_init(void);
|
||||||
#ifdef RT_USING_FINSH
|
|
||||||
extern int finsh_system_init(void);
|
|
||||||
extern void finsh_set_device(const char* device);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __CC_ARM
|
#ifdef __CC_ARM
|
||||||
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
||||||
@ -88,12 +84,6 @@ void rtthread_startup(void)
|
|||||||
/* init application */
|
/* init application */
|
||||||
rt_application_init();
|
rt_application_init();
|
||||||
|
|
||||||
#ifdef RT_USING_FINSH
|
|
||||||
/* init finsh */
|
|
||||||
finsh_system_init();
|
|
||||||
finsh_set_device( FINSH_DEVICE_NAME );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* init timer thread */
|
/* init timer thread */
|
||||||
rt_system_timer_thread_init();
|
rt_system_timer_thread_init();
|
||||||
|
|
||||||
|
@ -26,10 +26,6 @@
|
|||||||
/*@{*/
|
/*@{*/
|
||||||
|
|
||||||
extern int rt_application_init(void);
|
extern int rt_application_init(void);
|
||||||
#ifdef RT_USING_FINSH
|
|
||||||
extern int finsh_system_init(void);
|
|
||||||
extern void finsh_set_device(const char* device);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __CC_ARM
|
#ifdef __CC_ARM
|
||||||
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
||||||
|
@ -16,6 +16,11 @@
|
|||||||
#include <board.h>
|
#include <board.h>
|
||||||
#include <rtthread.h>
|
#include <rtthread.h>
|
||||||
|
|
||||||
|
#ifdef RT_USING_FINSH
|
||||||
|
#include <shell.h>
|
||||||
|
#include <finsh.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef RT_USING_LWIP
|
#ifdef RT_USING_LWIP
|
||||||
#include <lwip/sys.h>
|
#include <lwip/sys.h>
|
||||||
#include <lwip/api.h>
|
#include <lwip/api.h>
|
||||||
@ -50,6 +55,10 @@ void rt_init_thread_entry(void* parameter)
|
|||||||
rt_kprintf("TCP/IP initialized!\n");
|
rt_kprintf("TCP/IP initialized!\n");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef RT_USING_FINSH
|
||||||
|
finsh_system_init();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int rt_application_init()
|
int rt_application_init()
|
||||||
|
@ -26,10 +26,6 @@
|
|||||||
/*@{*/
|
/*@{*/
|
||||||
|
|
||||||
extern int rt_application_init(void);
|
extern int rt_application_init(void);
|
||||||
#ifdef RT_USING_FINSH
|
|
||||||
extern int finsh_system_init(void);
|
|
||||||
extern void finsh_set_device(const char* device);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __CC_ARM
|
#ifdef __CC_ARM
|
||||||
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
||||||
@ -92,11 +88,6 @@ void rtthread_startup(void)
|
|||||||
/* init application */
|
/* init application */
|
||||||
rt_application_init();
|
rt_application_init();
|
||||||
|
|
||||||
#ifdef RT_USING_FINSH
|
|
||||||
/* init finsh */
|
|
||||||
finsh_system_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* init timer thread */
|
/* init timer thread */
|
||||||
rt_system_timer_thread_init();
|
rt_system_timer_thread_init();
|
||||||
|
|
||||||
|
@ -26,11 +26,6 @@
|
|||||||
/*@{*/
|
/*@{*/
|
||||||
|
|
||||||
extern int rt_application_init(void);
|
extern int rt_application_init(void);
|
||||||
#ifdef RT_USING_FINSH
|
|
||||||
extern int finsh_system_init(void);
|
|
||||||
extern void finsh_set_device(const char* device);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Function Name : assert_failed
|
* Function Name : assert_failed
|
||||||
|
@ -25,10 +25,6 @@
|
|||||||
/*@{*/
|
/*@{*/
|
||||||
|
|
||||||
extern int rt_application_init(void);
|
extern int rt_application_init(void);
|
||||||
#ifdef RT_USING_FINSH
|
|
||||||
extern int finsh_system_init(void);
|
|
||||||
extern void finsh_set_device(const char* device);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __CC_ARM
|
#ifdef __CC_ARM
|
||||||
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
||||||
|
@ -26,10 +26,6 @@
|
|||||||
/*@{*/
|
/*@{*/
|
||||||
|
|
||||||
extern int rt_application_init(void);
|
extern int rt_application_init(void);
|
||||||
#ifdef RT_USING_FINSH
|
|
||||||
extern int finsh_system_init(void);
|
|
||||||
extern void finsh_set_device(const char* device);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __CC_ARM
|
#ifdef __CC_ARM
|
||||||
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
||||||
|
@ -36,10 +36,6 @@
|
|||||||
/*@{*/
|
/*@{*/
|
||||||
|
|
||||||
extern int rt_application_init(void);
|
extern int rt_application_init(void);
|
||||||
#ifdef RT_USING_FINSH
|
|
||||||
extern int finsh_system_init(void);
|
|
||||||
extern void finsh_set_device(const char* device);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __CC_ARM
|
#ifdef __CC_ARM
|
||||||
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user