- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
[ WICED-Studio-6.2.1 (Linux 64-bit) ]
I´ve two issues about Wiced using rtos:
First
Typedef wiced_thread_t isn't known even after included wiced_rtos.h in the code.
Second
According to API Reference Guide v6.2.0 - page 95
but in the wiced_rtos.h we found
Maybe is only the prototype name.
Best regards,
Solved! Go to Solution.
- Labels:
-
SDK 3.x
-
WICED Studio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Firstly, use the followed code for CYW20719's thread create demo:
wiced_thread_t* ptr_thread;
ptr_thread = wiced_rtos_create_thread();
wiced_result_t status = wiced_rtos_init_thread(ptr_thread,6,"thread",NewThread,1024,NULL);
Secondly, Thanks for axel.lin_1746341 's remind. My post#2 is for /43xxx_Wi-Fi/include/wiced_rtos.h.
CYW20719 use ./20719-B1_Bluetooth/include/20719/wiced_rtos.h
Regards
Jenson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am use the Windows version.
1. The wiced_thread_t can be found in rtos.h which had included by wiced_rtos.h
typedef struct
{
TX_THREAD handle; /**< TX thread Handle */
void* stack; /**< Thread Stack Pointer */
} wiced_thread_t;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using windows version too:
#include "wiced_rtos.h"
...
void NewThread(uint32_t arg);
wiced_thread_t ptr_thread;
...
wiced_result_t status = wiced_rtos_init_thread(&ptr_thread, 3, "thread", NewThread, 2000, 0);
static void NewThread(uint32_t arg)
{
}
I got the same error, this is the output:
I attached wiced_rtos.h , as you can see rtos.h doesn't exist.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Firstly, use the followed code for CYW20719's thread create demo:
wiced_thread_t* ptr_thread;
ptr_thread = wiced_rtos_create_thread();
wiced_result_t status = wiced_rtos_init_thread(ptr_thread,6,"thread",NewThread,1024,NULL);
Secondly, Thanks for axel.lin_1746341 's remind. My post#2 is for /43xxx_Wi-Fi/include/wiced_rtos.h.
CYW20719 use ./20719-B1_Bluetooth/include/20719/wiced_rtos.h
Regards
Jenson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jenson,
Thanks, I will try this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yans wrote:
I am use the Windows version.
1. The wiced_thread_t can be found in rtos.h which had included by wiced_rtos.h
You are talking about different wiced_rtos.h file:
./20719-B1_Bluetooth/include/20719/wiced_rtos.h
./43xxx_Wi-Fi/include/wiced_rtos.h
./20735-B1_Bluetooth/include/20735/wiced_rtos.h
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Second question :
wiced_rtos_init_thread and wiced_rtos_create_thread are different functions.
from wiced_rtos.c:
wiced_result_t wiced_rtos_create_thread( wiced_thread_t* thread, uint8_t priority, const char* name, wiced_thread_function_t function, uint32_t stack_size, void* arg )
{
thread->thread = wiced_rtos_create_thread_rom( );
if ( thread->thread == NULL )
return WICED_ERROR;
/*2039 FW limits priority to 0(lowest) to 7(highest)*/
if ( priority > 6 )
priority = 1; /* priority 0 is reserved for IDLE thread in 20739 FW */
else
priority = (uint8_t) ( 7 - (uint32_t) priority );
return wiced_rtos_init_thread( thread->thread, priority, name, function, stack_size, arg );
}
As you can see, wiced_rtos_create_thread call wiced_rtos_init_thread with some data manipulation.
First question:
Did you #include "wiced.h"?
If yes, tell what libs did you included and share makefile.mk in project directory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
deniszinchenko
I include wiced.h and error keeps.
My project is based on hello_sensor provided by Wiced Studio 6.2, I don't change makefile or added new lib.