Home

IAR Embedded Workbench - Texas Instruments Wiki

image

Contents

1. x x Basic Registers iData Expression Value Basic Henisters em El qum fibonacci i 2 Virtual Registers MCS 51 Core EH fibonacci array Timers Interrupt 170 Port Serial 1 0 Port S 4 0x02 i fibonacci T CYCLECOUNTER CCTIMER1 Moa won nm won nono Locals Auto Ln 17 Col 27 9 C SPY debugger Low Power RF Solutions AR Embedded Workbench 2 7 Debugger Debugger C SPY Debugger Complex code and data breakpoints with resume functionality Very fine granularity execution control single stepping on function call level and line statement level Terminal I O peripheral and interrupt simulation Versatile monitoring of data CPU peripheral registers memory structures call chains local and global variables Function level profiling code and data coverage analysis Backtrace via C call stack Mixed C Assembly level debugging Drivers for the Simulator MSP430 emulation interface CCS Low Power RF Solutions AR Embedded Workbench Code Composer Studio 4 0 Code Composer Studio 4 0 Source Code Debugger Integrated Visual Project Manager Hardware and virtual breakpoints Eclipse Integrated editor 9999 Code Composer Studio 4 0 MSP430 C compiler assembler and linker 16K version Free Lab Time Low Power RF Solutions AR Embedded Workbench Code Composer Studio 4 0 yet an
2. 02A03F 74 FF 02A041 69 024042 70 06 024046 79 00 MOV R1 C 024048 80 02 SJMP 0x024 02A04A 79 09 MOV 02A04C 02 00 9A LJMP MOV XRL A 0x R1 C BRET osal init system 02A04F CO 82 02A051 CO 83 NIANGA an na rca DPL DPH vs gt NETE gt Locals watch x NUM C Compiler Low Power RF Solutions AR Embedded Workbench Workspace Organization Compiler IAR C Compiler Highly optimized ISO ANSI standard C compiler Customizable C library pre built and in source form Comprehensive language extensions Flexible segment commands allow detailed control of code and data placement Multiple levels of optimizations for code size and execution speed Major functions of the optimizer can be controlled individually for example loop unrolling MCU specific optimizations Highlights IAR Embedded WorkBench Highlights Ready made I O register definition files Comprehensive documentation with efficient coding hints Context sensitive help with library function and keyword lookup JAR Embedded Workbench IDE Ces File Edit View Project Debug Simulator Tools Window Du Eg e 1 gt wae Z xp Workspace Browser X tutor c utiities c Debug r E O tutor Debug I gt call count a Buor De do foreground pro Ha utor c fibonacci 3 utilities c get fib C3 Output init fib main tutor x
3. File Edi View Project Debug Chipcon Emulator Tools Window Help h amp S zs osa Nv c osaL Tmers c hal mash ZMain c OSAL c x Oisassembly oop is E 38 ECICHEEENENENEN RouterDB Files a a GApp B LocationPr I B LocationPr B SampleAp L B SampleAp GHAL EMAC GMT CJNWK C3OSAL Profile Ha C1 Security Ha Ci Services Ca Tools C3zDo CazMac Ha Cd ZMain Lg E Output SampleAppSrc Ready EIS Ihis function is called to disable an i interrupt occurs the service routine a interrupt is not called If INTS ALL is the interrupt id interr If a single interrupt is passed in the param byte interrupt id Interrupt nu return ZSUCCESS or INVALID INTERRUPT ID 7 byte osal_int_disable byte interrupt_id if interrupt id INTS ALL ba else return INVALID INTERRUPT ID return ZSUCCESS j M Gin osal init system brief fol 4 Goto x x Power Management 7 d lt 02A02A 79 01 MO R1 04 HISLEEP Ox2C 02A02C 02 9E D8 Ox005 osal int enable 02AU2F 74 FF 02A031 69 024032 70 A g0s ARI TICKSPD CIKSPD FI PCON 06 0x024 024034 D2 AF EA R1 C 0x024 024036 79 024038 80 02A03A 79 02A03C 02 00 02 09 00 94 R1 C lt 7 PREL DE osal_int_disable Expression
4. IAR Embedded Workbench Introduction For those of you who have worked with IAR Embedded Workbench before this will be a review If you have not this module and lab will give you a quick introduction to some of the features Learning Objectives Topics Covered IAR EW IDE for MSP430 IAR Compiler IAR C SPY Debugger Code Composer Essentials IDE Low Power RF Solutions AR Embedded Workbench 2 1 Module Topics enjoy this photograph of a polar bear on a snowfield 2 2 Low Power RF Solutions AR Embedded Workbench Module Topics Module Topics TAR Embedded Workbenich sssssssssssesssssssessessesessessesessessesessessssessessesessessesessessesessessesessessesesessesess 2 1 Module TOpics e s e eee e eee ene eene 2 3 TAR Embedded Workbench eese eene teen entente nennen trennen erret tenere 2 5 Workspace Orpantzation s siste atit tte e n E a D ee ate eb pde eas 2 6 Compiler ensem Gaia vnda panibus 2 7 Debut per ce 2 8 Code Composer Studio 4 0 erae e i e tre ed ei aei n eere 2 9 Lab 2 Exploring IAR Embedded Workbench eene eene 2 11 D SCriptlOm 463 aio enini doro OTRO qa an e RO e ER 2 11 Hardware list enint EROR titi ec a OR RE oe asa neat 2 12 Software list oninia p ape OPI ER REOR DOR ERO ERR 2 12 ju 1052117 2 EE 2 13 Setting up IAR Embedded Workbench essere nennen 2 13 Low Power RF Solutions AR Embed
5. ded Workbench 2 3 Module Topics this page has little to offer 2 4 Low Power RF Solutions AR Embedded Workbench IAR Embedded Workbench IAR Embedded Workbench IAR Tools and Target System Supplied by IAR Simulator Simulator Driver Supplied by customer Embedded C SPY WorkBench i Target System l Application Emulator Driver i Emulator H Target HW Supplied by TI or 3 Party Some workbench highlights Easy to use IDE Powerful Project Manager can arrange multiple projects in a workspace Smart Source Browser Easy navigation to functions types variables and macros and with filtering possibilities Tons of context sensitive help Open architecture allows easy expansion of the standard tool chain External editor Source code control system integration Workspace organization Low Power RF Solutions AR Embedded Workbench 2 5 Workspace Organization Workspace Organization Workspace Organization Workspaces can contain multiple projects Projects contain sources and groups Default settings for the project can be inherited Groups contain sources other groups and can override any inherited settings Configurations can easily switch between different builds A look at the screen DnD eug X Case Workspace IDE Screenshot 7 JAR Embedded Workbench IDE
6. e file we re going to do this from scratch In the next window the Tool chain should be MSP430 then click OK When the Save in window appears Navigate to C Texas Instruments SimpliciTI 1 0 6 Projects Examples Peer applications eZ430RF Lab2 Name the project file Lab2 and click Save We re going to make use of some the SimpliciTI features in later labs so the lab files are located in the SimpliciTI folders Low Power RF Solutions AR Embedded Workbench 2 13 Procedure 3 Get familiar with the IDE Take a look at the Workspace The Menu bar is on top the Workspace window is on the left and the Editor window is on the right 4 Add Groups Let s set up a couple of folders so the project parts are organized Right click anywhere in the Workspace window and select Add gt Add Group Type Components into the Group name box and click OK Follow the same procedure to add a group named Source 5 Add BSP files There s no way I m wasting my life writing code that interacts with port pin combinations when I have a Board Support Package at hand so let s add the BSP file to the project Right click on the Components group and select Add gt Add Files Navigate to C Texas Instruments SimpliciTI 1 0 6 Components bsp select bsp c bsp h and bsp_macros h all at once and click Open 6 Add main c to the Project Add main c from C Texas Instruments SimpliciTI 1 0 6 Projects Examples Peer application
7. g 23 button to return to the editor window Close IAR Embedded Workbench If you are prompted to save anything please do 15 Run on Batteries Remove the target board from the eZ430 emulator and carefully connect it to one of the battery modules It s easy to mis align the connector so watch what you are doing Connect the power jumper across the two pins The LEDs should flash and life should be great Disconnect the jumper and place on one of the pins for safekeeping You re done Low Power RF Solutions AR Embedded Workbench 2 17 Procedure l TEXAS INSTRUMENTS Low Power RF Solutions AR Embedded Workbench
8. is still on the left the C debug window is in the center and the Disassembly window is on the right The green highlights and arrow denote the current position of the program counter IAR Embedded Workbench IDE File Edit View Project Debug Emulator Tools Window Help held amp geo El z eZzm i 3 oe gg Debug Files El fj Lab Deb Ha C3 Componen m F 00805E 0021 8 E Source 008062 0021 La C3 Output include bsp h Board support header files include bsp leds h 008066 0021 00806A 0200 volatile unsigned int i volatile to prevent optimiz D0806E 0200 void main void 008072 0200 008076 B Alvays initialize BSP first 008078 BSP TURN ON LED2 Turn on green LED exit 00807A 00807C while 1 00807E 008080 BSP TOGGLE LED1 Toggle red LED 008084 BSP TOGGLE LED2 Toggle green LED 008086 C 008088 80CC 3 i 65535 Delay about 1 3 secon ee Mi manzern Lab2 fal c gt Messages Line Changed settings forces a full rebuild Building configuration Lab2 Debug Updating build tree 0 file s deleted Updating build tree Errors 0 Warnings 0 Ln 14 Col 3 If you were watching closely you also saw this window pop up then disappear Downloading application The IAR Compiler Assembler Loader has created an executable file from your source code and programmed it into the flash memory of the MSP430 It is now co
9. mpletely non volatile and could be disconnected and run on the battery But we have other plans 11 Run Find the Go button z on the menu bar and click it Note the other run control buttons like Reset Step Over Step Into etc If everything works the way it s supposed to the LEDs on the target board should be rapidly flashing Low Power RF Solutions AR Embedded Workbench Procedure 12 Breakpoints Code execution is trapped in the while 1 loop So let s set a breakpoint on the first instruction inside it by double clicking just to the left of the instruction You can also right click on the instruction and select Toggle Breakpoint Code BSP TOGGLE LED2 Execution should quickly stop at the breakpoint as shown by the green arrow Click on the Go a button a couple of times and watch the LEDs toggle as the loop runs Feel free to experiment with the other run control button now 13 Watch Window Set another breakpoint on the do i instruction i 65535 e o while i 0 Right click on any line containing the i variable and select Add to Watch The Watch window should appear on the right side of your IAR screen At this point i should be 0 Click the Go a button and watch code execution stop at the new breakpoint Repeat this procedure a few times 14 Remove the Breakpoints and Shut down IAR Embedded Workbench Double click on both breakpoints red dots to remove them Click on the Stop Debuggin
10. orrect Part and Target Select General Option from the Category list and change the Device to MSP430x2xx Family gt MSP430F2274 This is the MCU on the eZ430 RF2500 board Select Debugger from the Category list and then select FET Debugger under the Setup tab in the Driver box This is the single most common and frustrating mistake people make when setting up an MSP430 project It can take way too much time to realize that your program is working but it s loading on the simulator Also note that Run to main is checked we ll see the advantage of that in a second Click on the FET Debugger category Under the Breakpoints tab check the Use software breakpoints checkbox The eZ430 emulator provides a single hardware breakpoint and this will give us many more Click OK Category Factory Settings General Options C C compiler Assembler Custom Build Setup Extra Options Plugins Build Actions Linker Debugger FET Debugger Simulator Driver v Runto FET Debugger m main Low Power RF Solutions AR Embedded Workbench 2 15 Procedure 10 Build and Load Click the Debug button on the right side of the Menu bar You ll be prompted to save your workspace Name it Lab2 and click Save The project should build properly If it does not notify your instructor A series of build messages will appear at the bottom of you IAR window and the project view will change to the debug view like below The Workspace window
11. other blankity blank page Low Power RF Solutions AR Embedded Workbench Lab 2 Exploring IAR Embedded Workbench Lab 2 Exploring IAR Embedded Workbench Description IAR Embedded Workbench is one of the most popular IDEs on the market today You can t go wrong learning to use this popular and capable tool Lab 2 Exploring IAR Workbench Workspaces Groups Projects Compiler Debugger 9999 Low Power RF Solutions AR Embedded Workbench 2 11 Lab 2 Exploring IAR Embedded Workbench Hardware list Y 3 eZ430 RF2500 Target Boards v 2 Battery Modules Y 4 AAA Batteries Y leZ430 RF2500 Emulator Board v 1 USB Extender Cable Software list Y AR Embedded Workbench for MSP430 version 4 11D You will find shortcuts for the above application on the desktop 2 12 Low Power RF Solutions AR Embedded Workbench Procedure Procedure Setting up IAR Embedded Workbench 1 Double check your hardware Hopefully none of the other sneaky people in your class has fooled with your hardware setup Make sure the USB extension cable EZ430 RF2500 emulator and target board are all connected properly 2 Start the tool Double click on the IAR Embedded Workbench shortcut on the desktop This starts the MSP430 version of the tool E a 35 salad When the startup window appears click the Create new project in current workspace button Other than creating the original main c sourc
12. s eZ430RF Lab2 to the Source group Low Power RF Solutions AR Embedded Workbench Procedure 7 Open main c for editing Double click on main c in the Workspace window The file will open for editing with a tab above in the editor window Note the bsp h and bsp_leds h files they add the BSP functionality for the LEDs The code is pretty simple initialize the BSP always first turn on the green LED then toggle both LEDs every 1 3 second or so This delay loop is the WRONG way to write MSP430 so don t get used to it In this case though it simplifies the code 8 Add the Include Paths In order for the header files to work the compiler needs to know the correct paths to these files Make sure the project name Lab2 Debug is highlighted in the Workspace window click on it From the Menu bar click on Project gt Options and pick the C C compiler category Click on the Preprocessor tab and add the following to the Additional include directories box Normally the easiest way to do this is to use Windows Explorer to navigate to the folder and cut paste the path But I ve placed a Paths txt file in the Lab2 folder you can just cut paste from that if you like C Program Files I AR Systems Embedded Workbench 5 0 430 inc C Texas Instruments SimpliciTI 1 0 6 Components bsp C Texas Instruments SimpliciTI 1 0 6 Components bsp drivers C Texas Instruments SimpliciTI 1 0 6 Components bsp boards EZ430RF 9 Define the C

Download Pdf Manuals

image

Related Search

Related Contents

User Guide for FEBFL7701_L30U003A  一 お知らせは?    Difrnce EB715TFT e-book reader  Descargar Pdf  MANUAL DEL PROPIETARIO  Maxi-Cosi Mobi - BabyObzor.com.ua  téléchargez la version pdf  

Copyright © All rights reserved.
Failed to retrieve file