μc/probe on the element14 BeagleBone Black

Similar documents
μc/probe on the RIoTboard (Linux)

μ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

AN999: WT32i Current Consumption

Software Release Note

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

QSG144: CP2615-EK2 Quick-Start Guide

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

QSG114: CPT007B SLEX8007A Kit Quick- Start Guide

EFM32 Happy Gecko Family EFM32HG-SLSTK3400A 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

QSG123: CP2102N Evaluation Kit Quick- Start Guide

UG345: Si72xx Eval Kit User's Guide

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

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

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

Date CET Initials Name Justification

AN1160: Project Collaboration with Simplicity Studio

Humidity/Temp/Optical EVB UG

QSG126: Bluetooth Developer Studio Quick-Start Guide

Date CET Initials Name Justification

QSG107: SLWSTK6101A Quick-Start Guide

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

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

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

Si1146 UVIRSlider2EK Demo Kit

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

QSG159: EFM32TG11-SLSTK3301A Quick- Start Guide

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

AN1143: Using Micrium OS with Silicon Labs Thread

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

UG365: GATT Configurator User s Guide

Figure 1. Precision32 AppBuilder

Bluegiga WF111 Software Driver Release Notes

QSG107: SLWSTK6101A/B Quick-Start Guide

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

QSG155: Using the Silicon Labs Dynamic Multiprotocol Demonstration Applications

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

AN0059.1: UART Flow Control

UG322: Isolated CAN Expansion Board User Guide

ETRX3DVK Development Kit Quick-Start Guide

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

AN1117: Migrating the Zigbee HA Profile to Zigbee 3.0

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

UG274: Isolated USB Expansion Board User Guide

Date CET Initials Name Justification

QSG166: WF200 Wi-Fi Development Kit Quick Start Guide

QSG107: SLWSTK6101A/B Quick-Start Guide

AN0059.0: UART Flow Control

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

AN888: EZR32 Quick Start Guide

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

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

AN888: EZR32 Simple TRX Application Quick Start Guide

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

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

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

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

Figure 1. Traditional Biasing and Termination for LVPECL Output Buffers

8-Bit MCU C8051F85x/86x Errata

UG271: CP2615-EK2 User's Guide

UG294: CPT213B SLEXP8019A Kit User's Guide

UG254: CP2102N-MINIEK Kit User's Guide

Software Design Specification

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

AN1139: CP2615 I/O Protocol

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

Software Design Specification

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

UG352: Si5391A-A Evaluation Board User's Guide

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

BRD4300B Reference Manual MGM111 Mighty Gecko Module

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

EFR32 Mighty Gecko Family EFR32MG1 with Integrated Serial Flash Errata History

UG232: Si88xxxISO-EVB User's Guide

EFM8 Universal Bee Family EFM8UB1 Errata

EFM8 Busy Bee EFM8BB1 Errata

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

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

ADC Evaluation Platform GUI User s Guide

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

TS9004 Demo Board FEATURES ORDERING INFORMATION

USBXpress Family CP2102N Errata

CP2114 Family CP2114 Errata

AN1154: Using Tokens for Non-Volatile Data Storage

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

AN1023: HTTP SERVER EXAMPLE

UG103.13: Application Development Fundamentals: RAIL

AN1053: Bluetooth Device Firmware Update over UART for EFR32xG1 and BGM11x Series Products

Termination Options for Any-Frequency Si51x XOs, VCXOs

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

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

EFM32 Zero Gecko EFM32ZG Errata

Transcription:

Micriμm μc/probe on the element14 BeagleBone Black 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 BeagleBone Black 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 BeagleBone Black 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 BeagleBone Black 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 BeagleBone Black 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 BeagleBone Black 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 BeagleBone Black responds with the latest value. In the case of a write command, the BeagleBone Black responds with an acknowledgement. Figure 1-1(5): μc/probe parses the responses from the BeagleBone Black and updates the virtual controls and indicators. 2. Requirements To conduct the steps in this guide you must meet the following requirements: Have a BeagleBone Black Board running Linux: the element14 BeagleBone Black can be purchased from here. Be familiar with the BeagleBone Black board, including how to power up the board and connect to it via the USB cable or Ethernet cable. 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 9 steps to run the example of Micriμm s μc/probe on the Linux version of the BeagleBone Black. 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. Figure 3-1: µc/probe Shortcut on the Windows Desktop With the purchase of the BeagleBone Black 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. 3-2. Download of µc/probe-target code in the BeagleBone Black All the files necessary to interface Micriµm s µc/probe with the BeagleBone Black board are archived in the Quick Start Package for the BeagleBone Black zip file Micrium_BBB_QSP.zip which is available for download from the following link: http://micrium.com/probe/micrium_bbb_qsp.zip The contents of this zip file are illustrated in Figure 3-2, 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. BeagleBone Black s file system). For discussion purposes, we can separate the directory structure in 5 different categories as indicated in Figure 3-2. The annotations at the bottom of Figure 3-2 will describe each group of files. Page 4

Micrium_BBB_QSP probe_demo.out probe_demo.wspx micrium Examples Element14 BBB 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-2: Micriµm Quick Start Package Directory Structure Figure 3-2(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. Page 5

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-2(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-2(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-2(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-2(5): The µc/probe-target module implements the communication protocol on the embedded target (i.e. BeagleBone Black) 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-3. Installation of µc/probe-target code in the BeagleBone Black Extract the files indicated by the blue box in Figure 3-2(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-2(2-5), there are multiple ways to transfer them to your BeagleBone Black s file system. Here are some ideas: Micro SD Card. SecureCopy (SCP) command. Boot partition. The easiest way to do it is probably by using the boot partition that gets mounted when you connect a USB cable between your Windows PC and the BeagleBone Black on P4. When you do so, Windows Explorer will open a window similar to the one shown in the following image. Page 6

Figure 3-3: BeagleBone Black s boot partition You can simply copy the entire /micrium folder indicated by the green boxes in Figure 3-2(2-5) by dragging and dropping it into that window. Finally, you can open a terminal console to the BeagleBone Black such as PuTTY with and IP address that will probably be 192.168.7.2, login as root and move the /micrium folder from the boot partition to any other folder in your BeagleBone Black s file system as long as the directory structure illustrated in Figure 3-2 is maintained. For example, you can enter the following command at the prompt: cp r /boot/uboot/micrium / 3-4. Compiling the µc/probe-target Demo on the BeagleBone Black Open a terminal console to the BeagleBone Black (e.g. PuTTY), 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-2(2) where the makefile is located. For example, you can enter the following command at the prompt: cd /micrium/examples/element14/bbb/uc-probe/ To compile the µc/probe demo and generate the executable file (ELF) enter the following command at the prompt: make all Page 7

3-5. Executing the µc/probe-target Demo on the BeagleBone Black Similar to the previous step, open a terminal console to the BeagleBone Black, change your working directory to the one shown in Figure 3-2(2) where the makefile is located and enter the following command at the prompt:./probe_demo.out 3-6. 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-2(1). 3-7. Updating the Symbols Browser If you have modified the original demo by editing the file app.c illustrated in Figure 3-2(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-4 from the BeagleBone Black to the Windows PC. You can do that by using the boot partition shown in Figure 3-3. You basically copy the file to the boot partition by entering the following command at the BeagleBone Black s command line prompt: cp /micrium/examples/element14/bbb/uc-probe/probe_demo.out /boot/uboot/ Then you can use Windows Explorer to copy the probe_demo.out file into your Micrium folder in your Windows PC. For example: BeagleBone Getting Started (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-4, 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 8

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

Figure 3-6: µc/probe Communication Settings Note: If using the USB cable on P4 of the BeagleBone Black, then the IP address will always be 192.168.7.2 otherwise, type ifconfig at the command line prompt to display the IP address of your BeagleBone Black. Page 10

3-9. 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 BeagleBone Black and will display the dashboard shown in Figure 3-7: Figure 3-7: µ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 BeagleBone Black s terminal window updating its output accordingly as shown in Figure 3-8: Figure 3-8: BeagleBone Black Terminal Window Page 11

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