Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use teensy_reboot script #13

Closed
ivankravets opened this issue Jan 27, 2017 · 7 comments
Closed

Use teensy_reboot script #13

ivankravets opened this issue Jan 27, 2017 · 7 comments

Comments

@ivankravets
Copy link
Member

See @PaulStoffregen

Oh, yeah, this was added some time ago. Use the new 1.35 release. Run "teensy_reboot -s" for stand-alone mode.

#9 (comment)

@mrkaroshi
Copy link

mrkaroshi commented Mar 13, 2017

I think I'm missing something obvious - when I upload to the Teensy 3.1, after copying the most recent 1.35 Teensy applications into .platformio, I still get a message saying "Soft reboot is not implemented in OSX". Is there a workaround with instructions somewhere for this?

(IDE 1.7.3, Core 3.2.1, OSX 10.11.6)

@arneboon
Copy link

Hi @mrkaroshi,

Had problems too with uploading in PlatformIO using teensy_loader_cli. Here is the thread on the teensy forum.

Now using the Teensy Loader implementation instead. This is how:

PlatformIO checks the ~/.platformio/packages/tool-teensy folder for existence of teensy_loader_cli. By deleting/renaming this file it skips to the Teensy Loader implementation.

See source below in ~/.platformio/platforms/teensy/builder/main.py

Hope this helps. Would be nice if there is a more sexy way of selecting between the teensy_loader_cli or Teensy Loader. Perhaps there is, haven't found it yet.

if any([
        isfile(
            join(
                platform.get_package_dir("tool-teensy") or "",
                "teensy_loader_cli%s" % b)) for b in ("", ".exe")
]):
    env.Append(
        UPLOADER="teensy_loader_cli",
        UPLOADERFLAGS=[
            "-mmcu=$BOARD_MCU",
            "-w",  # wait for device to apear
            "-s",  # soft reboot if device not online
            "-v"  # verbose output
        ],
        UPLOADHEXCMD='$UPLOADER $UPLOADERFLAGS $SOURCES')
else:
    env.Append(
        REBOOTER="teensy_reboot",
        UPLOADER="teensy_post_compile",
        UPLOADERFLAGS=[
            "-file=firmware", '-path=$BUILD_DIR',
            '-tools=%s' % (platform.get_package_dir("tool-teensy") or "")
        ],
        UPLOADHEXCMD='$UPLOADER $UPLOADERFLAGS')

@mrkaroshi
Copy link

@arneboon perfect! I suppose it's not exactly majestic, and I'm guessing I'll have to delete the CLI bin every time I update PlatformIO, but that's saved me a lot of hassle - I've been sat here with my project in pieces because I had to be able to reach the reset button. Thanks a million!

@venelinpetrov
Copy link

All issues are related to Teensy 3.x, will this work for 2.0 too?

@chappy1978
Copy link

I found that when you replace
"teensy_loader_cli%s" % b)) for b in ("", ".exe")
with
"Teensy%s" % b)) for b in ("", ".app")
It starts Teensy.app but has some errors and fails to work. Any thoughts

@chappy1978
Copy link

I brought this problem up with Paul the maker of the Teensy. It doesnt look like the CLI will be MacOS rebootable ever.
PaulStoffregen/teensy_loader_cli#37

@WasabiFan
Copy link

I can see that the flags mentioned above are passed to the teensy utilities here yet I am still prompted to press the button on each deployment; what's missing to make the end-to-end scenario work? Is it something I could figure out myself and open a PR for?

I'm on Windows 10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants