GRLIDE. LEON IDE plugin for Eclipse User's Manual. The most important thing we build is trust GR-LIDE-UM. August 2016, Version 1.

Similar documents
Installing LEON VxWorks 6.9

LINUXBUILD User's Manual

Installing LEON VxWorks

CodeWarrior Development Studio for Power Architecture Processors Version 10.x Quick Start

NSIGHT ECLIPSE EDITION

Blackfin cross development with GNU Toolchain and Eclipse

CodeWarrior Development Studio for StarCore DSP SC3900FP Architectures Quick Start for the Windows Edition

Optional Eclipse Workspace Configurations

NSIGHT ECLIPSE EDITION

NSIGHT ECLIPSE EDITION

TriCore Free Entry Tool Chain. AURIX family and AUDO Future, AUDO MAX

DS-5 ARM. Using Eclipse. Version Copyright ARM. All rights reserved. ARM DUI 0480L (ID100912)

AURIX family and AUDO Future, AUDO MAX

CodeWarrior Development Studio for etpu v10.x Quick Start SYSTEM REQUIREMENTS

Ethernut 3 Source Code Debugging

Manual Eclipse CDT Mac OS Snow Leopard

OS PORTING AND ABSTRACTION LAB USER MANUAL

Booting a LEON system over SpaceWire RMAP. Application note Doc. No GRLIB-AN-0002 Issue 2.1

LinuxScope-JTD Installation Guide. Version 4.0.0

Kinetis SDK Freescale Freedom FRDM-KL03Z Platform User s Guide

User Guide. Introduction. Requirements. Installing and Configuring. C Interface for NI myrio

Migration from HEW to e 2 studio Development Tools > IDEs

Laboratory Assignment #4 Debugging in Eclipse CDT 1

AonixADT for Eclipse Release / Installation Notes. Version 3.3.0, Build 2

Infor LN Studio Application Development Guide

Module 3: Working with C/C++

Nios II Studio Help System

Eclipse development with GNU Toolchain

QNX Software Development Platform 6.6. Quickstart Guide

Installation and Quick Start of isystem s winidea Open in DAVE. Tutorial Version 1.0, May, 2014

NonStop Development Environment for Eclipse 4.0 Debugging Supplement

ecospro CDT plug-in user's guide - OXYGEN.2 (1.6.2) Alex Schuilenburg Ross Younger Jonathan Larmour

HOW TO USE CODE::BLOCKS IDE FOR COMPUTER PROGRAMMING LABORATORY SESSIONS

Using an External GCC Toolchain with CodeWarrior for Power Architecture

What s NetBeans? Like Eclipse:

Using Eclipse for C Programming

Release Notes. S32 Design Studio for ARM v1.1

for StarCore DSP Architectures Quick Start for the Windows Edition

ECE QNX Real-time Lab

A Tutorial on using Code::Blocks with Catalina 3.0.3

COBOL-IT Developer Studio Getting Started The Debugger Perspective Version 2.0

Debugging in AVR32 Studio

Code::Blocks Student Manual

PetaLinux SDK User Guide. Eclipse Plugin Guide

egui Eclipse User Guide

Developing using C on imx Developer s Kits

Installing Eclipse (C++/Java)

μc/probe on the element14 BeagleBone Black

At the shell prompt, enter idlde

Controller Continuum. for Microcontrollers V6.3. Quick Start

Introducing HP NonStop Development Environment Version 2.0 for Eclipse (NSDEE 2.0)

Intel Parallel Studio XE 2015 Composer Edition for Linux* Installation Guide and Release Notes

BASICS OF THE RENESAS SYNERGY PLATFORM

FX SERIES. Programmer s Guide. Embedded SDK. MN000540A01 Rev. A

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

Red Suite 4 Getting Started. Applies to Red Suite 4.22 or greater

Installing Eclipse CDT and MinGW

Converting Earlier Versions of CodeWarrior for StarCore DSPs Projects to Version

The Road to CCSv4. Status Update

Getting Started with the TASKING VX-toolset for ARM

Getting Started with Freescale MQX RTOS for Kinetis SDK and Kinetis Design Studio IDE

Eclipse Quick Reference Windows Hosted

Getting Started with Eclipse/Java

for ColdFire Architectures V7.2 Quick Start

You have a PC with a USB interface, running Microsoft Windows XP (SP2 or greater) or Vista You have the Workshop Installation Software Flash Drive

Important Upgrade Information. iii P a g e

F&S Introduction to Eclipse

Eclipse Tutorial. For Introduction to Java Programming By Y. Daniel Liang

ARM DS-5. Eclipse for DS-5 User Guide. Version 5. Copyright ARM Limited or its affiliates. All rights reserved.

Installation and Upgrade Guide Zend Studio 9.x

News in RSA-RTE 10.2 updated for sprint Mattias Mohlin, May 2018

BASICS OF THE RENESAS SYNERGY PLATFORM

Using Eclipse for C, MPI, and Suzaku

Resource 2 Embedded computer and development environment

ARM DS-5. Eclipse for DS-5 User Guide. Version 5. Copyright ARM. All rights reserved. ARM DUI0480Q

Configuring Ubuntu to Code for the OmniFlash or OmniEP

CodeWarrior Development Studio for Freescale 68HC12/HCS12/HCS12X/XGATE Microcontrollers Quick Start SYSTEM REQUIREMENTS Hardware Operating System 200

μc/probe on the RIoTboard (Linux)

Module Road Map. 7. Version Control with Subversion Introduction Terminology

Installation and Upgrade Guide Zend Studio 9.x

Bare Metal User Guide

AN 834: Developing for the Intel HLS Compiler with an IDE

Figure 1. Simplicity Studio

Introduction to LEON3, GRLIB

μc/probe on the element14 BeagleBone Black

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

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

C Support for myrio 5.0 User Guide

for Freescale MPC55xx/MPC56xx Microcontrollers V2.10 Quick Start

GNATbench for Eclipse User s Guide

RELEASE NOTES. BeyondStudio for NXP JN-SW Build NXP Semiconductors

POOSL IDE Installation Manual

DS-5 ARM. Getting Started with DS-5. Version 5.6. Copyright 2010, 2011 ARM. All rights reserved. ARM DUI 0478F (ID071411)

NetBeans Tutorial. For Introduction to Java Programming By Y. Daniel Liang. This tutorial applies to NetBeans 6, 7, or a higher version.

R8C/Tiny. StarterKit Plus SKP8CMINI-15, SKP8CMINI-17. Clock Stop Detect

IDE: Integrated Development Environment

Intel System Studio for Microcontrollers

CSCI 201 Lab 1 Environment Setup

LEON SRMMU Behaviour. Technical note Doc. No GRLIB-TN-0002 Issue 1.0

Module 4: Working with MPI

Transcription:

. GRLIDE LEON IDE plugin for Eclipse 2016 User's Manual The most important thing we build is trust GR-LIDE 1

Table of Contents 1. Introduction... 3 1.1. Tools... 3 1.2. Supported Operating Systems... 3 2. Windows installation... 4 2.1. Installed versions... 4 2.2. Reinstalling or upgrading... 4 2.3. PATH environment variable... 4 2.4. Running the installer... 4 2.4.1. GRMON and TSIM professional... 6 3. Linux installation... 7 3.1. Tools... 7 3.2. Path... 7 3.3. Installing LEON IDE... 7 4. Quick start... 8 4.1. Starting Eclipse... 8 4.2. Create a new project... 8 4.3. Build project... 9 4.4. Debug configurations... 9 4.5. Launching... 10 4.6. Results... 11 5. Leon Integrated Development Environment... 12 5.1. Compatibility... 12 5.2. General Eclipse information... 12 5.2.1. Workspaces... 12 5.2.2. Perspectives... 12 5.2.3. Debugging... 12 5.2.4. Projects... 12 5.2.5. Create a new file... 12 5.2.6. Import existing files... 12 5.3. Compiling... 13 5.4. Build configurations... 13 5.5. Toolchains... 13 5.5.1. Creating a RTEMS project... 13 5.5.2. Creating an ecos project... 14 5.6. Compile properties... 14 5.6.1. Hardware options... 14 5.6.2. Libraries... 14 5.6.3. Link map... 15 5.7. Launch settings... 15 5.8. Launch time out... 15 6. Software update... 17 7. FAQ / TROUBLESHOOTING... 18 2

1. Introduction This document describes the installation of Cobham Gaisler development tools and the basic usage of the Eclipse environment. On Windows the tools can be installed by an installer which contains all the tools including evaluation versions of GRMON and TSIM. Professional versions can be installed separately. 1.1. Tools The following tools are included in the installer: Eclipse with C Development environment for SPARC / LEON Evaluation version of GRMON a debug monitor for the LEON processor Evaluation version of TSIM a SPARC architecture simulator Bare C cross-compiler for the LEON processor RTEMS 4.10 cross-compiler for LEON/ERC32 Source code for Newlib and RTEMS A Java Runtime Environment (JRE) needed to run Eclipse and GrmonRCP HASP License device driver for the GRMON and TSIM USB hardware license key 1.2. Supported Operating Systems The installer and all tools included are supported on Windows XP Service Pack 3 and Windows 7. The tools are also available for Linux at Cobham Gaisler web page http://www.gaisler.com/. 3

2. Windows installation 2.1. Installed versions The installer contains a README.txt file that lists the version of the different packages. 2.2. Reinstalling or upgrading Updates will be available from Cobham Gaisler web page at http://www.gaisler.com/. These can be installed by removing the corresponding folder and unpacking the downloaded package in the c:/opt folder. 2.3. PATH environment variable It is required to add the location where you have installed GRTools to a PATH variable. The PATH environment variable specify locations to search for commands and makes it possible to run a command without specifying the full path. The installer will add all installed tools to the PATH environment variable. This makes it possible to use e.g. grmon-eval.exe instead of c:\opt\grmon-eval\win32\grmoneval.exe If there are two tools with the same name both installed in the PATH environment variable Windows will use the one found first in the PATH. This can cause troubles if both the evaluation and professional version of a tool is installed. The PATH environment variable can be changed from the Control Panel. Select System -> Advanced -> Environment Variables and then select PATH under System variables and click Edit. The value is a list of paths separated by a semicolon, e.g. C:\Windows\;C:\Windows\System32 NOTE: Note: Restarting Eclipse is necessary for the PATH variable to be updated Figure 2.1. Editing the PATH environment variable. 2.4. Running the installer The installer will automatically remove any previous installation of a tool before installing a new version. The folder which will be removed. This means that all files in the corresponding folder will be removed. Folders for tools that are not chosen for installation will be preserved. The installer contains a guide which will help with the installation. 4

Figure 2.2. The welcome screen Figure 2.3. Read through the readme text. This file will also be available from the start-menu after the installation. Figure 2.4. Choose where to install Eclipse Figure 2.5. Choose which tools to install. Figure 2.6. The installer will create a new start menu Figure 2.7. Chose if the GRMON PCI driver should group with links to Eclipse and GrmonRCP. be installed. The installer can also update the Path environment variable (Recommended) and create desktop short cuts. 5

Figure 2.8. Summary of what is going to be installed Figure 2.9. A progress will be shown during the installation Figure 2.10. When the installation is finished there is an option to start Eclipse 2.4.1. GRMON and TSIM professional It is recommended to install the tools to C:\opt. The installer will set up the PATH environment variable to prefer the professional version if installed there. If the tools are installed anywhere else either the PATH environment variable needs to be updated or the full path must be specified in Eclipse. See Section 2.3 for information on how to update the PATH environment variable. See Section 5.7 for how to use the professional tools in Eclipse. 6

3. Linux installation 3.1. Tools The tools can be downloaded seperately from the Cobham Gaisler web page - http://www.gaisler.com/. Follow the installation manual included in each tool in order to properly install them. 3.2. Path For the tools to work it is required to create a path to the location of the folder for each of the added tools. The easiest way to do this is to edit the.bashrc file located in the home directory. Simply add export PATH=$PATH:/ opt/path/to/tool; at the end of the document. The path is then created each time you start the terminal. 3.3. Installing LEON IDE After the tools have been installed and the path has been added it is time to install it on Eclipse. The easiest way to do this is to install it using Eclipse's own software installer. To install LEON IDE using Software Update select Help - Software Updates... -> Available Software. Click Add Site... and enter the location: http://www.gaisler.com/eclipse/lide_kepler/ Figure 3.1. LEON IDE installation 7

4. Quick start LEON IDE is a plug-in for the Eclipse C Development Tooling or CDT. CDT is a C / C++ development environment for Eclipse. LEON IDE extends the CDT environment to include support for development and debugging using the tools provided by Cobham Gaisler. 4.1. Starting Eclipse The first time you start Eclipse a welcome screen will appear. Click the x to close it. Figure 4.1. Eclipse welcome screen 4.2. Create a new project To create a new project select File -> New -> C Project enter a Project name, select Hello World ANSI C Project and choose the SPARC Bare C Toolchain. Click Next to get to the configuration page, and then click Finish to create the project. Figure 4.2. New Bare C project Figure 4.3. Bare C settings 8 Figure 4.4. Bare C configurations

This quick start guide only includes instructions for creating a SPARC Bare C project, for information regarding the available toolchains and their respective specifics see Section 5.5 Eclipse will by default only show the tool chains which are detected as installed. NOTE: Note: If the toolchains does not show up and only show up when you untoggle the Show project types and toolchains only if they are supported on the platform the path has not been set up properly. 4.3. Build project Go to Project->Build all to build your project. 4.4. Debug configurations Open the debug configurations by selecting Run->Debug configurations. To create a new LEON Debugger right click the LEON C/C++ Application field then click New. Figure 4.5. New LEON C/C++ Application Select the Debugger tab and click New to create a target. 9

Figure 4.6. Create a new target Enter a target name, select startup options and click Finish. Figure 4.7. Target settings 4.5. Launching Launch the application by clicking Debug. 10

Figure 4.8. Launch debugger Sequential debugs with the same settings can be done by clicking the green beetle in the toolbar. 4.6. Results Errors and warning from the compilation will be shown in the Problems View, which will show both the message from the compiler and which line caused the error or warning. The source file will also show markers for these items. Errors are marked with red colour and warnings are yellow. Figure 4.9. The problems view A log from the compilation can be found in the Console view. It will show all the compilation commands that was run and all messages that was printed. Figure 4.10. Target settings 11

5. Leon Integrated Development Environment 5.1. Compatibility LEON IDE 1.6.0 is compatible with Eclipse Kepler. 5.2. General Eclipse information 5.2.1. Workspaces Eclipse uses a workspace to store the projects and all settings. When Eclipse is launched it will ask which workspace to use. The default path will be C:\Workspace. Note that this path cannot contain spaces as this will confuse the Eclipse plug-in and some of the debugging tools. 5.2.2. Perspectives Eclipse divides each task into different perspectives. There are among others one perspective for C / C++ development and one for debugging. Each perspective will preserve the layout of all open views. The last used perspective will be saved when exiting Eclipse and will be restored the next time Eclipse is started. To switch to the C/C++ perspective go to Window -> Open Perspective -> Other... then select C/C++ and click OK. 5.2.3. Debugging When the application is launched Eclipse will ask if it should change to the Debug perspective if that is not already the current perspective. The Debug perspective contains useful views for, e.g., inspecting the stack or settings breakpoints. The Debug view which is part of the Debug perspective contains buttons to control the debug session. When the application is suspended it will show a back trace, and there are buttons to suspend, resume and step the application. When thread support is activated it will also show all the available threads. Figure 5.1. The debug perspective during debugging 5.2.4. Projects All code belongs to a project. A workspace can contain several projects which can be built and debugged separately. 5.2.5. Create a new file To add a new source file to a project right-click the project or folder to create it in and select New -> Source File. Enter a name for the source file and then click Finish. 5.2.6. Import existing files Existing files and folder can be imported by right-clicking the project and selecting Import... and then General -> File System Select a From directory mark all the files and folder to import Select a Into folder Then click Finish. 12

Figure 5.2. Import files and folders 5.3. Compiling By default Eclipse is set to build automatically, which will compile the whole project on every save. To turn that feature off go to the Project menu and make sure Build Automatically is unchecked then the project can be compiled manually when desired instead. To compile manually right click on the project and select Build Project (this option is not available when Build Automatically is enabled and it's also available from the Project menu). The output from the compilation will end up in a different folder depending on the current build configuration. Also a special entry called Binaries will appear which contains all the binaries from the project. 5.4. Build configurations A new project will have two default build configurations, debug and release. The active build configuration can be changed using the Project menu. Go to Project -> Build Configuration -> Set Active. For debugging to work correctly the application must be built with the debug configuration. 5.5. Toolchains It is possible to select which kind of project you want to create. There are several different Toolchains to choose from. The available tool chains are: SPARC Bare C SPARC RTEMS SPARC ThreadX SPARC ThreadX SPARC Nucleus SPARC ecos 5.5.1. Creating a RTEMS project RTEMS requires special configurations, because of that it is recommended to create a RTEMS example project, when creating this project it is important not to click Finish straight away but instead to click Next and select the proper settings. 13

Figure 5.3. Creating a RTEMS project Figure 5.4. RTEMS project configuration 5.5.2. Creating an ecos project ecos projects need to know the path for the ecos kernel. This can easily be achieved by using the Basic ecos project template. The wizard will ask for the ecos Install dir which is the path to the directory which contains the lib and include folder for the desired ecos kernel. The default is to use the environment variable ECOS_INSTALL_DIR. The kernel path can also be changed from the project properties under C / C++ Build -> Settings -> Global options. This settings is configuration specific so it needs to be set for both the Debug and Release 5.6. Compile properties Right-click the project or the source file and select Properties, then select C/C++ Build -> Settings. This menu contains a large variety of different compile options. 5.6.1. Hardware options Under the C Compiler -> Hardware options there are options to issue software floating point instructions (msoft-float), issue hardware mul/div instructions (-mv8) and to use a flat register model (-mflat). 5.6.2. Libraries The libraries to link into the application are specified in the the Linker section Libraries, e.g. to link against libm enter m. To link against external libraries, i.e. libraries not included in the compiler package, enter the path where the library can be found under Library search path. 14

Figure 5.5. C libraries to link against 5.6.3. Link map A link map can be obtained from the compiler by specifying extra linker flags in the Linker section Miscellaneous. Add the Linker flags -Wl,-Map,mapfile where mapfile is the file the link map will be written to. It will be found together with the compiled files in a folder named after the current build configuration. 5.7. Launch settings Break at startup will tell GDB to insert a breakpoint at start-up. The default value for Symbol will be set according to the selected tool chain for the project. See Table 5.1. Table 5.1. Default start-up break symbols Toolchain Symbol BCC Bare C main RCC RTEMS Init Nucleus Application_Initialize ThreadX tx_application_define ecos cyg_user_start Thread support will enable debugging with threads. Please refer to the GRMON or the TSIM manual for additional information about thread support. Table 5.2. Professional executables Tool Executable (Windows) Executable (Linux) GRMON pro grmon.exe grmon TSIM ERC32 tsim-erc32.exe tsim-erc32 TSIM LEON tsim-leon.exe TSIM LEON3 tsim-leon3.exe tsim-leon 1 tsim-leon3 1 The TSIM LEON3 executable has the same name as the TSIM Eval executable. If this is causing any problems either specify the full path or remove TSIM Eval by deleting the folder c:\opt\tsim-eval. 5.8. Launch time out Eclipse has a launch time out set to 30 000 ms as default. This is a limit on the time it can take to start GRMON and download the binary. Since binary files sometimes can get very large this time is not always sufficient, especially 15

when debugging through a serial connection. To change this setting go to Window -> Prefences... -> C/C++ -> Debug -> GDB MI and set Launch timeout to something larger like 60 000 ms. Figure 5.6. Launch time-out error message 16

6. Software update Since LEON IDE is built upon the Eclipse framework it can use the Software Update feature available in Eclipse. To update LEON IDE select Help -> Check for updates. Eclipse will look for updates to all installed plugin and give a list with available updates. Select LEON IDE if available and follow the instructions. Figure 6.1. LEON IDE update 17

7. FAQ / TROUBLESHOOTING Q: A: Q: A: Q: A: Q: A: Q: A: Q: A: Open Declaration doesn't work. I only get file not found or symbol not found. This is because Eclipse defaults to using gcc for the indexing. To fix it open the project preferences and select C/C++ build Discovery options. Change the following for both Debug and Release: Set Discovery profile scope to Configuration-wide and set Compiler invocation command to the compiler used (sparc-rtems-gcc, sparc-elf-gcc...). After a recompile the index will be updated and Open Declaration should work. I try to run GRMON command with the monitor command, but it only works the first time. Eclipse tries to be smart and sends all output from the target to a separate console window. When you run the GDB monitor command the output goes to that console window instead of the GDB console and Eclipse will automatically select it. To run a new command select the GDB console again by clicking on the GDB process or using the console selection button. How do I issue a TSIM monitor command from within ECLIPSE? In Eclipse open the GDB debugger console through the console dropdown. Issue a monitor <tsim-command>. The output of the monitor command will appear in the console of the application being debugged. I get the error message: "error creating session localhost:2222: Bad file descriptor". What am I doing wrong? This error message is usually caused by GRMON or TSIM not being able to launch correctly. Make sure that your launch configuration settings are correct and that GRMON or TSIM is launched with the right settings. After creating a C project with the rtems-hello.c code, building the project always generate a warning: Error launching external scanner info generator (gcc -E -P -v -dd C:/workspace/.metadata/.plugins/ org.eclipse.cdt.make.core/specs.c) It is a problem with Eclipse which we haven't found any workaround for. The warning is completely harmless. When the debug sessions start the following messages are printed (or similar): No symbol "auto" in current context. monitor symbol C:\workspace\rtems-tasks\Debug\rtems-tasks Previous frame identical to this frame (corrupt stack?) The target endianness is set automatically (currently big endian) These are just informational messages from GDB and can be ignored. 18

Cobham Gaisler AB Kungsgatan 12 411 19 Gothenburg Sweden sales@gaisler.com T: +46 31 7758650 F: +46 31 421407 Cobham Gaisler AB, reserves the right to make changes to any products and services described herein at any time without notice. Consult Cobham or an authorized sales representative to verify that the information in this document is current before using this product. Cobham does not assume any responsibility or liability arising out of the application or use of any product or service described herein, except as expressly agreed to in writing by Cobham; nor does the purchase, lease, or use of a product or service from Cobham convey a license under any patent rights, copyrights, trademark rights, or any other of the intellectual rights of Cobham or of third parties. All information is provided as is. There is no warranty that it is correct or suitable for any purpose, neither implicit nor explicit. Copyright 2015 Cobham Gaisler AB 19