Open main menu

DAVE Developer's Wiki β

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

Revision as of 15:15, 17 April 2018 by U0007 (talk | contribs)

Info Box
Axel-04.png Applies to Axel Ultra
Axel-lite 02.png Applies to Axel Lite

Contents

HistoryEdit

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

IntroductionEdit

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 buildingEdit

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 kernelEdit

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 FreeRTOSEdit

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 latencystatEdit

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 targetEdit

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