Quick start with ecos 3.0 on Sitara AM335x processors

Similar documents
U-Boot and Linux Kernel Debug using CCSv5

Embest SOC8200 Single Board Computer

Contents. 1 Introduction Features Product Specifications Hardware Specification Software Specification...

Kinetis SDK Freescale Freedom FRDM-KL03Z Platform User s Guide

MYD-C437X-PRU Development Board

Pengwyn Documentation

MYC-C437X CPU Module

Getting Started with FreeRTOS BSP for i.mx 7Dual

PDK (Platform Development Kit) Getting Started. Automotive Processors

Hands-on with the Sitara Linux SDK

Freescale Semiconductor Inc. Vybrid DS-5 Getting Started Guide Rev 1.0

Parallella Linux - quickstart guide. Antmicro Ltd

Microblaze for Linux Howto

SBC8140 Single Board Computer

Speeding AM335x Programmable Realtime Unit (PRU) Application Development Through Improved Debug Tools

ARM Powered SoCs OpenEmbedded: a framework for toolcha. generation and rootfs management

VORAGO VA108x0 GCC IDE application note

OK335xS Users Manual Part I - Introduction

December 1, 2015 Jason Kridner

Getting Started with Kinetis SDK (KSDK) v.1.2

Getting Started with Kinetis SDK (KSDK) v.1.3

F28069 ControlCard Lab1

Building a Salvo Application for Stellaris Microcontrollers using GCC for Cortex-M3

QuickStart Guide O

Use Vivado to build an Embedded System

Ethernut 3 Source Code Debugging

Keil TM MDK-ARM Quick Start for. Holtek s HT32 Series Microcontrollers

As CCS starts up, a splash screen similar to one shown below will appear.

XDS200 ISO Operating Guide

Labs instructions for Enabling BeagleBone with TI SDK 5.x

DevKit8500D Evaluation Kit

Quick Start Guide. TWR-VF65GS10 For Vybrid Controller Solutions Based on ARM Cortex -A5 and Cortex-M4 Processors with the DS-5 Toolchain TOWER SYSTEM

Aport-212PG Programmable Device Server User Guide

QSPI Flash Memory Bootloading In Standard SPI Mode with KC705 Platform

Hands-On Workshop: ARM mbed : From Rapid Prototyping to Production

1-Port Industrial Ethernet to Serial Embedded Computer. SE5901 (SDK) Series FEATURED HIGHLIGHTS PRODUCT DESCRIPTION

POWERLINK Slave Xilinx Getting Started User's Manual

Use Vivado to build an Embedded System

Heterogeneous multi-processing with Linux and the CMSIS-DSP library

Figure 1 TCL Used to Initialize PS

PDK (Platform Development Kit) Getting Started. Automotive Processors 4 th Dec 2017

Intel SoC FPGA Embedded Development Suite User Guide

PAULA CARRILLO October Processor SDK & PRU-ICSS Industrial software

QuickStart Instructions. Using Keil's ULINK and the Keil ARM/µVision3 Software Development Tool Chain

Reference Manual , 01/2016. CodeWarrior Development Studio for Power Architecture Processors Targeting Manual

Bare Metal User Guide

MYD-Y6ULX Development Board

OMAP-L138 experimenter Kit. QuickStart Guide O

November 3, 2015 Jason Kridner

MYD-IMX28X Development Board

APPENDIX A. CODE COMPOSER STUDIO (CCS) v5: A BRIEF TUTORIAL FOR THE DSK6713

i.mx 6UltraLite Evaluation Kit Quick Start Guide s datasheet has been downloaded from at this pag

OK335x Products Guide. Contents

ARM Microcontroller Interfacing - Warwick A. Smith ISBN Elektor. Table of Contents

XDS560V2 Installation Guide

Santa Fe (MAXREFDES5#) MicroZed Quick Start Guide

EMUL-PPC-PC. Getting Started Guide. Version 1.0

VORAGO VA108x0 Bootloader application note

Introduction to Sitara AM437x Processors

Hands-On Workshop: ARM mbed

MicroZed: Hello World. Overview. Objectives. 23 August 2013 Version 2013_2.01

AT91SAM9RL64 Hands-on 03: Deploy an application thanks to the AT91SAM9RL64 BootROM loaders and at91bootstrap

Fresno (MAXREFDES11#) ZedBoard Quick Start Guide

MYD-SAMA5D3X Development Board

F28335 ControlCard Lab1

Introduction to Embedded System Design using Zynq

University of Massachusetts Amherst Computer Systems Lab 1 (ECE 354) LAB 1 Reference Manual

CANvu 355 & VeeCAN 320 SDK

MYD-IMX28X Development Board

BitCtrl Systems GmbH. QNX6.5.0SP1 BSP for AM3359 IDK. User's Guide. Version 1.0

LPC1788 Mio Board. The functional details of the board are as follows-

ECEN 449: Microprocessor System Design Department of Electrical and Computer Engineering Texas A&M University

QUICKSTART CODE COMPOSER STUDIO Stellaris Development and Evaluation Kits for Code Composer Studio

As CCS starts up, a splash screen similar to one shown below will appear.

MYC-AM335X CPU Module MYC-AM3352 MYC-AM3359

Avnet Zynq Mini Module Plus Embedded Design

Exercise: PWM Generation using the N2HET

C55x Digital Signal Processors Software Overview

Armstrap Documentation

Freescale MQX USB Stack for TWR-K24F120M GA User s Guide

Human Machine Interface Platform

Alameda (MAXREFDES24#) ZedBoard Quick Start Guide

TUTORIAL Auto Code Generation for F2803X Target

TQ2440 Development Platform Manual

MYD-C7Z010/20 Development Board

Release Notes for ADSP-CM41x EZ-Kit Lite Board Support Package For Keil MDK

Copyright 2014 Xilinx

Getting Started Guide: TMS-FET470A256 IAR Kickstart Development Kit

QuickStart Instructions. Programming Embedded Linux on phycore-lpc3180

TI mmwave Labs. Vital Signs Measurement

Digi document reference number: _A

PetaLinux SDK User Guide. Board Bringup Guide

Optional Eclipse Workspace Configurations

User Guide Linux for AT91CAP9-STK Version 1.1. User Guide LINUX FOR AT91CAP9-STK VERSION: 1.1 1/11

Intel SoC FPGA Embedded Development Suite (SoC EDS) Release Notes

MV V210 Android 4.0 Compilation

Spartan-6 LX9 MicroBoard Embedded Tutorial. Tutorial 1 Creating an AXI-based Embedded System

C55x Digital Signal Processors Software Overview

AT-501 Cortex-A5 System On Module Product Brief

Xilinx Vivado/SDK Tutorial

Transcription:

Quick start with ecos 3.0 on Sitara AM335x processors Version 1.0.0 Date 24 May 2013 Description The document describes quick start approach for ecos 3.0 on MTAX-MB- AM335x development board Target audience Managers and technical experts File name n Quick_start_with_eCos3_0_on_Sitara_ AM335x_processors.docx

1 Document History 1.1 Version VERSION DATE AUTHOR COMMENT 1.0.0 24-May-2013 Pavel A. First version of the document 1.2 Review and Approvals VERSION REVIEWED REVIEWED BY DATE APPROVED DATE APPROVED BY 1.0.0 10-Jan-2014 Artsiom S. 10-Jan-2014 Artsiom S.

2 Contents 1 Document History... 2 1.1 Version... 2 1.2 Review and Approvals... 2 2 Contents... 3 3 Introduction... 4 4 General information on ecos... 6 5 Preparing development environment on Windows hosts:... 6 6 Building ecos libraries and tests... 7 7 Creating new ecos configuration... 9 8 Debugging ecos application in Code Composer Studio... 11 9 Building and running RedBoot... 19

3 Introduction Described ecos port is developed to support MTAX-MB-AM335x development board with MTAX-SOM-AM335x processor module. Supported features: 1. Basic BSP package DDR3 controller Interrupt controller System timer (GPTIMER4 used) MMU Caches NEON Coprocessor UART0 for diagnostic output RedBoot (loading from SDcard with MLO) 2. Advanced BSP package MMC/SD Ethernet CPSW (MII, RMII, RGMII, GMII) LCD (16, 24- bit) TFT USB OTG SPI I2C CAN 2.0 A/B RTC ADC/Touch controller NAND controller PRU intercommunication Hardware dependent components are located in ecos/packages/hal/arm/ cortexa8 directory. It includes following subdirectories: var contains hardware initialization and interrupt controller support (am335x_misc.c), system timer (am335x_ostimer.c), diagnostic serial output (hal_diag.c). am3359 contains peripheral registers description, list of peripheral interrupts (hal_platform_ints.h) and part of startup code (hal_platform_setup.h). am3359_mtax contains MMU initialization code (am3359_mtax_mmu.c), pinmux setting macros (mux.h, pinmux.h) and memory layout files (*.ldi files). For evaluation purposes two configurations are supplied: am3359_mtax_test.ecc for building basic ecos tests.

am3359_mtax_redboot.ecc for building RedBoot ecos based bootstrap application. In order to support debugging in TI Code Composer Studio via JTAG, AM3359_MTAX.gel startup script is supplied (Startup-script-files). In order to support loading from RedBoot SD card, MLO bootloader is supplied (bootstraps folder).

4 General information on ecos Main ecos information source: http://ecos.sourceware.org/ Preparing to work with ecos: http://ecos.sourceware.org/getstart.html Recommended readings: 1. Book Embedded Software Development with ecos http://www.informit.com/content/downloads/perens/0130354732.pdf 2. Official ecos 3.0 documentation http://ecos.sourceware.org/docs-3.0/ Examples for building ecos libraries and tests are provided in chapters 12.4, 12.6 of Embedded Software Development with ecos book. 5 Preparing development environment on Windows hosts: 1. Setup Cygwin with necessary packages: http://ecos.sourceware.org/cygwin.html Copy supplied cygintl-2.dll and make.exe files from /fix into cygwin/bin folder. The version of make-utility installed with Cygwin does not work with Windows-style paths. Check that path to Cygwin utilities cygwin/bin is added to PATH system environment variable. Create system environment variable named CYGPATH and value cygpath. This will allow CodeSourcery toolchain automatically translate paths from Cygwin-style to Windows-style. 2. Unpack AM335x port sources into /cygwin/opt/ecos_am3359_mtax folder. 3. Download and launch ecos installation script: wget --passive-ftp ftp://ecos.sourceware.org/pub/ecos/ecos-install.tcl sh ecos-install.tcl While installing select arm-eabi toolchain. Default repository will be created at path \cygwin\opt\ecos\ecos-3.0\ 4. Download new set of ecos host tools: http://ecos.sourceware.org/ml/ecos-discuss/2012-04/msg00031.html Copy configtool.exe into cygwin folder. This will allow launching it from Cygwin root folder (/). 5. Download and install Sourcery CodeBench Lite toolchain: http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/liteedition/arm-eabi Check that path to installed toolchain \CodeSourcery\Sourcery_CodeBench_Lite_ for_arm_eabi\bin\ is added to PATH system environment variable. 6. Download and install Texas Instruments Code Composer Studio for debugging built applications http://softwaredl.ti.com/dsps/forms/self_cert_export.html?prod_no=ccs5.4.0.00091_win32.zip&ref_url=http:/ /software-dl.ti.com/dsps/dsps_public_sw/sdo_ccstudio/ccsv5/ccs_5_4_0/

6 Building ecos libraries and tests 1. ecos Configuration Tool is the main instrument for creating necessary ecos configuration. Run downloaded ecos Configuration Tool from Cygwin command line:./configtool.exe & Detailed setup for each ecos component is performed in Configuration Tool main window (Fig. 1): Fugure 1 ecos Configuration Tool main window 2. Set path to install Sourcery arm-none none-eabi eabi toolchain (\arm-none-eabi\bin): Tools->Path >Path->Build Tools Figure 2 Build Tools selection window

3. Set path to Cygwin utilities (\cygwin\bin): Tools->Path >Path->User >User Tools Figure 3 User Tools selection window 4. Set path to AM335x ecos repository (\ecos_am3359_mtax\ecos\packages): Build->Repository Figure 4 ecos repository selection window 5. Building test configuration Open supplied am3359_mtax_test.ecc file File->Open In ecos configuration tool, under "Configuration", "Global build options", "Global compiler flags" following options should be added: -isystem /cygdrive/c/program\ Files/Sourcery_CodeBench_Lite_for_ARM_EABI/lib/gcc/armnone-eabi/4.7.3/include -isystem /cygdrive/c/program\ Files/Sourcery_CodeBench_Lite_for_ARM_EABI/lib/gcc/armnone-eabi/4.7.3/include-fixed This assumes Sourcery CodeBench is installed to "c:\program Files\CodeSourcery\ Sourcery_CodeBench_Lite_for_ARM_EABI\" and the GCC version is 4.3.3. Update this to match your setup. Now save the configuration and select Build->Generate build tree. Do not start the build from within Configuration Tool because it will not pass environment variables to the compiler. Instead, in CygWin terminal navigate to your ecos build directory (\opt\ecos_am3359_mtax\targ et\am3359_mtax_test_build) and run following commands: make -jx build ecos libraries. Type number of CPUs on your machine instead of x. make tests build ecos tests. Built tects are located in <configuration name>_install/tests folder.

7 Creating new ecos configuration 1. Creating new configuration file File->New Build->Templates Figure 5 Create new configuration file from template Hardware select hardware platform (hardware-dependent set of components). Packages select predefined hardware-independent set of components. 2. Change selected components list Build->Packages Figure 6 Edit selecsed packages list You can add/remove only hardware-independent components.

In ecos configuration tool, under "Configuration", "Global build options", "Global compiler flags" following options should be added: -isystem /cygdrive/c/program\ Files/Sourcery_CodeBench_Lite_for_ARM_EABI/lib/gcc/armnone-eabi/4.7.3/include -isystem /cygdrive/c/program\ Files/Sourcery_CodeBench_Lite_for_ARM_EABI/lib/gcc/armnone-eabi/4.7.3/include-fixed This assumes Sourcery CodeBench is installed to "c:\program Files\CodeSourcery\ Sourcery_CodeBench_Lite_for_ARM_EABI\" and the GCC version is 4.3.3. Update this to match your setup. In ecos configuration tool, under "Configuration", "ecos HAL", "ROM monitor support", "Enable use of virtual vector calling interface": check option "Initialize whole of virtual vector table". In ecos configuration tool, under "Configuration", "ecos HAL", "Platform-independent HAL options", "Route diagnostic output to debug channel": change value of "Mangler used on diag output" option to None. Figure 7 "Initialize whole of virtual vector table" option Save the configuration and select Build->Generate build tree. Now you can build ecos libraries and tests in abovementioned manner.

8 Debugging ecos application in Code Composer Studio After installing Code Composer Studio connect evaluation board with XUSBFT1 socket to the host PC. Supply 12V to the evaluation board. JTAG and virtual COM-port driver should be installed automatically. Drivers are located in \ccsv5\ccs_base\emulation\windows\xds100_drivers\ftdi\ folder. Select: File -> Import C/C++ -> C/C++ Executable

Select GNU Elf Parser. Select executable (for example, one of the built ecos tests).

Create new Target Configuration File->New >New->Target >Target Configuration File Name the file. Select Texas Instruments XDS100v2 USB Emulator. Select AM3359 processor. Test Connection with JTAG.

Select Advanced tab. Select CortxA8 core Browse supplied AM3359_MTAX.gel file with startup configuration.

On Main tab: Select AM3359.ccxml target configuration file. Select CortxA8 core. On Program tab: Select device: CortxA8. Select created project in workspace. Select debugged executable file in workspace.

On Target tab: Check Reset the target on a connect option. Clear Auto Run Options.

On Source tab: Add Path mapping for \cygwin\opt folder.

Now you can Debug the application with Code Composer Studio.

9 Building and runni r unning ng RedBoot Open am3359_mtax_redboot.ecc configuration file with Configuration Tool. Select Build->Generate build tree. In CygWin terminal navigate to your ecos build directory (\opt\ecos_am3359_mtax\targ et\am3359_mtax_redboot_build) and run following command: make -jx build ecos libraries. Type number of CPUs on your machine instead of x. Built RedBoot binary file redboot.bin is located in \opt\ecos_am3359_mtax\target\ am3359_mtax_redboot_install\bin. Copy built redboot.bin file and supplied MLO file to SD card. Insert SD card into XMMCSIM1 slot and power up the evaluation board. Connect the evaluation board over with XUSBFT1 socket to the host PC. The board is recognized as virtual-com port. Driver is supplied with Code Composer Studio (located in \ccsv5\ccs_base\emulation\windows\xds100_drivers\ftdi\ folder). Setup terminal program (for example, Putty) to the appropriate COM-port and 115200 baud. Apply power to the board. You should see the following output in the terminal: ecos 3.0 SD sdloader for MTAX-EVM-AM335X 33X Built May 24 2013 at 12:13:50 Version AXONIM Devices MTAX-EVM-AM335X 01.00.00.01 open redboot.bin file Init HW: controller RST SDCARD: requested speed 1000000, actual speed 1000000 SDHC: command response timeout CTO! MMC::MMCCommandResponse: MMCSendCommand error, command = 8 MMC::MMCCommandResponse: Command Response Error SDCARD: requested speed 25000000, actual speed 19200000 read redboot.bin file jumping to RedBoot image AM335X ecos RedBoot(tm) bootstrap and debug environment [RAM] Non-certified release, version UNKNOWN - built 12:36:33, May 24 2013 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. RedBoot is free software, covered by the ecos license, derived from the GNU General Public License. You are welcome to change it and/or distribute copies of it under certain conditions. Under the license terms, RedBoot's source code and full license terms must have been made available to you. Redboot comes with ABSOLUTELY NO WARRANTY. Platform: TI AM3359 MTAX board (Cortex-A8) RAM: 0x01000000-0x10ffffff [0x8fe12c38-0x11000000 available] RedBoot>