Use a Raspberry Pi Zero as a host to do In-Circuit Serial Programming of AVR’s. IOFF buffers are used to level convert to the targets voltage. It also allows the serial port to be used for serial bootload and has some switches to control looping of the upload.
Linux icsp1 4.14.98+ #1200 Tue Feb 12 20:11:02 GMT 2019 armv6l
RTS and CTS handshake is only valid with uart0, so I need to use the Alt0 pin functions. Unfortunately, raspi-config cannot change the config file at this time.
dtoverlay=pi3-disable-bt
# Alt0 pin function
dtoverlay=uart0,pin_func=4
# raspi-config can set enable_uart
enable_uart=1
As the R-Pi Zero W boots up the D1 green LED is dimly lit. Once the overlay is applied D1 turns off, the R-Pi pin has 1.6V at power on and does sink some current. It is acceptable for this application, but that is not how the AVR's or PIC's that I have used power up.
I did a script so that I can push the bootload button (S1) and run the make bootload rule. I run that script after setting the working folder to the location with the make rule (e.g., change directory to the folder with Makefile).
Next I have a bootload rule in the RPUno i2c-debug application's Makefile.
Those should not be zeros. I connected the R-Pi to node MIS0 (note the zero) and the buffer to MISO. After some rework it is passing the loopback test.
spi mode: 0
bits per word: 8
max speed: 500000 Hz (500 KHz)
FF FF FF FF FF FF
40 00 00 00 00 95
FF FF FF FF FF FF
FF FF FF FF FF FF
FF FF FF FF FF FF
DE AD BE EF BA AD
F0 0D
Next I have added a linuxspi rule in the RPUpi Remote application's Makefile. I used sudo because of an issue with permissions.