Figure 1. Selecting a SiM3x Device

Similar documents
Figure 1. 8-Bit USB Debug Adapter

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

AN111: Using 8-Bit MCUs in 5 Volt Systems

UG103.8: Application Development Fundamentals: Tools

AN962: Implementing Master-Slave Timing Redundancy in Wireless and Packet- Based Network Applications

AN803. LOCK AND SETTLING TIME CONSIDERATIONS FOR Si5324/27/ 69/74 ANY-FREQUENCY JITTER ATTENUATING CLOCK ICS. 1. Introduction

UG129: ZigBee USB Virtual Gateway Reference Design (RD ) User's Guide

AN862. OPTIMIZING Si534X JITTER PERFORMANCE IN NEXT GENERATION INTERNET INFRASTRUCTURE SYSTEMS. 1. Introduction

AN580 INFRARED GESTURE SENSING. 1. Introduction. 2. Hardware Considerations

AN952: PCIe Jitter Estimation Using an Oscilloscope

TS1005 Demo Board COMPONENT LIST. Ordering Information. SC70 Packaging Demo Board SOT23 Packaging Demo Board TS1005DB TS1005DB-SOT

AN486: High-Side Bootstrap Design Using ISODrivers in Power Delivery Systems

UG103-13: Application Development Fundamentals: RAIL

AN922: Using the Command Line Interface (CLI) for Frequency On-the-Fly with the Si5346/47

Bootloader with AES Encryption

Making Prototyping Boards for the EFM32 kits

AN104 I NTEGRATING KEIL 8051 TOOLS INTO THE SILICON LABS IDE. 1. Introduction. 2. Key Points. 3. Create a Project in the Silicon Labs IDE

Current Digital to Analog Converter

UM1680 User manual. Getting started with STM32F429 Discovery software development tools. Introduction

ETRX3USB ETRX3USB-LRS ETRX3USB+8M ETRX3USB-LRS+8M PRODUCT MANUAL

How To Develop A Toolstick

Backup Power Domain. AN Application Note. Introduction

AN655 R ANGE TEST APPLICATION FOR EZRADIO AND EZRADIOPRO. 1. Introduction. 2. Supported Radio Types

UM1727 User manual. Getting started with STM32 Nucleo board software development tools. Introduction

Using DAVE with MDK Version 5

UG103.8 APPLICATION DEVELOPMENT FUNDAMENTALS: TOOLS

PC Base Adapter Daughter Card UART GPIO. Figure 1. ToolStick Development Platform Block Diagram

AN0822: Simplicity Studio User's Guide

AN583: Safety Considerations and Layout Recommendations for Digital Isolators

Selecting the Right MCU Can Squeeze Nanoamps out of Your Next Internet of Things Application

QSG105 GETTING STARTED WITH SILICON LABS WIRELESS NETWORKING SOFTWARE

RoHs compliant, Pb-free Industrial temperature range: 40 to +85 C Footprint-compatible with ICS , 2.5, or 3.3 V operation 16-TSSOP

APPLICATION NOTE. AT07175: SAM-BA Bootloader for SAM D21. Atmel SAM D21. Introduction. Features

CodeWarrior Development Studio for Freescale S12(X) Microcontrollers Quick Start

UM1727 User manual. Getting started with STM32 Nucleo board software development tools. Introduction

AN220 USB DRIVER CUSTOMIZATION

UM1790 User manual. Getting started with STM32L053 discovery kit software development tools. Introduction

UM1969 User manual. Getting started with STM32F746G discovery software development tools. Introduction

AN220 USB DRIVER CUSTOMIZATION

ZigBee-2.4-DK 2.4 GHZ ZIGBEE DEVELOPMENT KIT USER S GUIDE. 1. Kit Contents. Figure GHz ZigBee Development Kit

Telegesis is a trademark of Silicon Laboratories Inc. Telegesis ZigBee Communications Gateway. Product Manual

Building and Debugging a project using Keil MDK-ARM Eclipse plug-in

TWR-KV31F120M Sample Code Guide for IAR Board configuration, software, and development tools Rev.0

APPLICATION. si32library. Callback CMSIS HARDWARE. Figure 1. Firmware Layer Block Diagram

AN335 USB DRIVER INSTALLATION UTILITY. 1. Description. 2. Installation Install Package

Getting Started with Kinetis SDK (KSDK)

3. Programming the STM32F4-Discovery

Table 1. RF Pico Boards of the EZRadioPRO Development Kits. Qty Description Part Number

QSG108: Blue Gecko Bluetooth Smart Software Quick-Start Guide

AN614 A SIMPLE ALTERNATIVE TO ANALOG ISOLATION AMPLIFIERS. 1. Introduction. Input. Output. Input. Output Amp. Amp. Modulator or Driver

UM0985 User manual. Developing your STM32VLDISCOVERY application using the IAR Embedded Workbench software. Introduction

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

Quick Start Tutorial. Using the TASKING* Software Development Tools with the Intel 8x930 Family Evaluation Board

Installing Service Pack Updater Archive for CodeWarrior Tools (Windows and Linux) Quick Start

AN335 USB DRIVER INSTALLATION METHODS. 1. Introduction. 2. Relevant Documentation. 3. DPInst Installation and Customization

Zynq-7000 Platform Software Development Using the ARM DS-5 Toolchain Authors: Simon George and Prushothaman Palanichamy

AN3354 Application note

CPU. PCIe. Link. PCIe. Refclk. PCIe Refclk. PCIe. PCIe Endpoint. PCIe. Refclk. Figure 1. PCIe Architecture Components

AN10866 LPC1700 secondary USB bootloader

SKP16C62P Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

Wireless Client Configuration Guide. for third-party wireless Ethernet adapters

INF-USB2 and SI-USB Quick Start Guide

USER GUIDE EDBG. Description

AN588 ENERGY HARVESTING REFERENCE DESIGN USER S GUIDE. 1. Kit Contents. 2. Introduction. Figure 1. Energy Harvesting Sensor Node

DsPIC HOW-TO GUIDE Creating & Debugging a Project in MPLAB

USB FM Radio-RD USB FM RADIO USER S GUIDE. 1. USB FM Radio Setup. One-time set-up enables configuration of presets and region specific FM band

AN LPC1700 timer triggered memory to GPIO data transfer. Document information. LPC1700, GPIO, DMA, Timer0, Sleep Mode

32-bit AVR UC3 Microcontrollers. 32-bit AtmelAVR Application Note. AVR32769: How to Compile the standalone AVR32 Software Framework in AVR32 Studio V2

Production Flash Programming Best Practices for Kinetis K- and L-series MCUs

Getting started with software and firmware environments for the STM32F0DISCOVERY kit

USB Audio Simplified

DRV8312-C2-KIT How to Run Guide

SIM900 Eclipse environment install Application Note_V1.00

Using the VEX Cortex with ROBOTC

E-LINK FOR ARM. E-Link User maunal / 46

Desktop NETGEAR Genie

USB Stick Driver Installation Instructions

IBM Rational Rhapsody Gateway Add On. CaliberRM Coupling Notes

Trend Micro PC-cillin Internet Security 2006

In-System Programmer USER MANUAL RN-ISP-UM RN-WIFLYCR-UM

TROY Secure Print Enterprise Lite Users Guide

Scan2CRM for ACT! User Guide

Implicit Sync. Professional Edition Users Guide

UM0834 User manual. Developing and debugging your STM8S-DISCOVERY application code. Introduction. Reference documents

Installing Service Pack Updater Archive for CodeWarrior Tools (Windows and Linux) Quick Start

APPLICATION NOTE. AT16268: JD Smart Cloud Based Smart Plug Getting. Started Guide ATSAMW25. Introduction. Features

STMicroelectronics: Cortex -M4 Training STM32F429 Discovery evaluation board using ARM Keil MDK toolkit

WNDR4500 User Guide. A Guide for Using ReadySHARE Printer ReadySHARE Access Desktop NETGEAR Genie with your WNDR4500 Router

Start A New Project with Keil Microcontroller Development Kit Version 5 and Freescale FRDM-KL25Z

SUDT AccessPort TM Advanced Terminal / Monitor / Debugger Version 1.37 User Manual

1 Software Overview ncp-uart ash-v3-test-app ash-v3-test-app Command Line Options Testing... 2

MPLAB C18 C Compiler

HP LaserJet MFP Analog Fax Accessory 300 Send Fax Driver Guide

For Active Directory Installation Guide

NETWORK PRINT MONITOR User Guide

ReadySHARE Printer. Easy to Set Up: Instructions. 350 East Plumeria Drive San Jose, CA USA

WNDR4500 User Guide. A Guide for Using ReadySHARE Printer ReadySHARE Access Desktop NETGEAR Genie Time Machine with your WNDR4500 Router

EMC NetWorker Module for Microsoft for Windows Bare Metal Recovery Solution

Contents Notice to Users

SiI3132 SATARAID5 Quick Installation Guide (Windows version)

Transcription:

INTEGRATING SILICON LABS SiM3XXXX DEVICES INTO THE KEIL µvision IDE 1. Introduction This application note describes how to configure and use the Keil µvision Integrated Development Environment (IDE) with Silicon Laboratories Precision32 32-bit microcontrollers (SiM3xxxx). 2. Key Points Key points described in this application note include: Generating a blank project in Keil µvision Configuring a µvision project for use with Silicon Laboratories SiM3xxxx devices Using the µvision IDE to build, download, run, and debug a project Using the System Viewer Windows and Debug (Print) Viewer 3. Creating a Project A project is necessary in order to build an example and download the firmware image to the MCU. To create a project in µvision: 1. Under the Project menu, select New µvision Project. After naming your new project, select SiLabs SiM3x Devices in the Select a CPU Data Base File dialog and click OK. 2. Expand the Silicon Laboratories data base to open a list of supported MCUs, select the appropriate MCU, and click OK. Figure 1. Selecting a SiM3x Device After creating your blank project, there will be an empty project in the Project Window. The next step is to configure the project options. Rev. 0.1 2/12 Copyright 2012 by Silicon Laboratories AN669

4. Configuring Options for Target Specific configurations are required in order to communicate with the MCU using µvision. Some of the options are preconfigured after selecting a device under the Device tab, but some modifications are required. This section describes the required settings in all of the configuration tabs within the Project Options for Target dialog; tabs that do not require any changes are explicitly noted. 4.1. Target Check the Use MicroLIB option in the Code Generation section. Note: Adding the correct scatter file in "Section G: Linker" will override the options in Read/Only Memory Areas and Read/ Write Memory Areas on this tab. 4.2. Output No changes needed on this tab. Figure 2. Target Tab Figure 3. Output Tab 2 Rev. 0.1

4.3. Listing No changes needed on this tab. Figure 4. Listing Tab 4.4. User No changes needed on this tab. Figure 5. User Tab Rev. 0.1 3

4.5. C/C++ Add NDEBUG to the Define text box. Add include paths by clicking the " " box to the right of the Include Paths text box. Add -c99 -gnu to the Misc Controls text box. Figure 6. C/C+ and Include Path Tabs 4 Rev. 0.1

4.6. ASM No changes needed on this tab. 4.7. Linker Figure 7. ASM Tab Uncheck Use Memory Layout from Target Dialog. Add the correct scatter file by clicking ' ' to the right of the Scatter File text box and selecting the corresponding scatter file. Figure 8. Linker Tab Rev. 0.1 5

4.8. Debug Select SiLabs UDA Debugger in the drop-down menu on the top right-hand side and select Use. Figure 9. Debug Tab 6 Rev. 0.1

4.9. Utilities Select SiLabs UDA Debugger in the drop-down menu under the Use Target Driver for Flash Programming. Check the Update Target before Debugging option. AN669 Figure 10. Utilities Tab Rev. 0.1 7

4.10. UDA Debug Adapter Settings The UDA Debug Adapter options can be accessed by clicking the Settings button on the right-hand side of SiLabs UDA Debugger on the Utilities or on the Debug tab. 4.10.1. Debug Verify that the correct USB Debug Adapter is select in the Unit dropdown menu. For more information on the Debug section of the tab, see the µvision help. In µvision, select Help µvision Help. On the Contents tab of the µvision help file, select ULINK2 User's Guide Setup ULINK2 Configure µvision for Debugging Cortex-M Debugging Debug Driver Configuration Debug. Figure 11. Debug Adapter Settings Debug Tab 8 Rev. 0.1

4.10.2. Trace If any of the trace tools will be used (including the Debug (Printf) Viewer), check the Trace Enable box. In addition, the Core Clock setting must be correct in order to use any of the trace tools. For more information on the trace options, see the µvision help. In µvision, select Help µvision Help. On the Contents tab of the µvision help, select ULINK2 User's Guide Setup ULINK2 Configure µvision for Debugging Cortex-M Debugging Trace Configuration. Figure 12. Debug Adapter Settings Trace Tab Rev. 0.1 9

4.10.3. Flash Download A Flash download algorithm must be selected to download a code image to the MCU. The Flash programming algorithm temporarily resides in RAM and is used by the Debug Adapter to program the Flash. On the Flash Download tab, click Add and select the appropriate SiM3x algorithm. Next, click Add and then click OK. Figure 13. Debug Adapter Settings Flash Download Tab 10 Rev. 0.1

5. Managing Files Within the Project To add files to a project, add a Group in the project tree structure first. To add a Group, right-click on the root folder in the Project Window and select Add Group. After adding a Group, add files to the group by right-clicking on the Group and select Add Files to Group. To modify the overall project structure or file ordering, right-click on the root folder in the Project Window and select Manage Components. 6. Building the Project Build a project by selecting the Rebuild icon in the Build Toolbar or by selecting Project Rebuild all target files. To compile individual files, click the Translate icon in the Build Toolbar or select Project Translate. Any build-related errors or warnings will appear in the Build Output window. If the Build Output window is not visible, select View Build Output Window. 7. Running the Code and Debugging Figure 14. Build Toolbar After successfully building a project, clicking the Start/Stop Debug Session icon or selecting Debug Start/Stop Debug Session will initiate a debug session. If the project has been changed in any way since the last build, starting a debug session will initiate a download of the updated firmware image to the device. The µvision tools will not automatically download a firmware image when initiating a debug session if the IDE did not detect any changes. If this behavior is not desired, clicking the Download icon or selecting Flash Download will manually initiate a Flash download. After the Flash download, initiate a debug session to start debugging. During a debug session, Run, Step Into, Step Over, Stop, or Reset the code by clicking the corresponding button in the Debug Toolbar or in the Debug Menu. To stop a debug session, click the Start/Stop Debug Session icon or select Debug Start/Stop Debug Session. Figure 15. Debug Toolbar Add variables to the Watch Window or Memory Window by right-clicking on a variable, selecting Add to Watch or Add to Memory. The µvision IDE has two Watch Windows and four Memory Windows. To view a specific memory location, open a memory window by selecting View Memory Windows. After opening a Memory Window, manually enter a location in the Address box. This will also work when viewing the contents of Special Function Registers (SFRs). Rev. 0.1 11

8. System Viewer The System Viewer Window allows users to easily view and modify SFRs of the MCU. Each modifiable field within the System Viewer Window contains a field description, which can also be helpful for debugging. To open a peripheral's system viewer window, select View System Viewer (Select Peripheral). After selecting the desired peripheral, the System Viewer Window will appear. Bit fields that changed while stepping through code will be highlighted in green in the System Viewer Window. Figure 16 shows an example of the Clock Control (CLKCTRL) System Viewer Window. Figure 16. Clock Control System Viewer Window Note: Individual peripheral bit-fields cannot be modified if the clock control bit for the peripheral is disabled. Before manually modifying bits in the System Viewer Window for a peripheral, enable the corresponding clock enable bit for the peripheral. 12 Rev. 0.1

9. Debug (Printf) Viewer The debug printf function allows for firmware to use printf() functions to print characters or strings to the Debug (Printf) Viewer. The Debug Viewer uses the Serial Wire Output (SWO) pin of the MCU to send data back to the µvision IDE. To use the Debug Viewer: Configure the SWO port pin to push-pull mode (this is done in firmware). Select the Trace Enable option in the Trace tab within SiLabs UDA Debugger settings (this is done in the project settings; see "4.10.2. Trace" on page 9 for more information). Configure the Core Clock in the Trace tab within the SiLabs UDA Debugger settings (this is done in the project settings; see "4.10.2. Trace" on page 9 for more information). Open the Debug (Printf) Viewer window within the µvision IDE. To open the Debug Viewer, select View Serial Windows Debug (Printf) Viewer. 10. Evaluation Tools Figure 17. Debug (Printf) Viewer Window An evaluation version of the Keil µvision tool is available for download at https://www.keil.com/demo/eval/arm.htm. The free evaluation tools, called MDK-Lite, are 32 kb limited (debugger, compiler, and assembler-limited). More information on MDK-Lite can be found at http://www.keil.com/arm/selector.asp. 11. Code Examples and Source/Include Files Examples and source/include files for each of the Silicon Labs devices are installed with the Precision32 IDE. The default location for these examples is C:\Silabs\32bit\si32-x.y\Examples, where x is the major revision number and y is the minor revision number. Within each example folder, the folder labeled ARM contains the µvision project files. The src folder contains the source files for each example. Rev. 0.1 13

Simplicity Studio One-click access to MCU and wireless tools, documentation, software, source code libraries & more. Available for Windows, Mac and Linux! IoT Portfolio www.silabs.com/iot SW/HW Quality Support and Community www.silabs.com/simplicity www.silabs.com/quality community.silabs.com 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