Code Monkey home page Code Monkey logo

freertos-emulator's Introduction

FreeRTOS Emulator

An implementation of POSIX based FreeRTOS with the combination of SDL2 graphics. Aimed at providing an x86 emulation solution for teaching FreeRTOS to students without the need of embedded hardware.

Based on the FreeRTOS (V5.X) simulator developed by William Davy. Updated to use FreeRTOS V9.0.0.

Dependencies

The simulator uses the SDL2 graphics libraries.

Debian/Ubuntu

sudo apt-get install libsdl2-ttf-dev libsdl2-mixer-dev libsdl2-image-dev libsdl2-gfx-dev libsdl2-dev

Arch

sudo pacman -S sdl2 sdl2_gfx sdl2_image sdl2_mixer sdl2_ttf

Windows/Mac

¯\(°_o)/¯

....install linux?

Building

cd build
cmake ..
make

For those requiring an IDE run

cmake -G "Eclipse CDT4 - Unix Makefiles" ./

to generate the appropriate project files to allow for the emulator to be imported into Eclipse.

Debugging

The emulator uses the signals SIGUSR1 and SIG34 and as such GDB needs to be told to ignore the signal. An appropriate .gdbinit is in the bin directory. Copy the .gdbinit into your home directory or make sure to debug from the bin directory. Such that GDB does not get interrupted by the POSIX signals used by the emulator for IPC.

If using an IDE, make sure to configure your debug to load the gdbinit file.

Documentation

Documentation of the crude graphics library, found in lib/Gfx, and the example collision demo code library, can be generated by running

doxygen

from the docs directory to generate the Doxygen documentation. Also generated on GitHub via Travis CI, available here.

Example

Pong game implementation on pong branch

State of Simulator

Work in progress.

TODO:

  • Async IO

Buy Me A Coffee

YouCompleteMe Integration

This is not really related to the project but as I have left in the YCM symlinks and options in the CMake I may as well detail the YouCompleteMe Vim integration as it is applicable for other projects as well.

Install vim-plug

Ubuntu users

Ubuntu does not yet install vim 8.X+ by default and as you must install it manually first

sudo add-apt-repository ppa:jonathonf/vim
sudo apt update
sudo apt install vim

Installation

Prerequisites

A python version >= 3.5 is required.

sudo apt install build-essential cmake3 python3.5-dev python3.5
Vim plugin manager
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
YCM

Add YCM to vimrc

echo "call plug#begin('~/.vim/plugged')" >> $HOME/.vimrc
echo "Plug 'valloric/youcompleteme'" >> $HOME/.vimrc
echo "call plug#end()" >> $HOME/.vimrc

Start vim and run :PlugInstall

Navigate to vim plugin folder and run install script

cd $HOME/.vim/plugged/youcompleteme
python3.5 install.py --clang-completer

Get the config script

curl -Lo $HOME/.ycm_extra_conf.py https://raw.githubusercontent.com/alxhoff/dotfiles/master/ycm/.ycm_extra_conf.py

After running, you should be able to complete using CRTL+Space

freertos-emulator's People

Contributors

alxhoff avatar

Watchers

James Cloos 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.