The tools required to set up your tool chain are:
•The Eclipse Integrated Development Environment (IDE)
•Java Runtime Edition (required by Eclipse IDE).
•Codesourcery G++ Lite cross compilers.
•GNU ARM Eclipse Plugin.
•Texas Instruments Development Package which includes the Stellaris Peripheral Driver Library and LM Flash Programmer required by the Stellaris Shuru development board.
•FTDI Driver for USB-Serial interaction with the target board.
Setting up the toolchain
To successfully set up the IDE, follow each and every step and compare your screen output with the screen snapshots presented in this manual.
Note: Operating System used is Windows XP/Vista/7 (setting up eclipse and the toolchain integration with the IDE would be pretty much the same on linux)
Before starting with setting up the development environment or tool chain for Cortex M3 microprocessors, we need to first download some of the software modules.
Downloading Software Modules
1. Java
Install Java from the link.
2. Eclipse IDE:
Download Eclipse from the link.
Move the zip file to “Softwares_Stellaris” folder on your Desktop. Extract it to “C:\Eclipse”.
3. GNUARM Plugin for Eclipse: Download the plugin from the link.
Move the plugin file to “Softwares_Stellaris” folder on your Desktop.
4.TI Development Package: (Stellaris Peripheral Library + FTDI Drivers + LM Flash Programmer): Download the “StellarisWare Driver Library Standalone Package”, “Stellaris FTDI driver” and the “LM Flash Programmer” from this link.
Install the .exe under “C:\StellarisWare”. Install “LM Flash Programmer” under “C:\Program Files”.
5. CodeSourcery G++ Lite: Download the “Sourcery Code Bench Lite Edition EABI Release” from this link.
Install the .exe under “C:\Program Files”.
6. FTDI USB Serial Driver: Download the “VCP Drivers” for supported Architecture from this link.
Extract the zip file to “Softwares_Stellaris” folder on your desktop.
Setting up Eclipse and LM Flash Programmer
i) Fire up the Eclipse IDE. A window similar to that shown will crop up.
ii) Installing the GNU ARM Plugin
• Go to Help -> Install New Software -> Add -> Archive
• A window similar to that shown in figure 2.1 will show.
• Browse to the GNUARM plugin zip file downloaded under “Softwares_Stellaris”.
• Click Ok and Next to install the plugin.
• A window similar to that shown will show.
Figure 2.1
Figure 2.2
iii) Creating your first project
• Go to File -> New -> C Project.
• Enter the project name. Make sure the selections are as shown in figure 3.1
• Click Next.
• Make sure the selection are same as shown in figure 3.2
• Then, press Finish.
Figure 3.1
Figure 3.2
iv)Importing the existing file system.
• Go to File -> Import -> General -> File System.
• A window similar to that shown in figure 4.1 will crop up.
• Press Next.
•Browse and select the any project from the lm3s608 folder (Source Code for your project) under “Softwares_Stellaris” on your desktop. Make sure same option as shown in Figure 4.2 are selected. Press Finish.
Figure 4.1
Figure 4.2
So till now, we have set up a new project and instructed the Eclipse IDE as to what cross compiler to use for development. Your screen should look similar to that shown in Figure below.
v) Setting up project properties
• Go to Project Properties.
• Under Settings -> Tool Settings -> ARM Sourcery Windows GCC C Compiler -> Directories. Include the directory paths as shown in figure 5.1 and 5.2
Figure 5.1
Choose Cortex-m3 as the processor
Figure 5.2
Make sure the assembler flags is set to -c -fmessage-length=0
Figure 5.3
gcc is the defined symbol used
Figure 5.4
Include the location of the code
Figure 5.5
Do for all the locations as shown
Figure 5.6
-ffunctions-sections parameter required
Figure 5.7
Remove unused sections to be selected in the linker options
Figure 5.8
static library for the linker
Figure 5.9
Figure 5.10
Figure 5.11
Figure 5.12
Figure 5.13
And yes! You are ready to fire up your main.c and code away. To compile, just build. Get the hex file being built, Don't let those many lines running in the eclipse console cause you to worry.
Use the LM Flash Programmer to burn the file to the board. You can integrate the LM Flash Programmer with Eclipse using the External Tools Configuration.
Go open the external tools configuration, Run -> External Tools -> External Tools Configuration
Double click Program to configure a new external tool. Fill in as shown in the next figure. Make sure you choose the correct location of LMFlash.exe .
Congratulations! You have setup the basic development environment.
Now, these steps need not be repeated everytime you create a new project. Just create a project_template once, and the next time you want to create a new project just make a copy of project_template, rename it and change the location of the linker file in the project properties.
Next up, configuring OpenOCD with eclipse for debugging.
--
arm-none-eabi-objcopy -S -O binary project_template.elf project_template.bin // Converts .elf file to binary file
arm-none-eabi-objdump -d text.o > text.txt // To get the assembly file, being burnt to the controller