From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001 From: Sven Eisenhauer Date: Fri, 10 Nov 2023 15:11:48 +0100 Subject: add new repo --- .../Mikroprozessorsysteme2/mi2/Termin3/makefile | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 Bachelor/Mikroprozessorsysteme2/mi2/Termin3/makefile (limited to 'Bachelor/Mikroprozessorsysteme2/mi2/Termin3/makefile') diff --git a/Bachelor/Mikroprozessorsysteme2/mi2/Termin3/makefile b/Bachelor/Mikroprozessorsysteme2/mi2/Termin3/makefile new file mode 100644 index 0000000..80f70dd --- /dev/null +++ b/Bachelor/Mikroprozessorsysteme2/mi2/Termin3/makefile @@ -0,0 +1,51 @@ +FILE = Termin3Aufgabe1 +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 Assume input file is in format +# -O --output-target Create an output file in format +# -S --strip-all Remove all symbol and relocation information +# -x --discard-all Remove all non-global symbols +# -N --strip-symbol Do not copy symbol +# -O --output-target Create an output file in format +# -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 +# Jumper E7 muß auf STD stecken +# Mit mit dem BDI2000 verbinden. +# mit flash-Bereich löschen +# mit Programm ins flash schreiben. +# +# +clean: + rm *.o + rm *.s + rm *.elf + rm *.rom \ No newline at end of file -- cgit v1.2.3