Post by senatorpenguin on Nov 16, 2010 22:23:20 GMT -5
Here are the things you need to get your Evalbot up and running without having to rely on trial versions of expensive IDEs:
1. The Stellaris Firmware Development Kit. www.luminarymicro.com/products/software_updates.html
The "EK-LM3S9B92 Firmware Development Package" is what you need to download and extract somewhere.
This has all of the examples, drivers, libraries, and utilities you need except for:
2. LMFlash.exe, to program the evalbot without using the bootloader. This is the only part of the process that requires Windows as far as I'm aware (let me know if you find a way around this). It is on the same page as the sdk, but under the Utilities tab.
3. A working toolchain for the ARM processor. The instructions here worked well for me (I'm on a Core 2 Duo MBP):
claymore.engineer.gvsu.edu/egr326/LM3S6965
Under "Tips & Tricks" are also invaluable instructions for getting Mac drivers for the ICDI interface, though I didn't need to do the kextload-ing (more than once) or the rebooting.
4. The utility to send any program updates to the board over the USB-serial port, sflash. Its precompiled in the tools/bin directory of the sdk for windows, otherwise just compile it with make (it will name it and all tools .exe regardless of what system you are on).
Once you have these, you should be able to build all the examples in the SDK simply by navigating to the top level of the SDK and running 'make' (provided the cross-compiler is in your path environment variable)
The .bin files that are created in the gcc directory of each project directory can be programmed to the Evalbot using LMflash.exe, but since I prefer development in OS X, the bootloader is preferable. Adding this snippet of code to the top of any main.c file (or blinky.c in my case) will cause the execution to jump to the bootloader (conveniently located in the ROM on the chip) if Switch 1 is pressed when the chip is reset.
This bl_check() function should be called immediately after configuring the clock in main().
Attached is the project directory of the blinky example with the bootloader code and a cleaned up Makefile. All that needs to be adjusted is the location of the StellarisWare SDK in the ROOT variable of the Makefile.
Once this has been programmed into the Evalbot with LMflash.exe, the sflash program on any system can be used to send updates if you first hold down switch 1 while pressing the reset button.
1. The Stellaris Firmware Development Kit. www.luminarymicro.com/products/software_updates.html
The "EK-LM3S9B92 Firmware Development Package" is what you need to download and extract somewhere.
This has all of the examples, drivers, libraries, and utilities you need except for:
2. LMFlash.exe, to program the evalbot without using the bootloader. This is the only part of the process that requires Windows as far as I'm aware (let me know if you find a way around this). It is on the same page as the sdk, but under the Utilities tab.
3. A working toolchain for the ARM processor. The instructions here worked well for me (I'm on a Core 2 Duo MBP):
claymore.engineer.gvsu.edu/egr326/LM3S6965
Under "Tips & Tricks" are also invaluable instructions for getting Mac drivers for the ICDI interface, though I didn't need to do the kextload-ing (more than once) or the rebooting.
4. The utility to send any program updates to the board over the USB-serial port, sflash. Its precompiled in the tools/bin directory of the sdk for windows, otherwise just compile it with make (it will name it and all tools .exe regardless of what system you are on).
Once you have these, you should be able to build all the examples in the SDK simply by navigating to the top level of the SDK and running 'make' (provided the cross-compiler is in your path environment variable)
The .bin files that are created in the gcc directory of each project directory can be programmed to the Evalbot using LMflash.exe, but since I prefer development in OS X, the bootloader is preferable. Adding this snippet of code to the top of any main.c file (or blinky.c in my case) will cause the execution to jump to the bootloader (conveniently located in the ROM on the chip) if Switch 1 is pressed when the chip is reset.
#include "inc/hw_types.h"
#include "inc/hw_memmap.h"
#include "driverlib/debug.h"
#include "driverlib/rom.h"
#include "driverlib/gpio.h"
#include "driverlib/sysctl.h"
#include "utils/uartstdio.h"
//Check for a firmware update
//Hold down switch 1 while resetting to trigger an update
void bl_check() {
//Configure switch 1 as an input w/pullup (input normally high)
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD);
ROM_GPIOPinTypeGPIOInput(GPIO_PORTD_BASE, GPIO_PIN_6);
ROM_GPIOPadConfigSet(GPIO_PORTD_BASE, GPIO_PIN_6, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU);
//update the firmware if the button is pressed
if (ROM_GPIOPinRead(GPIO_PORTD_BASE, GPIO_PIN_6) == 0) {
//Configure UART0 to receive flash update
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
ROM_GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);
UARTStdioInit(0);
//jump to the bootloader in ROM
//This never returns
ROM_UpdateUART();
}
}
This bl_check() function should be called immediately after configuring the clock in main().
Attached is the project directory of the blinky example with the bootloader code and a cleaned up Makefile. All that needs to be adjusted is the location of the StellarisWare SDK in the ROOT variable of the Makefile.
Once this has been programmed into the Evalbot with LMflash.exe, the sflash program on any system can be used to send updates if you first hold down switch 1 while pressing the reset button.