summaryrefslogtreecommitdiffstats
path: root/Bachelor/Mikroprozessorsysteme2/mi2/Termin2/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Bachelor/Mikroprozessorsysteme2/mi2/Termin2/makefile')
-rw-r--r--Bachelor/Mikroprozessorsysteme2/mi2/Termin2/makefile51
1 files changed, 51 insertions, 0 deletions
diff --git a/Bachelor/Mikroprozessorsysteme2/mi2/Termin2/makefile b/Bachelor/Mikroprozessorsysteme2/mi2/Termin2/makefile
new file mode 100644
index 0000000..f44a2e7
--- /dev/null
+++ b/Bachelor/Mikroprozessorsysteme2/mi2/Termin2/makefile
@@ -0,0 +1,51 @@
+FILE = Termin2Aufgabe1
+Opti = 0
+all:
+
+# Übersetzen der Quelldatei
+ arm-elf-gcc -c -g -O$(Opti) $(FILE).c -I ../h
+
+# Erzeugen der Assemblerdatei aus der Quelldatei
+ arm-elf-gcc -S -o$(Opti) $(FILE).c -I ../h
+
+# Erzeugen der benötitgen Objektdateien
+ arm-elf-gcc -c -g -O$(Opti) ../boot/swi.S -o swi.o -I ../h
+ arm-elf-gcc -c -g -O$(Opti) ../boot/boot_ice.S -o boot_ice.o -I ../h
+ arm-elf-gcc -c -g -O$(Opti) ../boot/boot_flash.S -o boot_flash.o -I ../h
+# arm-elf-gcc -c -g -O$(Opti) seriell.S -I ../h
+# arm-elf-gcc -c -g -O$(Opti) ser_io.S -I ../h
+
+# Binden für die RAM-Version
+# arm-elf-ld -Ttext 0x02000000 -O$(Opti) boot.o swi.o $(FILE).o -o $(FILE).elf /usr/gnutools/lib/gcc-lib/arm-elf/3.3.2/libgcc.a
+ arm-elf-ld -Ttext 0x02000000 -O$(Opti) boot_ice.o swi.o $(FILE).o -o $(FILE).elf
+
+# Linkerskripte noch nicht getestet
+# arm-elf-ld -T ldscript.ram boot.o swi.o seriell.o ser_io.o swi.o $(FILE).o -o $(FILE).elf /gnutools/lib/gcc-lib/arm-elf/3.2.2/libgcc.a
+
+# Binden für die FLASH-Version
+# arm-elf-ld -Ttext 0x1000000 boot.o swi.o $(FILE).o -o $(FILE).out /usr/gnutools/lib/gcc-lib/arm-elf/3.3.2/libgcc.a
+ arm-elf-ld -Ttext 0x1000000 boot_flash.o swi.o $(FILE).o -o $(FILE).out
+
+# Linkerskripte noch nicht getestet
+# arm-elf-ld -T ldscript.rom boot.o seriell.o ser_io.o swi.o $(FILE).o -o $(FILE).out /gnutools/lib/gcc-lib/arm-elf/3.2.2/libgcc.a
+
+# -I --input-target <bfdname> Assume input file is in format <bfdname>
+# -O --output-target <bfdname> Create an output file in format <bfdname>
+# -S --strip-all Remove all symbol and relocation information
+# -x --discard-all Remove all non-global symbols
+# -N --strip-symbol <name> Do not copy symbol <name>
+# -O --output-target <bfdname> Create an output file in format <bfdname>
+# -g --strip-debug Remove all debugging symbols
+ arm-elf-objcopy -I elf32-littlearm -O binary -x -S -N -g $(FILE).out $(FILE).rom
+# programm.rom nach /tftpboot/downlaod.bin kopieren <cp name.rom /tftpboot/download.bin>
+# Jumper E7 muß auf STD stecken
+# Mit <telnet 141.100.xxx.xxx> mit dem BDI2000 verbinden.
+# mit <erase 0x1100000> flash-Bereich löschen
+# mit <prog 0x1100000 download.bin bin> Programm ins flash schreiben.
+#
+#
+clean:
+ rm *.o
+ rm *.s
+ rm *.elf
+ rm *.rom \ No newline at end of file