Bonjour,

Je souhaite développer une application en C sur MCU c8051F320 (Silab), d'ou l'utilisation de l'IDE keil µvision3 et de son compilateur C51.

Je dois utiliser des threads donc je souhaite importer pthread de POSIX.

J'ai donc inséré pthread.h dans "C:\Keil\C51\INC"
pthreadGC2.dll dans "C:\Keil\C51\BIN"

et, vu que ma librairie pthread contient des fichiers .a ET .lib, et que je ne sais jamais lesquels utiliser en fonction du compilateur, et que dans "C:\Keil\C51\LIB", il n'y a que des .lib, je n'ai rien inséré car pas de pthread.GC2.lib disponibles..
(uniquement ..VC2.lib ou ..VCE2.lib ou ..VSE2.lib)


J'ai également inséré : AGSI2=BIN\pthreadGC2.dll("pthread dll")
dans le fichier TOOLS.ini car j'ai vu sur un forum que l'ajout d'une DLL impliquait l'ajout de cette ligne dans ce fichier (pas convaincu mais bon, j'ai essayé)

lors de la compilation :

Build target 'nRF24L01'
compiling main.c...
C:\KEIL\C51\INC\PTHREAD.H(213): warning C322: unknown identifier
C:\KEIL\C51\INC\PTHREAD.H(218): warning C318: can't open file 'time.h'
C:\KEIL\C51\INC\PTHREAD.H(223): warning C322: unknown identifier
C:\KEIL\C51\INC\SCHED.H(69): warning C322: unknown identifier
C:\KEIL\C51\INC\SCHED.H(146): error C132: '__cdecl': not in formal parameter list
C:\KEIL\C51\INC\SCHED.H(146): error C141: syntax error near 'sched_yield'
C:\KEIL\C51\INC\SCHED.H(146): error C132: 'sched_yield': not in formal parameter list
C:\KEIL\C51\INC\SCHED.H(148): error C132: '___declspec': not in formal parameter list
C:\KEIL\C51\INC\SCHED.H(148): error C141: syntax error near 'int'
C:\KEIL\C51\INC\SCHED.H(148): error C132: '__cdecl': not in formal parameter list
C:\KEIL\C51\INC\SCHED.H(148): error C132: '_sched_get_priority_min': not in formal parameter list
C:\KEIL\C51\INC\SCHED.H(150): error C132: '___declspec': not in formal parameter list
C:\KEIL\C51\INC\SCHED.H(150): error C141: syntax error near 'int'
C:\KEIL\C51\INC\SCHED.H(150): error C132: '__cdecl': not in formal parameter list
C:\KEIL\C51\INC\SCHED.H(150): error C132: '_sched_get_priority_max': not in formal parameter list
C:\KEIL\C51\INC\SCHED.H(152): error C132: '___declspec': not in formal parameter list
C:\KEIL\C51\INC\SCHED.H(152): error C141: syntax error near 'int'
C:\KEIL\C51\INC\SCHED.H(152): error C132: '__cdecl': not in formal parameter list
C:\KEIL\C51\INC\SCHED.H(152): error C132: '_sched_setscheduler': not in formal parameter list
C:\KEIL\C51\INC\SCHED.H(154): error C132: '___declspec': not in formal parameter list
C:\KEIL\C51\INC\SCHED.H(154): error C141: syntax error near 'int'
C:\KEIL\C51\INC\SCHED.H(154): error C132: '__cdecl': not in formal parameter list
C:\KEIL\C51\INC\SCHED.H(154): error C132: '_sched_getscheduler': not in formal parameter list
C:\KEIL\C51\INC\PTHREAD.H(526): warning C322: unknown identifier
C:\KEIL\C51\INC\PTHREAD.H(569): error C127: 'ptw32_handle_t': invalid storage class
C:\KEIL\C51\INC\PTHREAD.H(571): error C127: 'ptw32_handle_t': invalid storage class
C:\KEIL\C51\INC\PTHREAD.H(571): error C141: syntax error near 'pthread_t'
C:\KEIL\C51\INC\PTHREAD.H(571): error C127: 'pthread_t': invalid storage class
C:\KEIL\C51\INC\PTHREAD.H(572): error C127: 'pthread_attr_t': invalid storage class
C:\KEIL\C51\INC\PTHREAD.H(573): error C127: 'pthread_once_t': invalid storage class
C:\KEIL\C51\INC\PTHREAD.H(574): error C127: 'pthread_key_t': invalid storage class
C:\KEIL\C51\INC\PTHREAD.H(575): error C127: 'pthread_mutex_t': invalid storage class
C:\KEIL\C51\INC\PTHREAD.H(576): error C127: 'pthread_mutexattr_t': invalid storage class
C:\KEIL\C51\INC\PTHREAD.H(577): error C127: 'pthread_cond_t': invalid storage class
C:\KEIL\C51\INC\PTHREAD.H(578): error C127: 'pthread_condattr_t': invalid storage class
C:\KEIL\C51\INC\PTHREAD.H(580): error C127: 'pthread_rwlock_t': invalid storage class
C:\KEIL\C51\INC\PTHREAD.H(581): error C127: 'pthread_rwlockattr_t': invalid storage class
C:\KEIL\C51\INC\PTHREAD.H(582): error C127: 'pthread_spinlock_t': invalid storage class
C:\KEIL\C51\INC\PTHREAD.H(583): error C127: 'pthread_barrier_t': invalid storage class
C:\KEIL\C51\INC\PTHREAD.H(584): error C127: 'pthread_barrierattr_t': invalid storage class
C:\KEIL\C51\INC\PTHREAD.H(709): error C127: 'ptw32_cleanup_t': invalid storage class
C:\KEIL\C51\INC\PTHREAD.H(716): error C141: syntax error near 'ptw32_cleanup_callback_t', expected ')'
C:\KEIL\C51\INC\PTHREAD.H(716): error C129: missing ';' before ')'
C:\KEIL\C51\INC\PTHREAD.H(950): warning C322: unknown identifier
C:\KEIL\C51\INC\PTHREAD.H(950): warning C322: unknown identifier
C:\KEIL\C51\INC\PTHREAD.H(1125): warning C322: unknown identifier
C:\KEIL\C51\INC\PTHREAD.H(1125): warning C322: unknown identifier
C:\KEIL\C51\INC\PTHREAD.H(1181): warning C322: unknown identifier
C:\KEIL\C51\INC\PTHREAD.H(1181): warning C322: unknown identifier
C:\KEIL\C51\INC\PTHREAD.H(1279): warning C322: unknown identifier
C:\KEIL\C51\INC\PTHREAD.H(1279): warning C322: unknown identifier
compiling radio.c...
compiling system.c...
compiling mcu.c...
compiling hal_nrf_l01.c...
compiling hal_nrf_f32x_hw.c...
compiling radio_esb.c...
compiling application_esb.c...
Target not created


Voilà, j'espère avoir été clair car c'est la première fois que je fais un post dans un forum..

Je vous remercie d'avance pour votre aide.

AinsiSoitIl