PDK Documentation
User Guide

Introduction

The Texas Instruments Platform Development Kit (PDK) is a single scalable software driver package that offers streamlined development on J721E ADAS Processor. The PDK package contains Device Abstraction Layer libraries and peripheral/board level sample/demo examples that demonstrate the capabilities of the peripherals on J721E platform for development, deployment and execution of applications.


Scope

The purpose of this guide is to quickly provide the information you need most while evaluating and developing applications on a TI embedded processor, specifically running embedded real-time operating system. It is not intended to be a thorough design document. As such, the focus is on application programming interfaces (API), build information, and examples to use as a template to start development.


Building the PDK

The PDK comes with pre-built application and libraries for running the demos/examples and everything you need to start writing an application (Note: This is part of the binary package and not available with source only package). However, one may want to customize and rebuild the source. Inside the PDK there is a top-level makefile at PDK_INSTALL_DIR/packages/ti/build that can be used to build some of the sub-components found within the PDK. Prior to calling this makefile, user needs to get the correct tool chains and setup the environment by updating Rules.make available at PDK_INSTALL_DIR/packages/ti/build


Build Steps

This section describes the steps to build the PDK package. For Windows machine, the package is built using the gmake from TI XDC package. For Linux machine, make can be used. In all below commands "gmake" can be replaced with "make" for Linux machine build. Also makefile internally uses some binaries like rm, mkdir echo from Cygwin.

To build all the examples and libraries you can use following command.

gmake -s allcores BOARD=j721e_evm

This will build all examples and libraries for all applicable cores.

gmake -s all BOARD=j721e_evm CORE=mcu2_0

Command to clean all targets you can use following command

gmake -s allcores_clean BOARD=j721e_evm

Command to clean everything (all cores and all platforms/boards)

gmake -s allclean

Command to clean individual targets you can use following command

gmake -s <target>_clean BOARD=j721e_evm CORE=<core>

To know more build options run the below command.

gmake -s help BOARD=j721e_evm

Command to build an examples/demos/libraries you can use following command

gmake -s <app_name/comp> BOARD=<board> CORE=<core>

<app_name/comp> can be found from the help command as shown above or in the make file of the respective examples and library folder.

Note: The executable will be generated under PDK_INSTALL_DIR/packages/ti/binary/<example> folder.
Note: The library will be generated under PDK_INSTALL_DIR/packages/ti/<component>/lib/<soc>/<core>/<debug/release>/ folder.
IMPORTANT NOTE: If the installation folder depth is high then windows cmd prompt fails with error that it cannot find a file, even if the file is present in mentioned path, this is because Windows has a limitation of 8191 characters for the commands that can execute. In such situation as a workaround either restrict the folder depth to d:/ or if it cannot be restricted use git bash to build. Refer https://support.microsoft.com/en-in/kb/830473 for more details.
(Always point to xdc path gmake only)
IMPORTANT NOTE: If '-j' option is used in windows build and build fails then clean that particular application target and run the same command again w/o '-j' option.


Pinmux

Steps to integrate pinmux for J7 custom boards:

  • Copy the pinmux generated files J721E_pinmux.h and J721E_pinmux_data.c to pdk/packages/ti/board/src/j721e_evm
  • Open pdk/packages/ti/board/src/j721e_evm/src_files_j721e_evm.mk and make below update to SRCS_COMMON configuration
    SRCS_COMMON += board_pinmux.c AM7xxx_pinmux_data.c AM7xxx_pinmux_data_info.c AM7xxx_pinmux_data_gesi.c AM7xxx_pinmux_data_gesi_cpsw9g.c
    To
    SRCS_COMMON += board_pinmux.c J721E_pinmux_data.c
  • Open pdk/packages/ti/board/src/j721e_evm/J721E_pinmux.h and make below modifications
    Change #include "pinmux.h" at line 26 to #include <ti/board/src/j721e_evm/include/pinmux.h>
    Change #include "csl_types.h" at line 27 to #include <ti/csl/csl_types.h>
  • Open pdk/packages/ti/board/src/j721e_evm/include/board_pinmux.h and make below modifications
    Change #include <ti/board/src/j721e_evm/AM7xxx_pinmux.h> at line 49 to #include <ti/board/src/j721e_evm/J721E_pinmux.h>
  • Open board_pinmux.c and search for function Board_pinmuxConfig() and replace with below code
    Board_STATUS Board_pinmuxConfig (void)
    {
    Board_STATUS status = BOARD_SOK;
    Board_pinmuxUpdate(gJ721E_MainPinmuxData,
    BOARD_SOC_DOMAIN_MAIN);
    Board_pinmuxUpdate(gJ721E_WkupPinmuxData,
    BOARD_SOC_DOMAIN_WKUP);
    return status;
    }

All the above steps are one time configurations. Copying J721E_pinmux_data.c to board folder and below step should be performed everytime there is change in pinmux output No need to change the J721E_pinmux.h everytime from pinmux tool unless there a change in pinmux tool verion

  • Open pdk/packages/ti/board/src/j721e_evm/J721E_pinmux_data.c and make below modifications
    Remove 'static' keyword in declarion of gJ721E_MainPinmuxData and gJ721E_WkupPinmuxData

Follow below additional clean-up steps which are optional but to remove the unused pinmux references

  • Remove the below files from pdk/packages/ti/board/src/j721e_evm folder
    AM7xxx_pinmux_data_info.c
    AM7xxx_pinmux_data_gesi.c
    AM7xxx_pinmux_data_gesi_cpsw9g.c

Supported Cores

mpu1_0 mcu1_0 mcu1_1 mcu2_0 mcu2_1 mcu3_0 mcu3_1 c66xdsp_1 c66xdsp_2 c7x_1
VHWA X
DSS X
CSI2RX X
SCICLIENT X X X X X X X X X X
IPC X X X X X X X X X X
UDMA X X X X X X X X X X
CPSW2G X
CPSW9G X
OSPI X X
MMCSD/FATFS X X
I2C X X X X X X X X X X
McSPI X
GPIO X X X X X X X X X X
UART X X X X X X X X X
McASP X X X X X
MCAN X X
SPINLOCK X X X
MAILBOX X X X
CRC X X
ESM X
ADC X
DCC X

Test Setup / Running examples

Refer the PSDKRA top level user guide for generic test setup details and steps to run the examples/demos using CCS/SBL.
For all examples logs will be available on CCS console or Uart console. Logs from mcu domain cores should be captured on J43 connector and logs from main domain cores should be captured on J44 connector. Refer to PSDKRA top level user guide for details.
Below sections mentions any special steps/setup required for each of the specific tests.

CSI Rx

  • Setup Details:
    • Connect the Fusion 1 Rev C to 'CSI EXP' MIPI connector available on J7 Common Processor Board.
    • Connect 4 IMX390 sensors to Fusion 1 board('Cam0' to 'Cam3' ports)
  • Expected result:
    • After capturing n frames, application shall print capture status like fps, number of error frames and number of dropped frames on the UART as well as on the CCS console.
    • Typically, number of error and dropped frames should be '0'. For 4 channel capture, fps should be ~120 fps(~30 fps per channel).

DSS

  • Setup Details:
    • Connect DP to Display 0 port available on the Common processor Board.
    • Connect the HDMI display on the HDMI port available on the infotainment daughter card.
  • Expected result:
    • Display test app will display on eDP connected to Display 0 port of Common Processor board.
    • A simple pattern with number is diaplyed.
    • Only 1080p display resolution is tested

OSPI

For OSPI application make sure that the SW3[1] should be off.

CPSW

  • Please refer the Cpsw Integration Guide for setup/test details. This Cpsw integration guide is available at PDK_INSTALL_DIR/packages/ti/drv/cpsw/docs/doxygen/html/cpsw_integration_guide_top.html
  • Please refer PHY Integration Guide to integrate PHY module and to know more about the state machine implemented in PHY driver. This PHY integration guide is available at PDK_INSTALL_DIR/packages/ti/drv/cpsw/docs/doxygen/html/cpsw_phy_guide_top.html

VHWA

VHWA Examples requires the input images to be loaded in the memory. The example will print the addresses where the buffers needs to be loaded on the UART console.
Connect to the mcu2_1 core using CCS.
Make sure the core is halted and load the images using the scripting console.
Similarly the output buffer addresses are printed for each of the test cases.
Once the test case is executed, save the output buffers using the scripting console.

An example load and save commands to be run on the scripting console is as given below.

 loadRaw(0x90000000,0,"C:\\in.raw",32,false);
 saveRaw(0,0xA0000000,"C:\\out.raw",1048576,32,false);