Skip to content
Home » Embedded Systems » Install MinGW on Windows for make

Install MinGW on Windows for make

MinGW SourceForge project page showing download options and project details for GNU Compiler Collection on Windows.
Embedded Systems Learning Path
Part 23 of 129 — View Full Path →

KEY TAKEAWAYS

📘 Toolchain ready? The next step is writing C worth compiling. My complete Master C & Embedded C course takes you from zero to hardware-ready code — free on YouTube (53 videos), or guided on Udemy with quizzes, certificate and my Q&A support.

  • MinGW provides GCC and Make tools for compiling C/C++ programs on Windows
  • Download and install MinGW, then add its bin directory to the system PATH
  • After installation, gcc and make commands are available in the command prompt
  • MinGW enables using standard Unix-like build tools and Makefiles on Windows

Setting up MinGW make on Windows is essential for compiling C/C++ projects and embedded systems development.

MinGW (“Minimalist GNU for Windows”) is a complete runtime environment for gcc to support binaries native to Windows 64-bit and 32-bit operating systems. With MinGW we can build C programs for windows. This tool is also required to build C-programs for microcontrollers. We will be seeing how to write codes for microcontrollers without using the any IDE. And we will use the MinGW compiler along with the microcontroller family toolchain to build the code. We will install mingw and configure it for running the “make” files

This post is the first step in the complete build process. In this post, we will look at installing mingw and adding it to the environment variables.

1.1 Download MingGW

It contains Make that we will be using in Command Prompt on Windows 10.

8-bit variable used as individual flags diagram showing bits 7 through 0 with bit 2 as threshold_crossed_flag, bit 1 as data_transmitted_flag, and bit 0 as data_received_flag

 

1.2 Install MinGW

We will now see how to install minGW. In this step, we will look at the important options that need to be selected.

Keep the Installation Directory the same as shown below.

install mingw

1.2.1 Navigate to your Desktop

Open MinGW Installer. Select Basic Setup, navigate to Packages and Right click on “mingw-developer-toolkit-bin”, “mingw32-base-bin” and “msys-base-bin” Packages and select Mark for Installation.

install mingw - select options

1.2.2 Navigate to the Top left corner and Left click on Installation then click Apply Changes.

MinGW Installation Manager with Installation menu open showing Apply Changes option to install selected packages including mingw-developer-toolkit-bin and msys-base-bin

1.2.3 The packages should now be Green (if not, just repeat the process), if they are successfully installed then close the Installation Manager.

install mingw - installed componenets

 

1.3 Rename to Make

Navigate to C:MingGWbin. Rename “mingw32-make” to “make”. This will make it easier to use Make in the Command Prompt.

Windows File Explorer showing C:MinGWbin directory contents with mingw32-make application highlighted among compiler tools like gcc, gdb, and autoconf utilities

1.3.1 Let’s add Make for usage in Command Prompt.

Press the “Windows Icon” on your keyboard, search and open “Edit the system environment variables”.

Windows 10 Start menu search results for Edit the system environment variables showing the Control Panel option to access PATH configuration for MSP430 toolchain setup

1.3.2 Click on “Environment Variables”

Windows System Properties Advanced tab with Environment Variables button circled at the bottom, showing how to access PATH settings for adding MinGW and MSP430 compiler paths

1.3.2 Under “System variables”, scroll down to “Path” and double-click.

Windows Environment Variables dialog showing user and system variables with the system Path variable selected, containing paths for MinGW, MSP430-gcc, and other development tools

1.3.3 Click on “New” and add the location “C:MingGWbin” to environment variable and press “OK”.

Edit environment variable dialog showing the system PATH entries list with C:MinGWbin and C:Timsp430-gccbin paths added, and New button circled for adding more paths

 

1.4 Testing Make

Press the “Windows Icon” on your keyboard, search and open “Command Prompt”.

Windows 10 Start menu search for cmd showing Command Prompt as best match with options to Open, Run as administrator, and Pin to Start for verifying MSP430 toolchain installation

1.4.1 Type “make –version” to confirm that it works. Recheck Step 1.3 – 1.4 if it doesn’t work.

Command Prompt showing make --version output confirming GNU Make 3.82.90 built for i686-pc-mingw32 is successfully installed and accessible from the system PATH

Leave a Reply

Your email address will not be published. Required fields are marked *