Part Number Hot Search : 
SR1100S 2SK2503 TOR016 SI5908DC GP10N FA7530 1N4745A 5KP10CA
Product Description
Full Text Search
 

To Download AN912 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  AN912/1098 1/14 application note a simple guide to development tools by k. bigu what are development tools ? a microcontroller is a highly integrated device which generally carries out an application con- trol function. to achieve this specific task, you must program several (usually several hun- dred!) instructions in the microcontroller. to develop and load the program, you require a set of devices. there are tools to create efficient and clearly structured programs and tools to transfer and to test these programs in the microcontroller. the creation tools are software tools. they will allow you to generate your program code. this code is loaded in the microcontroller by the transfer tools which are hardware tools. these de- vices also allow all the microcontroller functions to be evaluated. you require hardware devel- opment tools for final debugging and test. development tools consist of a package of software tools and hardware tools. they serve to program and to evaluate one or several microcontrollers. each microcontroller family needs both hardware and software development tools. all software development tools must follow the same principles: reliability, efficiency, ease of use, flexibility. these characteristics are es- pecially important for embedded applications. 1
a simple guide to development tools 2/14 1 software development tools the software tools allow the development of your application code. this code will be loaded in the microcontroller to execute the corresponding functions. to produce a code ready for execution, you must run the c compiler (if program is written in c language), the assembler and the linker . then, you must evaluate this code with the de- bugger or the simulator . figure 1. code development flow chart the c compiler used with the assembler and linker , allows the generation of executable ob- ject code. the generated object code may be used to debug, to generate eprom devices test or to produce rom mask data. c source file assembly source file c compiler assembler linker debugger simulator object file hexadecimal file emulator software tool hardware tool assembly file programmer factory mask rom (executable object code)
3/14 a simple guide to development tools figure 2. typical object code production 1.1 c compiler the c compiler translates c-code into assembly code. it allows you to write in c and to benefit from all its advantages. it is easier to program using a high level language. but for small appli- cations, the generated code can be less compact than by direct assembly programming. 1.1.1 high level language characteristics it is highly advisable to write your software using a high level language. it allows you to struc- ture your source code and improve program portability and reusability. routines written in high level language can be also used in other firmware or applications. furthermore, development costs are usually lower because code generation time is shortened and debugging is made easier. host host machine dedicated to development & object code generation target machine dedicated to execution & debugging downloading of a target file via parallel link & debugging via monitor on target and user interface on host
a simple guide to development tools 4/14 figure 3. high level language programming characteristics 1.1.2 advantages and drawbacks of c language the c language is an example of a high level language i.e. the instructions are expressed in a language similar to natural language. it was developed in bell laboratories by brian kernigan and david ritchie in the early seventies. the language is rich: it offers a library of ready-pro- grammed functions. the c language is very flexible and permits functions to be written with very few lines of code. this makes program development much easier. furthermore the program is more reliable because c language is a standardized language fol- lowing the ansi norm. it ensures that your code will meet some standard criteria. sometimes c language is not practical. for example, when a part of the program requires very fast processing, this section should be written in assembly language. also to get precise con- trol of hardware resources, it is sometimes useful to write a part of an application in assembly language. it is quite easy to interface an assembly function with a c program or a c function in an assembly program. high level language programming reduced development cost ? code generation time short- ened (time to market) ? debugging made easier improved code portability ? between applications (upgrades, new products) ? between firmware simplified code maintenance
5/14 a simple guide to development tools figure 4. c language programming advantages it is possible to mix other languages with the c compiler. you can include assembly instruc- tions with access to c program symbols. assembler must be used for critical instructions. thus execution time is optimized. 1.1.3 low level language characteristics a low level language is a language close to machine code i.e. it generates fast and compact code which means faster execution and lower memory requirements. it is more difficult to write and harder to read. but you can use all the capabilities of the machine. figure 5. low level language programming characteristics c language structured worlwide used standardized (ansi c) easy programming low level language programming complex to write or to read effective for time critical application
a simple guide to development tools 6/14 1.1.4 advantages and drawbacks of assembly language assembly language is a low level language. it provides very fast execution times and is very useful for programs which continuously calculate large amounts of data. however, it often re- quires a large number of code lines whereas a high level language uses only one statement. its complexity results in high level languages being used more and more often and assembly language only for time critical applications. 1.2 assembler the assembler transforms an assembly file into an object file. it assembles the instructions be- fore translating it automatically into a language understandable by the machine. this machine language is hexadecimal code. it would be hard for you to write or to read machine language directly so you must use assembly language to make programming possible. the assembler works as follows: it accepts one or more source files written in assembly lan- guage and changes them into relocatable object files. during the process, the assembler checks for many types of errors and it reports when you use a wrong instruction or operator. figure 6. advantages of assembler use after having separately assembled all the component modules in your program, the next step is to link them together into a file which can then be sent onto its final destination. precise control of hardware ressource reduced code size reduced execution time
7/14 a simple guide to development tools 1.3 linker nearly all applications are too large to be developed in a single file: this file would become too long to be easily managed by editors, and editing it would become tedious. applications broken down to several pieces of code are much easier to work with. separating each appli- cation into functional units and managing one file simplifies development and maintenance. as a final step, it is necessary to group all these parts of the application together, and to pro- duce one file containing the whole application. this is what the linker does. figure 7. linker overview the linker combines the different object code files issued by the assembler and places the code at predefined addresses in memory. it produces an output file in a hexadecimal format, which can be downloaded to the emulator by the debugger . it is the last step in building a compiled program and making an executable application. in some cases, additional steps may follow, but these are only to format the output of the linker in another structure. after your program has been assembled and linked to form a executable file, it needs to be sent to the place where it will be executed. the linker combines several object files each performing an elementary task & generates one file containing the whole application.
a simple guide to development tools 8/14 1.4 simulator using a simulator, you can debug programs written for a microcontroller and execute them on a computer, with no need for additional hardware. the simulator functionally duplicates the operation of the microcontroller and completely sup- ports the instruction set. it uses its clock frequency with the number of clock cycles needed by each instruction to keep track of the real time execution speed. 1.5 debugger the debugger is a powerful tool, helpful when writing, executing and debugging programs for microcontrollers. the debugger controls the downloading of the output file of the linker in a target machine. as- sociated with an emulator , it allows to monitor your program in the context of the application. for debugging purposes, the debugger provides several commands for displaying and setting memory and registers, for executing programs, setting breakpoints, tracing instructions. figure 8. example of a windows debugger the debugger is typically a multiwindow environment. this type of debugger provides some very useful features. first, it is easy to use using the familiar windows environment. the pro- gram or the microcontroller resources are directly accessible: you can examine resources, ac- cess variables or functions, control memory and access registers. the debugger should be very flexible. it must be adapted to your needs by displaying only in- formation you require for your debugging. you can choose the basic characteristics of each window by selecting filters. in this way, you customize your environment and get only the in- formation you need for a particular problem.
9/14 a simple guide to development tools using source level debugging, it is easy to identify which part of the program is displayed. the source and generated codes are on the same screen. the environment is easy to learn since it makes full use of window controls such as toolbars, tooltips, drag-and-drop, and context- sensitive pop up menus. from these windows, you fully control the execution of your program. figure 9. state-of-the-art debugger characteristics the debugger is an essential part of the development chain. by improving your productivity in the debug phases, a windowed symbolic debugger reduces your development costs and speeds up your time to market. debugger ease of use reliability adaptability
a simple guide to development tools 10/14 2 hardware development tools there are three different types of development system that are in common use. most of these systems require a host computer (pc, station) to run the device. usually they come with soft- ware to interface with the host computer. 2.1 emulator figure 10. emulator with its probe plugged in dedicated board an emulator is an electronic device that reproduces the behavior and functionality of a specific microcontroller in real time (that is it runs at the full speed of the microcontroller even in debug mode). the emulator is used to replace the component being emulated in your system. it al- lows interactive debugging of the software and can control your program execution while op- erating in the system. the emulator is connected to your application by a probe which is plugged directly into the ap- plication and controlled by a powerful software debugger which sends and receives informa- tion to and from the emulator. by means of a graphic interface which displays all available information on the pc screen, you can access the microcontroller internal resources (such as registers) and its internal memo- ries. this enables the development of application programs and the system emulation in real time or in single step mode. you can set breakpoints on specific instructions or addresses. the emulator stops the program execution when the cpu reaches that particular instruction. then you can consult all microcontroller registers and trace the preceding executed instruc-
11/14 a simple guide to development tools tions. there is a wide range of debug commands which give you full control of the emulator hardware and several commands for controlling program execution. memory and registers can be read and written in different formats, while macro commands and conditional block constructs are available for use in automated debugging sessions. 2.2 starter kit or development board a starter kit is a basic development system for the evaluation and design of microcontroller ap- plications. this evaluation kit can include emulation capabilities and provide a quick introduc- tion to the microcontroller world. the starter kit may include all hardware, software and docu- mentation required to evaluate the microcontroller and to develop simple applications. figure 11. starter kit content the hardware used to debug an application and to program a device, is an evaluation or de- velopment board. it is a board which includes the microcontroller in the version which offers all the most important features of the family to be tested. the microcontroller operates in a spe- cial mode that allows internal bus access. code delivered from the host is put into memory that the microcontroller can access, and the microcontroller can operate as if the code was contained within its internal memory. for maximum flexibility, the board can run in different modes of operation. without a host com- puter, you can prototype an application and build an easy-to-use demonstration board by con- necting your own application board to the starter kit. the main mode of operation allows you to debug your target system. your code can be downloaded into emulation memory and then executed under control of a windows debugger . you have the possibility to program the de- bugged program into an eprom or otp member.
a simple guide to development tools 12/14 the software includes a assembler which supports modular programming, a linker ,anar- chiver that manages relocatable objects modules, a functional simulator , a windows de- bugger which drives the evaluation board and the eprom programming software. the starter kit also includes full documentation on the microcontroller family, on how to con- nect and program it and the software manuals which describe how to use the development tools, as well as a diskette containing several application programs for microcontroller de- vices. this full evaluation kit provides a low cost platform for developing and evaluating embedded applications. 2.3 eprom and gang programmer the eprom programmer (or eprom programming board) is a programming tool for eprom and otp members of the microcontroller families. figure 12. eprom programming board this board is designed to program the eprom versions of microcontroller, including both the ceramic windowed and plastic otp packages. several sockets are provided to receive the dif- ferent existing packages types. the eprom programming board uses a ram in which your code is downloaded. the eprom device will be programmed from the contents of this ram.
13/14 a simple guide to development tools the board can perform three operations: n verify the blank state of the microcontroller eprom; n program microcontroller with the content of hexadecimal file; n verify the microcontroller. the gang programmer is a programmer which has several eprom programmers put in par- allel. figure 13. gang programmer
a simple guide to development tools 14/14 the present note which is for guidance only aims at providing customers with information regarding their products in order for them to save time. as a result, stmicroelectronics shall not be held liable for any direct, indirect or consequential damages with respect to any claims arising from the content of such a note and/or the use made by customers of the information contained herein in connexion with their products. information furnished is believed to be accurate and reliable. however, stmicroelectronics assumes no responsibility for the consequences of use of such information nor for any infringement of patents or other rights of third parties which may result from its use. n o license is granted by implication or otherwise under any patent or patent rights of stmicroelectronics. specifications mentioned in this publication are subject to change without notice. this publication supersedes and replaces all information previously supplied. stmicroelectronics products are not authorized for use as critical components in life support devices or systems without the express written approval of stmicroelectronics. the st logo is a registered trademark of stmicroelectronics ? 1998 stmicroelectronics - all rights reserved. purchase of i 2 c components by stmicroelectronics conveys a license under the philips i 2 c patent. rights to use these components in an i 2 c system is granted provided that the system conforms to the i 2 c standard specification as defined by philips. stmicroelectronics group of companies australia - brazil - canada - china - france - germany - italy - japan - korea - malaysia - malta - mexico - morocco - the netherlands - singapore - spain - sweden - switzerland - taiwan - thailand - united kingdom - u.s.a. http:/ /www.st.com


▲Up To Search▲   

 
Price & Availability of AN912

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X