NanoFlashProg
Overview

The NanoFlashProg is an Flash programmer using Arduino Nano.
Currently supported chips are:
- Winbond 25Q128FV
This has been particularly designed to flash uboot bootloader on SPI Flash chips.
Hardware
The NanoFlashProg shield fit on an Arduino Nano. The full kit has:
- Mini USB port for serial comm.
- 8 pin connector for connection with socket programmer.
Sketch
Software
A terminal emulator is required to communicate with the programmer. We recommend Cutecom. HyperTerminal or similar will also work as long as the emulator is able to send a file.
Usage
Connect to the programmer using settings 115200 8N1.
On connection the programmer will introduce itself and offer a prompt.
NanoFlashProg v1.0.0 Type h for help >
Pressing h and enter will show the help.
> h R - Read page D - Dump page W - Write File I - Chip Info E - Chip Erase H - Help >
Flashing Uboot
We recommend downloading uboot from pepe2k repository. Github link.
You must erase the chip before flashing uboot. At the prompt type e and enter. Then answer y to confirm (or anything else to cancel). This will take around 6 seconds to complete.
> e Erase Entire Chip? (y/n): y Erasing chip. >
Then issue the w command to write a file. The prompt will be waiting for a file. In Cutecom click on Send File. Then select the uboot file downloaded previously.
> w > Waiting for a file. Writing page 0 Writing page 1 Writing page 2 ... Writing page 491 Timeout. >
Once the file has been entirely written to the chip it will timeout and return to the prompt.
You can now check the data in the chip by dumping the first page (a page is 256 bytes). Type d and 1 as for one page.
> d How many pages? 1 100000ff00000000100000fd000000001000017500000000100001730000 000010000171000000001000016f000000001000016d000000001000016b 000000001000016900000000100001670000000010000165000000001000 01630000000010000161000000001000015f000000001000015d00000000 1000015b0000000010000159000000001000015700000000100001550000 0000100001530000000010000151000000001000014f000000001000014d 000000001000014b00000000100001490000000010000147000000001000 014500000000100001430000000010000141000000001000013f00000000 1000013d000000001000013b00000000 >
If you are on a Linux computer you can use the xxd command to make sure this is the same as the uboot file. Issue the following command on your computer.
xxd -ps u-boot_mod__tp-link_tl-wr703n_v1__20180223__git_master-7a540a78.bin | head
Replace the filename as appropriate.