Upload code to ATMEGA64 using JtagICE MKII on custom board

Yes, since the used upload program avrdude supports the JtagIce MKII (source), and PlatformIO is fully configurable, you should be able to upload the code to the MCU through this programmer (using the ICSP/SPI connections of your ATMega64).

One can also use avarice to setup debugging, though this curently requires you to obtain and compile avarice yourself.

As a first step, you should use the platformio.ini

[env:ATmega64]
platform = atmelavr
board = ATmega64
framework = arduino
upload_protocol = custom
upload_flags =
    -C
    ${platformio.packages_dir}/tool-avrdude/avrdude.conf
    -p
    $BOARD_MCU
    -c
    jtag2isp
upload_command = avrdude $UPLOAD_FLAGS -U flash:w:$SOURCE:i

and we’ll see how it goes from there when you try to upload.

1 Like