diff options
author | Perry Hung <iperry@alum.mit.edu> | 2010-03-22 23:37:50 -0400 |
---|---|---|
committer | Perry Hung <iperry@alum.mit.edu> | 2010-03-22 23:37:50 -0400 |
commit | 96ce013f875c918a70644ad23a03f0450a7f6848 (patch) | |
tree | c6bbaf93bbda4a4b7fb6bbf5805a6c4e13081e25 | |
parent | 76e746273c8fb0dc8952a04de87ff23c14916466 (diff) | |
parent | b9dc0877500de4164f99acc7b269fbddfe5502d3 (diff) | |
download | librambutan-96ce013f875c918a70644ad23a03f0450a7f6848.tar.gz librambutan-96ce013f875c918a70644ad23a03f0450a7f6848.zip |
Merge branch 'master' of git@github.com:leaflabs/maple-library
-rw-r--r-- | Makefile | 11 | ||||
-rw-r--r-- | README | 24 | ||||
-rw-r--r-- | src/lib/gpio.c | 1 |
3 files changed, 34 insertions, 2 deletions
@@ -15,8 +15,15 @@ AS := arm-none-eabi-as CP := arm-none-eabi-objcopy OD := arm-none-eabi-objdump -#todo: use an OS switch here to grab a different bin -DFU = ../dfu-util/bin/linux/dfu-util +# Platform detection +ARCH = $(shell uname -m) +OS = $(shell uname) + +ifeq ($(OS),Linux) + DFU = dfu-util +else + DFU = ../dfu-util/bin/linux/dfu-util +endif BUILD_PATH = build LIB_PATH = lib @@ -0,0 +1,24 @@ + +Instructions to Compile for ARM Targets +---------------------------------------- +The Codesourcery g++ compiler for arm platforms is required. It is based on gcc +(they push changes into gcc a couple times a year), get the latest EABI version +from: + + http://www.codesourcery.com/sgpp/lite/arm + +Note: grab the linux binaries for targeting the EABI platform; there are also +linux binaries for targeting the linux platform). + +I unzip the archive ("TAR") version into a place like +~/bin/arm-gcc-codesourcery and then add the bin/ directory within that to my +$PATH in ~/.profile, then check that arm-none-eabi-gcc and others are in my +path. + +You will also need to have dfu-util installed (on Linux) or compiled and placed +in a folder "dfu-util/" at the same level as the maple-library folder (macosx +and windows). + +Write your program using src/main.cpp as the entry point. Then just 'make' and follow the directions! + + diff --git a/src/lib/gpio.c b/src/lib/gpio.c index f03c4fa..facb514 100644 --- a/src/lib/gpio.c +++ b/src/lib/gpio.c @@ -32,6 +32,7 @@ void gpio_init(void) { RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB | RCC_APB2Periph_GPIOC | + RCC_APB2Periph_GPIOD | RCC_APB2Periph_AFIO, ENABLE); } |