Closed
Description
This sketch hardfaults the board on v1.3.0 of this Arduino Core on the Arduino Nano 33 BLE Sense:
void printf_wrapper(const char *format, ...) {
static char print_buf[2048] = { 0 };
va_list args;
va_start(args, format);
int r = vsnprintf(print_buf, 2048, format, args);
va_end(args);
if (r > 0) {
Serial.write(print_buf);
}
}
void setup() {
// put your setup code here, to run once:
delay(5000);
}
void loop() {
// put your main code here, to run repeatedly:
printf_wrapper("hello world\n");
printf_wrapper("hello this is a long text with 40 chars\n");
printf_wrapper("hello this is a long text with 80 chars hello this is a long text with 80 chars\n");
delay(1000);
}
This works fine on the 1.1.6 core.