Building the FreeRTOS Demo Project for MitySOM-A10S


FreeRTOS homepage:

The following build steps were tested on Ubuntu 18.04 with Quartus/SoCEDS 18.1 and DS-5 version 5.29.1/Eclipse version 4.6.3. The toolchain used was Mentor Graphics
Sourcery CodeBench Lite 2016.11-88, based on GCC 6.2.0.

Demo Binaries

The MitySOM-A10S FreeRTOS demo project creates two separate demo applications:
  • rtosblinkdemo.elf
    • This demo creates two tasks and one queue. One task sends the value 100 to the queue once every second. The other task waits until it sees the value 100 in the queue and then toggles a GPIO and prints a message to the console.
  • rtosfulldemo.elf
    • This demo creates a comprehensive set of tasks and tests that demonstrate:
      • The FreeRTOS+CLI command line interface
      • Software timers
      • Queues
      • Semaphores
      • Mutexes
      • Event Groups

A 'check' RTOS task is also created. The check task periodically queries the other demo tasks to ensure they are functioning as intended. The check task also toggles a GPIO to give an indication of the system status. If the GPIO toggles every 3 seconds then the check task has not discovered any problems with the executing demo. If the LED toggles every 200 milliseconds then the check task has discovered a problem in at least one task. An error message is also printed to the console if the check task discovers a problem.

Both demo applications use GPIO1[21], which is routed to J300 pin K34 on the Development Kit baseboard.

Command Line Build

  1. Check out the FreeRTOS source:
    git clone
  2. Change into the FreeRTOS source directory:
    cd freertos-socfpga
  3. Execute the Intel Embedded Command Shell (substitute /opt/intelFPGA/18.1/ if your install path is different):
  4. Set up autotools and build FreeRTOS:
    ./ && make
  5. The final FreeRTOS binaries are located in the current directory.

Eclipse Build

  1. Check out the FreeRTOS source:
    git clone
  2. Open the ARM DS-5 Eclipse IDE and either create a new workspace or select an existing workspace when prompted.
  3. Verify that the toolchain is registered in Eclipse:
    1. Navigate to "Window" -> "Preferences"
    2. Expand the "DS-5" section in the left of the Preferences window and click "Toolchains"
    3. If you do not see a toolchain named "GCC 6.2.0 [arm-altera-eabi]", click "Add" and navigate to /opt/intelFPGA/18.1/embedded/host_tools/mentor/gnu/arm/baremetal/bin (substitute /opt/intelFPGA/18.1/ if your install path is different)
    4. Click "Next" and then "Finish"
  4. If necessary, create a new project:
    1. Navigate to "File" -> "New" -> "Makefile Project with Existing Code"
    2. Click "Browse" and browse to the location you checked out the FreeRTOS source. The project name should be automatically populated
    3. Check only "C" under "Languages" and select "GCC 6.2.0 [arm-altera-eabi]" under "Toolchain for Indexer Settings"
    4. Click "Finish"
  5. If necessary, install the Autotools plugin:
    1. Navigate to "Help" -> "Install New Software..."
    2. Click "Add...", enter in the "Location:" field, and click "OK"
    3. Expand "CDT Optional Features", select "C/C++ Autotools support", and click "Next"
    4. Click "Next", accept the license, and click "Finish"
  6. Configure the project to use Autotools:
    1. Select the project in the Project Explorer and navigate to "File" -> "New" -> "Other..."
    2. Expand the "C/C++" section, select "Convert to a C/C++ Autotools Project", and click "Next"
    3. Ensure the project is checked under "Candidates for conversion:" and select "C Project" under "Convert to C or C++". Click "Next"
    4. Click "Finish"
  7. Select the project in the Project Explorer and either click the build icon in the toolbar or navigate to "Project" -> "Build Project". The final FreeRTOS binaries will be located in the project directory

Go to top
Add picture from clipboard (Maximum size: 600 MB)