Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

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

  1. #1
    Junior Member
    Join Date
    Jun 2018
    Posts
    2

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

    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: https://github.com/platformio/platform-teensy.git; 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 -> http://bit.ly/configure-pio-ldf
    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 ==========================================

  2. #2
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,700
    Quote Originally Posted by cudmore View Post
    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.

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,296
    Quote Originally Posted by cudmore View Post
    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.

  4. #4
    If someone will have this ARM binary of `teensy_reboot`, please share it at https://github.com/platformio/platform-teensy/issues/38

    P.S: I put some hook and it should work now without this `teensy_reboot`. Please run `pio update` on RPi side.

  5. #5
    Junior Member
    Join Date
    Jun 2018
    Posts
    2
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •