AN140 I NTEGRATING HI-TECH 8051 TOOLS INTO THE SILICON LABS IDE. 1. Introduction. 2. Key Points. 3. Create a Project in the Silicon Labs IDE

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

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

UG103.8: Application Development Fundamentals: Tools

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

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

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

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

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

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

AN952: PCIe Jitter Estimation Using an Oscilloscope

UG103-13: Application Development Fundamentals: RAIL

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

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

Current Digital to Analog Converter

Backup Power Domain. AN Application Note. Introduction

AN220 USB DRIVER CUSTOMIZATION

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

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

UG103.8 APPLICATION DEVELOPMENT FUNDAMENTALS: TOOLS

AN220 USB DRIVER CUSTOMIZATION

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

How To Develop A Toolstick

AN583: Safety Considerations and Layout Recommendations for Digital Isolators

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

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

AN0822: Simplicity Studio User's Guide

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

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

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

QSG105 GETTING STARTED WITH SILICON LABS WIRELESS NETWORKING SOFTWARE

QSG108: Blue Gecko Bluetooth Smart Software Quick-Start Guide

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

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

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

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

AN428 J UMP START: IN-SYSTEM, FLASH-BASED PROGRAMMING FOR SILICON LABS TIMING PRODUCTS. 1. Introduction

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

AN135 CACHE OPTIMIZATIONS FOR C8051F12X. Overview. Relevant Devices. Introduction. Key Points

AN108 IMPLEMENTING A REALTIME CLOCK. Relevant Devices. Introduction. Key Points. Overview

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

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

Serial Communications

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

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

Developing an Application on Core8051s IP-Based Embedded Processor System Using Firmware Catalog Drivers. User s Guide

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

Processor Expert Software Microcontrollers Driver Suite Getting Started Guide

Application Note: AN00141 xcore-xa - Application Development

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

AN3265 Application note

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

DRV8312-C2-KIT How to Run Guide

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

UG103.14: Application Development Fundamentals: Bluetooth Smart Technology

AN75. Si322X DUAL PROSLIC DEMO PBX AND GR 909 LOOP TESTING SOFTWARE GUIDE. 1. Introduction

AVR033: Getting Started with the CodeVisionAVR C Compiler. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

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

Lab 1 Course Guideline and Review

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

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

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

CodeWarrior Development Studio Floating Licensing Quick Start

Freescale Semiconductor, I

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

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

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

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

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

Using the TASKING Software Platform for AURIX

Creating the program. TIA Portal. SIMATIC Creating the program. Loading the block library. Deleting program block Main [OB1] Copying program blocks

Microcontroller Systems. ELET 3232 Topic 8: Slot Machine Example

Intel Unite. User Guide

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

Installation of the MMA955xL CodeWarrior Service Pack Author: Fengyi Li Application Engineer

Instructions for Installing and Using the FOCUS DL-15 Data Transfer Software

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

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

Intel Internet of Things (IoT) Developer Kit

For Active Directory Installation Guide

Getting Started with Kinetis SDK (KSDK)

AN3354 Application note

USER GUIDE EDBG. Description

Analog to Digital Converter

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

An Introduction to MPLAB Integrated Development Environment

Revision History. Revision Revision History Date

Using WinUSB in a Visual Studio Project with Freescale USB device controller

Implicit Sync. Professional Edition Users Guide

Software Real Time Clock Implementation on MC9S08LG32

PAC52XX Clock Control Firmware Design

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

Wave Adapter for DealerSocket Automotive CRM. Installation and Configuration Guide

Freescale Variable Key Security Protocol Transmitter User s Guide by: Ioseph Martínez and Christian Michel Applications Engineering - RTAC Americas

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

USB Audio Simplified

Transcription:

I NTEGRATING HI-TECH 8051 TOOLS INTO THE SILICON LABS IDE 1. Introduction This application note describes how to integrate the HI-TECH 8051 Tools into the Silicon Laboratories IDE (Integrated Development Environment). Integration provides an efficient development environment with compose, edit, build, download and debug operations integrated in the same program. Next, define the HI-TECH assembler, compiler, and linker as shown in the following sections. 2. Key Points The Intel OMF-51 absolute object file generated by the HI-TECH 8051 tools enables source-level debug from the Silicon Labs IDE. Once HI-TECH Tools are integrated into the IDE they are called by simply pressing the Assemble/ Compile Current File button or the Build/Make Project button. See the included software, AN140SW, for an example using the HI-TECH tools. Information in this application note applies to Version 2.8 and later of the Silicon Labs IDE and Version 9.01 and later of the HI-TECH 8051 Tools. 3. Create a Project in the Silicon Labs IDE A project is necessary in order to link assembly files created by the compiler and build an absolute OMF-51 output file. Follow these steps to create a project: 1. Under the Project menu, select Add Files to Project.... Select the C source files that you want to add and click Open. Continue adding files until all project files have been added. 2. To add files to the build process, right-click on the file name in the Project Window and select Add filename to build. 3. Under the Project menu, select Save Project As.... Enter a project workspace name and click Save. 4.1. Assembler Definition 1. Under the Assembler tab, if the assembler executable is not already defined, click the browse button next to the Executable: text box, and locate the assembler executable. The default location for the HI-TECH assembler is c:\htsoft\8051-c_9.01\bin\c51.exe. 2. Enter the processor command line flag directly in the Command Line Flags box. This flag designates which processor the code will be running on. It takes the form of '--Chip=C8051Fxxx' (For example, the flag for the C8051F020 processor is '--Chip=C8051F020'). 3. Enter any additional command line flags directly in the Command Line Flags box. 4. See the following figure for the Assembler tab with the default HI-TECH settings and the --Chip=C8051F020' flag. 4. Configure the Tool Chain Integration Dialog Under the Project menu select Tool Chain Integration to bring up the dialog box shown below. First, select Hi-Tech from the Select Tool Vendor drop down list. Rev. 1.3 1/07 Copyright 2007 by Silicon Laboratories AN140

4.2. Compiler Definition 1. Under the Compiler tab, if the compiler executable is not already defined, click the browse button next to the Executable: text box, and locate the compiler executable. The default location for the HI-TECH compiler is c:\htsoft\8051-c_9.01\bin\c51.exe. 2. Enter the processor command line flag directly in the Command Line Flags box. This flag designates which processor the code will be running on. It takes the form of '--Chip=C8051Fxxx' (For example, the flag for the C8051F020 processor is '--Chip=C8051F020'). 3. Enter any additional command line flags directly in the Command Line Flags box. 4. See the following figure for the Compiler tab with the default HI-TECH settings and the --Chip=C8051F020' flag. 5. Target Build Configuration Under the Project menu select Target Build Configuration to bring up the dialog box shown below. 4.3. Linker Definition 1. Under the Linker tab, if the linker executable is not already defined, click the browse button next to the Executable: text box, and locate the linker executable. The default location for the HI-TECH linker is c:\htsoft\8051-c_9.01\bin\c51.exe. 2. Enter the processor command line flag directly in the Command Line Flags box. This flag designates which processor the code will be running on. It takes the form of '--Chip=C8051Fxxx' (For example, the flag for the C8051F020 processor is '--Chip=C8051F020'). 3. Enter any additional command line flags directly in the Command line flags box. 4. See the following figure for the Linker tab with the default HI-TECH settings and the --Chip=C8051F020 flag. 5.1. Output Filename To customize a default filename or to create a new filename, click the browse button next to the Absolute OMF file name: edit box. Select a path and enter an output filename with a.omf extension (ex. blinky.omf ). 5.2. Project Build Definition Click the Customize button to bring up the Project Build Definition window shown below. This window allows selection of the files to be included in the build process. Although, default assemble and compile selections will be made, ensure that all files have been correctly included in the build process. Under each tab, add Files to assemble or compile by selecting the desired file and clicking the Add button. Files are removed in the same manner. 2 Rev. 1.3

5.3. Additional Options 1. If the Enable automatic save for project files before build. box is checked, then all files included in the project will be automatically saved when the Build/ Make project button is pressed. 2. If the Enable automatic connect/download after build. box is checked, then the project will be automatically downloaded to the target board when the Build/Make project button is pressed. 6. Building the Project See the included software, AN140SW, for an example file (blinky.c) created for use with the HI-TECH compiler. 1. After saving all files that have been edited, the previous revisions will be saved in backup files. Backups are saved as the name of the file with the extension #1, #2, #3, and so on up to the number of backups (N) created and available. #1 being the most recent and N being the least recent. 2. Click the Assemble/Compile current file button to compile just the current file. 3. Click the Build/Make project button to compile and link all the files in the project. 4. Review the errors and warnings generated during the build process located in the Build tab of the Output window (typically found at the bottom of the screen). Double-clicking on an error that is associated with a line number will automatically move the cursor to the proper line number in the source file that generated the error. Rev. 1.3 3

7. Source File Example Blinky.c Copyright (C) 2007 Silicon Laboratories, Inc. AUTH: JM DATE: 10 JUNE 03 Description: This program flashes the green LED on the C8051F020 target board about five times a second using the interrupt handler for Timer3. Target: C8051F02x Tool chain: HI-TECH Evaluation 'C' Includes #include "8051.h" SFR declarations #include "intrpt.h" Interrupt declarations Global CONSTANTS #define SYSCLK 2000000 approximate SYSCLK frequency in Hz static volatile bit LED @ 0x96; green LED: '1' = ON; '0' = OFF Function PROTOTYPES void PORT_Init (void); void Timer3_Init (int counts); interrupt void Timer3_ISR (void); MAIN Routine void main (void) { ROM_VECTOR(TIMER3, Timer3_ISR); Interrupt vector TIMER3 (0x73) points to TIMER3_ISR for interrupt handling disable watchdog timer WDTCN = 0xde; WDTCN = 0xad; PORT_Init (); Timer3_Init (SYSCLK / 12 / 10); EA = 1; while (1) { Init Timer3 to generate interrupts at a 10Hz rate. Enable global interrupts spin forever 4 Rev. 1.3

PORT_Init Configure the Crossbar and GPIO ports void PORT_Init (void) { XBR2 = 0x40; Enable crossbar and weak pull-ups P1MDOUT = 0x40; enable P1.6 (LED) as push-pull output Timer3_Init Configure Timer3 to auto-reload and generate an interrupt at interval specified by <counts> using SYSCLK/12 as its time base. void Timer3_Init (int counts) { TMR3CN = 0x00; Stop Timer3; Clear TF3; use SYSCLK/12 as timebase TMR3RLL = -counts; Init reload values TMR3RLH = -counts >> 8; Init reload values TMR3L = 0xff; TMR3H = 0xff; set to reload immediately set to reload immediately EIE2 = 0x01; enable Timer3 interrupts TMR3CN = 0x04; start Timer3 Interrupt Service Routines Timer3_ISR This routine changes the state of the LED whenever Timer3 overflows. interrupt void Timer3_ISR (void) { TMR3CN &= ~(0x80); clear TF3 LED =!(LED); change state of LED Rev. 1.3 5

8. Include File Example HI-TECH provides include files for several Silicon Labs device families with the installation of their tools. For any 8051 device you would use the 8051.h file, located by default in the C:\HTSOFT\8051-C_9.01\include directory. When this file is included, the compiler will know which device-specific header file to include based on the processor command line flag. 6 Rev. 1.3

DOCUMENT CHANGE LIST Revision 1.2 to Revision 1.3 Paths updated to support HI-TECH tools Version 9.01. Screenshots updated to support Silicon Labs IDE Version 2.8. Reference to application note software updated from AN040SW to AN140SW. Command line flag to specify the target device updated from -c8051f020 to --Chip=C8051F020. Rev. 1.3 7

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