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.

Porting OpenMP 2.x to KeyStone 1

From Texas Instruments Wiki
Jump to: navigation, search

General Information

This guide aims to use publicly available software downloads to rebuild OpenMP 2.x for KeyStone 1 devices. There are two sets of instructions: one for Windows based operating systems and one for Ubuntu based operating systems. This procedure has been tested on Windows 7 and Ubuntu 12.04.

Software Downloads Required

The required list of software is as follows. Ubuntu host users will select the Linux version of each download when presented with the option. Windows host users will select the Windows version of each download EXCEPT the MCSDK-HPC package. The MCSDK-HPC download only exists for Linux host computers so Windows users will need to download the Linux version of the MCSDK-HPC package.

  1. Code Generation Tools 8.0.1 for C6000
  2. MCSDK 2.1.2.6
  3. Patch 01 for MCSDK 2.1.2.6
  4. MCSDK-HPC package
  5. MinGW (optional, only for Windows host users)

Procedure

The required list of install and rebuild steps is as follows:

Windows

Install Code Generation Tools 8.0.1

  1. Run the installer downloaded above and follow the steps to install the Code Generation Tools on your Windows machine. Note the installation directory as the installation path will be used below.
    • My installation directory is 'C:/TI/ti-cgt-c6000_8.0.1'. The instructions below will use this path.

Install the MCSDK and rebuild the PDKs

  1. Run the MCSDK 2.1.2.6 installer downloaded above and follow the steps to install the MCSDK on your Windows machine. Note the installation directory as the installation path will be used below.
    • My installation directory is 'C:/TI/mcsdk_02_01_02_06'. The instructions below will use this path.
  2. Run the MCSDK 2.1.2.6 Patch 01 installer downloaded above and follow the steps to install the patch on top of the MCSDK 2.1.2.6 installation from the previous step.
  3. Modify mcsdk_02_01_02_06/pdk_C6657_1_1_2_6/packages/ti/csl/cslr_device.h line #1320 and replace the forward slash (/) with an underscore.
  4. Modify lines 38 and 43 of pdk_C66xx_1_1_2_6/packages/ti/drv/qmss/config.bld in all three of the PDKs (C6678, C6670, and C6657) to add the mem_model, like below:
    • Line 38: C66LE.ccOpts.prefix = "-mo -o3 -q -k -eo.o --mem_model:data=far";
    • Line 43: C66BE.ccOpts.prefix = "-mo -o3 -q -k -eo.o --mem_model:data=far -DBIGENDIAN";
    • Mem model.png
  5. Modify the pdk_C66xx_1_1_2_6/packages/ti/drv/qmss/src/qmss_drv.c file in all three of the PDKs (C6678, C6670, and C6657) to add DATA_SECTION pragmas for the qmssLObj and qmssLObjIsValid variables, like below. Place each DATA_SECTION pragma on the line above each variable declaration.
    • #pragma DATA_SECTION (qmssLObj, ".far:local");
    • #pragma DATA_SECTION (qmssLObjIsValid, ".far:local");
    • Data section.png
  6. Rebuild the PDKs with the new changes
    1. For C6678 open a command prompt and navigate to mcsdk_02_01_02_06/pdk_C6678_1_1_2_6/packages
    2. set C6X_GEN_INSTALL_PATH=C:/TI/ti-cgt-c6000_8.0.1
    3. set XDC_INSTALL_PATH=C:/TI/mcsdk_02_01_02_06/xdctools_3_23_04_60
    4. set CG_XML_BIN_INSTALL_PATH=C:/TI/mcsdk_02_01_02_06/cg_xml/bin
    5. set EDMA3_LLD_INSTALL_PATH=C:/TI/mcsdk_02_01_02_06/edma3_lld_02_11_05_02
    6. Type '.\ti\drv\pdksetupenv.bat'
      • The output should be 'PDK BUILD ENVIRONMENT CONFIGURED'
    7. Type '.\ti\drv\pdkbuilder.bat'
    8. Once this has finished follow the same steps above from step 1 - 7 for both the C6670 PDK as well as the C6657 PDK

Rebuild OpenMP 2.x for KeyStone 1

  1. Install the MCSDK-HPC package downloaded above onto a Linux machine
  2. Locate the openmp_dsp_2_01_16_02 folder inside the directory where the MCSDK-HPC package was installed and copy this folder to your Windows machine
    • These are the only two steps that will require a Linux machine for the Windows version of these steps
  3. On the Windows machine find the openmp_dsp_2_01_16_02/utils/Makefile file in the folder you just copied
  4. Open the Makefile and change 'C6636' on line 26 to 'C6657'
  5. In the same Makefile delete all references to C6636 or hawking
  6. Save the Makefile
  7. Open a command prompt with make capabilities at the openmp_dsp_2_01_16_02 folder
    • You may need to install MinGW (mentioned as optional in the downloads section above) in order to have make capabilities on your Windows machine
  8. Type the following commands replacing paths to products with the correct path on your machine, notice that the only path not found in the MCSDK 2.1.2.6 (which we installed in an earlier step) is the code generation tools (that we also just installed)
    1. set BUILD_KS1_LIBS=1
    2. set XDCCGROOT=C:/TI/ti-cgt-c6000_8.0.1
    3. set C6678_PDK_DIR=C:/TI/mcsdk_02_01_02_06/pdk_C6678_1_1_2_6/packages
    4. set C6670_PDK_DIR=C:/TI/mcsdk_02_01_02_06/pdk_C6670_1_1_2_6/packages
    5. set C6657_PDK_DIR=C:/TI/mcsdk_02_01_02_06/pdk_C6657_1_1_2_6/packages
    6. set XDC_DIR=C:/TI/mcsdk_02_01_02_06/xdctools_3_23_04_60
    7. set BIOS_DIR=C:/TI/mcsdk_02_01_02_06/bios_6_33_06_50/packages
    8. set IPC_DIR=C:/TI/mcsdk_02_01_02_06/ipc_1_24_03_32/packages
    9. make -f utils/Makefile
  9. Once this build has finished follow the steps in the OpenMP_Runtime_User_Guide.pdf found in the openmp_2_01_16_02/docs folder to build your first OpenMP example
    • Use the RTSC component versions that are provided with the MCSDK 2.1.2.6 release when building your OpenMP examples for KeyStone 1 (PDK 1.1.2.6, IPC 1.24.3.32, SYS/BIOS 6.33.6.50, XDC 3.23.4.60)

Ubuntu

Install Code Generation Tools 8.0.1

  1. Open a terminal window and navigate to the folder containing the ti_cgt_c6000_8.0.1_linux_installer_x86.bin file that was downloaded from the required software section above.
  2. Add execute permissions by typing 'chmod +x ti_cgt_c6000_8.0.1_linux_installer_x86.bin'
  3. Now type './ti_cgt_c6000_8.x.x_linux_installer_x86.bin' to start the installation
  4. Select your installation directory and click next
  5. C6000 Code Generation Tools are now installed on your Linux host, remember the installation directory as we will be using it again shortly
    • My installation directory is '~/ti/ti-cgt-c6000_8.0.1'. The instructions below will use this path.

Install the MCSDK

  1. Open a terminal window and navigate to the folder containing the bios_mcsdk_02_01_02_06_setuplinux.bin file that was downloaded from the required software section above
  2. Add execute permissions by typing 'chmod +x bios_mcsdk_02_01_02_06_setuplinux.bin'
  3. Now type './bios_mcsdk_02_01_02_06_setuplinux.bin' to start the installation
  4. Select your installation directory and click next
  5. Select all of the available packages and continue with the installation
  6. MCSDK 2.1.2.6 is now installed on your Linux host, remember the installation directory as we will be using it again shortly
    • My installation directory is '~/ti/mcsdk_2_01_02_06'. The instructions below will use this path.
  7. Open a terminal window and navigate to the folder containing the bios_mcsdk_02_01_02_06_patch01_setuplinux.bin file that was downloaded from the required software section above
  8. Add execute permissions by typing 'chmod +x bios_mcsdk_02_01_02_06_patch01_setuplinux.bin'
  9. Now type './bios_mcsdk_02_01_02_06_patch01_setuplinux.bin' to start the installation
  10. Follow the installation instructions and install this patch to the same folder that the MCSDK 2.1.2.6 was installed in the previous steps

Rebuild the PDKs

  1. Modify mcsdk_02_01_02_06/pdk_C6657_1_1_2_6/packages/ti/csl/cslr_device.h line #1320 and replace the forward slash (/) with an underscore
  2. Modify lines 38 and 43 of pdk_C66xx_1_1_2_6/packages/ti/drv/qmss/config.bld in all three of the PDKs (C6678, C6670, and C6657) to add the mem_model, like below:
    • Line 38: C66LE.ccOpts.prefix = "-mo -o3 -q -k -eo.o --mem_model:data=far";
    • Line 43: C66BE.ccOpts.prefix = "-mo -o3 -q -k -eo.o --mem_model:data=far -DBIGENDIAN";
    • Mem model.png
  3. Modify the pdk_C66xx_1_1_2_6/packages/ti/drv/qmss/src/qmss_drv.c file in all three of the PDKs (C6678, C6670, and C6657) to add DATA_SECTION pragmas for the qmssLObj and qmssLObjIsValid variables, like below. Place each DATA_SECTION pragma on the line above each variable declaration.
    • #pragma DATA_SECTION (qmssLObj, ".far:local");
    • #pragma DATA_SECTION (qmssLObjIsValid, ".far:local");
    • Data section.png
  4. Rebuild the PDKs with the new changes
    1. For C6678 open a terminal window and navigate to mcsdk_2_01_02_06/pdk_C6678_1_1_2_6/packages
    2. Type 'export C6X_GEN_INSTALL_PATH=~/ti/ti-cgt-c6000_8.0.1' replacing my path with your path to the Code Generation Tools
    3. Type 'export EDMA3_LLD_INSTALL_PATH=~/ti/mcsdk_2_01_02_06/edma3_lld_02_11_05_02' replacing my path with your path to the EDMA3 LLD
    4. Type 'chmod +x ./ti/drv/pdksetupenv.sh'
    5. Type './ti/drv/pdksetupenv.sh'
      • The output should be 'PDK environment is set successfully'
    6. Type 'chmod +x ./ti/drv/pdkbuilder.sh'
    7. Type './ti/drv/pdkbuilder.sh'
    8. Once this has finished follow the same steps above from step 1 - 7 for both the C6670 PDK as well as the C6657 PDK

Rebuild OpenMP 2.x for KeyStone 1

  1. Open a terminal window and navigate to the folder containing the mcsdk-hpc_03_xx_xx_xx_setuplinux.bin file that was downloaded from the required software section above (where 03_xx_xx_xx is the version number you downloaded)
  2. Add execute permissions by typing 'chmod +x mcsdk-hpc_03_xx_xx_xx_setuplinux.bin'
  3. Now type './chmod +x mcsdk-hpc_03_xx_xx_xx_setuplinux.bin' to start the installation
  4. Select your installation directory and click next
  5. Locate the openmp_dsp_2_01_16_02 folder inside the directory where the MCSDK-HPC package was just installed
  6. Copy this openmp_dsp_2_01_16_02 folder to another location on your Linux machine since we will be rebuilding it for KeyStone 1 and MCSDK 2.1.2.6
  7. Find the openmp_dsp_2_01_16_02/utils/Makefile file in the folder you just copied
  8. Open the makefile and change 'C6636' on line 26 to 'C6657'
  9. In the same makefile delete all references to C6636 or hawking
  10. Save the makefile
  11. Open a terminal window and navigate to the new openmp_dsp_2_01_16_02 folder
  12. Type the following commands replacing paths to products with the correct path on your machine, notice that the only path not found in the MCSDK 2.1.2.6 (which we installed in an earlier step) is the code generation tools (that we also just installed)
    1. export BUILD_KS1_LIBS=1
    2. export XDCCGROOT=~/ti/ti-cgt-c6000_8.0.1
    3. export C6678_PDK_DIR=~/ti/mcsdk_2_01_02_06/pdk_C6678_1_1_2_6/packages
    4. export C6670_PDK_DIR=~/ti/mcsdk_2_01_02_06/pdk_C6670_1_1_2_6/packages
    5. export C6657_PDK_DIR=~/ti/mcsdk_2_01_02_06/pdk_C6657_1_1_2_6/packages
    6. export XDC_DIR=~/ti/mcsdk_2_01_02_06/xdctools_3_23_04_60
    7. export BIOS_DIR=~/ti/mcsdk_2_01_02_06/bios_6_33_06_50/packages
    8. export IPC_DIR=~/ti/mcsdk_2_01_02_06/ipc_1_24_03_32/packages
    9. make -f utils/Makefile
  13. Once this build has finished follow the steps in the OpenMP_Runtime_User_Guide.pdf found in the openmp_2_01_16_02/docs folder to build your first OpenMP example
    • Use the RTSC component versions that are provided with the MCSDK 2.1.2.6 release when building your OpenMP examples for KeyStone 1 (PDK 1.1.2.6, IPC 1.24.3.32, SYS/BIOS 6.33.6.50, XDC 3.23.4.60)
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 Porting OpenMP 2.x to KeyStone 1 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 Porting OpenMP 2.x to KeyStone 1 here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Porting OpenMP 2.x to KeyStone 1 here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Porting OpenMP 2.x to KeyStone 1 here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Porting OpenMP 2.x to KeyStone 1 here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Porting OpenMP 2.x to KeyStone 1 here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Porting OpenMP 2.x to KeyStone 1 here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Porting OpenMP 2.x to KeyStone 1 here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Porting OpenMP 2.x to KeyStone 1 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