NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

Processor SDK Linux MMIP

From Texas Instruments Wiki
Jump to: navigation, search

Ti stk 1c rev rgb png.png



Overview[edit]

This Wiki page provides information on IPUMM and DSPDCE firmware in Processor SDK (version 02.00.00 and after). It is applicable to AM57xx devices. Overall, this guide includes the following contents.

  • How to rebuild IPUMM firmware on a Ubuntu machine
  • How to switch to use DSPDCE firmware on devices


Rebuild IPUMM Firmware[edit]

Pre-built IPUMM firmware images can be located on target file system at /lib/firmware/dra7-ipu2-fw.xem4. In case there is a need to rebuild the IPUMM firmware, the instructions below are provided for rebuilding IPUMM firmware. It assumes that everything is done on a Ubuntu machine.

IPUMM GIT Repo[edit]

IPUMM is publically available at https://git.ti.com/ivimm/ipumm. To clone the git repository, execute the following command.

  git clone git://git.ti.com/ivimm/ipumm.git

To checkout a particular tag, e.g., 3.00.09.01, run the following command:

  cd ipumm
  git checkout [tag, e.g., 3.00.09.01]

IPUMM Build Tools[edit]

Making IPUMM depends on the following tools.

Each release of IPUMM is verified with particular versions of the tools above. Check top level Makefile of ipumm to identify the versions to be downloaded and installed. For example, the tool versions used in IPUMM 3.00.09.01 are listed as below:

  XDCVERSION      ?= xdctools_3_31_02_38_core
  BIOSVERSION     ?= bios_6_42_02_29
  IPCVERSION      ?= ipc_3_40_01_08
  CEVERSION       ?= codec_engine_3_24_00_08
  FCVERSION       ?= framework_components_3_40_01_04
  XDAISVERSION    ?= xdais_7_24_00_04
  # TI Compiler Settings
  export TMS470CGTOOLPATH ?= $(BIOSTOOLSROOT)/ccsv6/tools/compiler/ti-cgt-arm_5.2.5

Below are direct download links and install instructions for IPUMM 3.00.09.01 build tools. When installing the tools, it is preferable to install all the tools to the same directory, e.g., /opt/ti.

Build IPUMM[edit]

Setup Environment[edit]

Export the following environment variables:

  export BIOSTOOLSROOT=<path where all tools are hosted>
  export IPCSRC=<path where IPC is installed>
  export TMS470CGTOOLPATH=<path to CGTOOL ARM Compiler is installed>

Example for IPUMM 3.00.09.01 assuming all the tools are installed to /opt/ti directory:

  export BIOSTOOLSROOT=/opt/ti
  export IPCSRC=/opt/ti/ipc_3_40_01_08
  export TMS470CGTOOLPATH=/opt/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.5

Build IPUMM[edit]

Follow the steps below to build IPUMM firmware.

  export HWVERSION=ES10
  cd ipumm
  make unconfig
  make vayu_smp_config
  make clean
  make ducatibin

After the build is completed, two different images will get created. Select the correct one for your devices.

 * dra7-ipu2-fw.xem4: This firmware will be used for Linux or Android. 
The firmware is built with the resource table defined in platform/ti/dce/baseimage/custom_rsc_table_vayu_ipu.h
The corresponding map file is: platform/ti/dce/baseimage/package/cfg/out/ipu/release/ipu.xem4.map
 * dra7xx-m4-ipu2.xem4: This firmware will be used for QNX. 
The firmware is built with the resource table defined in platform/ti/dce/baseimage/qnx_custom_rsc_table_vayu_ipu.h
The corresponding map file is: platform/ti/dce/baseimage/package/cfg/out/ipu/release/qnx_ipu.xem4.map



Firmware Loading and Unloading

The table below shows the remote cores and their corresponding definitions in the kernel dtsi files ([ti-processor-sdk-linux-am57xx-evm-[ver]]/board-support/linux-[ver]/arch/arm/boot/dts/dra7.dtsi, and dra74x.dtsi), as well as the argument to be used in the loading/unloading commands.

Remote Core Definition in dtsi file Argument in loading/unloading
IPU1 ipu@58820000 58820000.ipu
IPU2 ipu@55020000 55020000.ipu
DSP1 dsp@40800000 40800000.dsp
DSP2 dsp@41000000 41000000.dsp

For example, the argument of 55020000.ipu corresponds to IPU2 as can be seen from dra7.dtsi.

   ipu2: ipu@55020000 {
        compatible = "ti,dra7-rproc-ipu";

In the sections below, 55020000.ipu will be used as the example. For a specific use case, please select the corresponding argument which is applicable.

Unloading and loading remotecores at runtime[edit]

It is possible to unload and reload a remotecore at runtime from Linux using the sysfs interface.

target $ cd /sys/bus/platform/drivers/omap-rproc/ 
target $ echo 55020000.ipu > unbind 
target $ echo 55020000.ipu > bind

The echo 55020000.ipu > unbind command tears down the communication channels between the A15 and the remotecore and unloads the remotecore. Any application level shutdown that needs to be performed needs to be handled by the system integrator.

The echo 55020000.ipu > bind loads the appropriate firmware binary onto the remotecore.

Changing the remotecore binary at runtime[edit]

To change the remotecore binary at runtime

  1. Unload the remotecore using unbind.
  2. Change the remotecore binary in the firmware folder. Default location is /lib/firmware on the target filesystem.
  3. Load the remotecore using bind.
target $ cd /sys/bus/platform/drivers/omap-rproc/
target $ echo 55020000.ipu > unbind
target $ cp /home/root/new-binary.xem4 /lib/firmware/dra7-ipu2-fw.xem4
target $ echo 55020000.ipu > bind

If it is desirable to avoid overwriting the existing remote binaries, the method of symbolic links can be used instead of direct copy. For example, Processor SDK provides two types of DSP remotecore binaries: one for DSPDCE (dra7-dsp1-fw.xe66.dspdce-fw) and another one for OpenCL (dra7-dsp1-fw.xe66.opencl-monitor). dra7-dsp1-fw.xe66 is created as a symbolic link by default pointing to the OpenCL binary. When it is needed to switch to DSPDCE, the symbolic link of dra7-dsp1-fw.xe66 can be updated pointing to dra7-dsp1-fw.xe66.dspdce-fw.

target $ cd /sys/bus/platform/drivers/omap-rproc/
target $ echo 40800000.dsp > unbind
target $ rm /lib/firmware/dra7-dsp1-fw.xe66
target $ ln -s /lib/firmware/dra7-dsp1-fw.xe66.dspdce-fw /lib/firmware/dra7-dsp1-fw.xe66
target $ echo 40800000.dsp > bind

After the switch, copycodectest application can be run to verify that DSPDCE firmware is loaded. This application fills the input buffer with a number entered as the argument and after process the output buffer is tested for the same pattern.

usage: copycodectest pattern.

Example:

 target # copycodectest 123

Sample console output:

  root@am57xx-evm:~# copycodectest 123
  0x22070: Opening Engine..
  Created dsp_universalCopy
  Fill input buffer with pattern 123
  Verifing the UniversalCopy algorithm
  copycodectest executed successfully

Loading firmware during initial boot without using udev[edit]

During the default boot, firmware is supplied to the kernel by udev. Starting the udev service on boot causes a few seconds increase in boot time. In cases where a quick boot is required, the user may not start the udev service in boot. In such cases, firmware can be supplied to the kernel using the sysfs interface. An example script is shown below.

FW_NAMES="dra7-dsp1-fw.xe66 dra7-dsp2-fw.xe66 dra7-ipu1-fw.xem4 dra7-ipu2-fw.xem4"
for FW in $FW_NAMES ; do
    echo 1 > /sys/class/firmware/$FW/loading
    cat /lib/firmware/$FW > /sys/class/firmware/$FW/data
    echo 0 > /sys/class/firmware/$FW/loading
done


E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Processor SDK Linux MMIP here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Processor SDK Linux MMIP here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Processor SDK Linux MMIP here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Processor SDK Linux MMIP here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Processor SDK Linux MMIP here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Processor SDK Linux MMIP here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Processor SDK Linux MMIP here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Processor SDK Linux MMIP here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Processor SDK Linux MMIP here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity