763{
766
767#ifdef FINSH_USING_SYMTAB
768#ifdef __ARMCC_VERSION
769 extern const int FSymTab$$Base;
770 extern const int FSymTab$$Limit;
771 finsh_system_function_init(&FSymTab$$Base, &FSymTab$$Limit);
772#elif defined (__ICCARM__) || defined(__ICCRX__)
773 finsh_system_function_init(__section_begin("FSymTab"),
774 __section_end("FSymTab"));
775#elif defined (__GNUC__) || defined(__TI_COMPILER_VERSION__) || defined(__TASKING__)
776
777 extern const int __fsymtab_start;
778 extern const int __fsymtab_end;
779 finsh_system_function_init(&__fsymtab_start, &__fsymtab_end);
780#elif defined(__ADSPBLACKFIN__)
781 finsh_system_function_init(&__fsymtab_start, &__fsymtab_end);
782#elif defined(_MSC_VER)
783 unsigned int *ptr_begin, *ptr_end;
784
786 {
788 return RT_EOK;
789 }
790
791 ptr_begin = (unsigned int *)&__fsym_begin;
792 ptr_begin += (
sizeof(
struct finsh_syscall) / sizeof(unsigned int));
793 while (*ptr_begin == 0) ptr_begin ++;
794
795 ptr_end = (unsigned int *) &__fsym_end;
796 ptr_end --;
797 while (*ptr_end == 0) ptr_end --;
798
799 finsh_system_function_init(ptr_begin, ptr_end);
800#endif
801#endif
802
803#ifdef RT_USING_HEAP
804
807 {
809 return -1;
810 }
814#else
816 tid = &finsh_thread;
820 &finsh_thread_stack[0], sizeof(finsh_thread_stack),
822#endif
823
826
827 if (tid != NULL && result == RT_EOK)
829 return 0;
830}
rt_weak void * rt_calloc(rt_size_t count, rt_size_t size)
This function will contiguously allocate enough space for count objects that are size bytes of memory...
rt_err_t rt_thread_startup(rt_thread_t thread)
This function will start a thread and put it to system ready queue.
rt_thread_t rt_thread_create(const char *name, void(*entry)(void *parameter), void *parameter, rt_uint32_t stack_size, rt_uint8_t priority, rt_uint32_t tick)
This function will create a thread object and allocate thread object memory. and stack.
rt_err_t rt_thread_init(struct rt_thread *thread, const char *name, void(*entry)(void *parameter), void *parameter, void *stack_start, rt_uint32_t stack_size, rt_uint8_t priority, rt_uint32_t tick)
This function will initialize a thread. It's used to initialize a static thread object.
struct rt_thread * rt_thread_t
void finsh_set_prompt_mode(rt_uint32_t prompt_mode)
rt_err_t rt_sem_init(rt_sem_t sem, const char *name, rt_uint32_t value, rt_uint8_t flag)
This function will initialize a static semaphore object.
#define FINSH_THREAD_NAME
#define FINSH_THREAD_PRIORITY
#define FINSH_THREAD_STACK_SIZE