Ftdi upload fails with error : (22, 'Invalid argument')

And just as a summary post that encapsulates the answers better:

  • If doing a regular serial upload, no need to change the upload_protocol, the default arduino value for it (which gets passed onto avrdude) already does that
  • chips must have the correct bootloader burned into them to be programmable via the serial interface
  • bootloader must be programmed via an ISP capable programmer, e.g., an USB TinyASP. The upload_protocol must be changed in accordance to the documentation and the used programmer.
  • special care must be taken to select the right board = ... for the given hardware, e.g., with resepect to the used crystal speed (8MHz vs 16MHz)
1 Like