Computing stuff tied to the physical world

How to upload over FTDI

Uploading to the Tinker Pico requires two things:

  1. a suitable FTDI interface adapter
  2. a software tool to perform the upload

The FTDI interface adapter plugs into USB on one side and has 6 female pins on the other, matching the layout on the Tinker Pico: (DTR,RX,TX,5V,RTS,GND). See this earlier page for a good overview of what this FTDI interface is about, and how ARM re-flashing works.

Note that this way of connecting FTDI is slightly different from what is usually done with some AVR-based boards such as JeeNodes and Arduinos. The difference is pin 2, which is “RTS” (Request To Send, an output) instead of “CTS” (Clear To Send, an input). The good news is that this modified connection is still compatible with (and usable for) AVR uploads.

By pulling RTS low while forcing a hardware reset through DTR, the attached board and µC can be forced to enter its re-flashing code (which is baked into ROM in just about every ARM µC). Leaving it high while pulsing DTR low will perform a normal reset, and cause the uploaded software to start. This trick avoids having to press a button for each upload.

Here’s a Tinker Pico with a new FTDI board (both as prototypes) that has the right wiring:

DSC 5155

Another way to accomplish the same thing, is to modify a USB BUB II, also available from JeeLabs, as described in this article. Here’s the result of this hack:

DSC 4814

(there’s a tiny jumper across C4, and the thin blue wire has been added)

There are several other options to accomplish the same thing: you could modify another FTDI type interface you already own, or even build an ESP-Link, which works over WiFi. Each of these share the same approach: a serial RX/TX connection, with DTR and RTS output pins to control the process of resetting / uploading an attached Tinker Pico µC.

The second step is to get a copy of the “uploader” tool from the Embello repository on GitHub. The easiest way is probably to download a binary release from this page. If you prefer to build this tool yourself, you’ll need the Go programming language environment (see also this README), and then simply type this one-liner to grab the code and build it:

    go get -u git.jeelabs.org/jcw/embello/tools/uploader

For a few quick examples of how to upload software to the Tinker Pico using this tool, see this README. In the simplest case, all you’ll need to do is something like this:

    uploader /dev/ttyUSB0 firmware.bin

A more detailed example can be found in this article, and if you’d like to upload remotely (say from laptop => Raspberry Pi => FTDI interface), then this info should get you going.

That’s it. We’re all set to try out some test code and see it run on the Tinker Pico!

[Back to article index]