Individual Teensy loader

Status
Not open for further replies.

jblaze

Well-known member
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
 
I would like to but a simple compile of the original source fails (MAC OSX)

Code:
[B]gcc -o teensyload teensy_loader_cli.c [/B]
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:
[B]make[/B]
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:
[B]gcc -O2 -Wall -s -DUSE_WIN32 -o teensy_loader_cli.exe teensy_loader_cli.c -lhid -lsetupapi[/B]
teensy_loader_cli.c:358:10: fatal error: 'windows.h' file not found
#include <windows.h>
         ^
1 error generated.
 
Last edited:
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.
 
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:
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?
 
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.
 
For a specific use I need to use the cli.

Anyone who can help me compiling it? I'm stuck at the mentioned point.
 
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.
 
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.
 
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.
 
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.
 
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.
 
With teensiduino everything runs fine. Thank you guys.

But now I need to have a look at the cli.
 
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.
 
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?
 
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.
 
Status
Not open for further replies.
Back
Top