Luminary Micro - Stellaris

Page last updated: August 2010 by Kiran Nevaskar

Kit Details

  • Kit Name: EKK-LM3S811 Evaluation Kit
  • Onboard Microcontroller: LM3S811
  • Microcontroller Type: 32-bit (ARM Cortex M3)
  • Official kit companion site: EKK-LM3S811
  • Kit Price (Approx): USD 49
  • Buy Kit: Texas Instruments

Software Development Tools

We have used:
  • C Compiler: Keil Realview MDK Download
  • Assembler: Included along with Keil Realview MDK Package
  • IDE: Keil Realview MDK Download
  • Programmer/Debugger: Luminary Micro JTAG built into Keil
  • Operating System: Microsoft Windows 7 32-bit
 

Step 01 - Installation of KEIL



Download Keil Realview MDK & Start Installation by Double clicking on .exe file:




Read the license & accept the terms of use if you agree with that:



Select path for installation:



Enter the personal details:



Now installation is started:



Installation is finished:





Step 02 - Create a new Project



Start Keil Real View MDK:



Create new project by clicking on Project menu-> New uVision Project:



Select path for project and project name:



Select device as LM3S811:



Click Ok to add startup code to project folder and to project:




Step 03 - Create new source file and Compile



Create new file from file menu or from tool bar:



Write code and save the file with file extension as .c:




Add the code file to the project by double clicking on Source Group in Workspace window:




Select option "Option for Target" by clicking on Project->Option for Target Target 1



Set crystal speed as 6MHz (it is the value of on board crystal) so that during debugging & programming it can synchronize properly with JTAG:



In output tab check Create Hex File, if you want to program this device with some other external tool:



During simulation select Debug tab and there select simulator there:




In Utilities tab select Use target Driver for Flash Programming and in the settings choose Stellaris ICDI:




Now build all target files from Project Menu or from tool bar:



Step 04 - Simulation



Now add break points by double clicking on the required code line. If we want to remove break point then double click on the same line.
Do not double click on text, click where text is not present:



From Debug menu start debug session. After debug do the same to stop debug session:



As we are using evaluation edition following window will appear every time during debug session. Click on Ok to proceed further:



Now debug session is started so main window will have some more window. Some of them are Register, Code, Disassembly, Local etc:



During simulation/debug session we want to observe status of GPIO C. So we will add peripheral window from Peripheral menu:


After adding GPIO C window main window will looks like following image. GPIO C window can be moved any where as per convenience:



Press F5 to run the code. Simulator/debugger will halt at the break point. I code window yellow arrow on red circle of break point indicates that simulator/debugger had executed code before the line marked as break point:



Press F5 again to run the code. As we had put one more break point, simulator/debugger will halt again and we can see the result in GPIO C window that there is some change in value of I/O port.



Doing above process again and again we can simulate/debug the program very effectively:



The above procedure was for simulation. To debug the program on the target board under target option use Stellaris ICDI as debugger and repeat the above procedure again. In the case of debugging do not add GPIO C window as we are going to observe the change directly on LED. During programming and debugging on target board connect to Computer via USB cable. When target board is connected to PC first time you will need to install drivers for target board. Those drivers can be found on CD which came along with board. On the CD browse Tools->FTDI. In FTDI directory drivers are in compressed file. Extract that file with the help of Winzip/Winrar or any other equivalent program and install those drivers:




Step 05 - Execute the program



Now we are going to run the LED Blinking code on Target board directly by programming the Microcontroller. Click on Flash menu->Download:



Target Microcontroller is programmed. It is ready to blink LED. Press on board reset switch. Now you will find blinking led.













Attachments:


SelectionFile type iconFile nameDescriptionSizeRevisionTimeUser
ċ

Download
  66k v. 3 Aug 24, 2010, 9:08 AM Kiran Nevaskar
Comments