MCUSW
User Guide

Integrated MCU

SoC's such as Sitara MPU(AM62x/AM62A), integrates an MicroController Unit Subsystem (MCU SS) as an chip-in-chip. It operates using a separate voltage supply, clock sources and resets and includes the components needed for device management. This allows the MCUSS to function continuously regardless of the state of the rest of the device. MCU SS has one or more DUAL core Cortex R5F (number of instances varies on the variant of the device, please refer the device reference manual)


MCU SW

Consists of two main components, Microcontroller abstraction layer (MCAL) & Demonstration applications (example application). Its is expected to be hosted on Cortex R5F 0 in MCU Domain or other Cortex R5F in main domain. The table below lists SoC/Cores on which MCUSW can be hosted


Getting access to MCUSW

For Eng-releases, mcusw will be released as a .zip package for specific customers.

License for Configurator

  1. EB Tresos requires license to use it refer (Installing Elektrobit Tresos) for details
  2. EB provides limited-pool of license that could be shared by TI with its customers
    1. Classified as limited-period license & permanent license
    2. Limited-period license are expected to be used during development (typically 3 months, 6 months) and permanent license for production
    3. In cases where development is greater than license validity period, TI can provide additional licenses
  3. Login to MySecureSW, and Request Access to the EB Tresos Tool and License from here License Request
  4. Once license are received
    1. Follows steps listed in (Client License Administrator)
    2. IMPORTANT
      1. TI shares user details with EB on quarterly basis (name of organization and email id to whom license is released, fulfillment-id and user name). EB uses this data for license administration
      2. Share Fulfillment ID : Once license is activated, the "fulfillment-id" is to be shared with FAE/TI Engineer who provided license
  5. Third party (AUTOSAR Vendor / Other co-development organizations)
    1. TI can provide the EB licenses to other third party which is engaged by customers
    2. Steps and procedure will remain same as listed above
  6. Number of licenses
    1. Since TI receives finite-set of licenses from EB, TI will have to ration these among it's customers
    2. Based on customer needs / business needs number of license released to customer will be restricted
    3. Please request licenses on need basis

Back To Top



Supported Device Families

Device Family Also known by other names
AM62AX Sitara MPU
AM62x Sitara MPU

Core Naming Conventions

SoC Family Cores Names Referred as Comments
AM62AX MCU R5F Core 0 mcu 0 0 Please refer the "mcusw_release_notes.html" to determine if this release supports this platform. Note that all computing cores might not be supported in MCUSW
AM62X DM R5F Core 0 mcu 0 0 Please refer the "mcusw_release_notes.html" to determine if this release supports this platform. Note that all computing cores might not be supported in MCUSW

Package Contents

MCU Demos

MCU Demos are not support for Sitara MPU devices as this time.


MCAL

MCAL is the lowest layer of the AUTOSAR Basic Software architecture. MCAL contains drivers with direct access to the μC internal peripherals. MCAL is a hardware specific layer that ensures a standard interface to the Basic Software.

This user guide details procedure that are common to all MCAL drivers, please refer driver specific user guide for finer details of driver.

"MCAL" is component within Processor SDK and part of MCUSW as shown in below figure

user_guide_common_01.png
MCAL position within Processor SDK RTOS Automotive

Supported Drivers

Driver Comments Refer Supported SoC Supported Cores ----—
Can Driver for built-in CAN peripheral (Can User Guide) AM62AX/AM62X MCU 0 0
Dio Driver for control of GPIO (Dio User Guide) AM62AX/AM62X MCU 0 0
CDD_IPC Driver for control of CDD_IPC (Cdd Ipc User Guide) AM62AX/AM62X MCU 0 0
Gpt Driver for General purpose timer (Gpt User Guide) AM62AX/AM62X MCU 0 0
Eth Driver for built in CPSW 2G port (Eth & EthTrcv User Guide) AM62AX/AM62X MCU 0 0
EthTrcv Driver for Ethernet Transceiver and tested with DP83867 (Eth & EthTrcv User Guide) AM62AX/AM62X MCU 0 0
Spi Handler and driver for Serial Peripheral Interface (Spi User Guide) AM62AX/AM62X MCU 0 0
Wdg Driver for built in WWDT(Windowed Watchdog Timer) (Wdg User Guide) AM62AX/AM62X MCU 0 0
Mcu Driver for built in Mcu (Mcu User Guide) AM62AX/AM62X MCU 0 0

Back To Top


Dependencies

Dependencies can be categorized as listed below. Please note that depending on the intended use, the dependencies vary (e.g. for integration vs running demo applications only)

  1. Hardware Dependencies (Hardware Dependencies)
  2. Software Dependencies (Software Dependencies)

Hardware Dependencies

MCU SW is supported on the boards/EVM listed below


AM62X EVM

Please contact your FAE for documents describing the EVM. AM62X EVM includes an on-board XDS110 USB emulator.


AM62AX EVM

Please contact your FAE for documents describing the EVM. AM62AX EVM includes an on-board XDS110 USB emulator.


Software Dependencies

Get required MCU Plus SDK release version from TI Website for AM62X and TI Website for AM62AX and place it in same location as mcusw. This is required for building and validating MCAL Applications.


Compiler & Code generation Tools

Packages all required compiler and code generation tools required by MCUSW.

TI Arm Clang compiler : ti-cgt-armllvm_2.1.3.LTS should be installed. TI Website


MCAL Example Application

  • Applications rely on SCI Client to request interrupt number as resource
  • Applications rely on Hwip to register MCAL modules interrupts
  • Applications rely on UART driver to print on console

Back To Top


MCAL Configurator : Elektrobit Tresos

Elektrobit Tresos (EB) is used to configure the MCAL modules, please refer (MCAL Configurator User Guide) for details.

This tool would be required to re configure the MCAL modules provided by TI.

Back To Top


IDE (CCS)

Code Composer Studio is an integrated development environment (IDE) that supports TI's Microcontroller and Embedded Processors portfolio.

Code Composer Studio 12.2.0 CCS verion should be used.

Back To Top

AM62AX

  • Launch CCS
  • Go to View -> Target Configurations -> Create new target configurations
  • Select the connection -> xds 110
  • Select the board or device -> am62ax_sk_evm
  • Finish and Launch the created target configuration

Back To Top


Installation Steps


AM62AX/AM62X

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

c_ug_install_dir_psdkra_1.png
Directory structure post installation

Please note that this is an indicative image, actual 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.

c_ug_dri_1.png
Top Level Directory Structure

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


c_ug_dri_2.png
MCAL Modules

MCAL Examples

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

c_ug_dri_3.png
MCAL Examples

MCAL Examples Configuration

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

c_ug_dri_4.png
MCAL Example Configurations

Back To Top


Build


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

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,Windows_NT)
  2. Build MCAL Examples
    • Set BUILD_OS_TYPE = baremetal to build MCAL examples/libraries
  3. Specify the location of the 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. By default AM62AX_MCU_SDK_VERSION is set to am62ax_09_00_00_19. To use with specific SDK, update AM62AX_MCU_SDK_VERSION in Rules.make file.

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
  • gmake -s all BOARD=am62ax_evm SOC=am62ax BUILD_PROFILE=release CORE=mcu0_0 BUILD_OS_TYPE=baremetal
  • On Successful compilation, binary folder would be created in ($SDK_INSTALL_PATH)/mcusw/binary/(driver name)_app/bin/am62ax_evm/

Other useful commands


  1. To Clean all examples (all MCAL drivers and their associated examples)
    • gmake -s allclean
  2. To Build all examples (all MCAL drivers and their associated examples)
    • gmake -s all BOARD=am62ax_evm SOC=am62ax BUILD_PROFILE=release CORE=mcu0_0 BUILD_OS_TYPE=baremetal
  3. To build specific example (associated MCAL driver will also be built)
    • gmake -s can_app BOARD=am62ax_evm SOC=am62ax BUILD_PROFILE=release CORE=mcu0_0 BUILD_OS_TYPE=baremetal
      • Other examples cdd_ipc_app, dio_app, eth_app, eth_virtmac_app, gpt_app, mcspi_app, wdg_app, mcu_app
      • The above list is indicative and examples could be added/deleted
      • TO build cdd ipc linux application use below command.
      • gmake -s cdd_ipc_app_rc_linux BOARD=am62ax_evm SOC=am62ax BUILD_PROFILE=release CORE=mcu0_0 BUILD_OS_TYPE=baremetal CDD_IPC_LINUX_BUILD=yes
      • To determine example name, refer makefile in subdirectory of ($SDK_INSTALL_PATH)/mcusw/mcal/examples/
        • gmake -help, will list available target names

Profiles


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

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 ($SDK_INSTALL_PATH)/mcusw/build/(device family name)/(core name)/linker_r5.lds
    • In case of AM62Ax,($SDK_INSTALL_PATH)/mcusw/build/am62ax/mcu0_0/linker_r5.lds
    • Used for MCAL example application, that would be hosted on MCU 0 0
  • 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


AM62AX

Using Linux boot

  1. Ensure bootmode of the EVM is configured to SD Card bootmode
  2. Use Balena Etcher application to flash the linux OS on the SD Card using the file tisdk-default-image-am62axx-evm.wic.xz
  3. Once the SD card is flashed, insert the SD Card to EVM and observe the UART logs to make sure the EVM is booted

Using SBL Bootflow

  1. Refer EVM Setup Page for flashing using SBL bootflow

Steps to Load Example Binaries

  1. Boot the hardware as mentioned above
  2. CCS Setup & Steps to run from CCS Refer the SDK Release Notes user guide for generic test setup details and steps to run the examples using CCS.
  3. Connect to SMS0_TIFS_0
  4. Disconnect to SMS0_TIFS_0
  5. Connect to MCU_R5FSS0_0
  6. Do CPU Reset and Load binary (driver name)_app_mcu0_0_(release or debug).xer5f
    • AM62Ax MCAL Binaries will be available at ($SDK_INSTALL_PATH)/mcusw/binary/(driver name)_app/bin/am62ax_evm/
    • Some of the example applications (ipc) would have more than 1 binaries. The name of the binaries specify the core that it's intended to hosted on
  7. Run example
  8. Console for demo application logs / messages

Back To Top


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_MCU0_0 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_AM62AX Device Identifier

*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

Document Revision History


Revision Date Author Description
0.1 22 Nov 2022 Dinesh Kumar C E Approved
0.2 15 Mar 2023 Lavanya C Updated mcu_plus_sdk version
0.3 21 Jul 2023 Lavanya C MCAL-10822 Compiler flags used list is updated, mcu_plus_sdk, CLANG compiler and CCS version is updated. MCAL-11010 Software dependency on Mcu+Sdk section is added