TeensyTransfer

Frank B,
I've been struggling to get the teensytransfer tool working. I've read through the posts here and have tried many things. I have both a Windows 10 computer and a MacBook Air which I have tried and get the same error.

Here's the output I receive...

teensytransfer -i teensy
Model : Teensy 3.1/3.2 (MK20DX256)
Serial: 2341500
MAC : 04:E9:E5:03:92:A6
EEPROM: 2048 Bytes
F_CPU : 72000000 Hz
F_PLL : 72000000 Hz
F_BUS : 36000000 Hz
F_MEM : 24000000 Hz

teensytransfer -i serflash
ID : 00 00 00
Serial: 00 00 00 00 00 00 00 00
Size : 0 Bytes

teensytransfer -i
ID : 00 00 00
Serial: 00 00 00 00 00 00 00 00
Size : 0 Bytes

teensytransfer -w poweron1.wav
...................teensytransfer: Communication error

teensytransfer -l
{produces no output}

I compiled the teensytransfertool.ino project after uncommenting all the Serial.println and Serial.printf commands and I receive the following output in the serial monitor when I attempt to write a file to the serflash of the Prop Shield...

Filename:poweron1.wav
unable to create file.
List
Error

Any ideas what I should do next to get this working?

Regards,
Ken
 
Do you have the latest version of teensytransfer? What version of Arduino and Teensyduino are you using? Do you have a propshield, if not what kind of device is your T3.2 connected to ? With propshield "teensytransfer -i" should give you non-zero ID, Serial, Size -- you have 0's so it's not connected ??

You can test the propshield SPI serial flash with examples from https://github.com/PaulStoffregen/SerialFlash
EraseEverything
RawHardwareTest
 
Last edited:
Please try the SerialFlash-examples first. Do they work ? TeensyTransfer needs and uses this lib.
It's needed to erase the whole chip first (with TeensyTransfer, too) , before any to attempt to write it.
 
Please try the SerialFlash-examples first. Do they work ? TeensyTransfer needs and uses this lib.
It's needed to erase the whole chip first (with TeensyTransfer, too) , before any to attempt to write it.

Looks like the SerialFlash on my Prop Shield might not be working (see below output from "RawHardwareTest.ino").

Raw SerialFlash Hardware Test

Read Chip Identification:
JEDEC ID: 0 0 0
Part Nummber: (unknown chip)
Memory Size: 0 bytes

Tests Failed :{

The flash chip may be left in an improper state.
You might need to power cycle to return to normal.


I am working to re-check all my connections now. Hopefully this is not a permanent issue with the Prop Shield.

Thanks,
Ken
 
and you need to run EraseEverything before doing the first file IO, though i think RawHardwareTest should report non zero ID even though EraseEverything has not been run first ...

how is your propshield attached to T3.2? maybe a photo? it can't just sit on header pins, it needs to be soldered
 
Last edited:
manitou and dfragster,
Thanks for both responding to my post and providing your feedback. Apparently I had a bad solder connection for the MISO, MOSI and SCK pins between my Teensy and Prop Shield (even though the visually looked perfect). I resoldered these connections and everything is working now. I was able to run the EraseEverything and the RawHardwareTest samples. Now I'm able to run the TeensyTransfer without an issue and my transferred files are working.

Thanks again.

Regards,
Ken
 
Thanks

Is the flash erased ? If not, do it first:

Code:
teensytransfer -e

To be sure to have a working sketch on the teensy, use the pre-compiled hex-file, please. This is known to work.
If it - still - not works, there's a strange problem with your hardware.
i.e. ... Is the shield soldered to the teensy ? If not, solder it. It does not work without..

Yeah! It now works, I've bought a new solder with smaller head and performed a new soldering session. Everything works fine! Thanks!!!!
 
I'm on Ubuntu and I've enabled "Raw HID" mode in the Arduino IDE.

After downloading your repo into my arduinosketches folder, I try and compile it and get the following error.

Code:
/home/<username>/teensy/arduinosketches/TeensyTransfer/examples/teensytransfertool/teensytransfertool.ino:8:28: fatal error: TeensyTransfer.h: No such file or directory
compilation terminated.
Error compiling for board Teensy 3.2 / 3.1.

Any ideas? This is before extracting/executing the .gz executable in the extras folder.
 
Last edited:
Thank you, that worked!! I got it to compile, the Teensy appears to be running it, but when I try to execute the contents of the .gz archive, the terminal gives me this:

Code:
no such file or directory: ./teensytransfer

I've tried sudo-ing, I've tried running it from different directories, I've tried running it in the finder--no luck.
 
on ubuntu, you just do gunzip teensytransfer.gz then chmod +x teensytransfer then ./teensytransfer
 
I've done those things already, but tried them again, and got "no such file or directory" again.

Edit: Also, I'm not sure if/how much this changes the process, but I'm using a prop shield with the Teensy.
 
Last edited:
Thank you, that worked!! I got it to compile, the Teensy appears to be running it, but when I try to execute the contents of the .gz archive, the terminal gives me this:

Code:
no such file or directory: ./teensytransfer

I've tried sudo-ing, I've tried running it from different directories, I've tried running it in the finder--no luck.

This is a sign that teensytransfer is wanting to use a shared library that is not installed on your system. If you do the following at a shell prompt:

Code:
ldd ./teensytransfer

It tell you the libraries that it is using, and those that it can't find.

For reference, this is the output of ldd on my Fedora 24 system:

Code:
--> ldd ./teensytransfer.exe 
        linux-gate.so.1 (0xf77b4000)
        libusb-0.1.so.4 => /lib/libusb-0.1.so.4 (0xf7770000)
        libc.so.6 => /lib/libc.so.6 (0xf75a2000)
        libusb-1.0.so.0 => /lib/libusb-1.0.so.0 (0xf7588000)
        /lib/ld-linux.so.2 (0xf77b6000)
        libudev.so.1 => /lib/libudev.so.1 (0xf7567000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xf754a000)
        libselinux.so.1 => /lib/libselinux.so.1 (0xf7523000)
        libcap.so.2 => /lib/libcap.so.2 (0xf751d000)
        librt.so.1 => /lib/librt.so.1 (0xf7514000)
        libm.so.6 => /lib/libm.so.6 (0xf74be000)
        libresolv.so.2 => /lib/libresolv.so.2 (0xf74a3000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xf7484000)
        libpcre.so.1 => /lib/libpcre.so.1 (0xf740e000)
        libdl.so.2 => /lib/libdl.so.2 (0xf7409000)
        libattr.so.1 => /lib/libattr.so.1 (0xf7403000)

Note, the teensytransfer that I have on my system is compiled for 32-bit mode. IIRC, newer systems are not installing the 32-bit libraries by default any more (and a few no longer provide the libraries at all). It may be your Ubuntu system doesn't have the 32-bit libraries installed.
 
Thank you very much! It gave me some "dynamic executable" error but eventually I got it running! Thanks both of you for answering stupid questions! I do kind of think it should say in the original post/readme to clone the repo in your sketchbook/libraries folder.
 
Alright, I'm getting a communication error only when I try writing things to the prop shield. I have erased the chip; -l and -i don't give me communication errors. And after I get a communication error I have to unplug it and plug it back in to fix the connection. Any ideas?
 
Alright, I'm getting a communication error only when I try writing things to the prop shield. I have erased the chip; -l and -i don't give me communication errors. And after I get a communication error I have to unplug it and plug it back in to fix the connection. Any ideas?

I recall having similar issues a year or so ago. They went away when I used the binaries Frank B provided and the hex files for the appropriate target. Note, I tend to use the 3.2 on a prop shield. I don't recall any further details.
 
I'm also using a 3.2 with a prop shield. I've tried loading both the T32 hex files (straight from the Teensy connection pop-up, right?) and get the same result. What binaries are you referring to?
 
I'm also using a 3.2 with a prop shield. I've tried loading both the T32 hex files (straight from the Teensy connection pop-up, right?) and get the same result. What binaries are you referring to?

In the github extras directory:

There are 3 zip/gzip files:

  • teensytransfer.gz -- Linux binary gzipped
  • teensytransfer.mac.zip -- MAC binary zipped
  • teensytransfer.zip -- Windows binary zipped

In theory you should be able to download the appropriate file for your operating system, unzip it, arrange to make it executable (chmod +x on Linux), and you should be able to run it. The Linux binary is 32-bit, so you need to make sure that the 32-bit libraries are loaded on the system before it will run.

Or you can try and build it on your system. The source is in:
 
The binaries appear to be written for Mac OS and there's no configure.sh in the source folder, so I'm afraid we're stuck with the executable, which seemed to work anyway.

The closest (or farthest) I've gotten is a version conflict error, but I can't seem to duplicate that.
 
I think it may be a hardware issue, so I'm still playing around with that. Currently when I do -e it is giving me ....... for days, should I just wait it out?

MichaelMeissner, do you remember if you changed the pins in the code? According to the pinout, SCK is pin 13 and MOSI is pin 11, so I tried changing those in the default .ino.
 
I think it may be a hardware issue, so I'm still playing around with that. Currently when I do -e it is giving me ....... for days, should I just wait it out?

MichaelMeissner, do you remember if you changed the pins in the code? According to the pinout, SCK is pin 13 and MOSI is pin 11, so I tried changing those in the default .ino.

There are two hex files for the 3.2:
  • T32_teensytransfertool_with_SerFlash_CSPIN6.ino.hex -- this is the one I use for the Prop Shield. It uses SCK = pin 13, MOSI = pin 11, and CS pin 6 (which is what the prop shield uses);
  • T32_AUDIO_teensytransfertool_with_SerFlash_CSPIN6.ino.hex -- This is used for the Audio Shield. It uses SCK = pin 14, MOSI = pin 7, and CS = pin 6, which is what the audio shield uses (pins 13 and 11 are used for I2S, so the audio shield uses the alternate pins).

I recall that originally I had problems with the TeensyTransfer process, and the git repository mentions slowing down the clock speed.

However, I was curious. So I got one of my Teensy 3.2's that has the prop shield (with motion sensor) soldered onto the Teensy. I went to the TeensyTransfer example (TeensyTransfer/examples/teensytransfertool/teensytransfertool.ino), changed the USB type to RAW, set the clock speed to 24Mhz, built it and downloaded it to the Teensy.

I then went into the TeensyTransfer/extras/source directory and rebuilt teensytransfer with:
Code:
$ make OS=LINUX

Using the new executable, I was able to format the flash, download 4 .RAW files, and do a list (last year it would typically die in the first transfer).

Once that was successful, I then went back to the Teensy IDE, and changed the speed to the normal 96 Mhz, and re-did the download to the Teensy, and I was able to use the new executable to once again to transfer to the Teensy.

Note, I use 1.40 of the Teensy software and 1.8.5 of the Arduino software. Also, if I'm running teensytransfer the first auto download fails, but the loader tries again, and it works the second time.

So, you might try rebuilding the Teensy transfer tool on your Linux system.

Just in case, be sure to use git clone (or svn checkout) to get a recent version of the sources.

<edit>
I re-read the whole thread, and looked at my previous replies (#71, 75, 77, 89, 90). The things I complained about then seem to be fixed. Just to be sure, I bumped the Teensy clock speed to 120Mhz, and re-downloaed the sketch, and it still seems to work.
 
Last edited:
Thanks so much for tinkering around getting back to me!! I really appreciate it. I went into /source and tried to rebuild with the above command, and got the following errors:

Code:
  $ make OS=LINUX
gcc -Wall -O2 -DOS_LINUX   -c -o teensytransfer.o teensytransfer.c
gcc -Wall -O2 -DOS_LINUX -c -o hid.o hid_LINUX.c
hid_LINUX.c:34:17: fatal error: usb.h: No such file or directory
compilation terminated.
Makefile:63: recipe for target 'hid.o' failed
make: *** [hid.o] Error 1

Any idea what that means?
 
Thanks so much for tinkering around getting back to me!! I really appreciate it. I went into /source and tried to rebuild with the above command, and got the following errors:

Code:
  $ make OS=LINUX
gcc -Wall -O2 -DOS_LINUX   -c -o teensytransfer.o teensytransfer.c
gcc -Wall -O2 -DOS_LINUX -c -o hid.o hid_LINUX.c
hid_LINUX.c:34:17: fatal error: usb.h: No such file or directory
compilation terminated.
Makefile:63: recipe for target 'hid.o' failed
make: *** [hid.o] Error 1

Any idea what that means?

On my Fedora system, usb.h comes from the libusb-devel package. So you would need to install that package (and likely it will need libusb as well).
 
Back
Top