NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

SYSBIOS Industrial SDK Getting Started Guide

From Texas Instruments Wiki
Jump to: navigation, search
TIBanner.png
SYSBIOS Industrial SDK Getting Started Guide

Revision History[edit]

Revision Date Description
1.0 10-July-2015 Created initial version of the document
2.0 30-Nov-2015 Updated software section for ISDK 2.1.1.1









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[edit]

  • AM437x IDK
  • AM335x ICEv2


SYSBIOS Industrial SDK Introduction[edit]

The SYSBIOS-based software development kit (SDK) for industrial communications is designed for the Sitara AM437x ARM Cortex-A9 microprocessor and Sitara AM335x ARM Cortex-A8 processor family (with PRU-ICSS IP) 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 combines all the software components and tools needed to begin development of SYS/BIOS-based applications on the ARM. The SDK supports AM437x IDK and AM335x ICEv2 hardware platform and includes the following

  • Open source SYS/BIOS Real Time Operating System (RTOS)
  • Bootloader for Sitara AM437x Industrial Development Kit (IDK) and AM335x Industrial Communication Engine(ICEv2)
  • Library of peripheral drivers integrated with SYSBIOS supporting IDK and ICEv2
  • 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, Profinet IRT, Ethernet IP
  • 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 idk functional diag.jpg


AM335x ICEv2 block diagram
ICE V2 Block Diagram1.JPG


Platform[edit]

AM437x Industrial Development Kit[edit]

AM437x IDK.png

AM335x Industrial Communication Engine v2[edit]

ICE V2 marked.jpg


System Requirements[edit]

Hardware[edit]

  • AM437x IDK or AM335x ICEv2
  • Windows Host PC with minimum 2GB RAM
  • Micro SD Card


Software [edit]

  • Code Composer Studio version CCS 6.1.1.00022
  • SYS/BIOS 6.42.2.29 Real Time Operating System
  • XDC Tool 3.31.2.38_core
  • NDK 2.24.3.35
  • Compiler GNU v4.8.4 (Linaro)
  • Serial console terminal application (like Teraterm, minicom, HyperTerminal)



SDK Installation[edit]

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[edit]

AM437x IDK[edit]

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

  • To [0x8: QSPI, USB_MS(USB1), MMC0, USB_CL(USB0)]
  • From [0x18: MMC0, USB_MS(USB1), USB_CL(USB0), QSPI]

On the AM437x IDK 1.3A

  • Remove R30 and install R314 (DNI) 10K ohm resistor.

AM335x ICE V2  [edit]

The device supports SPI , MMC/SD and NOR boot mode through ARM ROM Bootloader. Boot mode selection is determined by the state of pins on J5. ( See ICE V2 Picture for pin markings)
 
NOR Boot
      Pin 1 & 2 shorted  on J5.  
      ROM Bootloader looks for a valid boot image in NOR sector 0 and if found, will execute it from there. If there is no valid image in NOR, SPI boot loader will be executed if present. If SPI bootloader is also not present, SD card  bootloader will be executed.
 

SPI Boot
      Pin 2 & 3 shorted  on J5.
      ROM Bootloader looks for a valid image in SPI flash and if found,loads it to IRAM and executes it. Otherwise, SD card bootloader will be executed if present.
 

MMC/SD Boot

     Pin 2 & 3 shorted  on J5. 
     ROM Bootloader looks for a file named 'MLO' in SD card and if found,loads it to IRAM and executes it. Please note that, SPI bootloader should NOT be present in SPI flash.



Running Pre-Built Applications on AM437x IDK/AM335x ICEv2[edit]

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 
  • Endat Diagnostic
  • EtherCAT Slave Application (The default out of box application shipped with the board)
  • EtherNet/IP Adapter Application
  • EtherNet MAC Application
  • Example Utils Application
  • Motor Control Application
  • Profibus Slave Application
  • Profinet IRT Slave Application
  • SDDF GUI Client Application


Running Application from SD card/QSPI Flash/McSPI Flash
[edit]

Refer to "Flashing And Booting" section in {IA_SDK_HOME}/starterware/docs/UserGuide_02_01_01_01.pdf


QSPI Flash Usage - IDK[edit]

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.

SPI Flash Layout - ICE V2
[edit]

AM335X ICE V2 board comes with a SPI FLASH of size 8MB, which is used to store bootloader, application binary and other application specific data.

SPI Flash memory layout is as given below.


  • First 128K (Start Address 0x0) is reserved for bootloader.
  • Next 8064K (Start Address 0x20000) can be used for application binary and/or other application specific data.


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


Flashing Binaries to SPI Flash on ICE V2 Using CCS[edit]

This section describes how to flash a binary image to the SPI flash on ICE.
The pre-built CCS tool for SPI flash(isdk_spi_flasher.out) can be found in $(IA_SDK_HOME)\tools\flasher\spi_flasher\


  • Make sure that USB cable is connected to PC from ICE
  • Launch CCS 
  • Launch Target configuration for XDS100 emulator. See " Target Configuration" section for details.
  • Load GEL file and execute "AM335x_EVM_Initialization" or "AM3359_ICE_Initialization" script(See "GEL File Loading" section for details), if not done.This is to initialize DDR and On-Chip RAM. GEL file can be found in $(IA_SDK_HOME)\tools\gel
  • Load pre-built  $(IA_SDK_HOME)\tools\flasher\spi_flasher\isdk_spi_flasher.out  to the ICE EVM. See Launching and Debugging application section for details.
  • Ensure that the binary image (e.g. MLO or ethercat_SPI.bin or profibus_slave_SPI.bin) to be flashed is present in the Windows Machine.
  • Enter the board type when prompted as shown below. 
Enter the board type [0-ICE]
  • Enter the operation when prompted as shown below. 
Enter Operation [1 - Flash ] [2 - Erase] :  
  • For Erase
    • Bootloader - Offset 0, Size 64
    • Application- Offset 20000, Size 248
  • Enter type of the binary to be flashed when prompted as shown below. 
Enter the binary type [0-Bootloader, 1-Other ]
  • Enter the offset when prompted as shown below. This offset is the start location from where the image should be flashed. NOTE: This offset should be in hex. In case of boot loader,the offset should be 0x0. In-case of application the offset shall be 0x20000.
Enter the Offset in bytes (in HEX eg:- bootloader :0x0 app : 0x20000) 
  • Pause program Execution and Load binary file into memory 0x80100000 using Load Memory option of CCS->Memory Browser,  when prompted as below. Once load operation is completed, continue flashing by entering 0.
Load .bin file to 0x80100000 

          Load binary file to Memory - Using LoadMemory

              Open Memory window in CCS ('View->Memory Browser)
              Select "
Tools->'
Load Memory".
              Browse and select the .bin file to be loaded
              Select TI RAW format and Click 'Next'. (File should be named as *.bin)
              Enter 0x80100000 in "Start Address' field.
              Select '32 bits' for 'Type-size' field

              Keep the swap tick box un-checked.

              click 'Finish'.
             Wait for the memory to be loaded.
              Press the Green 'Resume' Arrow.

Enter 0 to continue
  • After this the tool should first erase the flash and then start flashing the new image..
  • Finally the following message will shown.
  • Verifying...Success

 

  • These steps are performed when loading the Bootloader and loading the application
  • Once both have been loaded Disconnect CCS and then turn off the board.
  • Boot the Board & verify
NOTE : If you see an error in CCS console right after loading the Flasher binary, just click on "Resume (F8)"


Building and Running Sample Application[edit]

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[edit]

  1. Launch CCS.
  2. Click Menu->File->Import
  3. On new window , Select Code Composer Studio->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 ->SetActive ->Debug/Release and build the project once again.
NOTE : When building projects with am335x_debug/am335x_release configuration for ICE_AM3359[CortexA] device, ensure link command file AM335x.lds is removed from Properties->CCS General->Linker command file under Main tab.


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

  1. File menu-> New-> Target Configuration File
  2. Filename : AM437xIDK or AM335xEVM. 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 or ICE_AM335x
  5. Click Save.

 

Launching and Debugging application in CCS[edit]

  1. Connect JTAG Emulator to EVM in-case of IDK or Connect USB cable to board in-case of ICE 
  2. Select View->Target Configurations. Right click on the required configuration in the list and Select Launch Selected Configuration
  3. Right Click on the Cortex A9/A8 listed in Debug view and select Connect. ( Click View->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->Load ->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->Suspend
    2. Restart the application by clicking Runreset.jpg or Run->Restart
  9. Run the application by selecting Menu->Run->Resume.
  10. Menu->Run->Resume. 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/A8 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 -> Disconnect
    Reconnect the terminal session with File -> 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[edit]

  1. Launch the required Target Configuration
  2. Click Tools->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->Scripts.
  8. Click on the required script to open it.
    For AM437x IDK Menu->Scripts->AM43xx System Initialization->AM43xx_IDK_EVM_Initialization.
    For AM335x ICE V2 Menu->Scripts->AM335x System Initialization->AM3359_ICE_Initialization.


Technical Support and Product Updates[edit]

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

The Sitara Industrial Frequently asked questions are at: http://processors.wiki.ti.com/index.php/FAQ_Sitara_Industrial

The Sitara 2.1 Industrial Training Guides are at: http://processors.wiki.ti.com/index.php/Sitara_Indust_SDK_Training

The ICSS EMAC LLD developers guide is available at: ICSS EMAC Developers Guide

The ICSS EMAC LLD Debug guide is available at: ICSS EMAC LLD Debug Guide


Training[edit]

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

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article SYSBIOS Industrial SDK Getting Started Guide here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article SYSBIOS Industrial SDK Getting Started Guide here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article SYSBIOS Industrial SDK Getting Started Guide here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article SYSBIOS Industrial SDK Getting Started Guide here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article SYSBIOS Industrial SDK Getting Started Guide here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article SYSBIOS Industrial SDK Getting Started Guide here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article SYSBIOS Industrial SDK Getting Started Guide here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article SYSBIOS Industrial SDK Getting Started Guide here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article SYSBIOS Industrial SDK Getting Started Guide here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity