0

I am running a simple blink/hello world program on Teensy 3.2. The code is compiling and running fine but I can't see the serial output. When I try to open the serial monitor it gives me

"Board at /sys/devices/pci0000:00/0000:00:14.0/usb3/3-1 is not available"

The source code is pasted in below, and the terminal outputs below that.

I'm using Teensyduino 1.4.6 and Arduino IDE 1.8.9 running on Ubuntu 18.04. The 49-teensy.rules file has been copied to /etc/udev/rules.d/ as required.

The Tools > Port menu is greyed out, can't select it.

Any suggestions on what I am doing wrong? Why can't I see the serial output?

int led = 13;

void setup() {
  pinMode(led, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  digitalWrite(led, HIGH);
  Serial.println("Hello (on) world");
  delay(1000);
  digitalWrite(led, LOW);
  Serial.println("Hello (off) world");
  delay(1000);
}

Terminal output below:

> /usr/local/arduino/arduino-1.8.9/arduino-builder -dump-prefs
> -logger=machine -hardware /usr/local/arduino/arduino-1.8.9/hardware -tools /usr/local/arduino/arduino-1.8.9/tools-builder -tools /usr/local/arduino/arduino-1.8.9/hardware/tools/avr
> -built-in-libraries /usr/local/arduino/arduino-1.8.9/libraries -libraries /home/hubert/Arduino/libraries -fqbn=teensy:avr:teensy31:usb=serial,speed=48,opt=o2std,keys=en-us -ide-version=10809 -build-path /tmp/arduino_build_530222 -warnings=all -build-cache /tmp/arduino_cache_588473 -verbose /home/hubert/Arduino/Blink_T32/Blink_T32.ino
> /usr/local/arduino/arduino-1.8.9/arduino-builder -compile
> -logger=machine -hardware /usr/local/arduino/arduino-1.8.9/hardware -tools /usr/local/arduino/arduino-1.8.9/tools-builder -tools /usr/local/arduino/arduino-1.8.9/hardware/tools/avr
> -built-in-libraries /usr/local/arduino/arduino-1.8.9/libraries -libraries /home/hubert/Arduino/libraries -fqbn=teensy:avr:teensy31:usb=serial,speed=48,opt=o2std,keys=en-us -ide-version=10809 -build-path /tmp/arduino_build_530222 -warnings=all -build-cache /tmp/arduino_cache_588473 -verbose /home/hubert/Arduino/Blink_T32/Blink_T32.ino Using board 'teensy31'
> from platform in folder:
> /usr/local/arduino/arduino-1.8.9/hardware/teensy/avr Using core
> 'teensy3' from platform in folder:
> /usr/local/arduino/arduino-1.8.9/hardware/teensy/avr Detecting
> libraries used...
> /usr/local/arduino/arduino-1.8.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++
> -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=146 -DARDUINO=10809 -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/usr/local/arduino/arduino-1.8.9/hardware/teensy/avr/cores/teensy3 /tmp/arduino_build_530222/sketch/Blink_T32.ino.cpp -o /dev/null
> Generating function prototypes...
> /usr/local/arduino/arduino-1.8.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++
> -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=146 -DARDUINO=10809 -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/usr/local/arduino/arduino-1.8.9/hardware/teensy/avr/cores/teensy3 /tmp/arduino_build_530222/sketch/Blink_T32.ino.cpp -o
> /tmp/arduino_build_530222/preproc/ctags_target_for_gcc_minus_e.cpp
> /usr/local/arduino/arduino-1.8.9/tools-builder/ctags/5.8-arduino11/ctags
> -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /tmp/arduino_build_530222/preproc/ctags_target_for_gcc_minus_e.cpp
> Compiling sketch...
> /usr/local/arduino/arduino-1.8.9/hardware/teensy/../tools/precompile_helper
> /usr/local/arduino/arduino-1.8.9/hardware/teensy/avr/cores/teensy3
> /tmp/arduino_build_530222
> /usr/local/arduino/arduino-1.8.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++
> -x c++-header -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=146 -DARDUINO=10809 -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/usr/local/arduino/arduino-1.8.9/hardware/teensy/avr/cores/teensy3 /tmp/arduino_build_530222/pch/Arduino.h -o
> /tmp/arduino_build_530222/pch/Arduino.h.gch Using previously compiled
> file: /tmp/arduino_build_530222/pch/Arduino.h.gch
> /usr/local/arduino/arduino-1.8.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++
> -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=146 -DARDUINO=10809 -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/tmp/arduino_build_530222/pch -I/usr/local/arduino/arduino-1.8.9/hardware/teensy/avr/cores/teensy3 /tmp/arduino_build_530222/sketch/Blink_T32.ino.cpp -o
> /tmp/arduino_build_530222/sketch/Blink_T32.ino.cpp.o Compiling
> libraries... Compiling core... Using precompiled core:
> /tmp/arduino_cache_588473/core/core_teensy_avr_teensy31_usb_serial,speed_48,opt_o2std,keys_en-us_d47a876dd1beb90b689e2017ddeb665b.a
> Linking everything together...
> /usr/local/arduino/arduino-1.8.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-gcc
> -O2 -Wl,--gc-sections,--relax,--defsym=__rtc_localtime=1559084002 -T/usr/local/arduino/arduino-1.8.9/hardware/teensy/avr/cores/teensy3/mk20dx256.ld
> -lstdc++ -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -o /tmp/arduino_build_530222/Blink_T32.ino.elf
> /tmp/arduino_build_530222/sketch/Blink_T32.ino.cpp.o
> /tmp/arduino_build_530222/../arduino_cache_588473/core/core_teensy_avr_teensy31_usb_serial,speed_48,opt_o2std,keys_en-us_d47a876dd1beb90b689e2017ddeb665b.a
> -L/tmp/arduino_build_530222 -larm_cortexM4l_math -lm /usr/local/arduino/arduino-1.8.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-objcopy
> -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /tmp/arduino_build_530222/Blink_T32.ino.elf
> /tmp/arduino_build_530222/Blink_T32.ino.eep
> /usr/local/arduino/arduino-1.8.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-objcopy
> -O ihex -R .eeprom /tmp/arduino_build_530222/Blink_T32.ino.elf /tmp/arduino_build_530222/Blink_T32.ino.hex
> /usr/local/arduino/arduino-1.8.9/hardware/teensy/../tools/stdout_redirect
> /tmp/arduino_build_530222/Blink_T32.ino.lst
> /usr/local/arduino/arduino-1.8.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-objdump
> -d -S -C /tmp/arduino_build_530222/Blink_T32.ino.elf /usr/local/arduino/arduino-1.8.9/hardware/teensy/../tools/stdout_redirect
> /tmp/arduino_build_530222/Blink_T32.ino.sym
> /usr/local/arduino/arduino-1.8.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-objdump
> -t -C /tmp/arduino_build_530222/Blink_T32.ino.elf /usr/local/arduino/arduino-1.8.9/hardware/teensy/../tools/teensy_post_compile
> -file=Blink_T32.ino -path=/tmp/arduino_build_530222 -tools=/usr/local/arduino/arduino-1.8.9/hardware/teensy/../tools/ -board=TEENSY31 Opening Teensy Loader... /usr/local/arduino/arduino-1.8.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-size
> -A /tmp/arduino_build_530222/Blink_T32.ino.elf Sketch uses 13468 bytes (5%) of program storage space. Maximum is 262144 bytes. Global
> variables use 4564 bytes (6%) of dynamic memory, leaving 60972 bytes
> for local variables. Maximum is 65536 bytes.
> /usr/local/arduino/arduino-1.8.9/hardware/teensy/../tools/teensy_post_compile
> -file=Blink_T32.ino -path=/tmp/arduino_build_530222 -tools=/usr/local/arduino/arduino-1.8.9/hardware/teensy/../tools -board=TEENSY31 -reboot -port=/sys/devices/pci0000:00/0000:00:14.0/usb3/3-1 -portlabel=(null) -portprotocol=(null)  
Board at /sys/devices/pci0000:00/0000:00:14.0/usb3/3-1 is not available
  • And if you select the actual /dev/ttyACM0 serial port and try again...? – Majenko May 29 at 0:01
  • Go into the Tools menu, then Port, and select the port. – Majenko May 30 at 10:35
  • Have you installed the "49-teensy.rules" file as described in the tutorial? – Majenko May 30 at 10:57
  • Have updated question: the Ports menu is greyed out and the "49-teensy.rules" is installed. – Hubert B May 30 at 11:09
  • It looks like you haven't even managed to program the board - so there is no serial port for you to use. – Majenko May 30 at 11:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.