Rasware is a generic robotics library project for the EK-LM4F120XL Stellaris Launchpad, built on top of StellarisWare. It is intended to be used for UT RAS's Robotathon competition as well as general purpose robotics projects. Authored by the IEEE - Robotics and Automation Society Student Branch at the University of Texas at Austin. For documentation, see Rasware's Github wiki.
- Create a free GitHub account on github.com
- If you want to learn more about Git, you can read the GitPro book online for free (and legally, too!) at http://git-scm.com/book
- Once logged into GitHub, go to ut-ras's Rasware.
- Fork the project's code through the button on the top right. This will copy the project to your own account.
- On the team's forked repository Github page, go to
Settings -> Collaborators
and add each team member as a collaborator
The remainder of the instructions will depend on what type of system you're running. If you are running Windows 10, you may have better luck with the VMware, otherwise we suggest Virtual Box for Windows users.
- Download and install Virtual Box.
- Oracle's Virtual Box is a hypervisor that lets us run a controlled environment for writing and flashing code.
- The "Host Machine" refers to your physical computer, so you will want the installer for "Windows Hosts"
- Download RASBox.
- Launch Oracle Virtual Box.
- Import the RASBox Image by selecting
File -> Import Appliance
and navigating to the downloaded file. - Once imported, there should be a
rasbox
VM listed in Virtual Box. Select it and clickstart
to launch the VM. - The user name is
ras
and there is no password.
- Plug in a Launchpad to your computer. If you don't have a Launchpad available this step can be done later.
- In the RASBox VM, select
Machine -> Settings
and select theUSB
settings. - Click the little USB symbol with the + sign, select the
Texas Instruments In-Circuit Debug Interface
device, and clickOK
. - Once selected, replugging in the Launchpad should be detected by the RASBox.
- Download putty.exe.
- Putty is an incredibly useful little tool for terminal connections in Windows.
- In the VirtualBox Manager, select
File -> Preferences
, selectNetwork
, selectHost-only Networks
, and then select the little screwdriver symbol. - Change the IPv4 Address to
20.0.0.1
and hitOK
until all the windows are gone. - Launch Putty and set the hostname to
[email protected]
which is the default username and IP address of the RASBox. - You may want to also give the session a name and save it.
- Click
Open
to create an SSH connection to the RASBox.
- You should now be presented with a terminal showing something like
ras@rasbox:~$
. This is known as a shell or command line which is the main interface for using our system. - Here is a quick introduction (part 1, part 2) in using the shell.
- To edit files, nano is suggested for new users. You can edit a file, for example hello.txt below, by typing the following into the shell.
nano hello.txt
- Follow the rest of the instructions on how to use Rasware from the clone rasware step in the Linux instructions.
- Download and install VMware Workstation Player.
- WMware Player is a hypervisor that lets us run a controlled environment for writing and flashing code.
- Download RASBox.
- Launch VMware Player.
- Import the RASBox Image by selecting
Open a Virtual Machine
and navigating to the downloaded file. - If the import fails due to not passing
OVF specifications
orVirtual hardware compliance checks
, just try again with checks relaxed. - Once imported, there should be a
rasbox
VM listed in VMware. Double click on it to launch the VM. - The user name is
ras
and there is no password. - First we need to set up the RASBox to use the available network interfaces. Find the available interfaces with the following command.
ip link show
- In the output there should be several interfaces with names like
eno16777736
. We should expect two different interfaces. - Run the following command with each interface to set up DHCP.
sudo systemctl enable dhcpcd@<interface>
- You should reboot to make sure the changes stick.
sudo reboot now
- You can check to make sure the network is working by pinging some website like google.
ping www.gogle.com
- Plug in a Launchpad to your computer. If you don't have a Launchpad available this step can be done later.
- In the RASBox VM, select
Player -> Removable Devices -> Luminary Micro ICDI
and selectConnect
.
- Download putty.exe.
- Putty is an incredibly useful little tool for terminal connections in Windows.
- In VMWare, run the following command to find the ip address of the RASBox.
ip addr show
- Somewhere in the output there should be something like
inet 192.168.186.128
, this is your IP address. We most likely want the last one listed. - Launch Putty and set the hostname to
ras@<ip address>
. - You may want to also give the session a name and save it.
- Click
Open
to create an SSH connection to the RASBox.
- You should now be presented with a terminal showing something like
ras@rasbox:~$
. This is known as a shell or command line which is the main interface for using our system. - Here is a quick introduction (part 1, part 2) in using the shell.
- To edit files, nano is suggested for new users. You can edit a file, for example hello.txt below, by typing the following into the shell.
nano hello.txt
- Follow the rest of the instructions on how to use Rasware from the clone rasware step in the Linux instructions.
- Install Homebrew: link (Installation instructions are at the bottom of the page.)
- Install OpenOCD through Homebrew in a terminal.
brew install openocd
- Download the Cross Compilers for the LM4F from here (download the one for Mac) and extract.
- Download StellarisWare, and extract.
- Use git to clone Rasware, replacing "username" with your Git username in the URL. Make sure you've forked Rasware already!
git clone https://github.com/username/Rasware.git
- In Rasware, open up RASLib/Makefile with your favorite text editor and change the line containing the
PREFIX
variable.
PREFIX := ../../gcc-arm-none-eabi-*/bin/arm-none-eabi-
- Also change the line containing the
STELLARIS
andCORTEXM4
variabls.
STELLARIS = ../../StellarisWare
CORTEXM4 = ../../CortexM4Libs
2b. Repeat 1 and 2 for RASDemo/Makefile and RASTemplate/Makefile.
2c. In all three Makefiles, around lines 85-90, there are lines that say "/dev/lm4f". You need to change "lm4f" to be whatever your computer sees your Launchpad as. The easiest way to do this is to unplug the Launchpad, run "ls /dev", plug in the Launchpad, and run "ls /dev" again. Find the device that was added to the list and change the paths on those lines in the Makefiles to match that device.
- Compile RASLib.
cd Rasware/RASLib
make
- If everything has worked so far, follow the rest of the instructions on how to use Rasware from the compile and run rasdemo step in the Linux instructions.
These instructions are written for use in a terminal (xterm, gterm, kterm, tty1, etc.) and assume that you have already installed, and are familiar with, your favorite text editor. If you have not found a favorite text editor, I recomend you take a look at Vim, Emacs, and SublimeText2.
- Create a directory to work in. This is where we will place everything.
mkdir ras
cd ras
- First install the basic dependencies
- Archlinux :
sudo pacman -S git base-devel openocd screen arm-none-eabi-gcc arm-none-eabi-gdb arm-none-eabi-newlib
- Ubuntu/Debian :
sudo apt-get install git build-essential openocd screen gcc-arm-none-eabi gdb-arm-none-eabi libnewlib-arm-none-eabi
- Download StellarisWare, the TI library.
- Uncompress the file, compile StellarisWare, and move it to
/usr/local/lib
.
tar vfx StellarisWare.tar.bz2
cd StellarisWare
make
cd ..
sudo mv StellarisWare /usr/local/lib
rm StellarisWare.tar.bz2
- To avoid needing root access to communicate with the lm4f, you will need to copy the lm4f rule to the udev directory.
wget https://raw.githubusercontent.com/ut-ras/Rasware/master/RASLib/51-lm4f.rules
sudo mv 51-lm4f.rules /etc/udev/rules.d
- Trigger udev for the new rules to come into effect.
sudo udevadm control --reload
sudo udevadm trigger
- Plug in a Stellaris Launchpad. you should now see the file
/dev/lm4f
.
- Use git to clone Rasware, replacing "username" with your Git username in the URL. Make sure you've cloned Rasware already!
git clone https://github.com/username/Rasware.git
- Compile RASLib by using the make program.
cd Rasware/RASLib
make
- We have created an example project to demonstrate Rasware running on a Launchpad.
- Compile RASDemo.
cd Rasware/RASDemo
make
- To flash RASDemo to the board, we use make with different arguments.
make flash
- If a launchpad is plugged in, the special file
/dev/lm4f
should be available. You can use make to create a terminal over UART.
make uart
-
You should now be presented with the RASDemo menu. Feel free to mess around and look into RASDemo's source code to see how it is done. To exit press
C-a k y
, or control-A followed by a K followed by a Y. -
If you don't want to do all of the above steps each time, you can run everything with one command.
make run
- Before you start, you should configure git with both your username and email.
git config --global user.name "User Name"
git config --global user.email "[email protected]"
- Git will keep track of any changes to your directory. You can use the status command to show the state of git.
git status
- To track a file, you can use the add command.
git add filename
- You can now use the commit command to create a commit containing all of the modifications of the files you
git add
ed. It will open an editor for writing a commit message. If saved, the commit will be created.
git commit
- To move your local changes to the server, use the push command.
git push origin master