summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2009-07-13 19:17:41 +0000
committerDave Chapman <dave@dchapman.com>2009-07-13 19:17:41 +0000
commitb3f33002919cd8295b0579f655054855aa7e9298 (patch)
tree210c154b3abc4bc8f56f678fd44b67a59daacf0d
parente8c588903c5d1128f7cb742d3467b93c415a254d (diff)
downloadrockbox-b3f33002919cd8295b0579f655054855aa7e9298.tar.gz
rockbox-b3f33002919cd8295b0579f655054855aa7e9298.tar.bz2
rockbox-b3f33002919cd8295b0579f655054855aa7e9298.zip
Add some Makefile rules to demonstrate assembling, linking, converting to binary file and finally converting to a notes .htm file.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21845 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--utils/ipod/bin2note/Makefile14
-rw-r--r--utils/ipod/bin2note/README5
2 files changed, 18 insertions, 1 deletions
diff --git a/utils/ipod/bin2note/Makefile b/utils/ipod/bin2note/Makefile
index b5fd564d0a..985ed00da7 100644
--- a/utils/ipod/bin2note/Makefile
+++ b/utils/ipod/bin2note/Makefile
@@ -12,5 +12,17 @@ all: bin2note
bin2note: bin2note.c
gcc -W -Wall -o bin2note bin2note.c
+test.htm: bin2note test.bin
+ ./bin2note test.bin test.htm
+
+test.o: test.S
+ arm-elf-as -o $@ $<
+
+test.elf: test.o
+ arm-elf-ld -e 0 -Ttext=0 -o $@ $<
+
+test.bin: test.elf
+ arm-elf-objcopy -O binary $< $@
+
clean:
- rm -f bin2note
+ rm -f bin2note test.o test.elf test.bin test.htm
diff --git a/utils/ipod/bin2note/README b/utils/ipod/bin2note/README
index 40f285ccd5..0dbc9e465d 100644
--- a/utils/ipod/bin2note/README
+++ b/utils/ipod/bin2note/README
@@ -10,3 +10,8 @@ It is used to turn a blob of ARM code into an iPod notes file. This
ARM code will then be executed on the iPod.
It is known to work on the 2nd generation Nano.
+
+
+The Makefile contains rules for compiling an ARM assembler file
+"test.S" into a notes file "test.htm". Just put test.S in this
+directory and type "make test.htm".