[1a98a0d] | 1 | # |
---|
| 2 | # Config file for a generic PowerPC 405 based card |
---|
| 3 | # |
---|
| 4 | # $Id$ |
---|
| 5 | # |
---|
| 6 | # this is derived from: |
---|
| 7 | # |
---|
| 8 | # Config file for a PowerPC 403 based helas403 card |
---|
| 9 | # |
---|
| 10 | # Id: helas403.cfg,v 1.8 2000/07/13 15:05:38 joel Exp |
---|
| 11 | # |
---|
| 12 | # |
---|
| 13 | |
---|
| 14 | include $(RTEMS_ROOT)/make/custom/default.cfg |
---|
| 15 | |
---|
| 16 | RTEMS_CPU=powerpc |
---|
| 17 | RTEMS_CPU_MODEL=ppc405 |
---|
| 18 | |
---|
| 19 | # This is the actual bsp directory used during the build process. |
---|
| 20 | RTEMS_BSP_FAMILY=gen405 |
---|
| 21 | |
---|
| 22 | # This section makes the target dependent options file. |
---|
| 23 | |
---|
| 24 | # PPC_VECTOR_FILE_BASE (PowerPC) |
---|
| 25 | # This defines the base address of the exception table. |
---|
| 26 | # NOTE: Vectors are actually at 0xFFF00000 but file starts at offset 0x0100 |
---|
| 27 | # |
---|
| 28 | # PPC_USE_SPRG (RTEMS PowerPC port) |
---|
| 29 | # If defined, then the PowerPC specific code in RTEMS will use some |
---|
| 30 | # of the special purpose registers to slightly optimize interrupt |
---|
| 31 | # response time. The use of these registers can conflict with |
---|
| 32 | # other tools like debuggers. |
---|
| 33 | |
---|
| 34 | define make-target-options |
---|
| 35 | @echo "#define PPC_VECTOR_FILE_BASE 0x0100" >>$@ |
---|
| 36 | @echo "#define PPC_USE_SPRG 1" >>$@ |
---|
| 37 | endef |
---|
| 38 | |
---|
| 39 | # This contains the compiler options necessary to select the CPU model |
---|
| 40 | # and (hopefully) optimize for it. |
---|
| 41 | # |
---|
| 42 | CPU_CFLAGS = -mcpu=403 -D__powerpc__ |
---|
| 43 | |
---|
| 44 | # optimize flag: typically -0, could use -O4 or -fast |
---|
| 45 | # -O4 is ok for RTEMS |
---|
| 46 | # NOTE: some level of -O may be actually required by inline assembler |
---|
| 47 | CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions -g |
---|
| 48 | |
---|
| 49 | |
---|
| 50 | # No start file |
---|
| 51 | START_BASE= |
---|
| 52 | |
---|
| 53 | # The following are definitions of make-exe which will work using ld as |
---|
| 54 | # is currently required. It is expected that as of gcc 2.8, the end user |
---|
| 55 | # will be able to override parts of the compilers specs and link using gcc. |
---|
| 56 | |
---|
| 57 | ifeq ($(RTEMS_USE_GCC272),yes) |
---|
| 58 | # The --defsym arguments define arguments which are required by the linkcmds |
---|
| 59 | # file which is designed for gcc 2.8 |
---|
| 60 | define make-exe |
---|
| 61 | $(LD) $(XLDFLAGS) -T $(LINKCMDS) \ |
---|
| 62 | --defsym __fini=0 --defsym __init=0 \ |
---|
| 63 | -o $@ -u atexit -u __vectors -u download_entry \ |
---|
| 64 | $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group |
---|
| 65 | $(NM) -g -n $@ > $(basename $@).num |
---|
| 66 | $(SIZE) $@ |
---|
| 67 | endef |
---|
| 68 | else |
---|
| 69 | define make-exe |
---|
| 70 | $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).exe $(LINK_OBJS) $(LINK_LIBS) |
---|
| 71 | $(OBJCOPY) -O srec --srec-len 120 $(basename $@).exe $(basename $@).srec |
---|
| 72 | $(NM) -g -n $@ > $(basename $@).num |
---|
| 73 | $(SIZE) $@ |
---|
| 74 | endef |
---|
| 75 | endif |
---|
| 76 | |
---|
| 77 | define make-cxx-exe |
---|
| 78 | $(LINK.c) $(AM_CFLAGS) $(AM_CXXFLAGS) $(AM_LDFLAGS) -o $(basename $@).exe $(LINK_OBJS) $(LINK_LIBS) |
---|
| 79 | $(OBJCOPY) -O srec --srec-len 120 $(basename $@).exe $(basename $@).srec |
---|
| 80 | $(NM) -g -n $@ > $(basename $@).num |
---|
| 81 | $(SIZE) $@ |
---|
| 82 | endef |
---|
| 83 | |
---|
| 84 | # Miscellaneous additions go here |
---|
| 85 | |
---|