XELK-AN-001: Asymmetric Multiprocessing (AMP) on Axel – Linux + FreeRTOS

From DAVE Developer's Wiki
Revision as of 12:16, 17 April 2018 by U0007 (talk | contribs) (Created page with "{{InfoBoxTop}} {{AppliesToSBCLynx}} {{InfoBoxBottom}} == History == {| class="wikitable" border="1" !Version !Date !Axel_Embedded_Linux_Kit_(XELK)#XELK_software_components|X...")

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Info Box
SBC Lynx-top.png Applies to SBC Lynx

History[edit | edit source]

Version Date XELK version Notes
0.9.2 Feb 2015 2.0.0 Update for XELK 2.0.0 release
0.9.3 April 2015 2.0.0 Minor fixes
1.0.0 April 2018 2.1.0 Updated info for command erros

Introduction[edit | edit source]

This application note describe how to build the software components required to set up asymmetric multi-processing (AMP for short) configuration required to run Linux OS on first Cortex®-A9 core and FreeRTOS on second Cortex®-A9 core of the Freescale i.MX6 SOC. The latencystat demo is a RPMsg-based application that exploits sophisticated techniques to handle inter-processors communication and synchronization.

Please download the application note in PDF format for the overall information.

Downloading,configuring and building[edit | edit source]

Assuming that a local repository has not been created, clone the remote AMPgit repository (the -b option is used to automatically checkout the current branch):

dvdk@dvdk:~/xelk$ git clone git@git.dave.eu:dave/axel/linux-2.6-imx.git
  • Enter the git directory
  • Switch to AMP branch:
dvdk@dvdk:~/xelk/linux-2.6-imx$ git checkout axel-feat-2.1.0-amp

Build the Linux kernel[edit | edit source]

Set the correct environment sourcing the iMX6 toolchain:

dvdk@dvdk:~/xelk$ source env.sh 

Select the Axel board configuration:

dvdk@dvdk:~/xelk/linux-2.6-imx$ make imx_v7_axel_defconfig

build the Linux kernel and the XELK-L-S device tree:

dvdk@dvdk:~/xelk/linux-2.6-imx$ make UIMAGE_LOADADDR=0x18008000 imx6q-xelk-l.dtb uImage modules

Build FreeRTOS[edit | edit source]

Clone the FreeRTOS repository and build the real-time OS:

dvdk@dvdk:~/xelk$ git@git.dave.eu :dave/axel/freertos.git
dvdk@dvdk:~/xelk$ cd freertos

For building the FreeRTOS, a proper toolchain has to be used:

dvdk@dvdk:~/xelk/freertos$ export PATH=<path to arm-eabi toolchain>/bin:$PATH
dvdk@dvdk:~/xelk/freertos$ export ARCH=arm
dvdk@dvdk:~/xelk/freertos$ export CROSS_COMPILE=arm-none-eabi-

and then run <code>make</code> to build the RTOS binary image:
<pre>
dvdk@dvdk:~/xelk/freertos$ make


Building latencystat[edit | edit source]

Just clone, enter the latecystat directory and build with make:

dvdk@dvdk:~/xelk$ git@git.dave.eu :dave/axel/latencystat.git
dvdk@dvdk:~/xelk$ cd latencystat
dvdk@dvdk:~/xelk/latencystat$ make


Running the AMP on the target[edit | edit source]

move the device tree binary load address (the default 0x18000000 conflicts the AMP kernel loadaddr, it must be moved to a higher address) by changing u-boot environment for example as:

=> setenv fdtaddr 0x1c000000