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

Thread: Individual Teensy loader

  1. #1

    Individual Teensy loader

    Hello guys,

    if it finally comes to a commercial product and I want my customers to update the teensy on there own, it would be great to personalize the teensy loader application with an own picture and an own "name". Would that be even possible?

    Cheers
    Hendrik

  2. #2
    Senior Member pictographer's Avatar
    Join Date
    May 2013
    Location
    San Jose, CA
    Posts
    701
    Search for teensy_loader_cli. You can use a simple C program and make whatever GUI you like.

  3. #3
    I would like to but a simple compile of the original source fails (MAC OSX)

    Code:
    gcc -o teensyload teensy_loader_cli.c 
    Undefined symbols for architecture x86_64:
      "_hard_reboot", referenced from:
          _main in teensy_loader_cli-585e4e.o
         (maybe you meant: _hard_reboot_device)
      "_soft_reboot", referenced from:
          _main in teensy_loader_cli-585e4e.o
         (maybe you meant: _soft_reboot_device)
      "_teensy_close", referenced from:
          _main in teensy_loader_cli-585e4e.o
      "_teensy_open", referenced from:
          _main in teensy_loader_cli-585e4e.o
      "_teensy_write", referenced from:
          _main in teensy_loader_cli-585e4e.o
          _boot in teensy_loader_cli-585e4e.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    Or
    Code:
    make
    i586-mingw32msvc-gcc -O2 -Wall -s -DUSE_WIN32 -o teensy_loader_cli.exe teensy_loader_cli.c -lhid -lsetupapi
    make: i586-mingw32msvc-gcc: No such file or directory
    make: *** [teensy_loader_cli.exe] Error 1
    and
    Code:
    gcc -O2 -Wall -s -DUSE_WIN32 -o teensy_loader_cli.exe teensy_loader_cli.c -lhid -lsetupapi
    teensy_loader_cli.c:358:10: fatal error: 'windows.h' file not found
    #include <windows.h>
             ^
    1 error generated.
    Last edited by jblaze; 10-12-2016 at 05:58 AM.

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    24,121
    Edit the makefile. Look for the part where you select which operating system. You're trying to build for Windows, but you have a Mac.

  5. #5
    OK got it. Thanks!

  6. #6
    It works with smaller files but when I try a large file I get:

    "Warning, HEX parse error line 8193"

    Any hints?

    I tried to compile the loader on my own. Here is the output from my "make"
    Looking for a rule with intermediate file `makefile.sh'.
    Avoiding implicit rule recursion.
    Trying pattern rule with stem `makefile.sh'.
    Trying implicit prerequisite `makefile.sh,v'.
    Trying pattern rule with stem `makefile.sh'.
    Trying implicit prerequisite `RCS/makefile.sh,v'.
    Trying pattern rule with stem `makefile.sh'.
    Trying implicit prerequisite `RCS/makefile.sh'.
    Trying pattern rule with stem `makefile.sh'.
    Trying implicit prerequisite `s.makefile.sh'.
    Trying pattern rule with stem `makefile.sh'.
    Trying implicit prerequisite `SCCS/s.makefile.sh'.
    No implicit rule found for `makefile'.
    Finished prerequisites of target file `makefile'.
    No need to remake target `makefile'.
    Updating goal targets....
    Considering target file `clean'.
    File `clean' does not exist.
    Finished prerequisites of target file `clean'.
    Must remake target `clean'.
    rm -f teensy_loader_cli teensy_loader_cli.exe
    CreateProcess(C:\WinAVR\utils\bin\rm.exe,rm -f teensy_loader_cli teensy_loader_c
    li.exe,...)
    Putting child 0x01cf31b0 (clean) PID 30376032 on the chain.
    Live child 0x01cf31b0 (clean) PID 30376032
    Main thread handle = 0x00000070
    Reaping winning child 0x01cf31b0 PID 30376032
    Removing child 0x01cf31b0 PID 30376032 from chain.
    Successfully remade target file `clean'.
    WHat do I need to do afterwards? Sorry absolute newbee
    Last edited by jblaze; 10-29-2016 at 11:09 AM.

  7. #7
    Senior Member
    Join Date
    Jul 2014
    Posts
    3,156
    Quote Originally Posted by jblaze View Post
    Sorry absolute newbee
    Sorry, use ARDUINO IDE + Teensyduino. MUCH less problems, MUCH more fun.

  8. #8
    Can you tell me how to compile the teensy_loader_cli with Arduino IDE? If not I think I'll need to go on with winavr.

    Anyone else who can help?

  9. #9
    Senior Member
    Join Date
    Jul 2014
    Posts
    3,156
    Quote Originally Posted by jblaze View Post
    Can you tell me how to compile the teensy_loader_cli with Arduino IDE? If not I think I'll need to go on with winavr.

    Anyone else who can help?
    you do not need teensy_loader_cli when using Arduino IDE, All is build in with Teensyduino.

  10. #10
    For a specific use I need to use the cli.

    Anyone who can help me compiling it? I'm stuck at the mentioned point.

  11. #11
    Senior Member
    Join Date
    Jul 2014
    Posts
    3,156
    Quote Originally Posted by jblaze View Post
    For a specific use I need to use the cli.

    Anyone who can help me compiling it? I'm stuck at the mentioned point.
    I have no mac, so cannot help you directly.
    Nevertheless, It seems you have not setup your Mac for compiling Gcc (toolchain, tool utilities etc.) IMO error listing says to it did not do anything.
    Maybe you post the makefile you are using.

  12. #12
    On my mac everything works. I'm now on windows and use the make file that's included with the windows option uncommented together with winavr.

  13. #13
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    9,034
    Quote Originally Posted by WMXZ View Post
    you do not need teensy_loader_cli when using Arduino IDE, All is build in with Teensyduino.
    Sorry, I am not a MAC developer, except I do use it as a 2ndary development machine, but all of my work has been to build for or on other boards, like Arduino and remote to linux boards like Odroids or UP or...

    But I can say that you can not use Arduino IDE to build a native app for the MAC, that builds apps that run on the Arduino boards.

    I assume that when you are using the GCC compiler that, it was installed as part of XCode on your MAC? Also are you running the current version of XCode?

    Sorry, but that is about all I know on MAC development.

  14. #14
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    9,034
    Quote Originally Posted by jblaze View Post
    On my mac everything works. I'm now on windows and use the make file that's included with the windows option uncommented together with winavr.
    WinAvr? - Again that is an old version of the GCC stuff to build programs that run on an AVR processor.

    If you wish to build a program that runs on the PC you need a compiler that builds programs to run on the PC, such as VisualStudio.

  15. #15
    Oh I see. Dammit. I will have look. Thanks!

  16. #16
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    24,121
    You should use Arduino with Teensyduino.

    Follow the 3 steps on that page to install. Then run Arduino, select Teensy in the Tools > Boards menu. Open an example, like File > Examples > 01.Basics > Blink. Then click Upload to program it onto your Teensy.

    Easy!

    If you're an absolute novice, the absolute last thing you ought to be doing is fiddling with all this complex toolchain stuff. Just use Arduino. It works. Even if you have some artificial requirement to not use Arduino (eg, an academic project), at least do yourself a favor and use it to just get started. At least get things working the easy Arduino way before you jump down this very deep rabbit hole.

  17. #17
    With teensiduino everything runs fine. Thank you guys.

    But now I need to have a look at the cli.

  18. #18
    Senior Member
    Join Date
    Jul 2014
    Posts
    3,156
    Quote Originally Posted by KurtE View Post
    Sorry, I am not a MAC developer, except I do use it as a 2ndary development machine, but all of my work has been to build for or on other boards, like Arduino and remote to linux boards like Odroids or UP or...

    But I can say that you can not use Arduino IDE to build a native app for the MAC, that builds apps that run on the Arduino boards.

    I assume that when you are using the GCC compiler that, it was installed as part of XCode on your MAC? Also are you running the current version of XCode?

    Sorry, but that is about all I know on MAC development.
    I meant You don't need to build the command line loader to down load hex files (OK, I misread the OP), not to use Arduino as a tool to build applications for PC/MAC/LINUX/OSF/VAX.
    Having said that and to launch weird ideas:
    add a specific toolchain to ARDUINO, adapt the platform, why not, you could build applications for any platform.

  19. #19
    I was able to compile it. Installed MingW and ran this command: mingw32-gcc.exe -O2 -Wall -s -DUSE_WIN32 -o teensy_loader_cli.exe teensy_loader_cli.c -lhid -lsetupapi

    Unfortunatly Teens 3.2 is not supported for windows CLI. Is there a specific reason? Anything planned in the near future?

  20. #20
    Senior Member
    Join Date
    Jul 2014
    Posts
    3,156
    Quote Originally Posted by jblaze View Post
    I was able to compile it. Installed MingW and ran this command: mingw32-gcc.exe -O2 -Wall -s -DUSE_WIN32 -o teensy_loader_cli.exe teensy_loader_cli.c -lhid -lsetupapi

    Unfortunatly Teens 3.2 is not supported for windows CLI. Is there a specific reason? Anything planned in the near future?
    something like this: https://github.com/WMXZ-EU/teensy_loader_cli ?

    Note windows is difficult to guarantee downloading success. So understanding MS driver philosophy is key, and I'm not an expert at all. I got it working for me, but it may not work for others.

  21. #21
    Thank you, I will have a look.

Posting Permissions

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