Building the FreeRTOS Demo Project for MitySOM-A10S¶
Repository: https://support.criticallink.com/git/freertos-socfpga.git
FreeRTOS homepage: https://www.freertos.org/
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
- This demo creates a comprehensive set of tasks and tests that demonstrate:
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¶
- Check out the FreeRTOS source:
git clone https://support.criticallink.com/git/freertos-socfpga.git
- Change into the FreeRTOS source directory:
cd freertos-socfpga
- Execute the Intel Embedded Command Shell (substitute
/opt/intelFPGA/18.1/
if your install path is different):/opt/intelFPGA/18.1/embedded/embedded_command_shell.sh
- Set up autotools and build FreeRTOS:
./autogen.sh && make
- The final FreeRTOS binaries are located in the current directory.
Eclipse Build¶
- Check out the FreeRTOS source:
git clone https://support.criticallink.com/git/freertos-socfpga.git
- Open the ARM DS-5 Eclipse IDE and either create a new workspace or select an existing workspace when prompted.
- Verify that the toolchain is registered in Eclipse:
- Navigate to "Window" -> "Preferences"
- Expand the "DS-5" section in the left of the Preferences window and click "Toolchains"
- 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) - Click "Next" and then "Finish"
- If necessary, create a new project:
- Navigate to "File" -> "New" -> "Makefile Project with Existing Code"
- Click "Browse" and browse to the location you checked out the FreeRTOS source. The project name should be automatically populated
- Check only "C" under "Languages" and select "GCC 6.2.0 [arm-altera-eabi]" under "Toolchain for Indexer Settings"
- Click "Finish"
- If necessary, install the Autotools plugin:
- Navigate to "Help" -> "Install New Software..."
- Click "Add...", enter https://download.eclipse.org/tools/cdt/releases/9.2/ in the "Location:" field, and click "OK"
- Expand "CDT Optional Features", select "C/C++ Autotools support", and click "Next"
- Click "Next", accept the license, and click "Finish"
- Configure the project to use Autotools:
- Select the project in the Project Explorer and navigate to "File" -> "New" -> "Other..."
- Expand the "C/C++" section, select "Convert to a C/C++ Autotools Project", and click "Next"
- Ensure the project is checked under "Candidates for conversion:" and select "C Project" under "Convert to C or C++". Click "Next"
- Click "Finish"
- 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