aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2010-03-16 20:28:55 -0400
committerbnewbold <bnewbold@robocracy.org>2010-03-16 20:28:55 -0400
commitf045e25ac5290c97e89a1ebf25512ac642d25f17 (patch)
tree233b0d869ca33d4032bf618ed020de0081a06d7e
parent8be3c78e0ad7a36ce6beaffcf3ec755861f23ca0 (diff)
downloadlibrambutan-f045e25ac5290c97e89a1ebf25512ac642d25f17.tar.gz
librambutan-f045e25ac5290c97e89a1ebf25512ac642d25f17.zip
building instructions and added OS forking to Makefile
-rw-r--r--Makefile11
-rw-r--r--README24
2 files changed, 33 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 4d3f54c..17b5730 100644
--- a/Makefile
+++ b/Makefile
@@ -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
diff --git a/README b/README
new file mode 100644
index 0000000..9723e93
--- /dev/null
+++ b/README
@@ -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!
+
+