I'm looking for all the code and a wiring diagram needed to reprogram an Arduino Due (sam3x microcontroller) through an ESP8266-12F module. All the code should be uploadable via the Arduino IDE using the standard "Arduino SAM Boards" and "esp8266" ([url removed, login to view]) board libraries.
I'm not interested in a pretty esp8266 app since I already have solutions for that. Just hardcode the ssid and network password. The deliverable would be an app that lets the ESP8266 download a .hex file for the Due over wifi, stores it to the esp SPIFFs (flash memory), and then reprograms the Due with that file.
Here are some pointers on things I found helpful in my research:
* This explains how the Arduino Due bootloader works [url removed, login to view] What I think you want to do is emulate what the ATMEGA16U2 chip is doing except with the esp8266 acting as that link via serial.
* Here is one other thing that might be helpful about remote updates: [url removed, login to view]
So I think most or all of the code exists. It's mainly you just putting all the pieces together and making a proof of concept that works. If you can find a complete solution to this online feel free to test it and as long as it works I don't care if you write it or not. It just has to be open source for commercial use.
There is also a bonus (and preference in selecting) anyone who can make this work with an arbitrary uart on the sam3x. The default bootloader for sam3x (SAM-BA)is stored in the sam3x ROM. One limitation of the built in ROM bootloader is it can only use RX/TX0 or USB. So I suspect to use an arbitrary uart you'd need to make a bootloader which should include all the functionality of the SAM-BA plus the option to use different uarts. However, if you find a different way to make this work that's great. One possibility would be to download the app in bank1 flash on sam3x and then switch the boot register to use that bank, but I don't know how the details of this would be done so I'm not sure it would work.