MCU+ SDK is a software development package designed for usage with Sitara MPU/MCU+ class of devices from Texas Instruments. This repository provides MCU+SDK support the following list of Sitara MPU devices.
Go to MCU+SDK Core repository for other devices.
MCU+ SDK is designed with user experience and simplicity in mind. The SDK includes out-of-box application examples and peripheral usage examples to help users hit the ground running.
-
Out of Box peripheral Examples
- Peripheral Level Examples: UART, ADC, I2C, SPI etc.
-
Protocol stacks and middleware
- FreeRTOS-FAT
-
Drivers and Hardware Abstraction Layer
- Board peripheral drivers - Flash, EEPROM, LED etc.
- SoC peripheral drivers - I2C, SPI, OSPI, ADC etc.
-
OS kernel layer
- Driver Porting Layer(DPL) which acts as an abstraction layer between driver and OS
- Out of Box Support for
- FreeRTOS
- Baremetal i.e NO RTOS builds
MCU+ SDK source comprises of multiple repositories with the current repository at it's core. To build the SDK successfully, there are other repositories that need to be cloned and are listed below:
We use the repo tool to clone and manage multiple repositories. To setup the repo tool, navigate to repo tool setup section.
Prebuilt SDK installers for specific devices are available at below links. Please note that installers are packaged specific to each device to reduce size.
- Ubuntu 22.04 64bit
MCU+ SDK has multiple components (in multiple repositories) and dependencies (like compiler, CCS and other tools). We use repo tool from Google to manage these multiple repositories. Follow the below mentioned steps to setup repo tool:
Make sure python3 is installed and is in your OS path.
- Linux:
sudo apt-get update sudo apt-get install repo
To clone the repositories using repo tool, do below in your workarea folder:
Note that depending on the SoC you're working with, the components you clone might be slightly different. So please choose the manifest folder according to the SoC of your interest. For example, we are showing for am62ax below.
repo init -u https://github.com/TexasInstruments/mcupsdk-manifests.git -m am62ax/dev.xml -b k3_main
To download the recent tag,
repo init -u https://github.com/TexasInstruments/mcupsdk-manifests.git -m am62ax/main.xml -b k3_main
After the repo is initialized, do a
repo sync
This should clone all the repositories required for MCU+ SDK development.
You can start the repositories with adefault branch dev
by doing below:
repo start dev --all
Now download and install the dependencies.
Note that the dependencies are also soc specific, here we take an example of am62ax.
You can replace that with the SoC of your choice like the repo init
step.
Option1: Download and install dependencies through script:
Run the following from the same location where you have mcu_plus_sdk
and mcupsdk_setup
folders.
./mcupsdk_setup/am62ax/download_components.sh
This will install all the required dependencies including Code Composer Studio (CCS).
The script assumes that mcu_plus_sdk
folder is in the same location from where
you have invoked the script, and that dependencies are installed into ${HOME}/ti
location.
Set up node modules by running below commands
cd mcu_plus_sdk
npm ci
cd ..
Download and install PSDK Linux on ${HOME}/ti directory corresponding to the platform you are using. This is not installed by the script.
Option2: Download and install dependencies manually:
-
Download and install Code Composer Studio v12.8.1 from here
- Install at default folder, $HOMEC/ti
-
Download and install SysConfig 1.20.0 from here
- Install at default folder, $HOMEC/ti
-
Download and install ARM-CGT-CLANG 3.2.2 from here
- Install at default folder, $HOMEC/ti
-
Download and install GCC for Cortex A53 and ARM R5 from below link
-
Download and install Node.js v12.18.4 LTS
- Go to the NodeJS Website and use the installer to download and install v12.18.4 of node. Install in the default directory.
- After successful installation, run an
npm ci
inside themcu_plus_sdk
folder like so:This should install the node packages required for the SDK.$ cd mcu_plus_sdk/ $ npm ci $ cd ../
-
Download and install doxygen,
- Tested with 1.8.20
- Download the correct version of doxygen for windows from here
- Install and add the install path, typically, C:/Program Files/doxygen/bin to your windows PATH
- Test by doing below on the command prompt
$ doxygen -v 1.8.20 (<commit SHA-ID>)
- Tested with 1.8.20
-
Install OpenSSL
- In Linux,
- There is a chance that OpenSSL is already installed. If not, here are the steps:
- If you have Ubuntu 22.04, do below in Linux Ubuntu shell to install openssl
-
$ sudo apt install openssl
- In Linux,
-
Install Device Tree Compiler (DTC)
- Device Tree Compiler (DTC) is unavailable for Windows, and is required for Windows users.
- In Linux,
- If you have Ubuntu 22.04, do below in Linux Ubuntu shell to install dtc
-
$ sudo apt-get install device-tree-compiler
- If you have Ubuntu 22.04, do below in Linux Ubuntu shell to install dtc
-
NOTE
-
In Linux, you will need to run
$HOME/ti/ccs{version}/ccs/install_scripts/install_drivers.sh
script for setting COM port accesses correctly. Also add your user to groupstty
anddialout
. You can dosudo adduser $USER tty sudo adduser $USER dialout
-
Please use the industrial communication libraries from the sdk installer due licensing restrictions.
NOTE
- Unless mentioned otherwise, all below commands are invoked from root folder of the "mcu_plus_sdk" repository.
- Current supported device names are am62x, am62ax and am62px
- Pass one of these values to
"DEVICE="
- You can also build components (examples, tests or libraries) in
release
ordebug
profiles. To do this pass one of these values to"PROFILE="
- For A53 cores in am62x, there is a support to build the appimages with Trusted Firmware-A (TF-A) binary.
- You can set the pass the values as
yes
orno
to"ATF_INTEGRATED_BOOT="
to build the appimage with/without ATF binary respectively. - By default, it's set to
yes
and all the A53 examples in am62x are built with ATF binary in their appimages.
-
Run the following command to create makefiles
make gen-buildfiles DEVICE=am62ax
-
To see all granular build options, run
make -s help DEVICE=am62ax
This should show you commands to build specific libraries, examples or tests.
-
Make sure to build the libraries before attempting to build an example. For example, to build a Hello World example for AM62A, run the following:
make -s -j4 libs DEVICE=am62ax PROFILE=debug
Once the library build is complete, to build the example run:
make -s -C examples/hello_world/am62ax-sk/mcu-r5fss0-0_nortos/ti-arm-clang all PROFILE=debug
For AM62x, to build without the ATF binary for A53, run the following:
make -s -C examples/hello_world/am62x-sk/a53ss0-0_freertos/gcc-aarch64 all PROFILE=debug ATF_INTEGRATED_BOOT=no
Note
: For AM62x, an external library namedatf
is added. Make sure to build external libraries before building any example for Am62x as follows. The below command will not have any effect for other SoCs.make -s -j4 libs-external DEVICE=am62x PROFILE=debug
-
Following are the commands to build all libraries and all examples. Valid PROFILE's are "release" or "debug"
make -s -j4 clean DEVICE=am62ax PROFILE=debug make -s -j4 all DEVICE=am62ax PROFILE=debug
For AM62x, to build the libraries and examples without TF-A, run the following:
make -s -j4 clean DEVICE=am62ax PROFILE=debug ATF_INTEGRATED_BOOT=no make -s -j4 all DEVICE=am62ax PROFILE=debug ATF_INTEGRATED_BOOT=no
-
Run the following command to create makefiles
make gen-buildfiles DEVICE=am62ax
Valid DEVICE options are,
am62x am62ax am62px
-
Build bootloder and all the examples required for running the SBL
make -s -j4 all DEVICE=am62ax
-
Build HSM app image
make -C tools/boot/HSMAppimageGen BOARD=am62ax-sk
Valid BOARD options are,
am62x-sk am62x-sk-lp am62x-sip-sk am62ax-sk am62px-sk
-
Install Processor SDK Linux and update PSDK_LINUX_PATH in linuxAppimageGen config file.
vi mcu_plus_sdk/tools/boot/linuxAppimageGen/board/am62ax-sk/config.mak
-
Build Linux app image
make -C tools/boot/linuxAppimageGen BOARD=am62ax-sk
-
Set the board in UART bootmode
-
Send the binaries through UART uniflash
cd tools/boot python uart_uniflash.py -p /dev/ttyUSB0 --cfg=sbl_prebuilt/am62ax-sk/default_sbl_ospi_nand_linux.cfg
The config file will be different for each platform based on the OSPI flash type (NOR/NAND)
Platform Bootmode Config file am62x-sk OSPI NOR sbl_prebuilt/am62x-sk/default_sbl_ospi_linux.cfg am62x-sk-lp OSPI NAND sbl_prebuilt/am62x-sk-lp/default_sbl_ospi_nand_linux.cfg am62x-sip-sk OSPI NOR sbl_prebuilt/am62x-sip-sk/default_sbl_ospi_linux.cfg am62ax-sk OSPI NAND sbl_prebuilt/am62ax-sk/default_sbl_ospi_nand_linux.cfg am62px-sk OSPI NOR sbl_prebuilt/am62px-sk/default_sbl_ospi_linux.cfg -
After the flashing is completed, change the bootmode to OSPI NOR/NAND based on the platform.
-
Connect to /dev/ttyUSB0 through minicom and powercycle the board to see the boot logs appear on /dev/ttyUSB0
For more details on SDK usage, please refer to the SDK userguide. User guides contain information on
- Building the SDK
- EVM setup,
- CCS Setup, loading and running examples
- Flashing the EVM
- SBL, ROV and much more.
Note that userguides are specific to a particular device. The links for all the supported devices are given below.
The documentation can also be generated as mentioned in the below section.
-
Goto mcu_plus_sdk and type below to build the documentation for the device of interest
make docs DEVICE=am62ax
-
Browse API guide by opening below file for a DEVICE of interest
README_FIRST_*.html
-
Also note that code snippets added to “docs_src\docs\api_guide\doxy_samples” is valid code that can compile. Above command also compiles the code snippets.