MCUSW
CAN Response and Bootloader Demo Application

Introduction


This application demonstrates the fast boot capability provided by the Octal SPI flash controller on J721E & J7200 SoCs. By default, it boots the main domain cores with basic applications, and also provides mechanisms to alternatively boot Linux or QNX on the MPU1_0 (i.e. A72) core. In addition, it demonstrates booting of the main domain cores via MMCSD media on J721E/J7200. The application performs the following actions:

  1. MCAL Can driver is hosted on MCU1_0
  2. Transmit a 64 byte CAN message, or, alternatively, run CAN profiling
  3. Boot the main domain cores with a sample application image
  4. Optionally, boots a HLOS (Linux, QNX) on the main domain MPU1_0

This facilitates an early CAN response feature, typically required in an automotive ECU, followed by booting of the main domain cores on the SoC.

Performance / Early CAN response

Please refer to the data sheets for early CAN response


Internal Dependencies

This application depends on multiple components and are detailed in sections below

  1. MCAL CAN Driver
  2. MCAL BSW Stubs Stubs at coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcal_drv/mcal/Bsw_Stubs are used. Functions CanIf_TxConfirmation () is required.
  3. MCAL Configurations CAN & DIO Configurations at coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/mcal_config are used.

Back To Top


External Dependencies

This application depends on the Secondary Boot Loader (SBL) component from Processor SDK RTOS. For further details on the SBL, please refer to the Platform Development Kit (PDK) documentation on the SBL component for this release.


Flow Charts

The following flow chart displays the main application on the MCU1_0, which can spawn up to 2 current tasks.

canbootapp_main.png
MCU1_0 CAN and Bootloader Application

The following flow chart displays the functionality of the CAN task if the CAN function is set to "can_profiling".

demo_can_profile_flowchart.png
MCU1_0 CAN Profiling Task

The following flow chart displays the functionality of the CAN task if the CAN function is set to "can_fast_response".

canbootapp_can_response_task.png
MCU1_0 CAN Response Task

The following flow chart displays the functionality of the Boot task, as well as the applications started on the main domain cores.

canbootapp_boot_task.png
MCU1_0 Boot Task and Main Domain Applications

The following flow chart displays the functionality of the Boot task when run along with BIST (as well as the applications started on the main domain cores). Note that the default build of this application disables the BIST thread shown below, and BISTFUNC flag must be enabled in the build for BIST to be run.

canbootapp_boot_task_plus_bist.png
MCU1_0 Boot Task with BIST and Main Domain Applications

Back To Top


Compile Time Configurations for Boot Application

  1. Enable/Disable Boot Task

    The task that boots the main domain cores can be enabled/disabled. In the default boot sequence there are 3 stages for booting (J721E), or 2 stages (J7200). The specification of the cores to be included in each stage is given by the arrays "boot_order_first_stage", "boot_order_second_stage" and "boot_order_third_stage", found in mcuss_demos/boot_app_mcu_rtos/soc/$SOC/boot_core_defs.c. Below is the configuration flag for this feature.

    • BOOTFUNC

    Options are "enabled" (default) or "disabled".

  2. Enable/Disable BIST Task (J721E only) The task that runs Logic BIST and Memory BIST prior to boot stages can be enabled/disabled. In the default BIST sequence, there is one "pre-boot" stage (for BIST sections that need to be run before booting any of the main domain cores) and 3 main stages where BIST is run for main domain cores prior to the Boot Task booting those particular cores. The specification of the cores to be included in each stage is given by the arrays "pbist_pre_boot_stage", "lbist_pre_boot_stage", "pbist_first_boot_stage", "lbist_first_boot_stage", "pbist_second_boot_stage", "lbist_second_boot_stage", "pbist_third_boot_stage", and "lbist_third_boot_stage" in mcuss_demos/boot_app_mcu_rtos/soc/$SOC/bist_core_defs.c. Care should be taken to ensure that BIST sections defined for the 3 main stages (in bist_core_defs.c) match those utilized by the Boot Task (in boot_core_defs.c). Note that BOOTFUNC must be set to "enabled" as well to use the BIST Task. Below is the configuration flag for this feature.

    • BISTFUNC

    Options are "enabled" or "disabled" (default).

  3. Boot Media

    The boot task can either boot the main domain cores using an appimage located in OSPI or on an MMCSD card. Below is the configuration flag for this feature.

    • BOOTMODE

    Options are "ospi" (default) or "mmcsd".

    Note that if the "ospi" option is utilized, the custom Secondary Boot Loader (sbl_cust_img) is expected to load the MCUSW Boot Application. If the "mmcsd" option is used, the mmcsd Secondary Boot Loader (sbl_mmcsd_img) should be used to load the MCUSW Boot Application.

  4. Using DMA with OSPI Boot mode When using OSPI boot mode, this flash can be set, along with changes in the SBL "cust" build to enable OSPI DMA usage for loading images from the flash. Below is the configuration flag for this feature.
    • ENABLE_OSPI_DMA Options are "no" (default) or "yes".
  5. Boot Operating Systems for MPU1_0

    The boot task, by default, will load example applications written for TI Real-Time Operating System (RTOS) for all main domain cores (including MPU1_0). Alternatively, Linux or QNX operating systems could be loaded on MPU1_0. Below is the configuration flag for this feature.

    • HLOSBOOT

    Options are "none" (default, which means MPU1_0 TI RTOS application is loaded), "qnx", or "linux".

  6. CAN Functionality

    The CAN task can either perform a fast CAN response, some CAN profiling over many messages, or be completely turned off. Below is the configuration flag for this feature.

    • CANFUNC

    Options are "can_fast_response" (default), "can_profiling", or "none" (to completely disable the CAN task).

Compile Time Configurations for CAN profiling / CAN fast response task

  1. Enable CAN transmit only mode

    In transmit-only mode, messages can be received if an external CAN utility, like the CANOE tool or the PEAK tool, are connected to the EVM board. The J721E/J7200 EVM has four CAN ports: MCU_MCAN0, MCU_MCAN1, MCAN0 and MCAN2(J721E)/MCAN3(J7200). However, this demonstration only uses the first instance, MCU_MCAN0. Below are the configuration flags associated with this feature.

    • CAN_LOOPBACK_ENABLE

    Enable/Disable internal loopback mode.

    Options are "STD_ON" or "STD_OFF".

    CAN loopback configuration is present at coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/mcal_config/Can_Demo_Cfg/output/generated/soc/$SOC/mcu1_0/include/Can_Cfg.h

    • CAN_TX_ONLY_MODE

    Enable TX-only mode (vs. RX-only mode).

    Options are "STD_ON" or "STD_OFF".

    CAN TX only configuration is present at coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/can_resp.h (if using CAN Response task) AND mcuss_demos/boot_app_mcu_rtos/can_profile.h (if using CAN Profile task)

  2. Use first instance of CAN peripheral only

    Saves boot time by using only the first instance (MCU_MCAN0) of the CAN peripheral configured. Below is the configuration.

    • APP_INSTANCE_1_INST_IN_CFG_ONLY

    Use first instance of CAN peripheral only.

    Options are "STD_ON" or "STD_OFF".

    CAN configuration is present at coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/can_resp.h (if using CAN Response task) AND mcuss_demos/boot_app_mcu_rtos/can_profile.h (if using CAN Profile task)

  3. Disable early prints before CAN response

    When testing for early CAN response, it is important to disable any early prints that may be taking extra time before the CAN response actually starts. Below is the configuration.

    • CAN_INITIAL_PRINT_DISABLE_BEFORE_CAN_RESPONSE

    Enable this flag to minimize latencies due to early prints (disables the early prints).

    Options are "STD_ON" or "STD_OFF".

    CAN early prints configuration is present at coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/can_resp.h (if using CAN Response task) AND mcuss_demos/boot_app_mcu_rtos/can_profile.h (if using CAN Profile task)

Customizing CAN response / CAN profiling examples

For TX Only Flag Value Location
APP_INSTANCE_1_INST_IN_CFG_ONLY STD_ON mcuss_demos/boot_app_mcu_rtos/can_resp.h AND mcuss_demos/boot_app_mcu_rtos/can_profile.h
CAN_LOOPBACK_ENABLE STD_OFF mcuss_demos/mcal_config/Can_Demo_Cfg/output/generated/soc/$SOC/mcu1_0/include/Can_Cfg.h
CAN_TX_ONLY_MODE STD_ON mcuss_demos/boot_app_mcu_rtos/can_resp.h AND mcuss_demos/boot_app_mcu_rtos/can_profile.h
CAN_INITIAL_PRINT_DISABLE_BEFORE_CAN_RESPONSE STD_ON mcuss_demos/boot_app_mcu_rtos/can_resp.h AND mcuss_demos/boot_app_mcu_rtos/can_profile.h (if desired, to reduce early latency in CAN response)
Loopback Flag Value Location
APP_INSTANCE_1_INST_IN_CFG_ONLY STD_OFF mcuss_demos/boot_app_mcu_rtos/can_resp.h AND mcuss_demos/boot_app_mcu_rtos/can_profile.h
CAN_LOOPBACK_ENABLE STD_ON mcuss_demos/mcal_config/Can_Demo_Cfg/output/generated/soc/$SOC/mcu1_0/include/Can_Cfg.h
CAN_TX_ONLY_MODE X mcuss_demos/boot_app_mcu_rtos/can_resp.h AND mcuss_demos/boot_app_mcu_rtos/can_profile.h
CAN_INITIAL_PRINT_DISABLE_BEFORE_CAN_RESPONSE STD_OFF mcuss_demos/boot_app_mcu_rtos/can_resp.h AND mcuss_demos/boot_app_mcu_rtos/can_profile.h

For instructions on how to measure early CAN response timing, see the Early CAN response on J721E/J7200 section.

Back To Top


Test Setup / Configurations used

Loopback mode

  1. Supported EVM / SoC
    canbootapp_j721e_can_loopback_setup.png
    Loopback Setup

TX Only mode

  1. CAN_HIGH of all the nodes on the bus shall be connected together. Similary CAN_LOW of all the nodes on the bus shall be connected together.
    canbootapp_j721e_can_tx_setup.png
    TxOnly Setup
canbootapp_j721e_can_tx_setup_closeup.png
TxOnly Setup - Closeup

Back To Top


Building dependent binaries

We need have the following binaries built from coresdk_rtos_jacinto_xx_yy_xx_bb:

  1. sbl_cust_img that loads TIFS and initializes the OSPI flash. This SBL is used when utilizing MCUSW Boot App with BOOTMODE="ospi".
  2. sbl_mmcsd_img that loads TIFS, initializes the board, and copies the MCUSW Boot App image from the SD card to DDR memory. This SBL is used when utilizing MCUSW Boot App with BOOTMODE="mmcsd".

Apart from the above binaries, we need to build the can_boot_app_mcu_rtos that the SBL copies from either OSPI flash or the SD card, and does the following:

  1. CAN loopback / transmit
  2. Boot the available main domain cores - J7200: MPU1_0, MCU2_0, MCU2_1; J721E: MPU1_0, MCU2_0, MCU2_1, MCU3_0, MCU3_1, C66X_0, C66X_1, C7X_0

Building sbl_cust_img

Go to coresdk_rtos_jacinto_xx_yy_xx_bb/pdk_jacinto_07.x.x/packages/ti/build and run the following w/ $board set to "j721e_evm" or "j7200_evm":

make -j BOARD=$board CORE=mcu1_0 BUILD_PROFILE=release sbl_cust_img

OPTION for OSPI boot w/ DMA: If you plan to build the can_boot_app_mcu_rtos with ENABLE_OSPI_DMA=yes , then you need to make some corresponding changes in sbl_cust_img by modifying the CUST_SBL_TEST_FLAGS and some related makefile lines in the file coresdk_rtos_jacinto_xx_yy_xx_bb/pdk_jacinto_07.x.x/packages/ti/boot/sbl/sbl_component.mk. Make the following changes to these lines (with -DSBL_USE_DMA=1 and with SBL_USE_DMA=yes), and then do a clean build of sbl_lib_cust & sbl_cust_img:

CUST_SBL_TEST_FLAGS =" -DSBL_USE_DMA=1 -DSBL_LOG_LEVEL=1 -DSBL_SCRATCH_MEM_START=0xB8000000 -DSBL_SCRATCH_MEM_SIZE=0x4000000 -DSBL_ENABLE_PLL -DSBL_ENABLE_CLOCKS -DSBL_ENABLE_DDR -DSBL_SKIP_MCU_RESET -DBOOT_OSPI"
...
sbl_lib_cust_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_lib.mk BOOTMODE=cust SBL_USE_DMA=yes CUST_SBL_FLAGS=$(CUST_SBL_TEST_FLAGS)
...
sbl_cust_img_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_img.mk BOOTMODE=cust SBL_USE_DMA=yes BUILD_HS=no CUST_SBL_FLAGS=$(CUST_SBL_TEST_FLAGS)

NOTE: For Early CAN response with the fastest boot time (with NO prints enabled), you can pre-configure the SBL flags before building sbl_cust_img by modifying the CUST_SBL_TEST_FLAGS in the file coresdk_rtos_jacinto_xx_yy_xx_bb/pdk_jacinto_07.x.x/packages/ti/boot/sbl/sbl_component.mk. Just search for this line and un-comment it (and comment out similar lines above it), then save and build sbl_cust_img:

#CUST_SBL_TEST_FLAGS =" -DSBL_USE_DMA=0 -DSBL_LOG_LEVEL=1 -DSBL_SCRATCH_MEM_START=0x41cc0000 -DSBL_SCRATCH_MEM_SIZE=0x40000 -DSBL_ENABLE_PLL -DSBL_ENABLE_CLOCKS -DSBL_SKIP_MCU_RESET -DBOOT_OSPI -DSBL_ENABLE_DEV_GRP_MCU -DSBL_HLOS_OWNS_FLASH -DSBL_SKIP_PINMUX_ENABLE -DSBL_SKIP_LATE_INIT -DSBL_USE_MCU_DOMAIN_ONLY"

Building sbl_mmcsd_img

Go to coresdk_rtos_jacinto_xx_yy_xx_bb/pdk_jacinto_07.x.x/packages/ti/build and run the following w/ $board set to "j721e_evm" or "j7200_evm":

make -j BOARD=$board CORE=mcu1_0 BUILD_PROFILE=release sbl_mmcsd_img

Building can_boot_app_mcu_rtos

Go to coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/build and run the following w/ $board as "j721e_evm" or "j7200_evm" and with matching $soc as "j721e" or "j7200":

make -s -j can_boot_app_mcu_rtos BOARD=$board SOC=$soc BUILD_PROFILE=release CORE=mcu1_0 BUILD_OS_TYPE=tirtos

The default mode is OSPI boot and CAN fast response, with all main domain cores loaded with TI RTOS images.

Some common configurations also supported include:

For Early CAN response measurement (NO prints, and NO cores booted):

make -s -j can_boot_app_mcu_rtos BOOTFUNC=disabled BOARD=$board SOC=$soc BUILD_PROFILE=release CORE=mcu1_0 BUILD_OS_TYPE=tirtos MCUSW_UART_ENABLE=false

Booting TI RTOS images from MMCSD (all TI RTOS images for main domain cores):

make -s -j can_boot_app_mcu_rtos BOOTMODE=mmcsd BOARD=$board SOC=$soc BUILD_PROFILE=release CORE=mcu1_0 BUILD_OS_TYPE=tirtos

Booting HLOS on MPU1_0 with TI RTOS images on other main domain cores (OSPI mode):

make -s -j can_boot_app_mcu_rtos HLOSBOOT=linux BOARD=$board SOC=$soc BUILD_PROFILE=release CORE=mcu1_0 BUILD_OS_TYPE=tirtos
make -s -j can_boot_app_mcu_rtos HLOSBOOT=qnx BOARD=$board SOC=$soc BUILD_PROFILE=release CORE=mcu1_0 BUILD_OS_TYPE=tirtos

Booting HLOS on MPU1_0 with TI RTOS images on other main domain cores (MMCSD mode):

make -s -j can_boot_app_mcu_rtos HLOSBOOT=linux BOOTMODE=mmcsd BOARD=$board SOC=$soc BUILD_PROFILE=release CORE=mcu1_0 BUILD_OS_TYPE=tirtos
make -s -j can_boot_app_mcu_rtos HLOSBOOT=qnx BOOTMODE=mmcsd BOARD=$board SOC=$soc BUILD_PROFILE=release CORE=mcu1_0 BUILD_OS_TYPE=tirtos

The output appimage "can_boot_app_mcu_rtos_mcu1_0_release.appimage" will be placed in coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/binary/can_boot_app_mcu_rtos/bin/$board directory.


Building main domain applications

Creating RTOS appimage for main domain cores

Go to coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/scripts and run the following, with $board as "j721e_evm" or "j7200_evm": ./makemulticore.sh $board

After building all the binaries for each main domain core, this script calls the constructappimage_multistage.sh script to construct main-domain appimage files for loading the main domain cores, in three separate stages. The multi-stage appimage files will be utilized by the MCUSW boot application to load the main domain cores. J721E: the output appimage files "multicore_MCU2_0_MCU2_1_stage1.appimage", "multicore_DSPs_MCU3_0_MCU3_1_stage2.appimage", and "multicore_MPU1_0_stage3.appimage" will be placed in coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/binary/bin/j721e_evm directory, and these appimage files contain binaries for the following cores: MPU1_0, MCU2_0, MCU2_1, MCU3_0, MCU3_1, C66X_0, C66X_1, C7X_0. J7200: the output appimage files "multicore_MCU2_0_MCU2_1_stage1.appimage" and "multicore_MPU1_0_stage2.appimage" will be placed in coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/binary/bin/j7200_evm directory, and these appimage files contain binaries for the following cores: MPU1_0, MCU2_0, MCU2_1.

There is also a separate script, constructappimage_singlestage.sh, which can be used to combine all of the core images into a single appimage file, "multicore_split_with_DSPs.appimage", if it is desired to load all the main domain cores in a single stage. The contents of this appimage can be customized by slight modification of the script. This script contains some variables for the most-likely appimage cases in the main domain:

  1. mpu_rtos_enabled - This flag controls if the appimage will contain MPU1_0 binary or not. By default, this flag is set, and, thus, includes example RTOS MPU1_0 application. If Linux or QNX is instead desired on MPU1_0, this flag should be set to 0, and then re-run the constructappimage.sh.
  2. split_mode - This flag controls if main MCU's are run in split mode or not. If it is set to 0, the MCU2_1 and MCU3_1 images will be left out of the appimage. Note that the name of the generated output changes when disabling this flag.
  3. dsp_binaries_included - This flag control if C66 and C7 DSP binaries are included or not. Note that the name of the generated output changes when disabling this flag.

Note that either constructappimage_multistage.sh or constructappimage_singlestage.sh could be utilized to formulate main-domain appimages with other binaries on each core. One could simply copy these ELF images to the mcuss_demos/boot_app_mcu_rtos/main_domain_apps/binary/bin/$board directory, and then modify the ElfImages, CoreRprcFiles, and CoreIds arrays within the script before running it.

Creating HLOS appimages for Linux or QNX

In the common, alternative case where Linux/QNX is booted on MPU1_0, the following steps should be followed:

  1. Rebuild the can_boot_app_mcu_rtos image with the HLOSBOOT flag set to either "linux" or "qnx", as described in the Building can_boot_app_mcu_rtos section.
  2. Go to the coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/scripts/hlos directory and edit the constructappimageshlos.sh by setting the "OS" and Linux-specific or QNX-specific paths to match your setup. This assumes that the Linux/QNX binaries have already been created, as this script only creates appimages based off these already-created HLOS binaries.
  3. After modifying the user-defined variables in the constructappimageshlos.sh script, run this script like this: ./constructappimagehlos.sh $board . If run correctly, the coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/binary/bin/$board directory should now contain the following files:
    1. For Linux - atf_optee.appimage, tidtb_linux.appimage, and tikernelimage_linux.appimage
    2. For QNX - atf_optee.appimage and ifs_qnx.appimage
  4. NOTE: For booting the remaining MAIN domain cores (other than A72), you can simply reuse the RTOS images that were built in an earlier step in the binaries: "multicore_MCU2_0_MCU2_1_stage1.appimage" & "multicore_DSPs_MCU3_0_MCU3_1_stage2.appimage"

Steps to run

Writing needed binaries to OSPI

To run the default TI RTOS applications on all the main domain cores, flash the following binaries in OSPI memory at the respective offsets (in hex) as given below:

J721E:

  1. coresdk_rtos_jacinto_xx_yy_xx_bb/pdk_jacinto_07.x.x/packages/ti/boot/sbl/binary/j721e_evm/cust/bin/sbl_cust_img_mcu1_0_release.tiimage @ 0
  2. coresdk_rtos_jacinto_xx_yy_xx_bb/pdk_jacinto_07.x.x/packages/ti/drv/sciclient/soc/V1/tifs.bin @ 80000
  3. coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/binary/can_boot_app_mcu_rtos/bin/j721e_evm/can_boot_app_mcu_rtos_mcu1_0_release.appimage @ 100000
  4. coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/binary/bin/j721e_evm/multicore_MCU2_0_MCU2_1_stage1.appimage @ 1fc0000
  5. coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/binary/bin/j721e_evm/multicore_DSPs_MCU3_0_MCU3_1_stage2.appimage @ 27c0000
  6. coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/binary/bin/j721e_evm/multicore_MPU1_0_stage3.appimage @ 37c0000

To alternatively boot Linux on MPU1_0 (while still booting TI RTOS applications on the other main domain cores), also flash the following binaries in OSPI memory at the respective offsets (in hex):

  1. coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/binary/bin/j721e_evm/atf_optee.appimage @ 1c0000
  2. coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/binary/bin/j721e_evm/tikernelimage_linux.appimage @ 7c0000
  3. coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/binary/bin/j721e_evm/tidtb_linux.appimage @ 1ec0000

To alternatively boot QNX on MPU1_0 (while still booting TI RTOS applications on the other main domain cores), also flash the following binaries in OSPI memory at the respective offsets (in hex):

  1. coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/binary/bin/j721e_evm/atf_optee.appimage @ 1c0000
  2. coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/binary/bin/j721e_evm/ifs_qnx.appimage @ 7c0000

Note that, for Linux/QNX binaries, the can_boot_app_mcu_rtos_mcu1_0_release.appimage will also need to be rebuilt, as described in Creating HLOS appimages for Linux or QNX, and redownloaded to the designated OSPI location above. For booting the remaining MAIN domain cores (other than A72), you can simply reuse the RTOS images that were built in an earlier step in the binaries: "multicore_MCU2_0_MCU2_1_stage1.appimage" & "multicore_DSPs_MCU3_0_MCU3_1_stage2.appimage".

J7200:

  1. coresdk_rtos_jacinto_xx_yy_xx_bb/pdk_jacinto_07.x.x/packages/ti/boot/sbl/binary/j7200_evm/cust/bin/sbl_cust_img_mcu1_0_release.tiimage @ 0
  2. coresdk_rtos_jacinto_xx_yy_xx_bb/pdk_jacinto_07.x.x/packages/ti/drv/sciclient/soc/V2/tifs.bin @ 80000
  3. coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/binary/can_boot_app_mcu_rtos/bin/j7200_evm/can_boot_app_mcu_rtos_mcu1_0_release.appimage @ 100000
  4. coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/binary/bin/j7200_evm/multicore_MCU2_0_MCU2_1_stage1.appimage @ 1fc0000
  5. coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/binary/bin/j7200_evm/multicore_MPU1_0_stage2.appimage @ 27c0000

To alternatively boot Linux on MPU1_0 (while still booting TI RTOS applications on the other main domain cores), also flash the following binaries in OSPI memory at the respective offsets (in hex):

  1. coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/binary/bin/j7200_evm/atf_optee.appimage @ 1c0000
  2. coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/binary/bin/j7200_evm/tikernelimage_linux.appimage @ 7c0000
  3. coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/binary/bin/j7200_evm/tidtb_linux.appimage @ 1ec0000

To alternatively boot QNX on MPU1_0 (while still booting TI RTOS applications on the other main domain cores), also flash the following binaries in OSPI memory at the respective offsets (in hex):

  1. coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/binary/bin/j7200_evm/atf_optee.appimage @ 1c0000
  2. coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/binary/bin/j7200_evm/ifs_qnx.appimage @ 7c0000

Note that, for Linux/QNX binaries, the can_boot_app_mcu_rtos_mcu1_0_release.appimage will also need to be rebuilt, as described in Creating HLOS appimages for Linux or QNX, and redownloaded to the designated OSPI location above. For booting the remaining MAIN domain cores (other than A72), you can simply reuse the RTOS images that were built in an earlier step in the binary: "multicore_MCU2_0_MCU2_1_stage1.appimage".

Refer Uniflash Programming Guide to learn how to program the binaries at the respective offset in the flash.

Writing needed binaries to MMCSD

To run the default TI RTOS applications on all the main domain cores, copy the following binaries onto the MMCSD card:

  1. coresdk_rtos_jacinto_xx_yy_xx_bb/pdk_jacinto_07.x.x/packages/ti/boot/sbl/binary/$board/cust/bin/sbl_mmcsd_img_mcu1_0_release.tiimage, rename to tiboot3.bin
  2. coresdk_rtos_jacinto_xx_yy_xx_bb/pdk_jacinto_07.x.x/packages/ti/drv/sciclient/soc/V1/tifs.bin (for J721E), or *../V2/tifs.bin* (for J7200)
  3. coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/binary/can_boot_app_mcu_rtos/bin/$board/can_boot_app_mcu_rtos_mcu1_0_release.appimage, rename to app
  4. coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/binary/bin/<board/multicore_MCU2_0_MCU2_1_stage1.appimage, rename to lateapp1
  5. J7200: coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/binary/bin/j7200_evm/multicore_MPU1_0_stage2.appimage, rename to lateapp2
  6. J721E: coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/binary/bin/<j721e_evm/multicore_DSPs_MCU3_0_MCU3_1_stage2.appimage, rename to lateapp2
  7. J721E: coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/binary/bin/j721e_evm/multicore_MPU1_0_stage3.appimage, rename to lateapp3

To alternatively boot Linux on MPU1_0 (while still booting TI RTOS applications on the other main domain cores), also copy the following binaries onto the MMCSD card:

  1. coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/binary/bin/$board/atf_optee.appimage
  2. coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/binary/bin/$board/tidtb_linux.appimage
  3. coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/binary/bin/$board/tikernelimage_linux.appimage

To alternatively boot QNX on MPU1_0 (while still booting TI RTOS applications on the other main domain cores), also copy the following binaries onto the MMCSD card:

  1. coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/binary/bin/$board/atf_optee.appimage
  2. coresdk_rtos_jacinto_xx_yy_xx_bb/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/binary/bin/$board/ifs_qnx.appimage

Note that, for Linux/QNX binaries, the can_boot_app_mcu_rtos_mcu1_0_release.appimage will also need to be rebuilt, as described in Creating HLOS appimages for Linux or QNX, and copied again to the MMCSD card. For booting the remaining MAIN domain cores (other than A72), you can simply reuse the RTOS images that were built in an earlier step in the binaries: "multicore_MCU2_0_MCU2_1_stage1.appimage" & "multicore_DSPs_MCU3_0_MCU3_1_stage2.appimage".

Running the demonstration

  1. Ensure boot mode of the EVM is configured as described in (J721E/J7200 EVM MMC/SD Boot Mode) or (J721E/J7200 EVM OSPI Boot Mode)
  2. UART / Console for demo application logs / messages
    • J721E/J7200 EVM has 2 UART ports
    • UART port named MCU UART would be used when demo applications are hosted on MCU R5F (e.g. MCU1_0)
    • UART port named UART would be used when demo applications are hosted on MAIN R5F (e.g. MCU2_1, etc.)
    • Refer EVM Image at (J721E EVM)
  3. Connect two separate micro USB cables between MCU UART port (J43) <==> host PC and Main UART port (J44) <==> host PC
  4. Configure two separate instances of a serial console application on host PC to use MCU UART port, channel #2 (i.e. second UART instance) and Main UART port, channel #2 (i.e. fourth UART instance), respectively. For each instance, use a '115200 8N1' configuration.
    1. If also testing Linux/QNX booting, also configure Main UART port, channel #1 (i.e. third UART instance) with a similar '115200 8N1' configuration.
  5. Power ON the board and confirm the boot logs on serial console

After the application has completed, the UART logs are contained on the following UART ports:

  1. MCU UART port, channel #2 (i.e. second UART instance) - MCU R5F CAN Boot Application logs
  2. Main UART port, channel #1 (i.e. third UART instance) - Linux/QNX boot logs (only if Linux/QNX build enabled)
  3. Main UART port, channel #2 (i.e. fourth UART instance) - Main Domain RTOS application logs

Back To Top


Sample output RTOS main domain apps, CAN Loop back mode

Below is the log for CAN Boot App (J721E) when CAN is configured in loop-back mode, and all main domain cores run the RTOS example application (OSPI boot mode).

MCU UART Port#2 (second UART port on PC):

CAN Response App:NOTE : Operating in internal loop-back mode
CAN Response App:Message Id Received 800000c0 Message Length is 64
CAN Response App:Test completed for 0 instance

CAN Response App:NOTE : Operating in internal loop-back mode
CAN Response App:Message Id Received 800000b0 Message Length is 64
CAN Response App:Test completed for 1 instance

C OSPI NOR device ID: 0x5b1a, manufacturer ID: 0xCAN Response App: 8192 bytes used for stack
CAN Response App: 8192 bytes used for stack
CAN Response App:Early CAN completed!!!
Boot App: Started at 347 usec
Boot App: Total Num booted cores = 8
Boot App: Booted Core ID #6 at 294663 usecs
Boot App: Booted Core ID #7 at 294937 usecs
Boot App: Booted Core ID #8 at 311442 usecs
Boot App: Booted Core ID #9 at 311717 usecs
Boot App: Booted Core ID #10 at 312044 usecs
Boot App: Booted Core ID #11 at 312372 usecs
Boot App: Booted Core ID #12 at 312807 usecs
Boot App: Booted Core ID #0 at 319346 usecs

MCU Boot Task started at 345 usecs and finished at 1931335 usecs

Main UART Port#2 (fourth UART port on PC):

MPU1_0 started running at 331942 usecs
MPU1_0 initialized at 332201 usecs
MCU2_0 started running at 349214 usecs
MCU2_0 initialized at 350583 usecs
MCU2_1 started running at 349576 usecs
MCU2_1 initialized at 350947 usecs
MCU3_0 started running at 366498 usecs
MCU3_0 initialized at 367807 usecs
MCU3_1 started running at 366748 usecs
MCU3_1 initialized at 368070 usecs
C7X_0 started running at 332874 usecs
C7X_0 initialized at 333038 usecs
C66X_0 started running at 342547 usecs
C66X_0 initialized at 343780 usecs
C66X_1 started running at 343237 usecs
C66X_1 initialized at 344200 usecs

Back To Top


Sample output RTOS main domain apps with QNX, CAN Loop back mode

Below is the log for CAN Boot App (J721E) when CAN is configured in loop-back mode, and all main domain cores run the RTOS example application (OSPI boot mode), except for MPU1_0 running QNX.

MCU UART Port#2 (second UART port on PC):

CAN Response App:NOTE : Operating in internal loop-back mode
CAN Response App:Message Id Received 800000c0 Message Length is 64
CAN Response App:Test completed for 0 instance

CAN Response App:NOTE : Operating in internal loop-back mode
CAN Response App:Message Id Received 800000b0 Message Length is 64
CAN Response App:Test completed for 1 instance

CAN Response App: 8192 bytes used for stack
CAN Response App:Early CAN completed!!!
OSPI flash left configured in Legacy SPI mode.

 OSPI NOR device ID: 0x5b1a, manufacturer ID: 0x2c
Boot App: Started at 347 usec
Boot App: Total Num booted cores = 8
Boot App: Booted Core ID #6 at 294667 usecs
Boot App: Booted Core ID #7 at 294942 usecs
Boot App: Booted Core ID #8 at 311390 usecs
Boot App: Booted Core ID #9 at 311664 usecs
Boot App: Booted Core ID #10 at 311991 usecs
Boot App: Booted Core ID #11 at 312315 usecs
Boot App: Booted Core ID #12 at 312755 usecs
Boot App: Booted Core ID #0 at 572087 usecs

MCU Boot Task started at 346 usecs and finished at 2117335 usecs

Main UART Port#1 (third UART port on PC):

NOTICE:  BL31: v2.2(debug):ti2019.06-rc5
NOTICE:  BL31: Built : 09:20:36, Feb 12 2020
INFO:    GICv3 without legacy support detected. ARM GICv3 driver initialized in EL3
INFO:    SYSFW ABI: 3.0 (firmware rev 0x0014 '20.04.1-v2020.04a (Terrific Lla')
INFO:    BL31: Initializing runtime services
INFO:    BL31: cortex_a72: CPU workaround for cve_2018_3639 was applied
INFO:    BL31: Initializing BL32
I/TC:
I/TC: OP-TEE version: ti2019.06-rc5 (gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36))) #3 Thu Jan 30 16:40:38 UTC 2020 aarch64
I/TC: Initialized
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x80080000
INFO:    SPSR = 0x3c9
MMU: 16-bit ASID 44-bit PA TCR_EL1=b5183519
cpu0: MPIDR=80000000
cpu0: MIDR=411fd080 Cortex-A72 r1p0
cpu0: CWG=4 ERG=4 Dminline=4 Iminline=4 PIPT
cpu0: CLIDR=a200023 LoUU=1 LoC=2 LoUIS=1
cpu0: L1 Icache 48K linesz=64 set/way=256/3
cpu0: L1 Dcache 32K linesz=64 set/way=256/2
cpu0: L2 Unified 1024K linesz=64 set/way=1024/16
Loading IFS...done
cpu1: MPIDR=80000001
cpu1: MIDR=411fd080 Cortex-A72 r1p0
cpu1: CWG=4 ERG=4 Dminline=4 Iminline=4 PIPT
cpu1: CLIDR=a200023 LoUU=1 LoC=2 LoUIS=1
cpu1: L1 Icache 48K linesz=64 set/way=256/3
cpu1: L1 Dcache 32K linesz=64 set/way=256/2
cpu1: L2 Unified 1024K linesz=64 set/way=1024/16

System page at phys:0000000080011000 user:ffffff8040252000 kern:ffffff8040251000
Starting next program at vffffff8060058ae0
MMFLAGS=1
All ClockCycles offsets within tolerance
Welcome to QNX Neutrino 7.0 on TI J721E EVM Board!!
start serial driver
Toggle GPIO_uSD_PWR_EN for uSD
data: ch c2h
data: 4h c2h
data: 4h c6h
data: ch c6h
data: 4h ceh
data: 7h fch
MASTER_SEND: Input/output error
Setting environment variables...
done..
Looking for user script to run: /sd/user.sh
Unable to access /sd/stage/user.sh
done...
J7EVM#

Main UART Port#2 (fourth UART port on PC):

MCU2_0 started running at 349013 usecs
MCU2_0 initialized at 350403 usecs
MCU2_1 started running at 349377 usecs
MCU2_1 initialized at 350787 usecs
MCU3_0 started running at 367257 usecs
MCU3_0 initialized at 368619 usecs
MCU3_1 started running at 367538 usecs
MCU3_1 initialized at 368904 usecs
C7X_0 started running at 332980 usecs
C7X_0 initialized at 333144 usecs
C66X_0 started running at 342690 usecs
C66X_0 initialized at 343960 usecs
C66X_1 started running at 343404 usecs
C66X_1 initialized at 344470 usecs

Back To Top


Known Issues

  1. When booting QNX on MPU1_0 from MMCSD, the reading of the IFS (QNX) image is not optimized for MMCSD. Thus, the start of the booting of QNX may not happen until about 8-10 seconds after the MCUSW CAN Boot App has started. Note that customers are encouraged to utilize OSPI boot media to get best startup times.

Back To Top


Document Revision History

Revision Date Author Description Status
0.1 16 Apr 2019 Somnath Initial Version Approved
0.2 8 Aug 2019 Sunil M S Updates logs for release 00.09.01 Approved
0.3 30 Jan 2020 Danny Jochelson New Version For TIRTOS Boot App Approved
0.4 4 Feb 2020 Jonathan Bergsagel Updated for CAN boot app CAN response compile options Approved
0.5 17 Feb 2020 Sujith S Re Organized the document Approved
0.6 28 May 2020 Jonathan Bergsagel Updated CAN boot app instructions for 7.0 SDK release Approved
0.7 22 Sept 2020 Danny Jochelson Updated CAN boot app to include BIST task, Updated Boot Task to show staged image parsing Approved
0.8 4 Nov 2020 Jonathan Bergsagel Updated instructions to include J7200 support, and new OSPI flash memory layout for images Approved
0.9 17 Nov 2020 Jonathan Bergsagel Removed prior issue on booting Linux. Boot App enables an optimized Linux boot flow Approved