Developing Arduino Projects with Microchip Studio (Without the Bootloader)

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 :white_check_mark: Built-in (simple) :white_check_mark: Built-in (professional) :right_arrow: Requires additional setup (e.g., PlatformIO)
Hardware Debugging (JTAG, DW, etc.) :cross_mark: None :white_check_mark: Full support :small_orange_diamond: Possible, with configuration (e.g., OpenOCD)
Project templates for AVR :cross_mark: Minimal (single sketch) :white_check_mark: Yes (flexible) :small_orange_diamond: Requires extensions (PlatformIO)
Arduino Library compatibility :white_check_mark: Native :right_arrow: Manual import :white_check_mark: PlatformIO supports Arduino projects
Flashing without bootloader :cross_mark: Bootloader required :white_check_mark: Native support (ISP) :white_check_mark: With manual configuration
Integrated fuses/burn management :cross_mark: None :white_check_mark: Fully integrated :small_orange_diamond: Requires scripts or extensions
Workflow experience :hammer_and_wrench: Extremely simple :classical_building: Full-featured IDE :hammer_and_wrench: Lightweight modular editor
Ease of setup for AVR-only projects :white_check_mark: Extremely easy :white_check_mark: Very easy :small_orange_diamond: Moderate setup complexity
Code and Build Configuration Control :cross_mark: Very limited :white_check_mark: Full control :white_check_mark: Full control
License / Costs :white_check_mark: Free :white_check_mark: Free :white_check_mark: Free

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.

Hi @dricex86. Thanks for taking the time to share this information.

This is unexpected. Arduino IDE automatically sends a signal to the board to activate the bootloader (this is known as the "1200 bps touch"), then immediately after performs the upload operation. So the bootloader should never have the chance to time out.

Are you manually activating the bootloader by performing a double reset? If so, try an upload using Arduino IDE without doing that. I think you will be pleasantly surprised. The only time this doesn't work is if the program running on the board disables or breaks its ability to recognize the "1200 bps touch" signal (e.g., the board is sleeping, the processor has crashed due to a divide by zero bug in the code).

Although it is true that the Arduino IDE 1.x editor was fairly primitive, the editor in Arduino IDE 2.x editor is quite capable (it is based on the same technology as VS Code, the world's most popular programming editor/IDE). The only capability I find myself missing in the Arduino IDE editor is a split editor (which Microchip Studio surely has).

You can skip the use of a bootloader in Arduino IDE if you like. Just use Sketch > Upload Using Programmer from the Arduino IDE menus instead of Sketch > Upload.

There are also some excellent 3rd party boards platforms (e.g. MiniCore) that configure Arduino IDE so that even Sketch > Upload will flash the program via the selected programmer.

You can bundle libraries with the sketch project when using Arduino IDE if you like. Arduino IDE doesn't have any features to facilitate the bundling, so you do need to copy the library files into the sketch folder manually. However, from your description is sounds like that is also true for Microchip Studio.

This is false. Arduino IDE 2.x does have support for real hardware debugging:

https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-debugger/

I don't have a meaningful amount of experience using Microchip Studio, so I can't say how the debugging capability of Arduino IDE compares to that of Microchip Studio.

Arduino IDE's debugger is the Cortex-Debug VS Code extension, which is likely what you would be using for embedded systems project development with VS Code. So Arduino IDE's debugging capabilities should be comparable to what you get using VS Code.

As I wrote above already, this is false. It is not required to use a bootloader with Arduino IDE.

It is true that Microchip Studio's fuse configuration capabilities are comprehensive, but I feel that it is not exactly accurate to say that Arduino IDE has "none".

When you perform a "Burn Bootloader" operation, Arduino IDE sets the fuses as specified in the definition of the selected board. For most users, that is perfectly sufficient.

For more advanced users, 3rd party boards platforms such as those maintained by MCUDude and SpenceKonde allow the user to configure the useful fuses via a friendly interface. Those platforms also allow the users who don't want to use a bootloader to disable the bootloader feature, so that the "Burn Bootloader" operation only sets the fuses and does not waste time flashing a bootloader binary that won't be used.


There is something very important that you left out of your comparison:

Feature Arduino IDE Microchip Studio Visual Studio Code + Extensions
Linux support :white_check_mark: Full support :cross_mark: None :white_check_mark: Full support
macOS support :white_check_mark: Full support :cross_mark: None :white_check_mark: Full support
Windows support :white_check_mark: Full support :white_check_mark: Full support :white_check_mark: Full support

For me, this is a dealbreaker. I avoid reliance on any tool that is not cross-platform.

and another:

Feature Arduino IDE Microchip Studio Visual Studio Code + Extensions
License :heart_eyes: Open source :locked_with_key: Proprietary :man_shrugging: Open core

@dricex86 If you are not a user of the Arduino IDE, did you just register on the forum to disparage the IDE and spread propaganda about Microchip Studio or do you think you can contribute something useful?