Forum Rule: Always post complete source code & details to reproduce any issue!
Page 5 of 6 FirstFirst ... 3 4 5 6 LastLast
Results 101 to 125 of 128

Thread: TeensyTransfer

  1. #101
    Junior Member
    Join Date
    May 2017
    Posts
    3
    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...

    Filenameoweron1.wav
    unable to create file.
    List
    Error

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

    Regards,
    Ken

  2. #102
    Senior Member manitou's Avatar
    Join Date
    Jan 2013
    Posts
    1,265
    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 by manitou; 05-28-2017 at 11:21 PM.

  3. #103
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    4,347
    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.

  4. #104
    Junior Member
    Join Date
    May 2017
    Posts
    3
    Quote Originally Posted by Frank B View Post
    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

  5. #105
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    5,177
    As noted in that Raw Hardware Test:
    // The chip should be fully erased before running this test.
    // Use the EraseEverything to do a (slow) full chip erase.
    Does that work?

  6. #106
    Senior Member manitou's Avatar
    Join Date
    Jan 2013
    Posts
    1,265
    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 by manitou; 05-29-2017 at 02:00 AM.

  7. #107
    Junior Member
    Join Date
    May 2017
    Posts
    3
    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

  8. #108
    Junior Member
    Join Date
    Apr 2017
    Posts
    3

    Thanks

    Quote Originally Posted by Frank B View Post
    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!!!!

  9. #109
    Junior Member
    Join Date
    Dec 2017
    Posts
    11
    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 by zenby; 12-02-2017 at 12:17 AM.

  10. #110
    Senior Member manitou's Avatar
    Join Date
    Jan 2013
    Posts
    1,265
    you need to clone the TeensyTransfer files in to your sketchbook/libraries/ directory

  11. #111
    Junior Member
    Join Date
    Dec 2017
    Posts
    11
    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.

  12. #112
    Senior Member manitou's Avatar
    Join Date
    Jan 2013
    Posts
    1,265
    on ubuntu, you just do gunzip teensytransfer.gz then chmod +x teensytransfer then ./teensytransfer

  13. #113
    Junior Member
    Join Date
    Dec 2017
    Posts
    11
    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 by zenby; 12-03-2017 at 08:55 PM.

  14. #114
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    2,573
    Quote Originally Posted by zenby View Post
    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.

  15. #115
    Junior Member
    Join Date
    Dec 2017
    Posts
    11
    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.

  16. #116
    Junior Member
    Join Date
    Dec 2017
    Posts
    11
    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?

  17. #117
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    2,573
    Quote Originally Posted by zenby View Post
    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.

  18. #118
    Junior Member
    Join Date
    Dec 2017
    Posts
    11
    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?

  19. #119
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    2,573
    Quote Originally Posted by zenby View Post
    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:

  20. #120
    Junior Member
    Join Date
    Dec 2017
    Posts
    11
    Okay that's how I installed it. I'll try building it from source.

  21. #121
    Junior Member
    Join Date
    Dec 2017
    Posts
    11
    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.

  22. #122
    Junior Member
    Join Date
    Dec 2017
    Posts
    11
    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.

  23. #123
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    2,573
    Quote Originally Posted by zenby View Post
    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.he x -- 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 by MichaelMeissner; 12-06-2017 at 04:52 AM.

  24. #124
    Junior Member
    Join Date
    Dec 2017
    Posts
    11
    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?

  25. #125
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    2,573
    Quote Originally Posted by zenby View Post
    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).

Posting Permissions

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