Page last updated: September 2010 by Kiran Nevaskar
Step 01 - Install IARDouble click on setup to start installation: Enter user information and License code. After registering on website of IAR this code can be obtained: Enter License key which comes along with License no: Select setup type as Complete: Click on Install to start installation: Click on finish to start IAR Workbench: Step 02 - Create a new ProjectStep 04 - Simulation & DebuggingClick on Project->Download & Debug to start Simulation, Debugging or Programming target: After starting Simulation Code window will have some green highlighted text. Which indicates Code is about to execute: Insert breakpoints by double clicking on gray area on left side of code lines: Add watch window to watch the values of Registers and Ports from View menu: In watch window Enter the name of Port register by clicking and writing name in dotted rectangle: Click on Go to start the execution of code: Due to breakpoint process of simulation will get halted. So that we can observe the change in the value of Port 1 register. We can see the value in watch window. The value is 0xFF as per written in code: Again click on Go now value of Port 1 register will get changed to 0x00 as per written in the code: From simulation we can conclude that logically program is working . Now it is time to debug this code on target board. Click on cancel to stop simulation process: We need to change Simulator tool to Debugger tool from project option: Choose FET Debugger in Debugger option: Select Texas Instrument USB-IF in FET Debugger option and Select Automatic: In Breakpoint tab check on Software Breakpoints and Emulated Breakpoints: Now simulator menu will get disappear and Emulator Menu will appear: Before starting actual debugging connect target board to USB port of PC and install drivers from Driver directory where IAR IDE is installed. After successful installation such window will appear: Now click on Project Download & Debug to start programming and debugging on the target board: You will be able to see the window similar to window appeared while simulating: Click on Go. Now we can see that both the LEDs on Target board are glowed: Now we can see that both LEDs are switched off as per mentioned in the code. After debugging cancel debugging and remove target from USB port and reconnect we can see that LEDs are blinking: Attachments: |
eZ430-RF2500
Selection | File type icon | File name | Description | Size | Revision | Time | User |
---|---|---|---|---|---|---|---|
ċ
|
Download |
Blinking LED on MSP430F2274 on Port1 | 25k | v. 4 | Sep 11, 2010, 8:39 PM | Kiran Nevaskar |