Programming A-Star 328PB with AVRISP mkII?

Hi,
I have just read the “Uploading Using Programmer” from the A-Star User Guide - Section 4.4
However, I would like to use an AVR-ISP-Mk2 (Olimex) - listed as: “AVRISP-mkII” in the Arduino IDE.
How should I add to / modify pololu-a-star package? Add a new programmers.txt file? Containing what?

Best regards, Martin

Hello, Martin.

It sounds like you are trying to program an A-Star 328PB using an AVRISP mkII programmer in the Arduino IDE.

First, you should find the programmers.txt file that comes with the A-Star package. If you are using Windows and installed the A-Star package using the Boards Manager as recommended in our directions, you should be able to find it at a path like the following:

C:/Users/David/AppData/Local/Arduino15/packages/pololu-a-star/hardware/avr/4.0.2/programmers.txt

Next, open that file in a text editor and add these lines to the bottom:

avrispmkiifor328PB.name=AVRISP mkII for Pololu A-Star 328PB
avrispmkiifor328PB.communication=usb
avrispmkiifor328PB.protocol=stk500v2
avrispmkiifor328PB.program.protocol=stk500v2
avrispmkiifor328PB.program.tool=avrdudecustom
avrispmkiifor328PB.program.extra_params=-Pusb

After you save the file, close the Arduino IDE, and then open it again, you should see a new entry in the Programmers menu named “AVRISP mkII for Pololu A-Star 328PB”. Select this programmer. Also, make sure that you select “Pololu A-Star 328PB” in the “Board” menu.

You should now be able to program your A-Star 328PB with the AVRISP mkII using the “Upload using programmer” command. I only tested these instructions partially, so please let me know whether they work for you.

–David

Hi David,

Thank you very much for the prompt reply. And yes, the instructions worked a treat!
My apologies for not mentioning that I was using Linux (openSUSE Leap) and so the only variance to your note was the file location.
Which for me was: ~/.arduino15/packages/pololu-a-star/hardware/avr/4.0.2/programmers.txt.

Regards, Martin