-
Install an Eclipse distribution: Eclipse
- Go to Download > Download x86_64
- In the Eclipse Installer, you can select the normal Eclipse version for C/C++ or the one specific for Embedded systems.
-
Install the GCC Toolchain: from the GNU Arm Embedded Toolchain select and install gcc-arm-none-eabi-10.3-2021.10-win32.exe. At the end of the download, remember to check the box "Add path to enviornmental variable".
-
QEMU download: QEMU
- Go to Download > Windows > 64-bit
- And select qemu-w64-setup-20231126.exe
After QEMU's installation, you need to put QEMU in the PATH variables:
- Advanced System Settings > Environment Variables
- Add "C:\Program Files\qemu" to the PATH.
Environmental variables come in two different categories. System and user environment variables (configured for each user) (set for everyone).All users can access system environment variables worldwide. For this reason it is sufficient to set the environmental variables in the system.
- Install FreeRTOS: From the website (or from GitHub). In this guide, we are using: "FreeRTOS 202212.01".
-
Install Chocolatey: Chocolatey simplify some of the next necessary installations.
- Run PowerShell as an administrator
- Write:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
-
Download and install Make: it is possible to do this via the official GNU Make website or by using Chocolatey. In this project we decide the use Chocolatey software to install make. It is sufficient to write:
choco install make
. -
Eclipse - Import the Demo:
- Open Eclipse
- Go to Import > General > Existing Projects into Workspace
- Click "Next" and in the next Window, select /FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC/build/gcc as the root directory. Crucially ensure the "Copy projects into workspace" checkbox is unchecked before clicking the Finish button to bring the project into Eclipse.
- Eclipse - PATH Update:
- Go to: Window > Preferences > C/C++ > Build > Environment.
- Add: PATH ${OS}
-
Install MinGW: to avoid the "Program 'g++' not found in PATH" error it is needed to install MinGW by the MinGW-w64 official page, or by writing in the prompt:
choco install mingw
-
Project > Build All: Now, all is setted. Select 'Build All' from the Eclipse 'Project' menu. A successful build creates the elf file FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC/build/gcc/output/RTOSDemo.out.
-
Run QEMU: To visualize the result write in the shell:
qemu-system-arm -machine mps2-an385 -cpu cortex-m3 -kernel "C:\Users\Christian Coduri\Desktop\FreeRTOSv202212.01\FreeRTOS\Demo\CORTEX_MPS2_QEMU_IAR_GCC\build\gcc\output\RTOSDemo.out" -monitor none -nographic -serial stdio
- Eclipse: an integrated development environment used in computer programming.
- GCC Toolchain: a cross-compiler toolchain specifically designed for compiling code for ARM architecture-based microcontrollers, microprocessors, and embedded systems.
- QEMU: a free and open-source emulator. It emulates a computer's processor through dynamic binary translation and provides a set of different hardware and device models for the machine, enabling it to run a variety of guest operating systems.
- FreeRTOS: a real-time operating system kernel for embedded devices
- Chocolatey: is a machine-level, command-line package manager and installer for software on Microsoft Windows.
- MinGW acts as a bridge between Windows and the GNU toolchain, providing the necessary tools for compiling and building software on the Windows platform.
Written by Group 21: Armenante Pietro, Coduri Christian, Lombardi Giovanni, Serafini Luca.