Re: Zephyr flash won't work without usb connection
Curie boards generally flash in one of two ways: over JTAG or over USB. In typical uses, they actually flash over the Curie USB interface (using the USB DFU protocol; via dfu-util). That’s why you need USB connected in order to flash the device. Not sure how easy it is to do JTAG flashing on tinyTILE though, it requires a flyswatter2 or similar device for Arduino 101.
Not 100% sure of this, but you should be able to connect a battery to the VIN/GND holes of the tinyTILE and leave the USB open for flashing. If you intend to use a USB Battery, then you are somewhat stuck; though there might be ways to do OTA updates using the BLE Radio SoC if you are interested in investigating that…
Also note that on boot, there might be a UART flashing mechanism on boot, but I really haven’t done anything with it before and its really an afterthought to the main USB or JTAG mechanisms. It uses the XModem protocol and I think you will likely have to make a script specifically for handling it. But if your needs really merit it, it might be worth the effort. This feature may or may not be there on the default tinyTILE bootloader.
Code for the bootloader(s) that run on tinyTILE (or at least a close version to the one on tinyTILE) can be found here: https://github.com/CurieBSP/bootloader
From: zephyr-devel-bounces@... [mailto:zephyr-devel-bounces@...] On Behalf Of Jie Zhou
Sent: Tuesday, November 14, 2017 3:09 PM
Subject: [Zephyr-devel] Zephyr flash won't work without usb connection
I'm flashing my tinyTILE using DFU over FTDI cable. My computer, that has the zephyr applications, is connected to tinyTILE via a FTDI cable as TX & RX and a usb cable as power to the tinyTILE. It flashes fine; however, when I power the board externally so that my computer and tinyTILE is only connected with the FTDI cable, the application will not flash. I was always under the impression that the usb cable only functions as a power source, but it seems to be more than that. Only when the board is connected both by the FTDI and the USB cable will the zephyr application flash to my board. This means I won't be able to flash my zephyr application using battery power which defeats the purpose an IoT OS. I've tried the same with the arduino 101 board and it still does the same thing (wouldn't flash). I must be missing something. Wondering if anyone knows what I'm doing wrong.