MCUSW
J722S Build and Installation User Guide

Installation Steps


J722S

No additional steps required. However, the MCAL configurator would require an additional step. Please refer (Getting access to MCAL) to receive installer for configurator and steps to obtain licese is detailed in (License for Configurator)

Please note that this is an indicative image, actual soc and versions would change

Back To Top


Directory Structure

Post installation of MCUSW, the following directory would be created. Please note that this is an indicative snap-shot. Modules/Drivers could be added/modified.

MCAL

MCAL Directory structure, contains MCAL modules, build files. Please note that this is an indicative snap-shot. Modules/Drivers could be added/modified.

Back To Top


MCAL Examples

Contains demo applications that demonstrate use of MCAL modules. An integrator could refer these to determine the dependencies of the module.

MCAL Examples Configuration

Contains configurations (standalone i.e. configuration for given module and its dependencies, such as Gpt (not dependent on other modules), Can (with Dio, etc...))

Back To Top


Hardware Dependencies

MCU SW is supported on the boards/EVM listed below


J722S EVM No Boot Mode

Contact your FAE for documents describing the EVM

J722S EVM SD Boot Mode

Contact your FAE for documents describing the EVM

Back To Top


MCUSS Demonstration Applications

MCAL Dependencies

  • Bsw_Stubs : BSW Stubs that would be required to implement MCAL based demo applications
  • mcal_config : MCAL Driver Configurations

Utilities

  • demo_utils : Utility functions

Demos

Please refer (MCU Demos) for more information on supported demo applications

Back To Top


Build


MCAL employs make based build mechanism. When building on Windows based machine, tool such as Cygwin could be used.

CCS folder should contain Cygwin, please see (Setup Build Environment) for more details.

Setup Build Environment


Following changes are required to be performed in Rules.make to build

  1. Rules.make can be found at ($SDK_INSTALL_PATH)/mcusw/build, When building on Windows environment ensure to update variables under ifeq (,Windows_NT)
  2. Choose to build either MCUSS Demo Applications or MCAL Examples
    • MCUSS demo application no longer uses TI RTOS (sysBios), they only support freertos and MCAL do not use any OS
    • Set BUILD_OS_TYPE = freertos to build MUCSS demo applications
    • Set BUILD_OS_TYPE = baremetal to build MCAL examples/libraries
  3. Specify the location of the compiler
    • Typically SDK package includes the required compiler
    • In Rules.make, update SDK_INSTALL_PATH to specify location of the SDK installation.
    • One can override compiler path by updating variable TOOLCHAIN_PATH_R5
  4. Enable / Disable logging messages to UART
    • Flag MCUSW_UART_ENABLE, when set to TRUE directs the messages from example application to UART console. When set to FALSE, these messages are displayed in CCS console.
  5. Windows environment only
    • All the required utils are provided with the CCS installation. If CCS is not installed, please download Cygwin and install it. Cygwin
    • Ensure path gmake is included in windows environment variable Path Eg: C:/ti/ccs1010/ccs/utils/bin
    • Specify location of the Cygwin utils, update utils_PATH in mcusw/build/Rules.make file. This utils is required for "rm" command. Eg: C:/ti/ccs1010/ccs/utils/cygwin
    • OpenSSL installation is required for windows build. Easiest way for Windows users to install OpenSSL (if not already present) is to download and install Strawberry Perl. Ensure that the installed location of OpenSSL is added to Windows Environment Variables for a successful build.
    • Note that MPU core builds (CORE=mpu1_0) are not supported in Windows setup.

If FoundationSDK is installed sucessfully, no specific changes are required to build.

To build for specific SoC, ensure using BOARD=j72xxx_evm and SOC=j72xx explicitly in each command. By default J721E is selected.

Example: gmake -s all BOARD=j722s_evm SOC=j722s


Build Everything MCAL


With steps listed at (Setup Build Environment) all MCAL modules can be built

  • Ensure BUILD_OS_TYPE = baremetal
  • Go to folder ($SDK_INSTALL_PATH)/mcusw/build
  • Linux make -s all and gmake -s all for Windows
  • Linux make -s all CORE=mcu2_1 and gmake -s all CORE=mcu2_1 for Windows does not work, as default eth_app is not supported on core MCU2_1.
  • Use BOARD=j722s_evm to build for J722S SOC(Linux make -s all BOARD=j722s_evm and gmake -s all BOARD=j722s_evm for Windows)
  • Use option -j to speed up compilation (note that -j option is not recomended while building demos)
  • On Successful compilation, binary folder would be created in ($SDK_INSTALL_PATH)/mcusw/binary/(driver name)_app/bin/j722s_evm OR ($SDK_INSTALL_PATH)/mcusw/binary/(driver name)_app/bin/j722s_evm
  • Similarly, other devices builds are also enabled.

Build All Demos


With steps listed at (Setup Build Environment) completed MCAL modules can be built

  1. Go to folder ($SDK_INSTALL_PATH)/mcusw/build

J722S

  1. Can Profiling Application
    • make -s can_profile_app BOARD=j722s_evm SOC=j722s BUILD_PROFILE=release CORE=mcu1_0 BUILD_OS_TYPE=freertos
    • make -s can_profile_app BOARD=j722s_evm SOC=j722s BUILD_PROFILE=release CORE=mcu2_1 BUILD_OS_TYPE=freertos
  2. IPC Profiling Application
    • make -s cdd_ipc_profile_app BOARD=j722s_evm SOC=j722s BUILD_PROFILE=release CORE=mcu1_0 BUILD_OS_TYPE=freertos
    • make -s ipc_remote_app BOARD=j722s_evm SOC=j722s BUILD_PROFILE=release CORE=mcu2_1 BUILD_OS_TYPE=freertos
  • On Successful compilation, binary folder would be created in ($SDLINSTALL_PATH)/mcusw/binary/(driver name)_app_(BUILD_OS_TYPE)/bin/j722s_evm
  • Similarly, build for other devices are also enabled.

Profiles


  • Debug : Mostly used to development or debugging
    • BUILD_PROFILE=debug
  • Release : Recommended to be used for production / profiling performance
    • BUILD_PROFILE=release

Other useful commands


  1. To Clean all pdk libraries
    • gmake -s pdk_allclean
    • As MCUSW is dependent on PDK, if any changes done in PDK, please clean PDK and build MCUSW application again.
  2. To Clean all examples (all MCAL drivers and their associated examples) For J722S, need to explicitly mention BOARD=j72xxx_evm SOC=j72xxx as by default J721E is selected.
    • gmake -s allclean BOARD=j722S_evm SOC=j722S
  3. To Build all examples (all MCAL drivers and their associated examples) For J722S, need to explicitly mention BOARD=j72xx_evm as by default J721E is selected.
    • gmake -s all BOARD=j722S_evm SOC=j722S
  4. To build libraries only (only MCAL driver are built as library)
    • gmake -s mcusw_libs BOARD=j722S_evm SOC=j722S
  5. To build specific example (associated MCAL driver will also be built)
    • gmake -s can_app BOARD=j722S_evm
      • Other examples adc_app, cdd_ipc_app, dio_app, eth_app, eth_virtmac_app, gpt_app, mcspi_app, pwm_app, wdg_app, fls_app, fls_app_dac, fls_app_indac and fls_app_xip, icu_app
      • The above list is indicative and examples could be added/deleted
      • To determine example name, refer makefile in subdirectory of ($SDK_INSTALL_PATH)/mcusw/mcal/examples/
        • gmake -help, will list available target names
    • gmake can_profile_app -s
    • gmake can_profile_app -s BOARD=j722S_evm SOC=j722S

Examples Linker File (Select memory location to hold example binary)


The example applications use different memory and this could be changed/re-configured.

  • linker_r5.lds defines the memory locations used by the MCAL examples.
    • The linker file is specific to a device/core and available at mcusw/build/(device family name)/(core name)/linker_r5.lds
  • linker_r5_freertos.lds defines the memory locations used by the MCU SS demo applications
    • The linker file is specific to a device and available at mcusw/build/(device family name)/(core name)/linker_r5_freertos.lds
    • Used for demo application that use FREERTOS, which would be hosted on MCU 1 0.
  • Application Specific Linker command files
    • Some applications require to use custom linker command files
    • e.g. for low-latency memory accesses, can profile application uses custom linker command files
    • These would be under the application overrides directory. e.g. for can profile application it would at mcusw/mcuss_demos/profiling/can/overrides/j722s/mcu1_0/linker_r5_sysbios.lds

  • Memory that is used to hold, code, data impacts performance of the driver
  • When placed in internal memory (such OCMRAM) best performance is noted
  • It's recommended to place ISR code and other frequently used code/data in internal memory

Running Examples


IDE


CCS


Please refer (IDE (CCS)) for CCS and GEL setup

Load Example Binaries


SBL


Compiler Flags used


MCAL Drivers - Profile : Release


Flag Description
-g Default behavior. Enables symbolic debugging. The generation of debug information do not impact optimizations. Therefore, generating debug information is enabled by default.
-c Disables linking
-qq Super Quite Mode
-pdsw225 Categorizes the diagnostic identified by num as a warning
-march direct the compiler to target a particular architecture
–endian=little Little Endian
-Wall Enable most warning categories
-Wno Disable the specified warning category.
-mv7R5 Processor Architecture Cortex-R5
-mcpu Select the target processor version.
-mfpu option to specify which floating-point hardware is available for use by the compiler
-mfloat-abi option in combination with the appropriate -mfpu option depending on what Arm processor variant is in use.
–abi=eabi Application binary interface - ELF
-eo.oem4 Output Object file extension
-ea.sem4 Output assembly file extension
–symdebug:dwarf Generate symbolic debug in DWARF format
–embed_inline_assembly Embed inline assembly in code for optimization
–float_support=vfplib VFP coprocessor is enabled
–emit_warnings_as_errors Treat warning as errors
-os Interlists optimizer comments with assembly statements
–optimize_with_debug Optimize fully in the presence of debug
-DBUILD_MCU1_0, -DBUILD_MCU2_0, -DBUILD_MCU1_1, -DBUILD_MCU2_1 Identifies Core in the domain
-DBUILD_MCU Identifies Domain
-Xlinker Required by TI Arm Clang
–diag_suppress Suppresses the diagnostic identified by num.
–ram_model option tells the linker to initialize variables at load time
–reread_libs option, you can force the linker to reread all libraries
-DSOC_J722S Device Identifier
Please note that all MCAL modules do not support this version. Please refer the release notes for details
Please note that both flags (-DAUTOSAR_421 & -DAUTOSAR_431) cannont be used simultaneously
These flags will be deprecated once all MCAL modules migrate to AUTOSAR Specificaion v4.3.1

*Note – is actually 2 "-" dashes they simply appear as one long dash in the user Guide.

MCAL Examples - Profile : Release


Same flags that were used for driver (MCAL Drivers - Profile : Release), additional flags listed below