This article documents the steps I used to compile the uRADMonitor KIT1 firmware from the Github code/124 directory using Visual Studio Code on Windows.

The original uRADMonitor KIT1 firmware project was created for the AVR toolchain and appears to have been maintained using an Eclipse AVR-style project structure. That original setup is still valid, and the repository already contains the important build files if you want to use Visual Studio Code to compile it. This article is not meant to replace the author’s original toolchain or project layout, and you can still use it! It is simply a practical path for people who are more comfortable using Visual Studio Code instead.

The reason for documenting this is straightforward: I wanted to build the existing firmware without converting it or changing the source code, and without restructuring the repository. The actual work to get it to work in VSCode was not fixing the code – it was getting Windows, MSYS2, AVR-GCC, make, avrdude, and VS Code to all see each other correctly.

Once that environment was configured, the existing Makefile built the firmware successfully and produced the expected .elf and .hex files.

Base requirements for Studio:

The existing Makefile is located here in the Github repo:

The original programming script is located here:

That script shows the expected programmer and fuse settings:

The Eclipse AVR project settings also confirm the 8 MHz clock:

The Makefile also confirms the MCU and CPU frequency:

Getting started: Download the Git Repo, Install Visual Studio Code and extensions

To get started, download the Git repo, then install Visual Studio Code as well as the Microsoft C/C++ extensions.

The extensions provide C/C++ editing support and IntelliSense. The actual build still uses the existing Makefile and AVR-GCC toolchain.

Install MSYS2 on Windows

On Windows, I used MSYS2 to install the AVR development tools.

Download and install MSYS2, then open this shell from the Start Menu:

Do not use the plain MSYS2 shell for this step. Use the MINGW64 environment.

First update MSYS2:

If MSYS2 asks you to close the terminal after updating, close it, reopen MSYS2 MINGW64, and run the update command again:

Then install the AVR toolchain and build tools:

This installs the AVR compiler, AVR binutils, AVR libc, avrdude, and make.

Add MSYS2 paths to Windows PATH

This was the main Windows issue I encountered. I installed MSYS2 into C:\msys64.

After installing the packages, avr-gcc and avrdude were visible, but make was not visible from VS Code because VS Code was launching the build task through Windows PowerShell.

The fix was to add both of these folders to the Windows PATH (“Edit the System Environment Variables” in Windows 11):

The first path contains the AVR tools such as avr-gcc and avrdude. The second path contains make.exe.

After changing PATH, fully close and reopen Visual Studio Code. A normal reload is not always enough because the integrated terminal and task runner need the updated environment.

Confirm the tools are visible

After reopening VS Code, open a new terminal and run:

If all three commands respond, the toolchain is visible to VS Code.

If avr-gcc and avrdude work, but make does not, check that this folder was added to PATH:

C:\msys64\usr\bin

You can also test it directly from Command Prompt:

Add VS Code task files

I added a .vscode directory inside code/124 with two files:

The tasks.json file lets VS Code run the existing Makefile. The important build command (used in a terminal) is:

A minimal tasks.json could look like this:

A minimal c_cpp_properties.json file can look like this:

Build from VS Code

In VS Code, open this folder:

Then run:

(If prompted) Select:

The build should generate these files in the code/124 directory:

The important firmware output file is:

That is the file to flash to the ATmega328P.

Keep your eye on the problems tab in Visual Studio, you should only see things pop up there. If successful, you will see a message in the terminal saying “Terminal will be reused by tasks…” and those two files mentioned above will be in your code/124 directory.

Build from the terminal

Troubleshooting: Before troubleshooting VS Code, it is useful to confirm that the Makefile works directly.

From the VS Code terminal, while inside code/124, run:

If the environment is correct, this should build the firmware and produce:

Fuse settings

The fuse settings are documented in:

The script uses:

The matching extended fuse value for brown-out detection disabled is:

In your programming software, pick an Atmega 328p. The fuses settings above should allow the 8MHz oscillation.

Be careful when writing fuses. If the wrong fuses are written, the AVR may appear unresponsive until the correct fuse values are written. Before writing fuses, it is a good idea to read and save the current fuse values:


From here you should be able to follow the rest of the original guide to either use avrdude and program the IC or use your own programmer and program the Atmega 328p.

What actually had to be solved to get Visual Studio working

The important point is that the repository was already buildable. The source code and Makefile were not the problem.

The problem was the Windows development environment. Visual Studio Code was launching the build task through Windows PowerShell, and PowerShell could not initially find all of the command-line tools needed by the existing Makefile.

So the practical fix was to install the AVR tools through MSYS2, add the correct MSYS2 folders to the Windows PATH, and then add a small .vscode folder so VS Code could call the existing Makefile conveniently. After we did that, the files build successfully!

Thank you to Radu for an amazing piece of hardware engineering, and for the opportunity to write this guide for Visual Studio. Feel free to comment on it for any corrections or any other improvements, as I am just another hobbyist like you experimenting with my KIT1.