Upload code via TTL/USB adapter
Trying to upload code via a TTL/USB adapter. The connection works, as I can flash the device with new firmware. But I am missing two pieces of the puzzle. 1) what program/method to update the device via USB, I would prefer the FTP-style of approach and 2) the bootloader grounding pin, when to use it and how, the device LED shows all kind of nice colors, but I am not sure of the correct way to do things. I mean should I let the device start, then ground the pin, keep it grounded, or release it, and what about the reset button on the device, should that be pressed also, and if so when?
@p-s Yes I did. I had to use TX and RX and as I recall it and then you must connect P2 to ground. I am feeding my GPY with power and ground from this adapter as well. Works great with Pymakr, does not work with Vscode or Atom -at least with my knowledge
@Don-iot Did you manage to use the Upload function of Pymakr using a TTL/UART USB adapter? If so, which pins did you connect? RX0 and TX0 only?
robert-hh last edited by
@Don-iot The WiFi problem could by caused by pybytes, which uses WiFi for its own purpose. You can stop Pybytes with the commands:
After reboot you can use WiFi as documented.
In rshell, the Pycom board files are listed on the path /pyboard/flash
Then you can use the commands listed under help to access these.
Thanks so much @robert-hh for your help, highly appreciated! Your explanation of the LED is spot on what I have seen, good to know why the color changes.
The built in FTP-server would be an easy way that even I could understand, but for some odd reason the two GPys I have laying around are not firing up the built in wifi after I completely erased the devices with Pycom Firmware Update. So I turned to rshell and it sort of works, I mean I can access the device but my knowledge of how to basically clone a folder onto the devices /flash folder halts a bit. Can not find the right set of commands. So my third attempt was to try Virtual Studio Code and upload the files the "regular" way that I am used to but VScode, on my mac, does not find the Pycom via the serial adapter, even though rshell and Pycom Firmware Update does.
Searching for PyCom boards on serial... No PyCom boards found on USB
So I guess it needs some magic to work, but I simply do not know how to upload the files. Any ideas are extremely welcome, thanks in advance!
robert-hh last edited by
@Don-iot The bootloader pin is sampled at reset. To get into bootloader mode, tie that pin to GND and push reset. You can keep it there as long as you upload the firmware. But for a regular start it has to be removed.
Since the LED data port is also connected to that pin "P2", it will flash since it sees the pin level bumping as data. Just ignore that.
For uploading scripts to the device you can indeed use WiFi and ftp. Filezilla is a convenient ftp client. Besides PyMakr there are many other IDE's and command line tools to exchange data. Comabd line tools are for instance rshell, or pyboard.py from the micropython.org web site.