2. Getting Started

Important

Processor SDK RTOS (PSDK RTOS) for Jacinto 7 needs to be downloaded separately.

2.1. Downloading and installing the PSDK QNX

2.1.1. Step 1: Install QNX Packages

  • In order to build for a QNX environment, there are multiple packages from QNX Software Center that must be installed. This includes the QNX SDP and related packages. Please refer to the Software Depencies section of the Release Notes, for a list of those packages, and ensure they are installed on the host build machine.
  • While installing the QNX SDP, the default install location is:
/home/$USER/qnx700
or
/home/$USER/qnx710
  • You can install it anywhere, but please update the version and paths accordingly in “${PSDK_RTOS_PATH}/vision_apps/vision_apps_tools_path.mak”
export QNX_SDP_VERSION ?= <700 or 710>
ifeq ($(QNX_SDP_VERSION),700)
  export QNX_BASE ?= <your-sdp700-path>
  export QNX_CROSS_COMPILER_TOOL ?= aarch64-unknown-nto-qnx7.0.0-
else
 export QNX_BASE ?= <your-sdp710-path>
 export QNX_CROSS_COMPILER_TOOL ?= aarch64-unknown-nto-qnx7.1.0-
endif

2.1.2. Step 2: Download PSDK RTOS and PSDK QNX

  • The PSDK RTOS release can be downloaded from ti.com. The version of the PSDK RTOS and PSDK QNX release must be the same. The psdk rtos package needs to be installed in your build machine. Here after we’ll refer to this installation directory as $PSDK_RTOS_PATH
  • Similarly download the psdk qnx package (ti-processor-sdk-qnx_xx_xx_xx.tar.gz) and extract this to the $PSDK_RTOS_PATH
tar -xvf ti-processor-sdk-qnx_xx_xx_xx.tar.gz -C $PSDK_RTOS_PATH

2.1.3. Step 3: Install the PSDK QNX

2.1.3.1. For QNX SDP 7.0

  • Once the PSDK QNX package has been extracted the psdkqa/qnx/scripts/psdk_qnx_setup_qnx700.sh can be run from the $PSDK_RTOS_PATH folder to complete installation. The psdk_qnx_setup_qnx700.sh creates

    1. A QNX specific copy of the PDK in psdkqa/pdk
    2. A TI modified copy of the QNX BSP in psdkqa/bsp
  • The following variables must be set correctly in the psdkqa/qnx/scripts/psdk_qnx_setup_qnx700.sh for the script to function correctly.

PDK_VERSION=${PSDK_RTOS_PATH}/pdk_jacinto_07_01_00_XX                   (The location of the extracted PDK package.  Typically found in ${PSDK_RTOS_PATH})
QNX_BSP_PATH=${QNX_BASE}/bsp/                                           (The location of the extracted bsp that was downloaded from QNX Software Center)
QNX_BSP_NAME=BSP_ti-j721e-am752x-evm_br-700_be-700_SVNxxxxxx_JBNyy.zip  (The QNX BSP zip file)
QNX_BSP_VERSION=700_SVNxxxxxx_JBNyy                                     (The QNX BSP version)

The QNX_BASE referenced is the location in which QNX SDP was installed. The script asssumes the default location, so please give the correct path if you installed elsewhere.

Note

QNX Software Center would download the bsp archive by default to /home/$USER/qnx700/bsp, however user can modify this path.

Note

Please refer to the Software Depencies section of the Release Notes for supported QNX BSP releases.

  • The BSP archive must be extracted prior to running the psdk_qnx_setup_qnx700.sh script.
  • After modifying the psdkqa/qnx/scripts/psdk_qnx_setup_qnx700.sh script, then launch it with the following command from the PSDK RTOS directory path.
cd ${PSDK_RTOS_PATH}
./psdkqa/qnx/scripts/psdk_qnx_setup_qnx700.sh

2.1.3.2. For QNX SDP 7.1

  • Once the PSDK QNX package has been extracted the psdkqa/qnx/scripts/psdk_qnx_setup_qnx710.sh can be run from the $PSDK_RTOS_PATH folder to complete installation. The psdk_qnx_setup_qnx710.sh creates

    1. A QNX specific copy of the PDK in psdkqa/pdk
    2. A TI modified copy of the QNX BSP in psdkqa/bsp
  • The following variables must be set correctly in the psdkqa/qnx/scripts/psdk_qnx_setup_qnx710.sh for the script to function correctly.

PDK_VERSION=${PSDK_RTOS_PATH}/pdk_jacinto_07_01_00_XX                  (The location of the extracted PDK package.  Typically found in ${PSDK_RTOS_PATH})
QNX_BSP_PATH=${QNX_BASE}/bsp/                                          (The location of the extracted bsp that was downloaded from QNX Software Center)
QNX_BSP_NAME=BSP_ti-j721e-am752x-evm_br-710_be-710_SVNxxxxxx_JBNyy.zip (The QNX BSP zip file)
QNX_BSP_VERSION=710_SVNxxxxxx_JBNyy                                    (The QNX BSP version)

The QNX_BASE referenced is the location in which QNX SDP was installed. The script asssumes the default location, so please give the correct path if you installed elsewhere.

Note

QNX Software Center would download the bsp archive by default to /home/$USER/qnx710/bsp, however user can modify this path.

Note

Please refer to the Software Depencies section of the Release Notes supported QNX BSP releases.

  • The BSP archive must be extracted prior to running the psdk_qnx_setup_qnx710.sh script.
  • After modifying the psdkqa/qnx/scripts/psdk_qnx_setup_qnx710.sh script, then launch it with the following command from the PSDK RTOS directory path.
cd ${PSDK_RTOS_PATH}
./psdkqa/qnx/scripts/psdk_qnx_setup_qnx710.sh

2.2. Build and run of PSDK QNX and Vision Apps demos

  • The Vision Apps build environment is used as a centralized build location for both PSDK RTOS and PSDK QNX. To build and run the PSDK QNX and vision apps demos, detailed instructions from vision_apps user guide should be followed. Refer to the Build and Run section of vision apps userguide. You can either use the latest online documentation [LINK] or the local documentation at ${PSDK_RTOS_PATH}/vision_apps/docs/user_guide/index.html
  • For details regarding setting the EVM, boot modes etc., please refer EVM Setup for J721e
  • Refer to section CCS Setup for J721e for steps to debug RTOS or QNX cores.

2.3. Resource Managers

The PSDK QNX package provides A72 resource managers as described in PSDK QNX Components, for:

  • SCI
  • UDMA
  • IPC
  • Shared Memory Allocator

These resource managers must be launched during system intialization. Examples of this can be seen in ${PSDK_QNX_PATH}/qnx/scripts/user.sh. This script file is used during initialization, and is included in the SD card image generated by following Build and Run section of vision apps userguide [LINK].

2.4. PSDK QNX Boot Modes

Important

Refer to PSDK RTOS documentation for detailed information boot modes, and boot flow.

The PSDK QNX addon package supports 3 different boot modes

  • SPL/Uboot,
  • SBL+BootApp(SD Boot)
  • SBL+BootApp(OSPI Boot)

The steps to get each of these boot modes running is covered in the Build and Run section of vision apps userguide [LINK].

2.4.1. SPL (Uboot) Boot Mode

For the SPL/Uboot option, the following binaries are required, which are available as part of the PSDKLA package:

  • R5 bootloader (tiboot3.bin),
  • A72 bootloader (tispl.bin),
  • U-boot (U-boot.img)
  • DMSC System firmware binary (sysfw.itb).

2.4.2. SBL Boot Modes

When using the SBL / BootApp boot flow, be aware that the following set of resources are already configured prior to QNX starting. The settings are mostly done through usage of “Board_init()” calls in SBL or Boot App, which in turn call init functions in the Board library:

PLLs: Refer to the list PLLs that are initialized for both MCU & MAIN domains in the “gBoardPllClkCfgMcu[]” and “gBoardPllClkCfgMain[]” struct arrays, shown in the board_pll.c file here:

Clocks: Refer to the list of Clocks that are initialized for both MCU & MAIN domains in the “gBoardClkModuleMcuID[]” and “gBoardClkModuleMainID[]” arrays, shown in the board_clock.c file here:

Pinmux: on the J721E EVM, the main boards and daughter boards are detected and basic pinmux setup is done for the primary functionality used with these boards. Any other functionality must be customized (for customer boards, etc.). The pinmux configuration is called using the function “Board_pinmuxConfig” in the file here:

Related MCU & MAIN domain pinmux selections are possible (depending on which daughter boards are connected to the main EVM), where configurations are shown in these files:

There are other files there for different EVM daughter boards, etc.

DDR: LPDDR4 memory is configured through the “Board_DDRInit()” function in file:

Boot media: The Boot App will leave the boot media (either OSPI flash or SD card) as previously used, but with handles closed and left in a state to allow the software on the A72 to take over control:

  • MMCSD boot: SD card has been released and is ready for HLOS to take control
  • OSPI flash: Flash is closed & re-initialized in SPI mode, so that the HLOS can reset the flash as needed and re-initialize with its own OSPI