So, below is a stupid, do-nothing sketch, but it illustrates the problem. Throws the indicated error when compiled for T3.2 (Arduino 1.85, Teensyduino 1.44). The same sketch compiles error-free for a different ARM board like Adafruit Feather M0.
Any advise appreciated.
Thanks.
The Code:
The Error:
Any advise appreciated.
Thanks.
The Code:
Code:
#include "Arduino.h"
#include <unistd.h>
void setup()
{
int16_t argc = 4;
char **argv = nullptr, c;
while ((c = getopt(argc, argv, "abc:")) != -1) {
}
}
void loop()
{
}
The Error:
Code:
Arduino: 1.8.5 (Windows 10), TD: 1.44, Board: "Teensy 3.2 / 3.1, Serial, 96 MHz (overclock), Faster, US English"
Archiving built core (caching) in: C:\Users\tr001221\AppData\Local\Temp\arduino_cache_557088\core\core_teensy_avr_teensy31_usb_serial,speed_96,opt_o2std,keys_en-us_030978b2a1dfb34b2114ac9bd940b9a0.a
c:/arduino-1.8.5/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/lib/armv7e-m\libc.a(lib_a-writer.o): In function `_write_r':
writer.c:(.text._write_r+0x12): undefined reference to `_write'
collect2.exe: error: ld returned 1 exit status
Error compiling for board Teensy 3.2 / 3.1.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.