Git Product home page Git Product logo

coduri / freertos_lotteryscheduling Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 8.2 MB

Explored the complexities of embedded systems and developed a FreeRTOS Lottery Scheduler for Arm Cortex-M3 on QEMU, enhancing scheduling capabilities beyond default implementations.

Home Page: https://coduri.cc/projects/FreeRTOS_Lottery_Scheduling.pdf

C 96.13% Makefile 0.30% Assembly 3.14% CMake 0.35% Python 0.04% Batchfile 0.04%
cortex-m embedded-systems freertos qemu rtos freertos-kernel freertos-scheduler lottery-scheduler lottery-scheduling cortex-m3 arm-cortex-m3 kernel operating-system polito polito-project scheduler scheduling-algorithms

freertos_lotteryscheduling's Introduction

Configuration and Installation

How to build a demo

  1. 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.
  2. 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".

Install the GCC Toolchain Install the GCC Toolchain

  1. 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.

QEMU path QEMU path

  1. Install FreeRTOS: From the website (or from GitHub). In this guide, we are using: "FreeRTOS 202212.01".

FreeRTOS download

  1. 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'))
  2. 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.

  3. 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: Import the Demo

  1. Eclipse - PATH Update:
    • Go to: Window > Preferences > C/C++ > Build > Environment.
    • Add: PATH ${OS}

Eclipse: PATH Update

  1. 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

  2. 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.

  3. 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

Demo running

What are this necessary things?

  • 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.

freertos_lotteryscheduling's People

Contributors

coduri avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.