μc/probe on the RIoTboard (Linux)

Similar documents
μc/probe on the element14 BeagleBone Black

μc/probe on the element14 BeagleBone Black

The process also requires the use of the following files found in the Micriµm Quick Start Package for the FRDM-KL46Z:

µc/probe on the Freescale FRDM-KL05Z without an RTOS

EFM8 Laser Bee Family QSG110: EFM8LB1-SLSTK2030A Quick Start Guide

QSG153: Micrium s μc/probe Tool Quick- Start Guide

EFM32 Happy Gecko Family EFM32HG-SLSTK3400A Quick-Start Guide

Software Release Note

AN999: WT32i Current Consumption

QSG144: CP2615-EK2 Quick-Start Guide

AN125 INTEGRATING RAISONANCE 8051 TOOLS INTO THE S ILICON LABS IDE. 4. Configure the Tool Chain Integration Dialog. 1. Introduction. 2.

EFM32 Pearl Gecko Family QSG118: EFM32PG1 SLSTK3401A Quick- Start Guide

QSG114: CPT007B SLEX8007A Kit Quick- Start Guide

EFM8 Busy Bee Family EFM8BB2-SLSTK2021A Quick Start Guide

QSG119: Wizard Gecko WSTK Quick-Start Guide

EFM8 Universal Bee Family EFM8UB2 Errata

SMBus. Target Bootloader Firmware. Master Programmer Firmware. Figure 1. Firmware Update Setup

QSG123: CP2102N Evaluation Kit Quick- Start Guide

UG345: Si72xx Eval Kit User's Guide

Translate HCSL to LVPECL, LVDS or CML levels Reduce Power Consumption Simplify BOM AVL. silabs.com Building a more connected world. Rev. 0.

QSG126: Bluetooth Developer Studio Quick-Start Guide

EFM32 EFM32GG11 Giant Gecko Family QSG149: EFM32GG11-SLSTK3701A Quick-Start Guide

AN1160: Project Collaboration with Simplicity Studio

Date CET Initials Name Justification

CP2110-EK CP2110 EVALUATION KIT USER S GUIDE. 1. Kit Contents. 2. Relevant Documentation. 3. Software Setup

Si1146 UVIRSlider2EK Demo Kit

Humidity/Temp/Optical EVB UG

QSG107: SLWSTK6101A Quick-Start Guide

Date CET Initials Name Justification

AN976: CP2101/2/3/4/9 to CP2102N Porting Guide

CP2103-EK CP2103 EVALUATION KIT USER S GUIDE. 1. Kit Contents. 2. Relevant Documentation. 3. Software Setup USBXpress Driver Development Kit

Figure 1. Precision32 AppBuilder

CP2104-EK CP2104 EVALUATION KIT USER S GUIDE. 1. Kit Contents. 2. Relevant Documentation. 3. Software Setup USBXpress Driver Development Kit

CP2105-EK CP2105 EVALUATION KIT USER S GUIDE. 1. Kit Contents. 2. Relevant Documentation. 3. Software Setup USBXpress Driver Development Kit

EFR32MG13, EFR32BG13 & EFR32FG13 Revision C and Data Sheet Revision 1.0

QSG159: EFM32TG11-SLSTK3301A Quick- Start Guide

AN1143: Using Micrium OS with Silicon Labs Thread

QSG155: Using the Silicon Labs Dynamic Multiprotocol Demonstration Applications

QSG107: SLWSTK6101A/B Quick-Start Guide

WT12 EVALUATION KIT DATA SHEET. Monday, 09 September Version 1.7

UG365: GATT Configurator User s Guide

Figure 1. CP2108 USB-to-Quad UART Bridge Controller Evaluation Board

Si1140-DK. Si1140 DEVELOPMENT KIT USER S GUIDE. 1. Kit Contents. Figure 1. Si1143 Evaluation Board

UG322: Isolated CAN Expansion Board User Guide

Router-E and Router-E-PA Wireless Router PRODUCT MANUAL

Bluegiga WF111 Software Driver Release Notes

AN0059.1: UART Flow Control

QSG166: WF200 Wi-Fi Development Kit Quick Start Guide

ETRX3DVK Development Kit Quick-Start Guide

AN1117: Migrating the Zigbee HA Profile to Zigbee 3.0

UG274: Isolated USB Expansion Board User Guide

AN1106: Optimizing Jitter in 10G/40G Data Center Applications

QSG107: SLWSTK6101A/B Quick-Start Guide

Date CET Initials Name Justification

AN719 PRECISION32 IDE AND APPBUILDER DETAILED TUTORIAL AND WALKTHROUGH. 1. Introduction. Figure 1. Precision32 IDE and AppBuilder Walkthrough Overview

AN324 ADVANCED ENCRYPTION STANDARD RELEVANT DEVICES. 1. Introduction. 2. Implementation Potential Applications Firmware Organization

AN888: EZR32 Simple TRX Application Quick Start Guide

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup Using a USB Debug Adapter

AN0059.0: UART Flow Control

UG313: Thunderboard Sense 2 Bluetooth Low Energy Demo User's Guide

Figure 1. Traditional Biasing and Termination for LVPECL Output Buffers

UG271: CP2615-EK2 User's Guide

AN888: EZR32 Quick Start Guide

Wireless Development Suite (WDS) is a software utility used to configure and test the Silicon Labs line of ISM band RFICs.

UG369: Wireless Xpress BGX13P SLEXP8027A Kit User's Guide

AN1083: Creating and Using a Secure CoAP Connection with ARM s mbed TLS

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup Using a USB Debug Adapter

ADC Evaluation Platform GUI User s Guide

C8051F411-EK C8051F411 EVALUATION KIT USER S GUIDE. 1. Kit Contents. 2. Kit Overview. 3. Evaluation Board Interface LCD User Interface

AN1095: What to Do When the I2C Master Does Not Support Clock Stretching

UG294: CPT213B SLEXP8019A Kit User's Guide

8-Bit MCU C8051F85x/86x Errata

UG254: CP2102N-MINIEK Kit User's Guide

UG352: Si5391A-A Evaluation Board User's Guide

AN1139: CP2615 I/O Protocol

Software Design Specification

Table 1. Kits Content. Qty Part Number Description. Si4010 Simplified Key Fob Demo Kit 868 MHz

The Si50122-Ax-EVB is used to evaluate the Si50122-Ax. Table 1 shows the device part number and corresponding evaluation board part number.

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup using a USB Debug Adapter

Software Design Specification

EFR32 Mighty Gecko Family EFR32MG1 with Integrated Serial Flash Errata History

EFM8 Universal Bee Family EFM8UB1 Errata

EFM8 Busy Bee EFM8BB1 Errata

AN690. Si4010 DEVELOPMENT KIT QUICK-START GUIDE. 1. Purpose. 2. Kit Content. Table 1. Kit Content

Si7005USB-DONGLE. EVALUATION DONGLE KIT FOR THE Si7005 TEMPERATURE AND HUMIDITY SENSOR. 1. Introduction. 2. Evaluation Kit Description

BRD4300B Reference Manual MGM111 Mighty Gecko Module

TS9004 Demo Board FEATURES ORDERING INFORMATION

CP2114 Family CP2114 Errata

UG232: Si88xxxISO-EVB User's Guide

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup Using a USB Debug Adapter

AN1083: Creating and Using a Secure CoAP Connection with ARM s mbed TLS

USBXpress Family CP2102N Errata

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

AN1154: Using Tokens for Non-Volatile Data Storage

Termination Options for Any-Frequency Si51x XOs, VCXOs

EFM32 Zero Gecko EFM32ZG Errata

AN1023: HTTP SERVER EXAMPLE

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup Using a USB Debug Adapter

FM-DAB-DAB Seamless Linking I2S SRAM. I2C / SPI Host Interface. FLASH Interface MOSI/SDA INTB MISO/A0 RSTB SCLK/SCL SSB/A1 SMODE

UG366: Bluetooth Mesh Node Configuration User s Guide

Transcription:

Micriμm μc/probe on the RIoTboard (Linux) 1. Introduction Whether you are doing kernel, driver or application development in a Linux environment, it's likely that at some point, you will need to debug your program using the GNU Debugger (GDB) to do basic operations such as printing variable values, setting breakpoints and stepping through your code. There are several GUIs available for GDB such as the Eclipse CDT IDE that effectively help you debug and trace your application and libraries at the C source code level. Other tools exist to analyze performance, execution paths and memory, including memory leak detection, benchmark and optimization. However, if you are doing embedded application development in a Linux environment, all the previously mentioned tools are simply not enough. µc/probe is a Windows application tool that helps you extend your debugging scope to a higher level where you can model the system and operate the model using virtual controls to simulate stimulus and virtual indicators to simulate response. By having a dashboard for your C code, you will gain a firm understanding of what the embedded system is doing at any given time. µc/probe works with any embedded target processor and in most cases it does not require any special code running on the embedded target (e.g. no kernel, baremetal). Other platforms such as the RIoTboard featured in this document, require a few files written in C that are available for free and are royalty-free. This document will walk you through the steps necessary to run a Linux process written in C on the RIoTboard and interface the process with µc/probe via TCP/IP. Global variables declared in the Linux process will be available for read/write access from a dashboard in the Windows PC. Figure 1-1 shows an overview of the system and data flow. The annotations at the bottom of the image describe each step in the data flow. Page 1

Figure 1-1: µc/probe and the RIoTboard Flow Diagram Figure 1-1(1): You have to provide μc/probe with an ELF file with DWARF-2, -3 or -4 debugging information. The ELF file is generated by your toolchain s linker (i.e. GNU s gcc). μc/probe parses the ELF file and reads the addresses of each of the RIoTboard s symbols (i.e., global variables) and creates a catalog known as Symbol Browser, which will be used by you during design-time to select the symbols you want to display on your dashboard. Figure 1-1(2): During design-time, you create a μc/probe workspace using a Windows PC and μc/probe. You design your own dashboard by dragging and dropping virtual controls and indicators onto a data screen. Each virtual control and indicator needs to be mapped to a RIoTboard s symbol by selecting it from the symbol browser. Refer to the document μc/probe User s Manual for more information on creating your own dashboard with μc/probe. Page 2

Figure 1-1(3): Before proceeding to the run-time stage, μc/probe needs to be configured to use TCP/IP. In order to start the run-time stage, you click the Run button and μc/probe starts making requests to read the value of all the memory locations associated with each virtual control and indicator (i.e., buttons and gauges respectively). At the same time, μc/probe sends commands to write the memory locations associated with each virtual control (i.e., buttons on a click event). Figure 1-1(4): In the case of a reading request, the RIoTboard responds with the latest value. In the case of a write command, the RIoTboard responds with an acknowledgement. Figure 1-1(5): μc/probe parses the responses from the RIoTboard and updates the virtual controls and indicators. 2. Requirements To conduct the steps in this guide you must meet the following requirements: Have a RIoTboard Board: the RIoTboard can be purchased from here. Have a HDMI cable and monitor. Have a USB-based keyboard and mouse. The RIoTboard comes with an Android OS image preinstalled on the onboard flash storage. The example in this document requires Linux. To re-flash the board with a Linux image, follow the instructions in this manual. Be familiar with the RIoTboard, including how to power up the board, connect a mouse and keyboard, connect a monitor and, connect it to the Internet. Click here for more information. Have a basic understanding of Linux and GNU commands. Have a basic understanding of Linux-based embedded systems development using POSIX threads in the C language. Page 3

3. Quick Start Guide This section will guide you through the necessary 10 steps to run the example of Micriμm s μc/probe on the Linux version of the RIoTboard. 3-1. Installation of µc/probe for Windows Start by downloading and executing the µc/probe Windows Installer from the following link: http://micrium.com/tools/ucprobe/software-and-docs/ The installation process will automatically create a shortcut on your Desktop that you will need later on. Figure 3-1: µc/probe Shortcut on the Windows Desktop With the purchase of the RIoTboard from element14, you are eligible for a 1-month subscription to the Professional Edition of μc/probe. You can choose to activate your license at any time, but because the subscription period begins from the moment you activate it, we recommend activating it at a later time as this demo simply requires the Evaluation Edition of μc/probe. Whenever you are ready to activate your license, you will need internet access and then you can activate it by simply clicking File -> Activation and entering the 20-characters license key provided by element14. Page 4

3-2. Connecting the RIoTboard Connect the RIoT board to your Windows PC as shown in Figure 3-2: HDMI TV or Monitor USB Keyboard USB Mouse Internet 5V 4A DC Figure 3-2: RIoTboard Connections The RIoTboard will start Linux and will show a Desktop on your display connected to the HDMI port of the RIoTboard, similar to the one shown in Figure 3-3. Some of the steps in this quick start guide will ask you to use the tools indicated in Figure 3-3 to perform the following actions: Web Browser: To download software. Terminal: To compile the demo and build the executable. USB flash drive file system: To transfer the ELF file from the RIoTboard to your Windows PC. Page 5

Figure 3-3: RIoTboard Desktop 3-3. Download of µc/probe-target code in the RIoTboard All the files necessary to interface Micriµm s µc/probe with the RIoTboard board are archived in the Quick Start Package for the RIoTboard zip file Micrium_RIoT_QSP.zip which is available for download from the following link: http://micrium.com/probe/micrium_riot_qsp.zip The contents of this zip file are illustrated in Figure 3-4, where the files surrounded by the Blue box are meant to be used in the host Windows PC, while the files surrounded by the Green boxes are meant to be used in the Linux side of the system (i.e. RIoTboard s file system). Page 6

For discussion purposes, we can separate the directory structure in 5 different categories as indicated in Figure 3-4. The annotations at the bottom of Figure 3-4 will describe each group of files. Micrium_RIoT_QSP probe_demo.out probe_demo.wspx micrium Examples RIoTboard RIoTboard uc-probe app.c cpu_cfg.h lib_cfg.h makefile probe_com_cfg.h Software uc-cpu uc-lib uc-probe Target Communication Generic Source probe_com.c probe_com.h TCPIP OS Posix probe_tcpip_os.c Source probe_tcpip.c probe_tcpip.h (1) (2) (3) (4) (5) Figure 3-4: Micriµm Quick Start Package Directory Structure Page 7

Figure 3-4(1): These files are meant to be used on the Windows PC side of the system by µc/probe. They are the input files to µc/probe and can be described as follows: The file probe_demo.out is the executable file (ELF) generated by the compiler. The file probe_demo.wspx is the workspace file format used by µc/probe to store the dashboard where all the graphical widgets get configured. Figure 3-4(2): This folder contains the files that implement and make the example. The file app.c is the application-level example that demonstrates how easy it is to include a µc/probe interface in your embedded Linux C project. The files with the suffix _cfg are for configuration purposes. You don t really need to edit any of these files, simply type make all at the command line to build the example and generate the ELF file. Figure 3-4(3): The µc/cpu module consists of files that encapsulate common CPUspecific functionality and CPU compiler-specific data types. Although there is no need to get familiar or edit any of these files they are still required to build the example. Figure 3-4(4): The μc/lib module consists of library functions meant to be highly portable and not tied to any specific compiler. It contains the source code of the functions used to manipulate ASCII strings, perform memory copies, and more. Similar to the µc/cpu files previously described, there is no need to get familiar or edit any of these files but, they are still required to build the example. Figure 3-4(5): The µc/probe-target module implements the communication protocol on the embedded target (i.e. RIoTboard) to respond to the requests from μc/probe running on the Windows PC. There is no need to get familiar or edit any of these files. 3-4. Installation of µc/probe-target code in the RIoTboard Extract the files indicated by the blue box in Figure 3-4(1) to any folder in your Windows PC. For example, you can extract these files to a folder called Micrium on your Desktop: C:\Users\<your name>\desktop\micrium Now, in regards to the files indicated by the green boxes in Figure 3-4(2-5), there are multiple ways to transfer them to your RIoTboard s file system. Here are some ideas: USB flash drive in one of the USB ports in HUB1 or HUB2. Micro SD Card in J7. SecureCopy (SCP) command. Directly from the RIoT board. Page 8

The easiest way to do it is probably by downloading the files directly from the RIoTboard by using an Internet browser from the RIoT board s Ubuntu desktop environment and downloading the same zip file from here: http://micrium.com/probe/micrium_riot_qsp.zip When you do so, Ubuntu will open a window similar to the one shown in the following image. Figure 3-5: RIoTboard: Downloading File Select the option to Save the file and press Ok. The file will be downloaded to your Downloads directory as shown below: Figure 3-6: RIoTboard: Downloads Page 9

You can extract from the zip file the entire /micrium folder indicated by the green boxes in Figure 3-4(2-5), and copy it to your Home directory as shown below: Figure 3-7: RIoTboard: Extracting Files 3-5. Compiling the µc/probe-target Demo on the RIoTboard Open a terminal console to the RIoTboard, change your working directory to the one where you installed the /micrium folder in the previous step and to the subfolder shown in Figure 3-4(2) where the makefile is located. For example, you can enter the following command at the prompt: cd micrium/examples/riotboard/riotboard/uc-probe/ To compile the µc/probe demo and generate the executable file (ELF) enter the following command at the prompt: make all 3-6. Executing the µc/probe-target Demo on the RIoTboard Similar to the previous step, open a terminal console to the RIoTboard, change your working directory to the one shown in Figure 3-4(2) where the makefile is located and enter the following command at the prompt:./probe_demo.out Page 10

3-7. Opening the µc/probe Demo on the Windows PC Open µc/probe on the Windows PC and click File -> Open to open the workspace file probe_demo.wspx located in the folder illustrated in Figure 3-4(1). 3-8. Updating the Symbols Browser If you have modified the original demo by editing the file app.c illustrated in Figure 3-4(2), then the memory addresses of your global variables have most likely changed and you will need to update the Symbols Browser in µc/probe. You first need to transfer the new ELF file that you built in step 3-5 from the RIoTboard to the Windows PC. You can do that by inserting a USB flash drive in one of the RIoTboard s USB ports in HUB1 or HUB2. When you insert a USB flash drive into the RIoTboard, Ubuntu will open a window on your desktop where you can drag and drop the new ELF file probe_demo.out. Alternatively, you can open a console terminal and enter the following command: cp micrium/examples/riotboard/riotboard/uc-probe/probe_demo.out /media/<usb Flash Drive s Serial #> Then you can insert the USB flash drive in your Windows PC and use Windows Explorer to copy the new ELF file probe_demo.out into your Micrium folder in your Windows PC. For example: Removable Disk (E:) \probe_demo.out To C:\Users\<your name>\desktop\micrium Finally, to update the Symbols Browser, click the button with the Red X shown in Figure 3-8, then click the button labeled ELF and browse to the folder where you transferred the new ELF file probe_demo.out For example, C:\Users\<your name>\desktop\micrium Page 11

Figure 3-8: µc/probe Symbols Browser 3-9. Configuring µc/probe on the Windows PC Click the Settings button in the top toolbar of µc/probe as indicated in Figure 3-9: µc/probe will open the Settings window shown in Figure 3-10. Figure 3-9: µc/probe Top Toolbar Select the TCP/IP communication interface and configure it with the RIoTboard s IP address as shown in Figure 3-10. Page 12

Figure 3-10: µc/probe Communication Settings Note: Type ifconfig at the command line prompt to display the IP address of your RIoTboard. Page 13

3-10. Running µc/probe on the Windows PC Click the Run button in the top toolbar of µc/probe. µc/probe will start exchanging data with your RIoTboard and will display the dashboard shown in Figure 3-11: Figure 3-11: µc/probe Dashboard As you move the slider or type in a message in the text box control from µc/probe, you will see the RIoTboard s terminal window updating its output accordingly as shown in Figure 3-12: Figure 3-12: RIoTboard Terminal Window Page 14

Disclaimer Silicon Labs intends to provide customers with the latest, accurate, and in-depth documentation of all peripherals and modules available for system and software implementers using or intending to use the Silicon Labs products. Characterization data, available modules and peripherals, memory sizes and memory addresses refer to each specific device, and "Typical" parameters provided can and do vary in different applications. Application examples described herein are for illustrative purposes only. Silicon Labs reserves the right to make changes without further notice and limitation to product information, specifications, and descriptions herein, and does not give warranties as to the accuracy or completeness of the included information. Silicon Labs shall have no liability for the consequences of use of the information supplied herein. This document does not imply or express copyright licenses granted hereunder to design or fabricate any integrated circuits. The products are not designed or authorized to be used within any Life Support System without the specific written consent of Silicon Labs. A "Life Support System" is any product or system intended to support or sustain life and/or health, which, if it fails, can be reasonably expected to result in significant personal injury or death. Silicon Labs products are not designed or authorized for military applications. Silicon Labs products shall under no circumstances be used in weapons of mass destruction including (but not limited to) nuclear, biological or chemical weapons, or missiles capable of delivering such weapons. Trademark Information Silicon Laboratories Inc., Silicon Laboratories, Silicon Labs, SiLabs and the Silicon Labs logo, Bluegiga, Bluegiga Logo, Clockbuilder, CMEMS, DSPLL, EFM, EFM32, EFR, Ember, Energy Micro, Energy Micro logo and combinations thereof, "the world s most energy friendly microcontrollers", Ember, EZLink, EZRadio, EZRadioPRO, Gecko, ISOmodem, Precision32, ProSLIC, Simplicity Studio, SiPHY, Telegesis, the Telegesis Logo, USBXpress and others are trademarks or registered trademarks of Silicon Labs. ARM, CORTEX, Cortex-M3 and THUMB are trademarks or registered trademarks of ARM Holdings. Keil is a registered trademark of ARM Limited. All other products or brand names mentioned herein are trademarks of their respective holders. Silicon Laboratories Inc. 400 West Cesar Chavez Austin, TX 78701 USA http://www.silabs.com