I managed to get the StellarisWare libraries and examples working without Sourcery Codebench. Based on these two articles:
The complete StellarisWare suite compiles without errors, and the examples I tried (including usb_dev_serial and usb_dev_mouse) work correctly. This is an improvement over summon-arm-toolchain, which compiled non-functional USB examples.
Instructions for Ubuntu 12.10:
-
# Install toolchain sudo aptitude install gcc-arm-linux-gnueabi # Download and compile newlib (had trouble with the toolchain's libc and libm) wget ftp://sources.redhat.com/pub/newlib/newlib-1.18.0.tar.gz tar xzf newlib-1.18.0.tar.gz cd newlib-1.18.0/ ./configure --target arm-linux-gnueabi --disable-newlib-supplied-syscalls make
This makes the files
libc.a
andlibm.a
in the subdirectoryarm-linux-gnueabi/newlib
- Unzip the StellarisWare files, and in the root directory edit
makedefs
. Search for the following settings and change them, replacingsomething
with the directory where you unzipped newlibPREFIX=arm-linux-gnueabi LIBC=/something/newlib-1.18.0/arm-linux-gnueabi/newlib/libc.a LIBM=/something/newlib-1.18.0/arm-linux-gnueabi/newlib/libm.a
Also change
CFLAGS
, adding the line with-fno-stack-protector
, so it looks like this:CFLAGS=-mthumb \ ${CPU} \ ${FPU} \ -Os \ -ffunction-sections \ -fdata-sections \ -MD \ -std=c99 \ -Wall \ -pedantic \ -DPART_${PART} \ -fno-stack-protector \ -c
- To compile everything, run
make clean
andmake