diff --git a/bsp/avr32uc3b0/startup.c b/bsp/avr32uc3b0/startup.c index efa76a4e27..920b8c7901 100644 --- a/bsp/avr32uc3b0/startup.c +++ b/bsp/avr32uc3b0/startup.c @@ -38,7 +38,9 @@ int main(void) #ifdef RT_USING_FINSH /* init finsh */ finsh_system_init(); +#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) finsh_set_device(FINSH_DEVICE_NAME); +#endif #endif rt_thread_idle_init(); diff --git a/bsp/bf533/startup.c b/bsp/bf533/startup.c index a56b123035..3f128b28f9 100644 --- a/bsp/bf533/startup.c +++ b/bsp/bf533/startup.c @@ -62,7 +62,9 @@ void rtthread_startup(void) /* init finsh */ extern int finsh_system_init(void); finsh_system_init(); +#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) finsh_set_device("uart0"); +#endif #endif rt_system_timer_thread_init(); diff --git a/bsp/efm32/startup.c b/bsp/efm32/startup.c index d769bbf99c..02c0d949fd 100644 --- a/bsp/efm32/startup.c +++ b/bsp/efm32/startup.c @@ -111,7 +111,9 @@ void rtthread_startup(void) /* init finsh */ #ifdef RT_USING_FINSH finsh_system_init(); +#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) finsh_set_device(CONSOLE_DEVICE); +#endif #endif /* Initialize gui server */ diff --git a/bsp/frdm-k64f/applications/startup.c b/bsp/frdm-k64f/applications/startup.c index e558cd8cbf..3eb8003917 100644 --- a/bsp/frdm-k64f/applications/startup.c +++ b/bsp/frdm-k64f/applications/startup.c @@ -79,7 +79,9 @@ void rtthread_startup(void) #ifdef RT_USING_FINSH /* init finsh */ finsh_system_init(); +#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) finsh_set_device( FINSH_DEVICE_NAME ); +#endif #endif /* init timer thread */ diff --git a/bsp/juicevm/rtconfig.h b/bsp/juicevm/rtconfig.h index b2f2cfde3d..b2b72b8f45 100755 --- a/bsp/juicevm/rtconfig.h +++ b/bsp/juicevm/rtconfig.h @@ -106,7 +106,6 @@ /* POSIX layer and C standard library */ #define RT_USING_LIBC -// #define RT_USING_POSIX /* Network */ diff --git a/bsp/lm3s8962/applications/startup.c b/bsp/lm3s8962/applications/startup.c index 2d8e55b554..b4e1239d10 100644 --- a/bsp/lm3s8962/applications/startup.c +++ b/bsp/lm3s8962/applications/startup.c @@ -119,7 +119,7 @@ void rtthread_startup(void) #ifdef RT_USING_FINSH /* init finsh */ finsh_system_init(); -#if !defined(RT_USING_POSIX) && defined(RT_USING_DEVICE) +#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) finsh_set_device("uart1"); #endif #endif diff --git a/bsp/lm3s9b9x/applications/startup.c b/bsp/lm3s9b9x/applications/startup.c index 8d261d0036..3ca6c5b348 100644 --- a/bsp/lm3s9b9x/applications/startup.c +++ b/bsp/lm3s9b9x/applications/startup.c @@ -119,7 +119,7 @@ void rtthread_startup(void) #ifdef RT_USING_FINSH /* init finsh */ finsh_system_init(); -#ifdef RT_USING_DEVICE +#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) finsh_set_device("uart1"); #endif #endif diff --git a/bsp/lm4f232/applications/startup.c b/bsp/lm4f232/applications/startup.c index ed16b60a50..8b04de0d32 100644 --- a/bsp/lm4f232/applications/startup.c +++ b/bsp/lm4f232/applications/startup.c @@ -119,7 +119,7 @@ void rtthread_startup(void) #ifdef RT_USING_FINSH /* init finsh */ finsh_system_init(); -#ifdef RT_USING_DEVICE +#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) finsh_set_device("uart1"); #endif #endif diff --git a/bsp/lpc43xx/M0/applications/application.c b/bsp/lpc43xx/M0/applications/application.c index 1b14f82cd7..4194c039e8 100644 --- a/bsp/lpc43xx/M0/applications/application.c +++ b/bsp/lpc43xx/M0/applications/application.c @@ -28,8 +28,10 @@ void rt_init_thread_entry(void *parameter) #ifdef RT_USING_FINSH /* initialize finsh */ finsh_system_init(); +#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) finsh_set_device(RT_CONSOLE_DEVICE_NAME); #endif +#endif #ifdef RT_USING_VBUS rt_vbus_do_init(); diff --git a/bsp/lpc43xx/M4/applications/application.c b/bsp/lpc43xx/M4/applications/application.c index 03e56fa955..a35c5862f4 100644 --- a/bsp/lpc43xx/M4/applications/application.c +++ b/bsp/lpc43xx/M4/applications/application.c @@ -59,8 +59,10 @@ void rt_init_thread_entry(void *parameter) #ifdef RT_USING_FINSH /* initialize finsh */ finsh_system_init(); +#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) finsh_set_device(RT_CONSOLE_DEVICE_NAME); #endif +#endif #ifdef RT_USING_VBUS rt_vbus_do_init(); diff --git a/bsp/m16c62p/applications/startup.c b/bsp/m16c62p/applications/startup.c index 149e530892..907ec1cd20 100644 --- a/bsp/m16c62p/applications/startup.c +++ b/bsp/m16c62p/applications/startup.c @@ -65,7 +65,9 @@ void rtthread_startup(void) #ifdef RT_USING_FINSH /* init finsh */ finsh_system_init(); +#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) finsh_set_device("uart0"); +#endif #endif /* init timer thread */ diff --git a/bsp/mb9bf568r/applications/application.c b/bsp/mb9bf568r/applications/application.c index e5d2b55950..677e9c91a5 100644 --- a/bsp/mb9bf568r/applications/application.c +++ b/bsp/mb9bf568r/applications/application.c @@ -25,8 +25,9 @@ void rt_init_thread_entry(void *parameter) //finsh_system_init(); +#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) finsh_set_device(RT_CONSOLE_DEVICE_NAME); - +#endif /**< init led device */ { diff --git a/bsp/mb9bf618s/applications/application.c b/bsp/mb9bf618s/applications/application.c index 5e7c265450..737034fff6 100644 --- a/bsp/mb9bf618s/applications/application.c +++ b/bsp/mb9bf618s/applications/application.c @@ -24,7 +24,7 @@ void rt_init_thread_entry(void *parameter) #endif #ifdef RT_USING_FINSH - finsh_set_device(RT_CONSOLE_DEVICE_NAME); + (RT_CONSOLE_DEVICE_NAME); #endif /* RT_USING_FINSH */ /**< init led device */ diff --git a/bsp/microblaze/startup.c b/bsp/microblaze/startup.c index e1104a4cd5..dec74de918 100755 --- a/bsp/microblaze/startup.c +++ b/bsp/microblaze/startup.c @@ -84,7 +84,9 @@ void rtthread_startup(void) #ifdef RT_USING_FINSH /* init finsh */ finsh_system_init(); +#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) finsh_set_device("uart1"); +#endif #endif /* init idle thread */ diff --git a/bsp/mini4020/applications/startup.c b/bsp/mini4020/applications/startup.c index 4d07a8edd7..0feba225cf 100644 --- a/bsp/mini4020/applications/startup.c +++ b/bsp/mini4020/applications/startup.c @@ -77,7 +77,7 @@ void rtthread_startup() #ifdef RT_USING_FINSH /* init finsh */ finsh_system_init(); -#ifdef RT_USING_DEVICE +#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) finsh_set_device("uart0"); #endif #endif diff --git a/bsp/nios_ii/startup.c b/bsp/nios_ii/startup.c index fd2f909aa2..aa6df54c3a 100644 --- a/bsp/nios_ii/startup.c +++ b/bsp/nios_ii/startup.c @@ -60,7 +60,9 @@ void rtthread_startup(void) #ifdef RT_USING_FINSH /* init finsh */ finsh_system_init(); +#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) finsh_set_device("uart"); +#endif #endif /* init idle thread */ diff --git a/bsp/nv32f100x/app/src/main.c b/bsp/nv32f100x/app/src/main.c index 813878bc9f..4145900aa3 100644 --- a/bsp/nv32f100x/app/src/main.c +++ b/bsp/nv32f100x/app/src/main.c @@ -17,8 +17,10 @@ int main(void) { rt_thread_t thread; -#ifdef RT_USING_FINSH +#ifdef RT_USING_FINSH +#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) finsh_set_device(RT_CONSOLE_DEVICE_NAME); +#endif #endif /* Create led thread */ diff --git a/bsp/pic32ethernet/startup.c b/bsp/pic32ethernet/startup.c index 372440d711..8c8772a4a7 100644 --- a/bsp/pic32ethernet/startup.c +++ b/bsp/pic32ethernet/startup.c @@ -48,7 +48,7 @@ void rtthread_startup(void) #ifdef RT_USING_FINSH /* init finsh */ finsh_system_init(); -#ifdef RT_USING_DEVICE +#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) finsh_set_device("uart1"); #endif #endif diff --git a/bsp/rm48x50/application/startup.c b/bsp/rm48x50/application/startup.c index a49c9f1810..cbcc9b19ca 100644 --- a/bsp/rm48x50/application/startup.c +++ b/bsp/rm48x50/application/startup.c @@ -104,7 +104,9 @@ void rtthread_startup(void) #ifdef RT_USING_FINSH /* init finsh */ finsh_system_init(); +#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) finsh_set_device("sci2"); +#endif #endif /* init soft timer thread */ diff --git a/bsp/rx/applications/application.c b/bsp/rx/applications/application.c index 2013a3c69a..eb3053174b 100644 --- a/bsp/rx/applications/application.c +++ b/bsp/rx/applications/application.c @@ -60,8 +60,10 @@ void rt_init_thread_entry(void* parameter) #ifdef RT_USING_FINSH /* initialize finsh */ finsh_system_init(); +#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) finsh_set_device(RT_CONSOLE_DEVICE_NAME); #endif +#endif #ifdef RT_USING_LWIP /* initialize lwip stack */ @@ -130,7 +132,9 @@ void rt_init_thread_entry(void* parameter) #endif #ifdef RT_USING_FINSH +#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) finsh_set_device(RT_CONSOLE_DEVICE_NAME); +#endif #endif /* RT_USING_FINSH */ /* Filesystem Initialization */ diff --git a/bsp/sam7x/applications/startup.c b/bsp/sam7x/applications/startup.c index 528d6127f3..bc3e8f5ad3 100644 --- a/bsp/sam7x/applications/startup.c +++ b/bsp/sam7x/applications/startup.c @@ -114,7 +114,9 @@ void rtthread_startup(void) #ifdef RT_USING_FINSH /* init finsh */ finsh_system_init(); +#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) finsh_set_device("uart1"); +#endif #endif /* init idle thread */ diff --git a/bsp/samd21/applications/application.c b/bsp/samd21/applications/application.c index d311cb23fc..6bb3c7d24e 100644 --- a/bsp/samd21/applications/application.c +++ b/bsp/samd21/applications/application.c @@ -87,7 +87,9 @@ void rt_init_thread_entry(void* parameter) #ifdef RT_USING_FINSH /* init finsh */ finsh_system_init(); +#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) finsh_set_device("uart1"); +#endif #endif LED_Init(); diff --git a/bsp/sep6200/application/startup.c b/bsp/sep6200/application/startup.c index 0d67f08256..4ecacf560f 100644 --- a/bsp/sep6200/application/startup.c +++ b/bsp/sep6200/application/startup.c @@ -64,7 +64,7 @@ void rtthread_startup() #ifdef RT_USING_FINSH /* init finsh */ finsh_system_init(); -#ifdef RT_USING_DEVICE +#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) finsh_set_device("uart0"); #endif #endif diff --git a/bsp/taihu/applications/startup.c b/bsp/taihu/applications/startup.c index 299a2867e6..7812af03aa 100644 --- a/bsp/taihu/applications/startup.c +++ b/bsp/taihu/applications/startup.c @@ -53,7 +53,9 @@ void rtthread_startup(void) #ifdef RT_USING_FINSH /* init finsh */ finsh_system_init(); +#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) finsh_set_device("uart1"); +#endif #endif /* init soft timer thread */ diff --git a/bsp/upd70f3454/applications/startup.c b/bsp/upd70f3454/applications/startup.c index 9a9ed22cde..990112dfa8 100644 --- a/bsp/upd70f3454/applications/startup.c +++ b/bsp/upd70f3454/applications/startup.c @@ -64,7 +64,9 @@ void rtthread_startup(void) #ifdef RT_USING_FINSH /* init finsh */ finsh_system_init(); +#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) finsh_set_device("uart0"); +#endif #endif /* init timer thread */ diff --git a/bsp/xplorer4330/applications/application.c b/bsp/xplorer4330/applications/application.c index 707be03de8..98f1874c0d 100644 --- a/bsp/xplorer4330/applications/application.c +++ b/bsp/xplorer4330/applications/application.c @@ -23,8 +23,10 @@ void rt_init_thread_entry(void *parameter) #ifdef RT_USING_FINSH /* initialize finsh */ finsh_system_init(); +#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) finsh_set_device(RT_CONSOLE_DEVICE_NAME); #endif +#endif } /*the led thread*/ ALIGN(RT_ALIGN_SIZE) diff --git a/components/finsh/finsh.h b/components/finsh/finsh.h index f5e4df9e49..865627fd79 100644 --- a/components/finsh/finsh.h +++ b/components/finsh/finsh.h @@ -168,7 +168,7 @@ extern struct finsh_syscall *_syscall_table_begin, *_syscall_table_end; /* find out system call, which should be implemented in user program */ struct finsh_syscall *finsh_syscall_lookup(const char *name); -#ifdef RT_USING_DEVICE +#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) void finsh_set_device(const char *device_name); #endif diff --git a/components/finsh/shell.h b/components/finsh/shell.h index ca1ec308ed..0c20ba60dd 100644 --- a/components/finsh/shell.h +++ b/components/finsh/shell.h @@ -91,7 +91,6 @@ void finsh_set_echo(rt_uint32_t echo); rt_uint32_t finsh_get_echo(void); int finsh_system_init(void); -void finsh_set_device(const char *device_name); const char *finsh_get_device(void); int finsh_getchar(void);