FreeRTOS simulatior on Linux

Link to download the source:

 https://www.freertos.org/FreeRTOS-simulator-for-Linux.html

or

http://www.openrtos.net/index.html

Download Source:

https://www.freertos.org/a00104.html

Source code organization:

https://www.freertos.org/a00017.html

 

Building the source code:

  1. Navigate to the Demo Directory at: Demo source

     $ cd FreeRTOS/Demo/Posix_GCC/
  2. To build run:
    $ make
    Error: 
    incompatible type for argument 3 of ‘pthread_sigmask’ 
    528 |                            *&xSchedulerOriginalSignalMask );
          |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                            |
          |                            sigset_t {aka struct <anonymous>} 
     
     Solution: 
    Run command:
    1) cd ~/Downloads/src/FreeRTOSv202012.00/FreeRTOS/Source/portable/ThirdParty/GCC/Posix
    2) gedit port.c
    3)go to line 528 and comment 528 and 529
    4) paste below lines:
    extern int pthread_sigmask (int __how, const __sigset_t *__restrict __newmask, __sigset_t *__restrict __oldmask)__THROW 
    Link: https://forums.freertos.org/t/posix-port-compile-issues/11323/6 
    5)save file
    6)cd FreeRTOS/Demo/Posix_GCC
    7)make
    3. to make clean 
    make clean

Running the Demo (check the instructions above on how to choose between the available demos)

  1. Navigate to the newly created "build" directory
    $ cd build 
  2. Run the demo (blinky and full)

    $ ./posix_demo

Comments

Popular posts from this blog

Write a code to pass a simple integer to each thread and measure time taken by each thread with out and with pthread_join. The calling thread uses a unique data structure for each thread, insuring that each thread's argument remains intact throughout the program.

print hello world using pthread through creating 5 threads.

write simple code to create pthread and execute the code