Creating Linux Task Threads
This example shows how to create Linux® task threads using the Linux Task block of Embedded Coder® Support Package for ARM® Cortex®-A Processors.
Embedded Coder Support Package for ARM Cortex-A Processors enables you to create a separate Linux task thread for a Function-Call Subsystem (Simulink) block. To create a Linux task thread, trigger a Function-Call Subsystem block using the output of a Linux Task block.
1. Open the armcortexalinuxtaskthreadexample model. This model uses a Function-Call Subsystem block to add two inputs and sends the output to a Scope block.
2. On the Apps tab of Simulink® model opened in step 1, in the Setup to Run on Hardware group, click Run on Hardware Board.
3. On the Run on Hardware Board pop-up, set Hardware Board to
ARM Cortex-A9 (QEMU). Click Finish.
4. In the Hardware tab, click Build, Deploy, & Start to run your model as a binary executable on the running QEMU emulator. The MathWorks® software, uses the GCC toolchain, to build a binary executable by compiling and linking the generated code on your host computer for the model. The executable is then be deployed and run on the QEMU processor emulator. The generated code running as an executable on a QEMU emulator of an ARM processor runs the Function-Call Subsystem block as a separate Linux task thread.
5. Double click on the Scope block to see the output of the Function-Call subsystem.