Arduino Pro Micro support in IDE 2.0

I'm considering to use the Pro MIcro as a drop-in for Teensy 2.0. It uses the same 32U4 MCU with embedded USB interface and has a somewhat larger foortprint than Teensy.

When I select the Pro Micro/Mini in the board selection Menu, it only shows the 328P variants in the Processor secion. An oversight?

image

PS: when I compile the sketch for a Leonardo board (uses the same 32U4 MCU as the Pro Micro board) I get the following result:

Sketch uses 4606 bytes (16%) of program storage space.
Global variables use 172 bytes (6%) of dynamic memory,

When I complie the same sketch for the Pro Mini/Micro board (currently only supports 328P MCU)
the code is A LOT smaller while I would expect the code to be more or less the same as both MCU's have the same features (the 32U4 has a bit more RAM, but that shouldn't make much difference)?

*Sketch uses 1540 bytes (5%) of program storage space. *
Global variables use 32 bytes (1%) of dynamic memory

2 Questions:
1 - Why so much difference? Code for a 328P MCU is about 3x the size compared to 32U4 MCU.
2 - Any plans to include the 32U4 MCU for the Pro Micro?

I did the same test using the 1.8.19 IDE. Results:
Leonardo: De schets gebruikt 4606 bytes (16%) programma-opslagruimte. Maximum is 28672 bytes.
Pro Micro/Mini: 1540 bytes (5%) programma-opslagruimte. Maximum is 30720 bytes
Teensy 2.0 (same MCU as Leonardo): 3534 bytes (10%) programma-opslagruimte. Maximum is 32256 bytes.

The larger maximum for Teensy vs. Leonardo is probably explained by the fact that Teensy uses a much smaller boot loader? But that would not explain why the code is 1K larger than on a Teensy.

No. You have selected the "Arduino Pro or Pro Mini" board from the Tools > Board menu. This board selection is for use with the Arduino Pro and Pro Mini boards.

The Pro Micro is a completely different board and can't be used with that menu selection. SparkFun distributed their own "SparkFun AVR Boards platform with a "Pro Micro" board definition. Alternatively, you can select Tools > Board > Arduino AVR Boards > Arduino Micro. That is intended for use with the Micro board, but will also work with the Pro Micro in a pinch.

I'm confused by the contradiction between this claim and the screenshot. The screenshot you shared shows that the ATmega168 variants are also listed.

ATmega32U4 has a significant extra feature, which is the native USB capability. This is also the reason for the increased memory usage. Your Arduino sketch program includes an entire USB stack to allow it to communicate with the computer over the CDC serial port. The ATmega328P does not have have native USB capability, so it instead uses a separate USB to serial interface. So when you compile a sketch for an ATmega328P-based board, the program does not include the USB stack.

Already done. You can learn how to use the Pro Micro here:

https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide

1 Like

Thanks for this clarification.

I wasn't interested in the 168 version. Sorry for my ignorance.

Now all the different code sizes make sense.

Thank you.

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

The Pro Micro is a very nice little board.

Regards,
Per

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