Build environment
To build and run Mongoose examples on your workstation, install these three tools:
- Git, https://git-scm.com/ - for downloading source code and version control
- GCC / MinGW compiler - for compiling desktop / server programs
- GNU make, http://www.gnu.org/software/make/ - for build automation
If you are going to build for embedded systems, extra tools are required:
- for ARM embedded systems, install ARM GCC. Pick hosted cross toolchain
arm-none-eabi - For RISCV embedded systems, install RISCV GCC
- For RP2040 and RP2350 devices, install CMake
- For STM32 devices, install STM32CubeProgrammer
- For NXP devices, install LinkServer (included with MCUXpresso)
- For NXP FRDM-RW612, install J-Link Software
- For TI devices, install Uniflash
Below there are the specific installation instructions for MacOS, Linux and Windows.
MacOS
Open a terminal and install the required packages using Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install gcc make git gcc-arm-embedded cmake uniflash riscv-tools
If you plan to work with STM32 devices, install STM32CubeProgrammer
Linux
The following assumes Ubuntu Linux. Open a terminal and install the required packages:
sudo apt -y update
sudo apt -y install build-essential make gcc-arm-none-eabi stlink-tools git cmake gcc-riscv64-unknown-elf
If you plan to work with STM32 devices, install STM32CubeProgrammer
Windows
- Enable "Developer Mode" in Windows 10/11, for symbolic link support: "Open Settings" / "Privacy & Security" / "For developers", then set "Developer Mode" to "on".
- Install Git. Check "Enable symlink" during installation.
If you have Git already installed, either reinstall it with the symlink support on, or enter
git config --global core.symlinks truein the command prompt to enable symlinks in Git - Download and run mingwInstaller.exe
- Set install destination to
c:\ - Accept suggested default settings
- Go to
c:\mingw32\binfolder and renamemingw32-make.exetomake.exe - Add
c:\mingw32\binto thePathenvironment variable. For Windows 11 the steps are:- Open Start Search, type "env", and select "Edit the system environment variables"
- Click the "Environment Variables..."
- In the "System Variables" section, locate "Path", and click edit
- In the "Edit environment variable" UI, click "New" to add the new path
- Set install destination to
- For ARM embedded systems, install ARM GCC . Enable "Add path to environment variable" during the installation
- For RISCV embedded systems, install risc-v-gcc10.1.0.exe, accept default installation settings.
- For RP2040 and RP2350 devices, Install CMake; choose "Add CMake to the system PATH". Also install Python 3
- For STM32 devices, Install STM32CubeProgrammer