Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 1 month ago.
Relationship between lwip_sys: arch.h&c and RTOS
Hi, I'm a tyro in using mbed-os and I met some problems when I was using RTOS. I'm trying to build up a wireless sensor network which will use threads in the program. When I'm using the thread in this form: "Thread t1(myfunction);", the program can be complied but when I run it on my FRDM-K64F board, it will report "sys_arch_protect error". But if I changed the way that I use threads: "Thread t1; t1.start(callback(myfunction));", the program can still be complied but another error called "sys_mutex_lock error" will occur.
The functions that return these errors can be found in lwip_sys, arch.h and arch.c. After I checked these files, I found that this library has its own definition of thread (sys_thread_data_t), mutex(sys_mutex_t), semaphore(sys_sem_t) and other classes that have already been defined in RTOS. Are there any relationship between lwip_sys arch and RTOS? And dose anyone know why my program returns "sys_arch_protect error" and "sys_mutex_lock error"?
Thanks a lot.