AVRdude hooks for dreg

Here’s some overview of the current binary IO mode and where to tie in things for AVRdude.

in mode/binio.c the main loop script_mode() is basically straight out of Bus Pirate v3 branch.

 else if (inByte == 0b1111) 
            {//return to terminal

This is where the info screen output needs to be replicated for compatibility, if it is still needed. The reset to terminal command. It can’t reset to terminal though because that’s on a different COM port interface.

One thing to note: We have to use the USB buffers instead of a direct UART, so use the getRXbyte and bin_tx_fifo_put to read/write bytes.

In mode/binspi.c

#ifdef AVR_EXTENDED_COMMANDS
                    case 6: // AVR Extended Commands
                        UART1TX(1); // send 1/OK (ie, AVR Extended Commands accepted)

I’m sure you recognize this one in SPI.

Ok, here it gets dicey. I noticed that I have various work over several different branches. This binspi.c hasn’t been ported yet. The binIOhelpers file for read/write is on the GusmanB logic analyzer branch. It’s kind of all over.

I tried to pull it all together, but I need take a few hours to do that tomorrow morning. I’ll follow up when I push that.

4 Likes