Template:Glsdk sdg starting

= Starting your software development =

Setup up ARM linux development Environment on the host. Please refer to this link to see how to set one up.

Configuration of ARM Linux development Environment

Step 1:  Install the Processor SDK Linux Automotive release on the host machine.

host $ chmod +x ti-processor-sdk-linux-automotive---installer.bin host $ ./ti-processor-sdk-linux-automotive---installer.bin
 * Download the Processor SDK Linux Automotive installer.
 * If necessary make the installer executable manually by executing:
 * Execute the installer on the host and follow the instructions:

Step 2:  Setup the INSTALL_DIR environment variable to the location where the Processor SDK Linux Automotive is installed (the following assumes that Processor SDK Linux Automotive was installed at default location):

host $ export INSTALL_DIR="${HOME}/ti-processor-sdk-linux-automotive__"

 Step 3:  Setup the Processor SDK Linux Automotive on host

Host Setup
The recommended Linux distribution is Ubuntu 14.04 or Ubuntu 16.04.
 * Ubuntu

The following build host packages are required for Ubuntu. The following command will install the required tools on the Ubuntu Linux distribution.

For Ubuntu 14.04 and 16.04, please run the following: $ sudo apt-get install git build-essential python diffstat texinfo gawk chrpath dos2unix wget unzip socat doxygen libc6:i386 libncurses5:i386 libstdc++6:i386 libz1:i386

The build also requires that  is configured as the default system shell. The following steps will configure Ubuntu to use  instead of the default. $ sudo dpkg-reconfigure dash

(Select "no" when prompted)

Code Composer Studio
NOTE! This step is required only if you want to use Code Composer Studio IDE. In the latest Processor SDK Linux Automotive releases, M4/DSP firmware image build is handled as part of SDK Yocto build.

Code Composer Studio 6.1.3.00034 must be downloaded manually and placed into either the downloads directory, or placed on a mirror. Please see CCS v6 Download for details and download the Linux off-line installation tarball, e.g., CCS6.1.3.00034_linux.tar.gz.

The Processor SDK Linux Automotive comes with a script for setting up your Ubuntu 14.04 LTS development host. It is an interactive script, but if you accept the defaults by pressing return you will use the recommended settings. This is recommended for first time users. Note that this script requires ethernet access as it will update your Ubuntu Linux development host with the packages required to develop using the Processor SDK Linux Automotive. Note: Please make sure that the proxy settings are done for http, https, git, ftp and wget before proceeding further. Execute the script in the Processor SDK Linux Automotive release directory using:

host $ cd ${INSTALL_DIR} host $ ./setup.sh

The setup script would perform the following operations:


 * 1) Installs all the necessary package on the host for the SDK.


 * 1) Prepares the UART terminal to communicate with the target over Debug USB on Minicom. If you want to use a windows host for connecting to the target instead, see the  section
 * 2) Setups the linaro cross compiler
 * 3) Installs the dependencies for the repo tool.
 * 4) Initialize the repo by pointing it to Processor SDK Linux Automotive release manifest location.

To start minicom on your Linux development host execute minicom -w (or Tera Term on Windows).

Step 4:  Prepare SD card To install the release image, you need a µSD Card (at least 4GB) with 2 partitions:
 * boot (vfat) partition.
 * rootfs (ext4 or ext3) partition.

The following procedure prepares the sdcard: (however, the user can choose to do it manually as well) Note : If you are using NFS file system, then edit ${INSTALL_DIR}/board-support/pre-built-images/uenv.txt, add "ip=dhcp" in bootargs. $ sudo ${INSTALL_DIR}/bin/mksdboot.sh --device /dev/sdY --sdk ${INSTALL_DIR}
 * Plug an SD card reader to your PC and insert a µSD card. It must be at least 4GB size.
 * Identify which device corresponds to the SD card reader. sudo fdisk -l command can help you find out where the µSD Card is mapped. We will call it /dev/sdY here.
 * Re-format your µSD card with this script mksdboot.sh from the bin directory in the Processor SDK Linux Automotive

The above script would prepare the SD card with the prebuilt images and yocto filesystem for SD boot.

Step 5:  Booting the board To boot the board with the above created SD card, refer to the Quick Start Guide at the Processor SDK Linux Automotive download location Link to setup the board. Then, power cycle the board and login with username as root.

= Repo tool Usage =

Starting source code development using repo tool
The Processor SDK Linux Automotive release uses the repo tool to effectively manage the different components.

NOTE :

1: The first step to the repo tool is the repo initialization and this is done as part of the $INSTALL_DIR/setup.sh script

'''2: The repo tool is downloaded into the bin folder in the Processor SDK Linux Automotive directory. Please ensure that this path is updated in the environment variable as shown below'''

host $ export PATH=${INSTALL_DIR}/bin:$PATH

The Processor SDK Linux Automotive release contains a helper script that sets up the development environment. Run the script as shown below: host $ cd ${INSTALL_DIR} host $ ./bin/fetch-sources.sh

The script does the following:
 * Check for the repo tool.
 * Perform repo sync
 * Create a branch called dev
 * Checkout the branch dev

It is expected that the development is done on the dev branch.

How to get updates
If there are changes in the remote repositories, it could be fetched using the same script. However, please make note of these important points.

1. The script will fetch the latest changes, and switch back to the dev branch. 2. The new updates from the remote, will be available in the master branch. 3. The decision on whether to merge the changes to the local branch or merge the local branch to the master is left to the developer