Changes

Jump to: navigation, search
no edit summary
{{WorkInProgress}}
{{InfoBoxTop}}
{{Applies To Bora}}
{{Applies To BoraX}}
{{InfoBoxBottom}}
{{WarningMessage|text=This application note was validated against specific versions of the kit only. It may not work with other versions. Supported versions are listed in the ''History'' section.}}
 
{{ImportantMessage|text=The implementation described in this document applies do the BELK/BXELK versions indicated in the [[#History|History]] section. For previous releases, please refer to [[AN-BELK-001:_Asymmetric_Multiprocessing_(AMP)_on_Bora_–_Linux_FreeRTOS|this page]].
}}
== History ==
For further information, please refer to http://www.wiki.xilinx.com/Multi-OS+Support+%28AMP+%26+Hypervisor%29
Belk BELK/BXELK AMP demos are based on OpenAMP Framework for Zynq Devices (see [http://www.xilinx.com/support/documentation/sw_manuals/xilinx2017_2/ug1186-zynq-openamp-gsg.pdf UG1186]).Xilinx open asymmetric multiOpen Asymmetric Multi-processing (OpenAMP) is a framework providing the software components needed to enable the development of software applications for asymmetric multi-processing (AMP) systems.The Xilinx implementation of OpenAMP framework provides the following for Zynq-7000 All Programmable (AP) SoC devices:
* The ''remoteproc'' , ''RPMsg'' , and ''virtIO'' components that are used for a Linux master or a bare-metal remote configuration.
* Proxy infrastructure and demos that showcase the ability of a proxy on a master processor running Linux on the ARM processor unit (APU) to handle ''printf'' , ''scanf'' , ''open'' , ''close'' , ''read'' , and ''write'' calls from a bare-metal OS-based remote contexts running on the remote processor unit (RPU).
== Build the AN-BELK-007 ==
=== Yocto build ===
To build the components for the AN-BELK-007 , the users can build the Yocto BSP as described [[Building_the_Yocto_BSP_(BELK/BXELK)|here]].
Some changes must be made to build Yocto for AN-BELK-007.
After initializing the build environment as described [[Building_the_Yocto_BSP_(BELK/BXELK)#Initialize_the_build_environment|here]], user must modify the <code>conf/local.conf</code> build configuration to match the ''<code>bora-amp'' </code> machine:
<pre>
MACHINE = "bora-amp"
</pre>
Then build the ''<code>bora-image-devel'' </code> image as described [[Building_the_Yocto_BSP_(BELK/BXELK)#Running_the_build|here]].
=== Separated components build ===
</pre>
==== Demo Applications ====
To build the AN-BELK-007 linux userspace demo applications run the following commands (the following is for the ''rpmsg-echo-test'TBD'):<pre>dvdk@dvdk-vm:~$ . ~/bora/sdk/latest/environment-setup-cortexa9hf-neon-xilinx-linux-gnueabidvdk@dvdk-vm:~$ git clone https://github.com/Xilinx/meta-openamp -b rel-v2017.2Cloning into 'meta-openamp'...remote: Counting objects: 378, done.remote: Compressing objects: 100% (163/163), done.remote: Total 378 (delta 189), reused 378 (delta 189), pack-reused 0Receiving objects: 100% (378/378), 58.85 KiB | 0 bytes/s, done.Resolving deltas: 100% (189/189), done.Checking connectivity... done.dvdk@dvdk-vm:~$ cd meta-openamp/recipes-openamp/rpmsg-examples/rpmsg-echo-test/dvdk@dvdk-vm:~/meta-openamp/recipes-openamp/rpmsg-examples/rpmsg-echo-test$ makearm-xilinx-linux-gnueabi-gcc -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/home/dvdk/bora/sdk/belk-4.0.0/sysroots/cortexa9hf-neon-xilinx-linux-gnueabi -c -O2 -pipe -g -feliminate-unused-debug-types -o echo_test.o echo_test.carm-xilinx-linux-gnueabi-gcc -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/home/dvdk/bora/sdk/belk-4.0.0/sysroots/cortexa9hf-neon-xilinx-linux-gnueabi -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o echo_test echo_test.o dvdk@dvdk-vm:~/meta-openamp/recipes-openamp/rpmsg-examples/rpmsg-echo-test$ lltotal 60drwxrwxr-x 2 dvdk dvdk 4096 Sep 21 09:13 ./drwxrwxr-x 5 dvdk dvdk 4096 Sep 21 09:00 ../-rwxrwxr-x 1 dvdk dvdk 18512 Sep 21 09:13 echo_test*-rw-rw-r-- 1 dvdk dvdk 4241 Sep 21 09:00 echo_test.c-rw-rw-r-- 1 dvdk dvdk 13932 Sep 21 09:13 echo_test.o-rw-rw-r-- 1 dvdk dvdk 1686 Sep 21 09:00 LICENSE-rw-rw-r-- 1 dvdk dvdk 237 Sep 21 09:00 Makefile</pre> Copy the ''echo_test'' executable binary into target rootfilesystem. 
==== FreeRTOS Firmware ====
FreeRTOS Firmware for the AN-BELK-007 demos can be builded buildt starting from the BELK/BXELK Vivado project described [[Creating_and_building_example_Vivado_project_(BELK/BXELK)|here]], or from a custom BORA/BORAX Vivado project.
Follow these steps with the Vivado project already opened:
** under ''drivers -> ps7_cortexa9_1'' add <code>-DUSE_AMP=1</code> to <code>extra_compiler_flags</code> parameter
** close settings by clicking ''OK'' button
* Rebuild rebuild project by right clicking on the project name in ''Project Explorer'' and selecting first ''Clean Project'' and then ''Build Project''* the FreeRTOS Firmware demo project (ELF file) is then built and available under the Debug directory of the project* copy the ''openamp_echo.elf'' (or ''openamp_matrix_mult.elf'' or ''openamp_rpc.elf'' for the other demos) into the target root filesystem under the <code>/lib/firmware/</code> directory.
== Run AN-BELK-007 demos ==
The AN-BELK-007 demos can be executed on BELK/BXELK kit using the pre-built images available on '''TDB link cloud'''release along with the kit, or using Yocto build system as described [[#Build_the_AN-BELK-007|here]].
Create a bootable microSD card as described [[System_boot_and_recovery_via_microSD_card_(BELK/BXELK)|here]].
743
edits

Navigation menu