You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

43 lines
1006 B

  1. # $Header: $
  2. # This will make the test program for ARM.
  3. PROC=arm
  4. TYPE=none-linux-gnueabi
  5. LDSCRIPT=ldscript
  6. PATH:=/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/:$(PATH)
  7. CC=$(PROC)-$(TYPE)-gcc
  8. AS=$(PROC)-$(TYPE)-as
  9. AR=$(PROC)-$(TYPE)-ar
  10. LD=$(PROC)-$(TYPE)-ld
  11. NM=$(PROC)-$(TYPE)-nm
  12. OBJDUMP=$(PROC)-$(TYPE)-objdump
  13. CFLAGS= -g -c -mcpu=arm1136j-s
  14. all: test.elf
  15. # Make a little endian image:
  16. # In Eclipse, add the line :
  17. # source gdbinit
  18. # to : Run -> Debug... (menu) -> Commands (tab): Commands (listbox)
  19. # To start gdb from a window use : arm-elf-gdb --command=gdbinit
  20. test.elf: test.c Makefile ldscript crt0.S
  21. $(CC) $(CFLAGS) -o crt0.o crt0.S
  22. $(CC) $(CFLAGS) -o test.o test.c
  23. $(LD) -g -v -T$(LDSCRIPT) -o test.elf crt0.o test.o
  24. $(NM) test.elf
  25. dump:
  26. $(OBJDUMP) --all-headers test.elf
  27. dump_test:
  28. $(OBJDUMP) --disassemble test.elf
  29. dump_full:
  30. $(OBJDUMP) --full-contents test.elf
  31. clean:
  32. -/bin/rm -f *.o *~ test.elf