Keil vision4在编译过程 出现这个是neovision什么意思思?

Keil μvision4 的问题 编辑保存了头文件 16进制也改了 该保存的都存了 显示_百度知道
Keil μvision4 的问题 编辑保存了头文件 16进制也改了 该保存的都存了 显示
Keil μvision4 的问题 编辑保存了头文件 16进制也改了 该保存的都存了 显示这个 求大神解答怎么解决这个问题 谢谢了 如果会或者能搜到就不会来提问了 有效会加分 谢谢了
我有更好的答案
reg51.h&再试一试,所以有可能你未包含标准的51寄存器的定义头文件。另外第4行的“P2”符号,编译器不认识你让我们看Output有什么用……重点要看看你的12465.c的内容……第1行说的很明白了,在项目目录下未找到stcreg.h这个文件。正常安装的C51包里恐怕是不会有STC的头文件的。你应当包含个&quot
谢谢 回去试试
不好意思忘记提分了………
采纳率:66%
为您推荐:
其他类似问题
16进制的相关知识
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。单片机编译软件keil μvision4中的工程运行键无法使用,请教为什么,怎么解决?谢谢_百度知道
单片机编译软件keil μvision4中的工程运行键无法使用,请教为什么,怎么解决?谢谢
我有更好的答案
貌似你没有新建工程project,直接新建了一个.c文件
采纳率:76%
为您推荐:
其他类似问题
keil的相关知识
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。Keil_C51_μVision4的使用_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
Keil_C51_μVision4的使用
阅读已结束,下载本文需要
想免费下载更多文档?
定制HR最喜欢的简历
下载文档到电脑,同时保存到云知识,更方便管理
还剩41页未读,继续阅读
定制HR最喜欢的简历
你可能喜欢keil vision4 官方使用指南(英文版)_学霸学习网
keil vision4 官方使用指南(英文版)
Creating Applications with ?Vision?4Getting StartedFor 8-bit, 16-bit, and 32-bit Microcontrollerswww.keil.com
2PrefaceInformation in this document is subject to change without notice and does not represent a commitment on the part of the manufacturer. The software described in this document is furnished under license agreement or nondisclosure agreement and may be used or copied only in accordance with the terms of the agreement. It is against the law to copy the software on any medium except as specifically allowed in the license or nondisclosure agreement. The purchaser may make one copy of the software for backup purposes. No part of this manual may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or information storage and retrieval systems, for any purpose other than for the purchaser’s personal use, without written permission. Copyright ?
Keil, Tools by ARM, and ARM Ltd. All rights reserved.Keil Software and Design?, the Keil Software Logo, ?Vision?, RealView?, C51?, C166?, MDK?, RL-ARM?, ULINK?, Device Database?, and ARTX? are trademarks or registered trademarks of Keil, Tools by ARM, and ARM Ltd. Microsoft? and Windows? are trademarks or registered trademarks of Microsoft Corporation. PC? is a registered trademark of International Business Machines Corporation.NOTE This manual assumes that you are familiar with Microsoft Windows and the hardware and instruction set of the ARM7, ARM9, Cortex-Mx, C166, XE166, XC2000, or 8051 microcontroller.Every effort was made to ensure accuracy in this manual and to give appropriate credit to persons, companies, and trademarks referenced herein. Getting Started: Creating Applications with ?Vision3PrefaceThis manual is an introduction to the Keil development tools designed for Cortex-Mx, ARM7, ARM9, C166, XE166, XC2000, and 8051 microcontrollers. It introduces the ?Vision Integrated Development Environment, Simulator, and Debugger and presents a step-by-step guided tour of the numerous features and capabilities the Keil embedded development tools offer.Who should Read this BookThis book is useful for students, beginners, advanced and experienced developers alike. Developers are considered experienced or advanced if they have used ?Vision extensively in the past and knowledge exists of how the ?Vision IDE works and interacts with the debugger, simulator, and target hardware. Preferably, these developers already have a deep understanding of microcontrollers. We encourage this group of engineers to get familiar with the enhancements introduced and to explore the latest features in ?Vision. Developers are considered students or beginners if they have no working experience with ?Vision. We encourage this group of developers to start by reading the chapters related to the ?Vision IDE and to work through the examples to get familiar with the interface and configuration options described. They should make use of the ample possibilities the simulator offers. Later on, they should continue with the chapters describing the RTOS and microcontroller architectures. However, it is assumed that you have a basic knowledge of how to use microcontrollers and that you are familiar with a few instructions or with the instruction set of your preferred microcontroller. The chapters of this book can be studied individually, since they do not strictly depend on each other. 4PrefaceChapter Overview“Chapter 1. Introduction”, provides an overview of product installation and licensing and shows how to get support for the Keil development tools. “Chapter 2. Microcontroller Architectures”, discusses various microcontroller architectures supported by the Keil development tools and assists you in choosing the microcontroller best suited for your application. “Chapter 3. Development Tools”, discusses the major features of the ?Vision IDE and Debugger, Assembler, Compiler, Linker, and other development tools. “Chapter 4. RTX RTOS Kernel”, discusses the benefits of using a Real-Time Operating System (RTOS) and introduces the features available in Keil RTX Kernels. “Chapter 5. Using ?Vision”, describes specific features of the ?Vision user interface and how to interact with them. “Chapter 6. Creating Embedded Programs”, describes how to create projects, edit source files, compile, fix syntax errors, and generate executable code. “Chapter 7. Debugging”, describes how to use the ?Vision Simulator and Target Debugger to test and validate your embedded programs. “Chapter 8. Using Target Hardware”, describes how to configure and use third-party Flash programming utilities and target drivers. “Chapter 9. Example Programs”, describes four example programs and shows the relevant features of ?Vision by means of these examples. Getting Started: Creating Applications with ?Vision5Document ConventionsExamplesREADME.TXT1DescriptionBold capital text is used to highlight the names of executable programs, data files, source files, environment variables, and commands that you can enter at the command prompt. This text usually represents commands that you must type in literally. For example: ARMCC.EXE DIR LX51.EXECourierText in this typeface is used to represent information that is displayed on the screen or is printed out on the printer This typeface is also used within the text when discussing or describing command line items. Text in italics represents required information that you must provide. For example, projectfile in a syntax string means that you must supply the actual project file name Occasionally, italics are also used to emphasize words in the text. Ellipses (…) are used to indicate an item that may be repeated Vertical ellipses are used in source code listings to indicate that a fragment of the program has been omitted. For example: void main (void) { . . . while (1); Double brackets indicate optional items in command lines and input fields. For example: C51 TEST.C PRINT ?filename? Text contained within braces, separated by a vertical bar represents a selection of items. The braces enclose all of the choices and the vertical bars separate the choices. Exactly one item in the list must be selected. Text in this sans serif typeface represents actual keys on the keyboard. For example, “Press Enter to continueVariablesElements that repeat… Omitted code . . .?Optional Items?{ opt1 | opt2 }Keys1It is not required to enter commands using all capital letters. 6ContentsContentsPreface................................................................................................................... 3 Document Conventions........................................................................................ 5 Contents ................................................................................................................ 6 Chapter 1. Introduction...................................................................................... 9 Last-Minute Changes ....................................................................................... 11 Licensing.......................................................................................................... 11 Installation ....................................................................................................... 11 Requesting Assistance ..................................................................................... 13 Chapter 2. Microcontroller Architectures ...................................................... 14 Selecting an Architecture ................................................................................. 15 Classic and Extended 8051 Devices ................................................................ 17 Infineon C166, XE166, XC2000 ..................................................................... 20 ARM7 and ARM9 based Microcontrollers...................................................... 21 Cortex-Mx based Microcontrollers .................................................................. 23 Code Comparison ............................................................................................ 26 Generating Optimum Code .............................................................................. 28 Chapter 3. Development Tools......................................................................... 33 Software Development Cycle .......................................................................... 33 ?Vision IDE ..................................................................................................... 34 ?Vision Device Database ................................................................................ 35 ?Vision Debugger ............................................................................................ 35 Assembler ........................................................................................................ 37 C/C++ Compiler .............................................................................................. 38 Object-HEX Converter .................................................................................... 38 Linker/Locator ................................................................................................. 39 Library Manager .............................................................................................. 39 Chapter 4. RTX RTOS Kernel ........................................................................ 40 Software Concepts ........................................................................................... 40 RTX Introduction............................................................................................. 43 Chapter 5. Using ?Vision ................................................................................. 55 Menus .............................................................................................................. 59 Toolbars and Toolbar Icons ............................................................................. 63 Project Windows .............................................................................................. 69 Getting Started: Creating Applications with ?Vision7Editor Windows ............................................................................................... 71 Output Windows .............................................................................................. 73 Other Windows and Dialogs ............................................................................ 74 On-line Help .................................................................................................... 74 Chapter 6. Creating Embedded Programs ..................................................... 75 Creating a Project File ..................................................................................... 75 Using the Project Windows ............................................................................. 77 Creating Source Files ....................................................................................... 78 Adding Source Files to the Project .................................................................. 79 Using Targets, Groups, and Files..................................................................... 79 Setting Target Options ..................................................................................... 81 Setting Group and File Options ....................................................................... 82 Configuring the Startup Code .......................................................................... 83 Building the Project ......................................................................................... 84 Creating a HEX File ........................................................................................ 85 Working with Multiple Projects ...................................................................... 86 Chapter 7. Debugging ....................................................................................... 89 Simulation ........................................................................................................ 91 Starting a Debug Session ................................................................................. 91 Debug Mode .................................................................................................... 93 Using the Command Window.......................................................................... 94 Using the Disassembly Window ...................................................................... 94 Executing Code ................................................................................................ 95 Examining and Modifying Memory ................................................................ 96 Breakpoints and Bookmarks ............................................................................ 98 Watchpoints and Watch Window .................................................................. 100 Serial I/O and UARTs.................................................................................... 102 Execution Profiler .......................................................................................... 103 Code Coverage............................................................................................... 104 Performance Analyzer ................................................................................... 105 Logic Analyzer .............................................................................................. 106 System Viewer ............................................................................................... 107 Symbols Window........................................................................................... 108 Browse Window ............................................................................................ 109 Toolbox .......................................................................................................... 110 Instruction Trace Window ............................................................................. 111 Defining Debug Restore Views ..................................................................... 111 8ContentsChapter 8. Using Target Hardware............................................................... 112 Configuring the Debugger ............................................................................. 113 Programming Flash Devices .......................................................................... 114 Configuring External Tools ........................................................................... 115 Using ULINK Adapters ................................................................................. 116 Using an Init File ........................................................................................... 121 Chapter 9. Example Programs ...................................................................... 122 “Hello” Example Program ............................................................................. 123 “Measure” Example Program ........................................................................ 127 “Traffic” Example Program ........................................................................... 138 “Blinky” Example Program ........................................................................... 142 Glossary ............................................................................................................ 146 Index.................................................................................................................. 151 Getting Started: Creating Applications with ?Vision9Chapter 1. IntroductionThank you for allowing Keil to provide you with software development tools for your embedded microcontroller applications. This book, Getting Started, describes the ?Vision IDE, ?Vision Debugger and Analysis Tools, the simulation, and debugging and tracing capabilities. In addition to describing the basic behavior and basic screens of ?Vision, this book provides a comprehensive overview of the supported microcontroller architecture types, their advantages and highlights, and supports you in selecting the appropriate target device. This book incorporates hints to help you to write better code. As with any Getting Started book, it does not cover every aspect and the many available configuration options in detail. We encourage you to work through the examples to get familiar with ?Vision and the components delivered. The Keil Development Tools are designed for the professional software developer, however programmers of all levels can use them to get the most out of the embedded microcontroller architectures that are supported. Tools developed by Keil endorse the most popular microcontrollers and are distributed in several packages and configurations, dependent on the architecture. MDK-ARM: Microcontroller Development Kit, for several ARM7, ARM9, and Cortex-Mx based devices PK166: Keil Professional Developer’s Kit, for C166, XE166, and XC2000 devices DK251: Keil 251 Development Tools, for 251 devices PK51: Keil 8051 Development Tools, for Classic & Extended 8051 devices In addition to the software packages, Keil offers a variety of evaluation boards, USB-JTAG adapters, emulators, and third-party tools, which completes the range of products. The following illustrations show the generic component blocks of ?Vision in conjunction with tools provided by Keil, or tools from other vendors, and the way the components relate. 10Chapter 1. IntroductionSoftware Development ToolsLike all software based on Keil’s ?Vision IDE, the toolsets provide a powerful, easy to use and easy to learn environment for developing embedded applications. They include the components you need to create, debug, and assemble your C/C++ source files, and incorporate simulation for microcontrollers and related peripherals. The RTX RTOS Kernel helps you to implement complex and time-critical software.Software Development ToolsC/C++ CompilerRTX RTOS Kernel Library Vision IDE & Device Database Vision Debugger & Analysis Tools Complete Device SimulationRTOS and Middleware ComponentsThese components are designed to solve communication and real-time challenges of embedded systems. While it is possible to implement embedded applications without using a real-time kernel, a proven kernel saves time and shortens the development cycle. This component also includes the source code files for the operating system.RTOS and Middleware Components RTX RTOS Source CodeTCPnet Networking SuiteFlash File SystemUSB Device InterfaceCAN InterfaceHardware Debug AdaptersThe ?Vision Debugger fully supports several emulators provided by Keil, and other vendors. The Keil ULINK USB-JTAG family of adapters con nect the USB port of a PC to the target hardware. They enable you to download, test, and debug your embedded application on real hardware. Getting Started: Creating Applications with ?Vision11Last-Minute ChangesAs with any high-tech product, last minute changes might not be included into the printed manuals. These last-minute changes and enhancements to the software and manuals are listed in the Release Notes shipped with the product.LicensingEach Keil product requires activation through a license code. This code is obtained via e-mail during the registration process. There are two types of product licenses: Single-User License is available for all Keil products. A Single-User License grants the right to use a product on a maximum of two computers to one user. Each installation requires a license code that is personalized for the computer on which the product is installed. A Single-User license may be uninstalled and moved to another computer. Floating-User License is available for many Keil products. The FloatingUser license grants the right to use that product on several computers by several different developers at the same time. Each installation of the product requires an individual license code for each computer on which the product is installed.InstallationPlease check the minimum hardware and software requirements that must be satisfied to ensure that your Keil development tools are installed and will function properly. Before attempting installation, verify that you have: A standard PC running Microsoft Windows XP, or Windows Vista 1GB RAM and 500 MB of available hard-disk space is recommended
or high a mouse or other pointing device A CD-ROM drive Keil products are available on CD-ROM and via download from www.keil.com. Updates to the related products are regularly available at www.keil.com/update. 12Chapter 1. IntroductionInstallation using the web download1. Download the product from www.keil.com/demo 2. Run the downloaded executable 3. Follow the instructions displayed by the SETUP programInstallation from CD-ROM1. Insert the CD-ROM into your CD-ROM drive. The CD-ROM browser should start automatically. If it does not, you can run SETUP.EXE from the CD-ROM. 2. Select Install Products & Updates from the CD Browser menu 3. Follow the instructions displayed by the SETUP programProduct Folder StructureThe SETUP program copies the development tools into subfolders. The base folder defaults to C:\KEIL\. The following table lists the default folders for each microcontroller architecture installation. Adjust the examples used in this manual to your preferred installation directory accordingly.Microcontroller ArchitectureMDK-ARM Toolset C166/XE166/XC2000 Toolset 8051 Toolset C251 Toolset ?Vision Common FilesFolderC:\KEIL\ARM\ C:\KEIL\C166\ C:\KEIL\C51\ C:\KEIL\C251\ C:\KEIL\UV4\Each toolset contains several subfolders:ContentsExecutable Program Files C Include/Header Files On-line Help Files and Release Notes Common/Generic Example Programs Example Programs for Evaluation BoardsSubfolder\BIN\ \INC\ \HLP\ \EXAMPLES\ \BOARDS\ Getting Started: Creating Applications with ?Vision13Requesting AssistanceAt Keil, we are committed to providing you with the best embedded development tools, documentation, and support. If you have suggestions and comments regarding any of our products, or you have discovered a problem with the software, please report them to us, and where applicable make sure to: 1. Read the section in this manual that pertains to the task you are attempting 2. Check the update section of the Keil web site to make sure you have the latest software and utility version 3. Isolate software problems by reducing your code to as few lines as possible If you are still having difficulties, please report them to our technical support group. Make sure to include your license code and product version number. See the Help C About Menu. In addition, we offer the following support and information channels, all accessible at www.keil.com/support1. 1. The Support Knowledgebase is updated daily and includes the latest questions and answers from the support department 2. The Application Notes can help you in mastering complex issues, like interrupts and memory utilization 3. Check the on-line Discussion Forum 4. Request assistance through Contact Technical Support (web-based E-Mail) 5. Finally, you can reach the support department directly via support. or support.1 You can always get technical support, product updates, application notes, and sample programs at www.keil.com/support. 14Chapter 2. Microcontroller ArchitecturesChapter 2. Microcontroller ArchitecturesThe Keil ?Vision Integrated Development Environment (?Vision IDE) supports three major microcontroller architectures and sustains the development of a wide range of applications. 8-bit (classic and extended 8051) devices include an efficient interrupt system designed for real-time performance and are found in more than 65% of all 8-bit applications. Over 1000 variants are available, with peripherals that include analog I/O, timer/counters, PWM, serial interfaces like UART, I2C, LIN, SPI, USB, CAN, and on-chip RF transmitter supporting low-power wireless applications. Some architecture extensions provide up to 16MB memory with an enriched 16/32-bit instruction set. The ?Vision IDE supports the latest trends, like custom chip designs based on IP cores, which integrate application-specific peripherals on a single chip. 16-bit (Infineon C166, XE166, XC2000) devices are tuned for optimum real-time and interrupt performance and provide a rich set of on-chip peripherals closely coupled with the microcontroller core. They include a Peripheral Event Controller (similar to memory-to-memory DMA) for highspeed data collection with little or no microcontroller overhead. These devices are the best choice for applications requiring extremely fast responses to external events. 32-bit (ARM7 and ARM9 based) devices support complex applications, which require greater processing power. These cores provide high-speed 32bit arithmetic within a 4GB address space. The RISC instruction set has been extended with a Thumb mode for high code density. ARM7 and ARM9 devices provide separate stack spaces for high-speed context switching enabling efficient multi-tasking operating systems. Bitaddressing and dedicated peripheral address spaces are not supported. Only two interrupt priority levels, - Interrupt Request (IRQ) and Fast Interrupt Request (FIQ), are available. Getting Started: Creating Applications with ?Vision1532-bit (Cortex-Mx based) devices combine the cost benefits of 8-bit and 16-bit devices with the flexibility and performance of 32-bit devices at extremely low power consumption. The architecture delivers state of the art implementations for FPGAs and SoCs. With the improved Thumb2 instruction set, Cortex-Mx1 based microcontrollers support a 4GB address space, provide bit-addressing (bit-banding), and several interrupts with at least 8 interrupt priority levels.Selecting an ArchitectureChoosing the optimal device for an embedded application is a complex task. The Keil Device Database (www.keil.com/dd) supports you in selecting the appropriate architecture and provides three different methods for searching. You can find your device by architecture, by specifying certain characteristics of the microcontroller, or by vendor. The following sections explain the advantages of the different architectures and provide guidelines for finding the microcontroller that best fits your embedded application.8051 Architecture AdvantagesFast I/O operations and fast access to on-chip RAM in data space Efficient and flexible interrupt system Low-power operation 8051-based devices are typically used in small and medium sized applications that require high I/O throughput. Many devices with flexible peripherals are available, even in the smallest chip packages.1Cortex-M0 devices implement the Thumb instruction set. 16Chapter 2. Microcontroller ArchitecturesC166, XE166 and XC2000 Architecture AdvantagesExtremely fast I/O operations via the Peripheral Event Controller High-speed interrupt system with very well-tuned peripherals Efficient arithmetic and fast memory access These devices are used in medium to large sized applications that require high I/O throughput. This architecture is well suited to the needs of embedded systems that involve a mixture of traditional controller code and DSP algorithms.ARM7 and ARM9 Architecture AdvantagesHuge linear address space The 16-bit Thumb instruction set provides high code density Efficient support for all C integer data types including pointer addressing ARM7 and ARM9-based microcontrollers are used for applications with large memory demands and for applications that use PC-based algorithms.Cortex-Mx Architecture AdvantagesOne instruction set, Thumb2, reduces the complexity of the program code and eliminates the overhead needed for switching between ARM and Thumb instruction mode The Nested Vector Interrupt Controller (NVIC) removes interrupt prolog and epilog code, and provides several, configurable priority levels Extremely low power consumption with a variety of sleep modes The Cortex-Mx microcontroller architecture is designed for hard real-time systems, but can be used for complex System-on-Chip applications as well. Getting Started: Creating Applications with ?Vision17Classic and Extended 8051 Devices8051 devices combine cost-efficient hardware with a simple but efficient programming model that uses various memory regions to maximize code efficiency and speed-up memory access. The following figure shows the memory layout of a classic 8051 device.0x100 0xFFFF F8 98 90 88 IDATA 256 Bytes 0x80 2F DATA 128 Bytes 0x 0 DATA 128 Bytes 8051 Bitspace 4 Register Banks 20 1F 0 XDATA 0xFFFF 80 0x80 8051 Bit addressable 0x0000 CODESFR 0x100 SPACE0x0000The 8051 architecture provides three different physical memory regions: DATA/IDATA memory includes a 256 Bytes on-chip RAM with register banks and bit-addressable space that is used for fast variable accessing. Some devices provide an extended data (EDATA) space with up to 64KB. CODE memory consists of 64KB ROM space used for program code and constants. The Keil linker supports code banking that allows you to expand the physical memory space. In extended variants, up to 16MB ROM space is available. XDATA memory has a 64KB RAM space for off-chip peripheral and memory addressing. Today, most devices provide some on-chip RAM that is mapped into XDATA. 18Chapter 2. Microcontroller ArchitecturesSFR and IDATA memory are located in the same address space but are accessed through different assembler instructions For extended devices, the memory layout provides a universal memory map that includes all 8051-memory types in a single 16MByte address region8051 HighlightsFast interrupt service routines with two or four priority levels and up to 32vectored interrupts Four register banks for minimum interrupt prolog/epilog Bit-addressable space for efficient logical operations 128 Bytes of Special Function Register (SFR) space for tight integration of on-chip peripherals. Some devices extend the SFR space using paging. Low-power, high-speed devices up to 100 MIPS are available8051 Development Tool SupportThe Keil C51 Compiler and the Keil Linker/Locator provide optimum 8051 architecture support with the following features and C language extensions. Interrupt functions with register bank support are written directly in C Bit and bit-addressable variables for optimal Boolean data type support Compile-time stack with data overlaying uses direct memory access and gives high-speed code with little overhead compared to assembly programming Reentrant functions for usage by multiple interrupt or task threats Generic and memory-specific pointers provide flexible memory access Linker Code Packing gives utmost code density by reusing identical program sequences Code and Variable Banking expand the physical memory address space Absolute Variable Locating enables peripheral access and memory sharing Getting Started: Creating Applications with ?Vision198051 Memory TypesA memory type prefix is used to assign a memory type to an expression with a constant. This is necessary, for example, when an expression is used as an address for the output command. Normally, symbolic names have an assigned memory type, so that the specification of the memory type can be omitted. The following memory types are defined:PrefixC: D: I: X: B: P:Memory SpaceCode Memory (CODE) Internal, direct-addressable RAM memory (DATA) Internal, indirect-addressable RAM memory (IDATA) External RAM memory (XDATA) Bit-addressable RAM memory Peripheral memory (VTREGD C 80x51 pins)The prefix P: is a special case, since it always must be followed by a name. The name in turn is searched for in a special symbol table that contains the register’s pin names. Example:C:0x100 ACC I:100 X:0FFFFH B:0x7F C Address 0x100 in CODE memory Address 0xE0 in DATA memory, D: Address 0x64 in internal RAM Address 0xFFFF in external data memory Bit address 127 or 2FH.7 Address 0xD7 (PSW.7), memory type B: 20Chapter 2. Microcontroller ArchitecturesInfineon C166, XE166, XC2000The 16-bit architecture of these devices is designed for high-speed real-time applications. It provides up to 16MB memory space with fast memory areas mapped into parts of the address space. High-performance applications benefit from locating frequently used variables into the fast memory areas. The below listed memory types address the following memory regions:Memory Typebdata huge idata near sdata xhugeDescriptionBit-addressable part of the idata memory. Complete 16MB memory with fast 16-bit address calculation. Object size limited to 64KB. High speed RAM providing maximum access speed (part of sdata). Efficient variable and constant addressing (max. 64KB) with 16-bit pointer and 16-bit address calculation. System area includes Peripheral Registers and additional on-chip RAM space. Complete 16MB memory with full address calculation for unlimited object size.C166, XE166, XC2000 HighlightsHighest-speed interrupt handling with 16 priority levels and up to 128 vectored interrupts Unlimited register banks for minimum interrupt prolog/epilog Bit instructions and bit-addressable space for efficient logical operations ATOMIC instruction sequences are protected from interrupts without interrupt enable/disable sequences Peripheral Event Controller (PEC) for automatic memory transfers triggered by peripheral interrupts. Requires no processor interaction and further improves interrupt response time. Multiply-Accumulate Unit (MAC) provided for high-speed DSP algorithms Getting Started: Creating Applications with ?Vision21C166, XE166, XC2000 Development Tool SupportThe Keil C166 Compiler supports all C166, XE166, XC2000 specific features and provides additional extensions such as: Memory type support and flexible digital pattern processing for extremely fast variable access Function inlining eliminating call/return overhead Inline assembly for accessing all microcontroller and MAC instructionsARM7 and ARM9 based MicrocontrollersThe ARM7 and ARM9 based microcontrollers run on a load-store RISC architecture with 32-bit registers and fixed op-code length. The architecture provides a linear 4GB memory address space. In contrast to the previously mentioned 8/16-bit devices, no specific memory types are provided, since memory addressing is performed via 32-bit pointers in microcontroller registers. Peripheral registers are mapped directly into the linear address space. The Thumb instruction set improves code density by providing a compressed 16-bit instruction subset. The ARM7 and ARM9 cores are easy to use, cost-effective, and support modern object-oriented programming techniques. They include a 2-level interrupt system with a normal interrupt (IRQ) and a fast interrupt (FIQ) vector. To minimize interrupt overhead, typical ARM7/ARM9 microcontrollers provide a vectored interrupt controller. The microcontroller operating modes, separate stack spaces, and Software Interrupt (SVC) features produce efficient use of Real-Time Operating Systems. The ARM7 and ARM9 core provides thirteen general-purpose registers (R0C R12), the stack pointer (SP) R13, the link register (LR) R14, which holds return addresses on function calls, the program counter (PC) R15, and a program status register (PSR). Shadow registers, available in various operating modes, are similar to register banks and reduce interrupt latency. 22Chapter 2. Microcontroller ArchitecturesR1 R2 R3 R4 R5 R6 R7 R8 R9 R10 R11 R12 R13 = SP R14 = LR R15 = PC R8 R9 R10 R11 R12 R13 = SP R14 = LRARM7 and ARM9 Operation Modes User FIQ IRQ SVC UND ABT Normal execution state Fast Interrupt mode Interrupt mode Supervisor mode (software interrupt) Undefined instruction execution Memory access failureR13 = SP R14 = LRR13 = SP R14 = LRR13 = SP R14 = LRR13 = SP R14 = LRCPSRSPSRSPSRSPSRSPSRSPSRUserFIQIRQSVCABTUNDARM7 and ARM9 HighlightsLinear 4 GB memory space that includes peripherals and eliminates the need for specific memory types Load-store architecture with efficient pointer addressing. Fast task context switch times are achieved with multiple register load/store. Standard (IRQ) and Fast (FIQ) interrupt. Banked microcontroller registers on FIQ reduce register save/restore overhead. Vectored Interrupt Controller (available in most microcontrollers) optimizes multiple interrupt handling Processor modes with separate interrupt stacks for predictable stack requirements Compact 16-bit Instruction Set (Thumb). Compared to ARM mode, Thumb mode code is about 65% of the code size and 160% faster when executing from a 16-bit memory system. Getting Started: Creating Applications with ?Vision23ARM7 and ARM9 Development Tool SupportThe ARM compilation tools support all ARM-specific features and provide: Function Inlining eliminates call/return overhead and optimizes parameter passing Inline assembly supports special ARM/Thumb instructions in C/C++ programs RAM functions enable high-speed interrupt code and In-System Flash programming ARM/Thumb interworking provides outstanding code density and microcontroller performance Task function and RTOS support are built into the C/C++ compilerCortex-Mx based MicrocontrollersDesigned for the 32-bit microcontroller market, the Cortex-Mx microcontrollers combine excellent performance at low gate count with features only previously found in high-end processors. With 4GB of linear, unified memory space, the Cortex-Mx processors provide bit-banding features and supports big and little endian configuration. Predefined memory types are available, while some memory regions have additional attributes. Code can be located in the SRAM, external RAM, but preferably in the Code region. Peripheral registers are mapped into the memory space. Code density is improved by the Thumb or Thumb2 instruction set, depending on the processor version. General-purpose registers rank from R0 to R12. R13 (SP) is banked, with only one copy of the R13 (MSP, PSP) being visible at a time. Special registers are available, but are not used for normal data processing. Some of the 16-bit Thumb instructions can access R0-R7 (low) registers only. There is no FIQ; however, nested interrupts and interrupt priority handling is implemented via the Nested Vector Interrupt Controller (NVIC), greatly reducing interrupt latency. 24Chapter 2. Microcontroller ArchitecturesCortex Core Register SetR0 R1 R2 R3 Low Registers R4 R5 R6 R7 R8 R9 R10 R11 R12 R13 = PSP R13 = MSP R14 = LR R15 = PC Process Stack Pointer (PSP), Main Stack Pointer (MSP): (banked) Link Register Program Counter High Registers General-Purpose RegistersxPSR PRIMASK FAULTMASK BASEPRI CONTROLProgram Status RegisterException Mask RegistersSpecial RegistersControl RegistersCortex-Mx HighlightsNested Vectored Interrupt Controller optimizes multiple external interrupts (up to 240 + 1 NMI, with at least eight priority levels) R0-R3, R12, LR, PSR, and PC are pushed automatically to the stack at interrupt entry and popped back at interrupt exit points Only one instruction set (Thumb2), assuring software upward compatibility with the entire ARM roadmap Several Extreme Low-Power Modes with an attached Wake-Up Interrupt Controller (WIC) Getting Started: Creating Applications with ?Vision25Cortex-Mx Development Tool SupportIn addition to the ARM specific characteristics, the Keil MDK-ARM supports the Cortex-Mx Microcontroller Software Interface Standard (CMSIS) and provides the following features: Core registers and core peripherals are accessible through C/C++ functions Device independent debug channel for RTOS kernels Supports object oriented programming, reuse of code, and implements an easy way of porting code to different devices Extensive debug capabilities allowing direct access to memory without stopping the processor CMSIS is supported, making the software compatible across the Cortex-Mx architecturesArchitecture Comparison ConclusionsThe various architectures have pros and cons and the optimal choice depends highly on the application requirements. The following code comparison section provides additional architectural information that can help you in selecting the optimal microcontroller for your target embedded system. 26Chapter 2. Microcontroller ArchitecturesCode ComparisonThe following short but representative code examples show the impressive individual strengths of the different microcontroller architectures.I/O Port Access ComparisonSource Codeif (IO_PIN == 1) i++; } {DescriptionIncrement a value when an I/O pin is set.8051 devices provide bit-addressable I/O Ports and instructions to access fixed memory locations directly C166, XE166, XC2000 devices provide bit-addressable I/O Ports and instructions to access fixed memory locations directly ARM7 and ARM9 devices provide indirect memory access instructions only. However, there are no bit operations. Cortex-Mx devices provide indirect memory access instructions only, but allow atomic bit operations8051 Codesfr P0=0x80; sbit P0_0=P0^0; void main (void) { if (P0_0) { ; JNB P0_0,?C0002C166/XE166 and XC2000 Codesfr P0L=0xFF00; sbit P0_0=P0L^0; void main (void) { if (P0_0) { ; JNB P0_0,?C0001ARM7 and ARM9 Thumb Code#define IOP *(int*))Cortex-Mx Thumb2 Code void main (void) { if (IOP & 1) { ; LDR R0,=0xE0028000 ; LDR R0,[R0,#0x0] ; MOV R1,#0x1 ; TST R0,R1 ; BEQ L_1 i++; LDR LDR ADD STR } void main (void) { if (GPIOA-&ODR) { ; STR R0,[R1,#0xc] ; LDR R0,[R2,#0] ; CBZ R0,|L1.242|;i++; INCi;i++; SUB i,ONES; ; ; ;R0,= i R1,[R0,#0x0];i R1,#0x1 R1,[R0,#0x0];ii++; ; MOVS R0,#2 ; STR R0,[R1,#0xc] ; |L1.242| }} ; } RET ; }} RET; BX }LR; BX }LR6 Bytes10 Bytes24 Bytes12 Bytes Getting Started: Creating Applications with ?Vision27Pointer Access ComparisonSource Codetypedef struct { int arr[10]; } int f (sx xdata *sp, int i) { return sp-&arr[i]; }DescriptionReturn a value that is part of a struct and indirectly accessed via pointer.8051 devices provide byte arithmetic requiring several microcontroller instructions for address calculation C166, XE166, XC2000 devices provide efficient address arithmetic with direct support of a large 16 MByte address space ARM devices are extremely efficient with regard to pointer addressing and always use the 32-bit addressing mode In Cortex-Mx devices, any register can be used as a pointer to data structures and arrays8051 CodeMOV MOV MOV ADD MOV MOV RLC MOV INC INC MOV ADD MOV MOV ADDC MOV MOVX MOV INC MOVX MOV DPL,R7 DPH,R6 A,R5 A,ACC R7,A A,R4 A R6,A DPTR DPTR A,DPL A,R7 DPL,A A,DPH A,R6 DPH,A A,@DPTR R6,A DPTR A,@DPTR R7,AC166, XE166, XC2000 CodeMOV SHL ADD EXTS MOV R4,R10 R4,#01H R4,R8 R9,#01H R4,[R4+#2]ARM 7 and ARM9 Thumb CodeLSL ADD LDR R0,R1,#0x2 R0,R2,R0 R0,[R0,#0x4]Cortex-Mx Thumb2 CodeADD LDR R0,R0,R1,LSL #2 R0,[R0,#4]25 Bytes14 Bytes6 Bytes6-Bytes 28Chapter 2. Microcontroller ArchitecturesGenerating Optimum CodeThe C/C++ compilers provided by Keil are leaders in code generation and produce highly efficient code. However, code generation and translation is influenced by the way the application software is written. The following hints will help you optimize your application performance.Coding Hints for All ArchitecturesHintKeep interrupt functions short.DescriptionWell-structured interrupt functions only perform data collection and/or time-keeping. Data processing is done in the main function or by RTOS task functions. This reduces overhead involved with context save/restore of interrupt functions. Atomic code is required for accessing data while using multiple RTOS threads or interrupt routines that access the memory used by the main function. Carefully check the application to determine if atomic operations are needed and verify the generated code. The various architectures have different pitfalls. For example, incrementing a variable on the 8051 and C166/XE166/XC2000 device is a single, atomic instruction, since it cannot be interrupted, whereas multiple instructions are required for an increment on ARM devices. In contrast, the 8051 requires multiple instructions to access the memory of an int variable. The volatile attribute prevents the C/C++ compiler from optimizing variable access. By default, a C/C++ Compiler may assume that a variable value will remain unchanged between several memory-read operations. This may yield incorrect application behavior in real-time applications. As part of the optimization process, the Keil C/C++ compiler attempts to maintain local variables (defined at function level) in CPU registers. Register access is the fastest type of memory access and requires the least program code.Check the requirement for atomic operations.Apply the volatile attribute on variables that are modified by an interrupt, hardware peripherals, or other RTOS tasks. When possible, use automatic variables for loops and other temporary calculations. Getting Started: Creating Applications with ?Vision29Coding Hints for the 8051 ArchitectureHintUse the smallest possible data type for variables. Favor unsigned char and bit. Use unsigned data types whenever possible. Favor the SMALL memory model.DescriptionThe 8051 uses an 8-bit CPU with extensive bit support. Most instructions operate on 8-bit values or bits. Consequently, small data types generate code that is more efficient. The 8051 has no direct support for signed data types. Signed operations require additional instructions whereas unsigned data types are directly supported by the architecture. Most applications may be written using the SMALL memory model. You can locate large objects, as arrays or structures, into xdata or pdata memory using explicit memory types. Note, the Keil C51 run-time library uses generic pointers and can work with any memory type. Variables in the data address space are directly accessed by an 8-bit address that is encoded into the 8051 instruction set. This memory type generates the most efficient code. The pdata memory provides efficient access to 256 bytes using MOVX @Ri instructions with 8-bit addressing. However, pdata behaves differently on the various 8051 devices, since it may require setting up a paging register. The xdata memory type is generic and accesses large memory spaces (up to 64KB). By default, the Keil C51 Compiler uses generic pointers that may access any memory type. Memory-typed pointers can access only a fixed memory space, but generate faster and smaller code. The 8051 lacks support for stack variables. Reentrant functions are implemented by the Keil C51 Compiler using a compile-time stack with data overlaying for maximum memory utilization. Reentrant functions on the 8051 require simulation of the stack architecture. Since reentrant code is rarely needed in embedded applications, you should minimize the usage of the reentrant attributes. The extended LX51 Linker/Locator (available only in the PK51 Professional Developer’s Kit) analyzes and optimizes your entire program. Code is reordered in memory to maximize 2byte AJMP and ACALL instructions (instead of 3-byte LJMP and LCALL). Linker Code Packing (enabled in C51 OPTIMIZE level 8 and above) generates subroutines for common code blocks.When using other memory models, apply the memory type data to frequently used variables. Learn how to use pdata memory type on your device.Use memory-typed pointers when possible.Reduce the usage of Reentrant Functions.Use the LX51 Linker/Locater and Linker Code Packing to reduce program size. 30Chapter 2. Microcontroller ArchitecturesCoding Hints for C166, XE166, XC2000 ArchitecturesHintWhen possible, use 16-bit data types for automatic and parameter variables. Replace long with int data types when possible. Use the bit data type for boolean variables. Use the SMALL or MEDIUM memory model when possible.DescriptionParameter passing is performed in 16-bit CPU registers (many 16-bit registers are available for automatic variables). More 16bit variables (signed/unsigned int/short) can be assigned to CPU registers. This generates code that is more efficient. Operations that use 16-bit types (like int and unsigned int) are much more efficient than operations using long types. These CPUs have efficient bit instructions that are fully supported by the Keil C166 Compiler with the bit data type. In these memory models, the default location of a variable is in near memory, accessible through16-bit direct addresses encoded in the CPU instructions. You can locate large objects (array or struct) into huge or xhuge using explicit memory types. Variables in the near, idata, or sdata address space are accessed through a 16-bit address that is encoded directly into a single C166/XE166/XC2000 instruction. These memory types generate the most efficient code. The memory models COMPACT and LARGE use the obsolete far memory type and have an object size limit of 16KB. The memory models HCOMACT and HLARGE use the huge memory type that feature a 64KB object size limit. Even cast operations from near to huge pointers are more optimal. Check if a near pointer is sufficient for accessing the memory, since near pointers can access variables in the near, idata, or sdata address space. Near pointers generate faster and smaller code.When using other memory models, apply the near, idata, or sdata memory type to frequently used variables. Use the memory model HCOMPACT/HLARGE instead of COMPACT/LARGE.Use near pointers when possible. Getting Started: Creating Applications with ?Vision31Coding Hints for the ARM7 and ARM9 ArchitectureHintWhen possible, use 32-bit data types for automatic and parameter variables.DescriptionParameter passing is performed in 32-bit CPU registers. All ARM instructions operate on 32-bit values. In Thumb mode, all stack instructions operate only on 32-bit values. By using 32-bit data types (signed/unsigned int/long), additional data type cast operations are eliminated. Thumb mode is about 65% of the code size and 160% faster than ARM mode when executing from a 16-bit memory system. The MDK-ARM Compiler automatically inserts required ARM / Thumb interworking instructions. Via the __swi function attribute, the MDK-ARM Compiler offers a method to generate software interrupt functions directly, which cannot be interrupted by IRQ (__swi functions can be interrupted by FIQ interrupts). In contrast to other embedded architectures, ARM prevents access to the interrupt disable bits I and F in User mode. Thumb and ARM instructions encode a limited displacement for memory access. When a struct is accessed via a pointer, scalar variables at the beginning of a struct can be accessed directly. Arrays always require address calculation. Consequently, it is more efficient to place scalar variables at the beginning of a struct. Code executed from Flash ROM typically requires wait states or CPU stalls. Code execution from RAM does not. Consequently, time critical functions (like high-speed interrupt code) can be located in RAM directly using the Memory Assignment feature in Options for File C Properties available via the Context Menu of that file. To optimize an application for minimal program size select under Options for Target the following toolchain: In the dialog page Target enable Code Generation - Use Cross-Module Optimization In the dialog page C/C++ select Optimization: Level 2 (-O2) and disable the options Optimize for Time, Split Load and Store Multiple, and One ELF Section per FunctionUse the Thumb instruction set.Use __swi software interrupt functions for atomic sequences.Enhance struct pointer access by placing scalars at the beginning and arrays as subsequent struct members. Assign high speed interrupt code to RAM.Optimize for SizeMicroLIBThe compiler offers a MicroLIB to be used for further reducing the code size of an application. MicroLIB is tailored for deeply embedded systems, but is not fully ANSI compliant. Do not use MicroLIB when execution speed is your primary goal. To optimize an application for maximum execution speed, under Options for Target select the following toolchain: In the dialog pageTarget enable Code Generation - Use Cross-Module Optimization In the dialog page C/C++ select Optimization: Level 3 (-O3), enable Optimize for Time, and disable Split Load and Store MultipleOptimize for Speed 32Chapter 2. Microcontroller ArchitecturesCoding Hints for the Cortex-Mx ArchitectureHintWhen possible, use 32-bit data types for automatic and parameter variables.DescriptionParameter passing is performed in 32-bit CPU registers. All ARM instructions operate on 32-bit values. In Thumb mode, all stack instructions operate only on 32-bit values. By using 32-bit data types (signed/unsigned int/long), additional data type cast operations are eliminated. To optimize an application for minimal program size select under Options for Target the following toolchain: In the dialog page Target enable Code Generation - Use CrossModule Optimization In the dialog page C/C++ select Optimization: Level 2 (-O2) and disable the options Optimize for Time, Split Load and Store Multiple, and One ELF Section per FunctionOptimize for SizeMicroLIBThe compiler offers a MicroLIB to be used for further reducing the code size of an application. MicroLIB is tailored for deeply embedded systems, but is not fully ANSI compliant. Do not use MicroLIB when execution speed is your primary goal. To optimize an application for maximum execution speed, under Options for Target select the following toolchain: In the dialog pageTarget enable Code Generation - Use CrossModule Optimization In the dialog page C/C++ select Optimization: Level 3 (-O3), enable Optimize for Time, and disable Split Load and Store MultipleOptimize for SpeedSleep mode featuresTo optimize power consumption of an application you may use the WFI instruction to send the processor into Sleep Mode until the next interrupt is received. In C programs, use the intrinsic function __wfi() to insert this instruction into your code. Thumb2 instructions encode a limited displacement for memory access. When a struct is accessed via a pointer, scalar variables at the beginning of a struct can be directly accessed. Arrays always require address calculations. Therefore, it is more efficient to place scalar variables at the beginning of a struct.Enhance struct pointer access, by placing scalars at the beginning and arrays as sub-sequent struct members. Getting Started: Creating Applications with ?Vision33Chapter 3. Development ToolsThe Keil development tools offer numerous features and advantages that help you to develop embedded applications quickly and successfully. They are easy to use and are guaranteed to help you achieve your design goals in a timely manner.Software Development CycleWhen using the Keil tools, the project development cycle is similar to any other software development project. 1. Create a project, select the target device from the Device Data base, and configure the tool settings 2. Create your source files in C/C++ or Assembly 3. Build your application with the Project Manager 4. Debug and correct errors in source files, verify and optimize your application 5. Download your code to Flash ROM or SRAM and test the linked application Each component shown in the block diagram is described in the following section. 34Chapter 3. Development Tools?Vision IDEThe ?Vision IDE is a window-based software development platform combining a robust editor, Project Manager, and Make Utility tool. ?Vision supports all the Keil tools including C/C++ Compiler, Macro Assembler, Linker, Library Manager, and Object-HEX Converter. ?Vision helps expedite the development process by providing: Device Database for selecting a device and configuring the development tools for that particular microcontroller Project Manager to create and maintain projects Make Utility for assembling, compiling, and linking your embedded applications Full-featured source code editor Template Editor that is used to insert common text sequences or header blocks Source Browser for rapidly exploring code objects, locating and analyzing data in your application Function Browser for quickly navigating between functions in your program Function Outlining for controlling the visual scope within a source file Built-in utilities, such as Find in Files and functions for commenting and uncommenting source code ?Vision Simulator and Target Debugger are fully integrated Configuration Wizard providing graphical editing for microcontroller startup code and configuration files Interface to configure Software Version Control Systems and third-party utilities Flash Programming Utilities, such as the family of Keil ULINK USBJTAG Adapters Dialogs for all development tool settings On-line Help and links to microcontroller data sheets and user guides Getting Started: Creating Applications with ?Vision35?Vision Device DatabaseThe ?Vision Device Database offers a convenient way to select and configure your device and project parameters. It includes preconfigured settings, so that you can fully concentrate on your application requirements. In addition, you can add your own devices, or change existing settings. Use the features of the Device Database to: Initialize the start up code and device settings Load the configuration options for the assembler, compiler, and linker You can add and change microcontroller configuration settings?Vision DebuggerThe ?Vision Debugger is completely integrated into the ?Vision IDE. It provides the following features: Disassembly of the code on C/C++ source- or assembly-level with program execution in various stepping modes and various view modes, like assembler, text, or mixed mode Multiple breakpoint options including access and complex breakpoints Bookmarks to quickly find and define your critical spots Review and modify memory, variable, and register values List the program call tree including stack variables Review the status of on-chip microcontroller peripherals Debugging commands or C-like scripting functions Execution Profiling to record and display the time consumed, as well as the cycles needed for each instruction Code Coverage statistics for safety-critical application testing Various analyzing tools to view statistics, record values of variables and peripheral I/O signals, and to display them on a time axis Instruction Trace capabilities to view the history of executed instructions Define personalized screen and window layouts 36Chapter 3. Development ToolsThe ?Vision Debugger offers two operating modes―Simulator Mode and Target Mode. Simulator Mode configures the ?Vision Debugger as a software-only product that accurately simulates target systems including instructions and most on-chip peripherals. In this mode, you can test your application code before any hardware is available. It gives you serious benefits for rapid development of reliable embedded software. The Simulator Mode offers: Software testing on your desktop with no hardware environment Early software debugging on a functional basis improves software reliability Breakpoints that are impossible with hardware debuggers Optimal input signals. Hardware debuggers add extra noise Single-stepping through signal processing algorithms is possible. External signals are stopped when the microcontroller halts. Detection of failure scenarios that would destroy real hardware peripherals Target Mode1 connects the ?Vision Debugger to real hardware. Several targetdrivers are available that interface to a:ULINK JTAG/OCDS Adapter that connects to on-chip debugging systems Monitor that may be integrated with user hardware or that is available on many evaluation boards Emulator that connects to the microcontroller pins of the target hardware In-System Debugger that is part of the user application program and provides basic test functions ULINKPro Adapter a high-speed debug and trace unit connecting to on-chip debugging systems via JTAG/SWD/SWV, and offering Cortex-M3 ETM Instruction Trace capabilities1 Some target drivers have hardware restrictions that limit or eliminate features of the ?Vision Debugger while debugging the target hardware. Getting Started: Creating Applications with ?Vision37AssemblerAn assembler allows you to write programs using microcontroller instructions. It is used where utmost speed, small code size, and exact hardware control is essential. The Keil Assemblers translate symbolic assembler language mnemonics into executable machine code while supporting source-level symbolic debugging. In addition, they offer powerful capabilities like macro processing. The assembler translates assembly source files into re-locatable object modules and can optionally create listing files with symbol table and cross-reference details. Complete line number, symbol, and type information is written to the generated object files. This information enables the debugger to display the program variables exactly. Line numbers are used for source-level debugging with the ?Vision Debugger or other third-party debugging tools. Keil assemblers support several different types of macro processors (depending on architecture): The Standard Macro Processor is the easier macro processor to use. It allows you to define and use macros in your assembly programs using syntax that is compatible with that used in many other assemblers. The Macro Processing Language or MPL is a string replacement facility that is compatible with the Intel ASM-51 macro processor. MPL has several predefined macro processor functions that perform useful operations like string manipulation and number processing. Macros save development and maintenance time, since commonly used sequences need to be developed once only. Another powerful feature of the assembler’s macro processor is the conditional assembly capability. You can invoke conditional assembly through command line directives or symbols in your assembly program. Conditional assembly of code sections can help achieve the most compact code possible. It also allows you to generate different applications from a single assembly source file. 38Chapter 3. Development ToolsC/C++ CompilerThe ARM C/C++ compiler is designed to generate fast and compact code for the ARM7, ARM9 and Cortex-Mx pro while the Keil ANSI C compilers target the 8051, C166, XE166, and XC2000 architectures. They can generate object code that matches the efficiency and speed of assembly programming. Using a high-level language like C/C++ offers many advantages over assembly language programming: Knowledge of the processor instruction set is not required. Rudimentary knowledge of the microcontroller architecture is desirable, but not necessary. Details, like register allocation, addressing of the various memory types, and addressing data types, are managed by the compiler Programs receive a formal structure (imposed by the C/C++ programming language) and can be split into distinct functions. This contributes to source code reusability as well as a better application structure. Keywords and operational functions that resemble the human thought process may be used Software development time and debugging time are significantly reduced You can use the standard routines from the run-time library such as formatted output, numeric conversions, and floating-point arithmetic Through modular programming techniques, existing program components can be integrated easily into new programs The C/C++ language is portable (based on the ANSI standard), enjoys wide and popular support, and is easily obtained for most systems. Existing program code can be adapted quickly and as needed to other processors.Object-HEX ConverterThe object-hex converter creates Intel HEX files from absolute object modules that have been created by the linker. Intel HEX files are ASCII files containing a hexadecimal representation of your application program. They are loaded easily into a device program for writing to ROM, EPROM, FLASH, or other programmable memory. Intel HEX files can be manipulated easily to }

我要回帖

更多关于 thinkvision的意思 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信