Introduction
This project uses the "Pro Micro" 5V/16MHz development board, based on the ATmega32U4 microcontroller (Arduino Pro Micro or SparkFun Pro Micro variant).
The initial testing was carried out using the Arduino IDE. However, the Arduino IDE and its bootloader β which remains active for only about 8 seconds after reset β caused several issues.
When the bootloader times out and the board switches into normal application mode, the COM port used by the bootloader disappears. As a result, the Arduino IDE loses the connection, making it difficult to achieve a smooth and reliable development cycle.
To resolve these issues and transition to a more professional development environment, the project was ported to Atmel-/Microchip Studio.
Motivation: Why Move Away from the Arduino IDE - and when to keep it?
While the Arduino IDE is excellent for quick prototyping and hobby projects, it has several limitations that can impact serious or professional developments.
Specifically when using the Pro Micro board (5V, ATmega32U4), the following issues were observed:
- The Arduino bootloader only remains active for a few seconds after reset.
If the timing is missed, the COM port disappears, making uploads unreliable. - This behavior leads to an uncomfortable and error-prone development cycle, requiring frequent manual resets and retries.
- Debugging support in the Arduino IDE is extremely limited compared to professional embedded development environments.
Stick to the Arduino IDE, you you like it and are comfortable and familiar with it.
It is still an excellent project. Please do not feel pulled away from things you like!
Several technical motivations led to the decision to switch:
- Familiarity with Visual Studio-based environments:
Microchip Studio is based on Microsoft Visual Studio, a widely known and established IDE.
Its familiarity enables a more productive workflow without a steep learning curve. - Increased flexibility:
Microchip Studio allows full control over project structures, libraries, source files, and directory organization β without being restricted by the Arduino IDEβs simplistic model. - Access to professional IDE features:
Features such as real hardware debugging, advanced build configurations, powerful editing tools, and project management capabilities are standard in Microchip Studio. - Better memory usage:
The Arduino bootloader and core framework introduce overhead and consume flash memory.
By flashing firmware directly to the microcontroller without a bootloader, additional program memory becomes available for application code. - A more professional development environment:
Working within a professional-grade IDE ensures a stable, scalable, and future-proof foundation for embedded projects.
Moreover, relying on external Arduino libraries installed outside the project folder creates risks:
- Changes to the IDE or libraries can unexpectedly break the project,
- Updates to the Arduino platform may cause previously working projects to stop compiling,
- Long-term maintenance becomes difficult.
By migrating to Microchip Studio and maintaining all required files and configurations within the local project repository, the development environment becomes:
- More reliable,
- Fully reproducible,
- Independent of external system changes.
This approach ensures a sustainable and professional workflow for embedded development.
Porting the Project to Microchip Studio Using Arduino Libraries
To retain access to familiar Arduino libraries, a minimal project was first created in the Arduino IDE.
This project was compiled with the correct board settings (Pro Micro 5V/16MHz) and processor settings (ATmega32U4).
By enabling Verbose Output in the Arduino IDE settings (File β Preferences), the following details could be observed:
- Which libraries are integrated,
- Which compiler and linker flags are used.
This information was then used to configure the project within Microchip Studio.
All necessary files and compiler/linker flags were manually transferred.
While compiler and linker flags must be configured separately for the C and C++ compilers, the resulting setup places all required files inside the projectβs local directory.
This eliminates any dependency on external Arduino library installations and improves portability.
Relevant Source Directories
The most important locations where the Arduino core and library files were found include:
makefile
KopierenBearbeiten
C:\Users\JohnDoe\AppData\Local\Arduino15\libraries\
C:\Users\JohnDoe\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino
C:\Users\JohnDoe\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries
C:\Users\JohnDoe\AppData\Local\Arduino15\packages\SparkFun\hardware\avr\1.1.13\variants\promicro
Additional Benefits: Keeping Everything Local
Keeping all project-related files local provides several major advantages, especially in embedded and IoT development:
- IDEs and libraries change over time, risking compatibility issues.
- Older codebases may fail to compile with newer versions of toolchains.
- External dependencies create hidden risks for project stability.
By placing all source code, libraries, and dependencies under version control, projects remain buildable and maintainable even many years later.
It is also advisable to archive backup copies of IDE installers and store any license or registration data alongside project assets.
This approach enhances long-term reproducibility, reduces maintenance risks, and strengthens overall project reliability.
Comparison: Arduino IDE vs Microchip Studio vs Visual Studio Code
| Feature | Arduino IDE | Microchip Studio | Visual Studio Code + Extensions |
|---|---|---|---|
| Native AVR/ATmega toolchain support | |||
| Hardware Debugging (JTAG, DW, etc.) | |||
| Project templates for AVR | |||
| Arduino Library compatibility | |||
| Flashing without bootloader | |||
| Integrated fuses/burn management | |||
| Workflow experience | |||
| Ease of setup for AVR-only projects | |||
| Code and Build Configuration Control | |||
| License / Costs |
Conclusion:
For projects focused on AVR/ATmega development, Microchip Studio provides the most complete, integrated, and professional experience.
It offers seamless support for:
- Real hardware debugging,
- Direct MCU programming (without bootloaders),
- Fuse management,
- And a highly stable environment.
However, for multi-platform development (e.g., ESP32, STM32, RP2040), or where lightweight editors are preferred, Visual Studio Code combined with PlatformIO becomes an attractive option.
Final Conclusion
By porting the project to Microchip Studio, it is now possible to develop and flash firmware directly to the ATmega32U4 microcontroller without relying on the Arduino bootloader.
This approach provides:
- Full control over the microcontroller,
- A faster, more reliable development cycle,
- Access to professional debugging and configuration tools,
- Locally preserved and portable project environments,
- And continued compatibility with familiar Arduino libraries.
For professional or long-term embedded development, this setup offers a robust, sustainable, and highly efficient foundation.