-
Notifications
You must be signed in to change notification settings - Fork 508
Closed
Description
A program implementing setjmp/longjmp for error recovery seems to have problems opening a serial port. Demonstration:
#include <setjmp.h>
jmp_buf exception;
void error () { Serial.println("Error"); longjmp(exception, 1); }
void setup () {
Serial.begin(9600);
Serial.println("Starting");
}
void loop () {
if (!setjmp(exception)) {}
Serial.println("Waiting");
delay(10000);
error();
}
Hangs up with no port available on arduino-pico core 1.9.15. Works OK on Arduino Mbed OS RP2040 Boards core version 2.6.1.
Test setup:
Raspberry Pi RP2040 board
MacBook Pro with macOS High Sierra 10.13.6
Arduino IDE 1.8.13
Metadata
Metadata
Assignees
Labels
No labels