Uploading to teensy with platformio gives error teensy_reboot not found (Raspberry Pi

Status
Not open for further replies.

cudmore

New member
I am trying to program a teensy 3.1/3.2 with platformio. I am on a Raspberry Pi and have the teensy connected to a USB port.

When I run the command

Code:
platformio run --target upload

I always get the error

Code:
teensy_reboot -s
sh: 1: teensy_reboot: not found
*** [upload] Error 127

How do I install teensy_reboot to get this working? I am working entirely from the command line. I have not installed an arduino ide or the teensy loader. If answer is 'install teensy loader', how do I do this in command line?

My platform.io file is

Code:
[env:teensy31]
platform = teensy
board = teensy31
framework = arduino

System info is:

Code:
Raspberry Pi 3+
Raspian Stretch
platformio==3.5.3
udev is in /etc/udev/rules.d/49-teensy.rules

Thanks in advance. Platformio, teensy, and raspberry pi go great together.

Here is the output of the upload

Code:
pi@hc4:~/platformio/blink $ platformio run --target upload -v
[Fri Jun 15 20:03:20 2018] Processing teensy31 (platform: [url]https://github.com/platformio/platform-teensy.git;[/url] board: teensy31; framework: arduino)
---------------------------------------------------------------------------------------------------------------
PLATFORM: Teensy > Teensy 3.1 / 3.2
SYSTEM: MK20DX256 72MHz 64KB RAM (256KB Flash)
DEBUG: CURRENT(jlink) EXTERNAL(jlink)
Library Dependency Finder -> [url]http://bit.ly/configure-pio-ldf[/url]
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 94 compatible libraries
Scanning dependencies...
No dependencies
arm-none-eabi-g++ -o .pioenvs/teensy31/firmware.elf -Os -Wl,--gc-sections,--relax -mthumb -mcpu=cortex-m4 -Wl,--defsym=__rtc_localtime=1529107402 -fsingle-precision-constant -Wl,-T"mk20dx256.ld" .pioenvs/teensy31/src/main.cpp.o -L/home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy3 -L.pioenvs/teensy31 -Wl,--start-group .pioenvs/teensy31/libFrameworkArduino.a -larm_cortexM4l_math -lm -lstdc++ -Wl,--end-group
MethodWrapper([".pioenvs/teensy31/firmware.elf"], [".pioenvs/teensy31/src/main.cpp.o"])
text	   data	    bss	    dec	    hex	filename
6288	   1232	   2176	   9696	   25e0	.pioenvs/teensy31/firmware.elf
arm-none-eabi-objcopy -O ihex -R .eeprom .pioenvs/teensy31/firmware.elf .pioenvs/teensy31/firmware.hex
Configuring upload protocol...
AVAILABLE: jlink, teensy-cli, teensy-gui
CURRENT: upload_protocol = teensy-cli
teensy_reboot -s
sh: 1: teensy_reboot: not found
*** [upload] Error 127
========================================== [ERROR] Took 5.76 seconds ==========================================
 
I am trying to program a teensy 3.1/3.2 with platformio. I am on a Raspberry Pi and have the teensy connected to a USB port.

When I run the command

Code:
platformio run --target upload

I always get the error

Code:
teensy_reboot -s
sh: 1: teensy_reboot: not found
*** [upload] Error 127

teensy-reboot is part of the teensyduino installation and AFAIK not independently available, which would mean I have the feeling platformio expects complete TD installation, which requires an Arduino installation.
 
How do I install teensy_reboot to get this working?

Download Arduino 1.8.5 and Teensyduino 1.4.2. Extract Arduino and make a mental note of which directory. Run the Teensyduino installer.

Then look in Arduino's hardware/tools folder. There you will find the teensy_reboot program.

No, it isn't available separately. The only way to get it is to download these 2 large packages, run the installer, then grab if from that folder.
 
Thank @ikravets and @PaulStoffregen. I upgraded platformio to version 3.5.3

Code:
sudo pip uninstall platformio
sudo pip install -U platformio

Running `platformio run` now uploads my test blink program successfully!

Code:
sudo platformio run --target upload

Code:
Building .pioenvs/teensy31/firmware.hex
Configuring upload protocol...
AVAILABLE: jlink, teensy-cli, teensy-gui
CURRENT: upload_protocol = teensy-cli
Rebooting...
Uploading .pioenvs/teensy31/firmware.hex
Teensy Loader, Command Line, Version 2.1
Read ".pioenvs/teensy31/firmware.hex": 7516 bytes, 2.9% usage
Soft reboot performed
Waiting for Teensy device...
(hint: press the reset button)
Found HalfKay Bootloader
Read ".pioenvs/teensy31/firmware.hex": 7516 bytes, 2.9% usage
Programming........
Booting
 
Status
Not open for further replies.
Back
Top