AM437x SYSBIOS Industrial SDK Getting Started Guide

= Revision History =

To stay current with the latest Industrial Tools and features - make sure to download and apply latest version of the IA-SDK. Each release comes with full release notes and user guides also hosted on this wiki. Use Category IASDK to find all docs.

= Applies To =


 * AM437x IDK

= AM437x Industrial SDK Introduction =

The SYSBIOS-based software development kit (SDK) for industrial communications is designed for the Sitara AM437x ARM Cortex-A9 microprocessor family to enable customers add real-time industrial communications, motor control and feedback capabilities easily and quickly to their system. By making all the basic system software components immediately available, the Kit allows developers to focus on their application code, where they can add the most differentiation. The SDK is optimized to support real-time industrial communications protocols such as EtherCAT, Profibus, Profinet, Ethernet/IP and motor feedback features like EnDAT, BISS, Sigma Delta Decimation Filter. The SDK includes a real-time, low-footprint SYSBIOS kernel with boot loader and sample industrial applications to get started quickly.

The SYSBIOS Industrial SDK for AM437x combines all the software components and tools needed to begin development of SYS/BIOS-based applications on the ARM. The SDK supports AM437x IDK hardware platform and includes the following


 * Open source SYS/BIOS Real Time Operating System (RTOS)
 * Bootloader for Sitara AM437x Industrial Development Kit (IDK)
 * Library of peripheral drivers integrated with SYSBIOS supporting IDK
 * Sample applications demonstrating peripheral use cases.
 * Code Composer Studio integrated development environment (IDE) v.6
 * Sample industrial input/output applications over communication protocols such as EtherCAT
 * Motor and Drive feedback capability with support for interfaces like EnDAT, Sigma Delta Decimation Filter etc
 * Evaluation versions of protocol stacks for industrial communications such as EtherCAT, EnDAT and many others to facilitate software development

AM437x IDK block diagram

= AM437x Industrial Development Kit (IDK) =



= System Requirements =

Hardware

 * AM437x IDK
 * Windows (XP) Host PC with minimum 2GB RAM
 * Micro SD Card for IDK

Software

 * Code Composer Studio version CCS 6.0.0.00190
 * SYSBIOS 6.40.3.39 Real Time Operating System
 * XDC Tool 3.30.4.52_core
 * Compiler GNU v4.7.4 (Linaro)
 * Serial console terminal application (like Teraterm, minicom, HyperTerminal)

= SDK Installation =

SDK Setup is a windows executable which installs Industrial SDK Source files, CCS project files, pre-built libraries, documents, tools and other items to the host machine. Note that, setup will not install pre-built applications. These are provided as a separate package.  NOTE 


 * On Windows 7, sdk installation requires administrator privilege. Install sdk using "Run as Administrator" option.

= Boot Modes =

AM437x IDK
NOTE : The QSPI bootloader takes close to 20 seconds to come up. This is because the ROM Boot Loader has to timeout from the USB boot modes before coming to QSPI. If there is a requirement, please modify SYSBOOT settings accordingly to give QSPI higher priority To shorten the bootup time of QSPI - please make the following changes: Change the SYSBOOT config On the AM437x IDK 1.3A
 * To [0x8: QSPI, USB_MS(USB1), MMC0, USB_CL(USB0)]
 * From [0x18: MMC0, USB_MS(USB1), USB_CL(USB0), QSPI]
 * Remove R30 and install R314 (DNI) 10K ohm resistor.

= Running Pre-Built Applications on AM437x IDK =

The following pre-built applications can be used for a quick start with IDK. SDK release notes will have the information on where to obtain pre-built binaries for each release,


 * Bootloader
 * EtherCAT Slave Application (The default out of box application shipped with the board)
 * EnDat Master application
 * LED Demo Application
 * UartEcho Application

Running Application from SD card/QSPI Flash
Refer section "Flashing And Booting" in {IA_SDK_HOME}/starterware/docs/UserGuide_02_01_00_03.pdf

QSPI Flash Usage - IDK
AM437x IDK board comes with a QSPI FLASH size of 64MB, which is used to store bootloader, application binary and other application specific data.


 * Bootloader is always loaded at offset 0x0 (Base address is 0x3000_0000)
 * The QSPI Flash Writer can configure the location of the app. (For eg: offset 0x80000)

For example, the EtherCAT application reserves 512K (starting from address 0x20000) and uses the memory starting from 0xA0000 to store the ESI file.

= Building and Running Sample Application =

The Industrial SDK includes many sample applications which demonstrate the device capabilities. Please see Industrial SDK user guide examples section for more details on sample projects. Sample projects contains the project files to enable the user to import the project into CCS and rebuild with any modifications. The steps that are involved are explained below.

Importing and Building Sample Project in CCS

 * 1) Launch CCS.
 * 2) Click Menu-&gt;File-&gt;Import
 * 3) On new window, Select Code Composer Studio-&gt;Existing CCS Eclipse Projects and click Next.
 * 4) Select "Select search-directory" and browse to locate the sample application directory. SDK examples can be found at $(IA_SDK_HOME)\Examples
 * 5) The project will be listed under "Discovered Projects" and Select the required project from the list.
 * 6) It is recommended to keep "Copy Projects into workspace" tick box un-checked.
 * 7) Click Finish. This will import the project into workspace.
 * 8) The imported project will be shown in CCS Project Explorer tab.
 * 9) Expand the Project directory and double click *.cfg file. This will build the RTSC configuration.
 * 10) Right Click on Project, Select "Build Project". This will build the sample project's .out file.
 * 11) Upon successful build, post_build.bat script file will be executed to generate the binary file which can then be copied to SD card/SPI flash for standalone execution. The generated binaries can be located in directories with build configuration name. See Generating Executable binary section for post build process details.
 * 12) See the CCS Console tab for build logs.
 * 13) All sample applications have Debug and Release configurations.
 * 14) To build for a different configuration, Right click on the project and select Build Configurations-&gt;SetActive-&gt;Debug/Release and build the project once again.

Creating a target configuration, if one doesn't exist already.

 * 1) File menu-&gt; New-&gt; Target Configuration File.
 * 2) Filename : AM437xIDK. Check "Use shared location" to be available to anyone who uses the workspace. Click Finish. A window opens up which is to configure the connection details
 * 3) Connection: Choose the host-to-target connection details. For example "Texas Instruments XDS100v2 USB Emulator"
 * 4) Device: Type IDK_AM437x
 * 5) Click Save.

Launching and Debugging application in CCS

 * 1) Connect JTAG Emulator to EVM in-case of IDK or Connect USB cable to board in-case of ICE
 * 2) Select View-&gt;Target Configurations. Right click on the required configuration in the list and Select Launch Selected Configuration
 * 3) Right Click on the Cortex A9 listed in Debug view and select Connect. ( Click View-&gt;Debug to view debug window, if not visible. )
 * 4) Select System Reset under reset.jpg
 * 5) Select Suspend suspend.jpg
 * 6) Load the GEL file and execute initialization script.
 * 7) Once the initialization is completed, Select Run-&gt;Load -&gt;Load Program. Here browse to the required executable and click OK
 * 8) After a successful load, the program is expected to be in suspended state and program counter is pointing to main function. If the program is not in suspended state : 1. Suspend the application by clicking suspend.jpg or Run-&gt;Suspend 2. Restart the application by clicking runreset.jpg or Run-&gt;Restart
 * 9) Run the application by selecting Menu-&gt;Run-&gt;Run.
 * 10) Menu-&gt;Run-&gt;Run. This will execute the application.

 NOTE


 * While launching a debug session for the first time, CCS will ask for the CPU to which the program needs to be loaded. Please select Cortex-A9 and continue.
 * If TeraTerm does not display an output upon program execution. TeraTerm can be initialized just prior to program execution by performing steps 1-8 and then Disconnect the terminal session using File -&gt; Disconnect Reconnect the terminal session with File -&gt; New Connection
 * If there is a valid application in SPI or NOR flash(in their corresponding boot mode), on "System Reset" the application loads right away. This might cause issues on the application you load via JTAG. To avoid this, put a hardware breakpoint at 0x402f_0400(in case of MMSCD boot mode) or 0x30000000(in case of qSPI boot mode) and then do a "System Reset". You can then continue with Step 4 after this step.

GEL File Loading and Script Execution

 * 1) Launch the required Target Configuration
 * 2) Click Tools-&gt;GEL Files
 * 3) Select GEL Files on the newly opened tab.
 * 4) Right click on the empty list box shown on the right side of the tab.
 * 5) Select Load GEL. 
 * 6) Browse to the folder where GEL file is stored and open it.(SDK provided GEL files can be found at ${IA_SDK_HOME}\tools\gel).
 * 7) Once the GEL file is loaded, the scripts available within the GEL file will be shown in Menu-&gt;Scripts.
 * 8) Click on the required script to open it. In the general case, this will be Menu->Scripts->AM43xx System Initialization->AM43xx_IDK_EVM_Initialization.

= Technical Support and Product Updates =

The support and community for Sitara Processors is at http://www.ti.com/lsds/ti/arm/sitara_arm_cortex_a_processor/support.page The Sitara E2E forum is at http://e2e.ti.com/support/arm/sitara_arm/default.aspx

= Training =

The "Intro to TI-RTOS Kernel Workshop" is now available. Follow the link below to find out more. The TI-RTOS Kernel Workshop covers the SYS/BIOS operating system available for all TI embedded processors - C28x, MSP430, Tiva-C, C6000 and AM335x (Cortex A-8). You can take a LIVE workshop (scheduled at various sites around the U.S.) or download/stream the videos of each chapter online and watch at your own pace. All of the labs, solutions, powerpoint slides, student guides, installation instructions, lab procedures, etc., are all available to you. The workshop labs run on all MCU platforms and the C6000. Check it out... Intro to TI-RTOS Kernel Workshop