Using <pthread.h> LPCXpresso 1769

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Using <pthread.h> LPCXpresso 1769

1,343件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by activestealth on Sat Sep 28 07:53:43 MST 2013
Hi all,

I tried to use pthread in CodeRed but it appears that it could work; but I havent had full success yet.

Attempts:
1. Selected Newlib for GCC C Compiler
2. Downloaded Pthread Win32
3. GCC C Compiler: a) Directory -> Included the path for Pthread Win32 header files
                   b) Misc -> -pthread
4. GCC C Linker: a) Library -> Included pthreadGC1 and pthreadGCE1
                 b) Library Search Path -> Included the path for Pthread Win32 lib files

I was initially working on lpcxpresso v3 IDE. It was able to BUILD successfully. However, when I started pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER and compiled again; this time the console popped out: "GNU Compiler needs to be updated"

Next, I switched over to lpcxpresso v6 IDE (hopefully GNU Compiler is more up-to-date). Did the same 4 steps. This time when I compile, they didn't show me "GNU Compiler needs to be updated". Instead, I have this error message:

arm-none-eabi-gcc.exe: error: unrecognized option '-pthread'

Thanks guys for helping.
0 件の賞賛
返信
1 返信

1,184件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Sat Sep 28 08:42:26 MST 2013
To run threads/tasks etc, your need an operating system running on your target. An OS will supply the header file. Take a look at ucLinux or similar.
0 件の賞賛
返信