Arduino IDE v2.3.2 not recognizing AVRISP MKII

Hello,
I'm starting with the Arduino platform on MacOS/M processor, moving from Atmel Studio on Windows. My plan is to use official Arduino boards to test software due to its ease of use, quick testing ability, and easy to use serial monitor. Then flash the device with bare-metal Atmel micros programmed via ISP probably using AVRDUDE to allow fuse programming.

MacOS 14.7
MacBookPro M2Pro
Atmel AVRISP MKII via USB, unit works in Atmel Studio 6 on Windows.

I've read multiple forum posts, read articles, and watched videos, and they all say that on MacOS the AVRISP MKII should "just work". The IDE should recognize it when I plug it in and allow it as a board selection.
Some of the videos with MacOS/Arduino IDE show the AVRISP in the list of selectable boards.

In the IDE when starting a sketch I'm unable to select the AVRISP MKII. When I attempt to "select board" it's not available, using Tools/Board or Tools/Port it does not show up, and it's not available to install under Boards Manager. System Information/USB shows it has enumerated and displays the following -

AVRISP mkII:
Product ID: 0x2104
Vendor ID: 0x03eb (Atmel Corporation)
Version: 2.00
Serial Number: FFFFFFFFFFFF
Speed: Up to 12 Mb/s
Manufacturer: ATMEL
Location ID: 0x02100000 / 1
Current Available (mA): 500
Extra Operating Current (mA): 0

I'm guessing I don't have to install a serial driver for two reasons - First, folks say it will be recognized under MacOS natively after the IDE installation. Second, it's supposedly a usb not a serial device.

What am I doing wrong? Is someone able to give some advice?
Thanks,
SBA

This is incorrect. If you really did see a forum post, article, or video that claimed that, it was wrong.

The AVRISP mkII is not a board so it would be silly for it to be available as a board selection.

I think that you need to look more carefully. You surely instead saw it in the Tools > Programmer menu, where it belongs.

Select the target board from Arduino IDE's Tools > Board menu, then select Tools > Programmer > AVRISP mkII from the Arduino IDE menus.

After doing that, and connecting the AVRISP mkII to the target board's ISP header, you can flash the compiled sketch binary to the board by selecting Sketch > Upload Using Programmer from the Arduino IDE menus. However, during your development and testing work, I recommend you just upload to the target board normally rather than doing the "Upload Using Programmer". This will be more convenient since you can use the same connection between the board and computer for uploading as you are using for communication with the Arduino IDE Serial Monitor.


:exclamation: When you do an "Upload Using Programmer", the bootloader on the target board is erased. After that, you won't be able to upload to the board normally. For this reason, when you want to switch back to doing normal uploads at some point after performing an "Upload Using Programmer" operation, you must first perform a "Burn Bootloader" operation to replace the bootloader on the target board.


Hello ptillisch,
Thank you for the response. It appears I'm confused by nomenclature and procedures, I appreciate your information.

Doing as you suggested in the IDE I arbitrarily selected an Arduino Nano (an Arduino board is not here at the studio to test with) and at that point the "Programmer" option appeared in the IDE. I was able to select the AVRISP and did a test "Upload using Programmer" (without a target attached) and received the expected errors in the output window of no target attached.

I plan on using Arduino boards to prototype and test code then program bare AVRs on my pcbs for the product, obviously using the same clock speed as the Arduino board. I anticipate having to use AVRDUDE in cli in order to program AVR fuses.
If I understand the compiler correctly the board selection defines the target chip and its chip-specific compilation.

This brings up my next two questions in my attempt to transition to Arduino IDE.

A - In order to compile and upload correctly I -think- I need to select and use an Arduino board model that has my specific eventual target chip, is that accurate? If that's accurate then I need to choose AVRs that are already on Arduino boards as I understand it.

B - Is there a way in Arduino IDE to define a target chip for compilation and upload that is NOT on an Arduino board or are those the only options?

Thank you again for your assistance.
Sincerely,
SBA

Great news!

That is correct.

It also defines appropriate fuses for the board. The fuses are programmed on the target board when you select Tools > Burn Bootloader from the Arduino IDE menus, so you can use that approach to program the fuses instead of using AVRDUDE directly if you like.

Yes.

Correct.

You can add support for additional microcontrollers or boards to Arduino IDE by creating an Arduino boards platform for that target:

https://arduino.github.io/arduino-cli/latest/platform-specification/

But before starting on such an endeavor, make sure to do a search for existing boards platforms. In addition to the official platforms provided by the Arduino company, the Arduino community has created many more platforms that provide Arduino support for a large number of microcontrollers and platforms. Since you are interested in AVR, definitely check out these excellent platforms, which provide support for most of the AVR microcontrollers:

Hello ptillisch,

That's a lot of good information. I will eventually migrate from AVR to a more powerful family such as ESP32 or something, and am now attempting to build a knowledge base for that eventually using a Mac. For the moment I'm attempting to migrate from Atmel Studio on Win to something on Mac, the Arduino platform offers some nice higher-level functions than what I'm used to in C and assembly.

I appreciate your assistance. With the additional board packages you mentioned I'm probably covered for whatever I may do although the learning will be steep.

I'm sure I'll have more questions eventually but thank you in the interim.
Sincerely,
SBA

You are welcome. I'm glad if I was able to be of assistance.

Regards, Per

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.