Problems with Pthread.h. ESP32-DevKitC-V4
Posted: Fri Mar 03, 2023 1:18 pm
I'm trying to program an ESP32 DevKitC-V4 board with the Pthread.h library in Arduino IDE 1.8.19 and I got an error. Trying to narrow down the error, I loaded an example code with the same library and still got the same error:
When I look at the serial monitor y see this error:
Guru Meditation Error: Core 0 panic'ed (IllegalInstruction). Do you have any idea what the problem might be?
Code: Select all
#include <pthread.h>
void *printThreadId(void *threadid) {
Serial.println((int)threadid);
}
void setup() {
Serial.begin(115200);
pthread_t threads[4];
int returnValue;
for( int i = 0; i< 4; i++ ) {
returnValue = pthread_create(&threads[i], NULL, printThreadId, (void *)i);
if (returnValue) {
Serial.println("An error has occurred");
}
}
}
void loop() {}
Guru Meditation Error: Core 0 panic'ed (IllegalInstruction). Do you have any idea what the problem might be?