Examples for Eridani
You may download the examples here. If you don't use git just click the zip button to get the examples in zip form.
In the extras directory are items that are useful but not programs for Eridani.
These examples require the StellarisWare libraries to compile and are designed to be use with one of our suggested free toolchains.
You must configure toolchainsettings in the example folder for the toolchain you are using. Specifically you must change the path for the StellarisWare directory, and the COMPORT, SERIALPROG, and WINDOWS variables to match your system setup. You may also need to change openocd.cfg to match your JTAG if using a JTAG toolchain.
At present the USB examples that are ported from the StellarisWare board examples require a POSIX environment to compile (Cygwin or Linux). Future releases may remove this limitation. Under Cygwin the USB examples currently require make clean followed by make or make flash, failing to do this will result in a path error.
root directory
In the root of the examples directory there are 4 files.
readme contains information on the contents of the archive.
toolchainsettings contains key variables needed for the makefile toolchain as described in the toolchain guides.
openocd.cfg is a standard openocd.cfg file that you can edit fit your JTAG.
updateOpenOCDcfg.sh is a shell script to copy openocd.cfg to all of the project sub-directories.
blinky
The classic proof that everything is working: turn an LED on and off. This code uses only a header file and uses direct hardware access to achieve operation, as such it does not need the rest of the StellarisWare library only the register definition header file in the /inc directory inside this project.
basic
The basic starting point for most general purpose applications: serial communication (UART + SPI), clock setup and GPIOs. This uses Chan's portable xprintf in place of the StellarisWare printf. This program shows you how to write a simple program with the StellarisWare library. It uses the PLL to run the CPU at full speed. If you do not desire to use Chan's code there is also a printf like function in StellarisWare, the code for this is in the utilities directory.
usb_dev_mouse
An example of using the board as a USB mouse class device. It moves the mouse in a small square when active. You must attach the VBUS jumper for this code to work.
This example was ported from LM3S9B92 development board directory in StellarisWare to work with LM3S3651.
usb_dev_serial
An example using the board as a serial port. Requires only an INI file to install in windows (available from Luminary/Ti). This example forwards virtual COM traffic to UART0 on the board. With this as a base you do not need to use chips like FT232 for your project. You must attach the VBUS jumper for this code to work.
This example was ported from LM3S9B92 development board directory in StellarisWare to work with LM3S3651.
usb_host_msc
An example hosting USB mass storage device (USB flash key, hard drive, etc.) This is based on Chan's FatFS system and the MSC class in StellarisWare. You must have jumpers attached to the USB Host Ground, ID, VBUS, ENABLE and FAULT pins on the jumper block for this code to function.
This example was ported from LM3S9B92 development board directory in StellarisWare to work with LM3S3651.
Extras
The following extras are included in the current example release:
binmerge
This is a simple utility for splicing two .bin files together. The intention is that it splice a bootloader and a binary for that bootloader together. The offset is hardcoded in at 0x1000 which is the offset for the current Eridani bootloader. The usage is ./merge.out bootloader.bin programfile.bin output.bin the result is bootloader.bin then 0s to 0x1000 then programfile.bin as a single file.
The source for the program is included as is a Linux binary of it. This utility allows you to deploy a bootload+program with a single JTAG flash cycle.
bootloader
Included is the current binary bootloader: bl.bin
This bootloader checks if PB4 is low at reset. PB4 has a internal weak pull up on it. If it is low via the user switch or other method, the bootloader waits for commands on UART0.
To use the bootloader it is suggested you use a jumper from USR_SW to B4, hold the USR_SW while pressing reset then release reset followed by the USR_SW.
The bootloader is automatically entered if a interrupt vector table is not found at 0x1000. The bootloader does not allow itself to be overwritten via itself.
linkers
There are two linkers: bootlink.ld and link.ld
These are very simple linkers the only difference is the starting address in flash for the memory map. bootlink has an offset of 0x1000 to work with the bl.bin bootloader.
makefile
Included is an extra copy of the simplest makefile used with our toolchains for reference. The makefile is documented elsewhere.
openocd
safe_openocd.cfg is the standard configuration script used in all of the directories in the example archive.
If you wish to use a different JTAG change the interface line.
The prefix safe_ is added to prevent updateOpenOCDcfg.sh from updating this file.
perl scripts
Included is an extra copy of the do_flash.pl script that is used to flash via JTAG using the make flash command
Usage is ./do_flash.pl somebinary.bin
This effectively runs the following commands:
telnet localhost 4444 run halt flash write_image erase somebinary.bin reset run exit
sflash
This is just a binary of SW01242-680 compiled on Ubuntu 10.04 i386, this program is a serial flash loader for Stellaris microcontrollers
Project Examples using Eridani
These project examples require more than just the Eridani board to function.
- BlueZigbee - Relay remote control example using Android phone, Bluetooth and Zigbee API mode mesh network
