[f73cfe99] | 1 | ## |
---|
| 2 | # |
---|
| 3 | # @file |
---|
| 4 | # |
---|
| 5 | # @brief Makefile of LibBSP for the Altera Cyclone-V platform. |
---|
| 6 | # |
---|
| 7 | |
---|
| 8 | ACLOCAL_AMFLAGS = -I ../../../../aclocal |
---|
| 9 | |
---|
| 10 | include $(top_srcdir)/../../../../automake/compile.am |
---|
[f3ce8f41] | 11 | include $(top_srcdir)/../../bsp.am |
---|
[f73cfe99] | 12 | |
---|
[2afb22b] | 13 | dist_project_lib_DATA = startup/bsp_specs |
---|
[f73cfe99] | 14 | |
---|
| 15 | ############################################################################### |
---|
| 16 | # Header # |
---|
| 17 | ############################################################################### |
---|
| 18 | |
---|
| 19 | # Altera hwlib |
---|
| 20 | #The following Altera hwlib header files have been left out because so far |
---|
| 21 | #they are not required: |
---|
| 22 | #include_bsp_HEADERS += hwlib/include/alt_bridge_manager.h |
---|
| 23 | #include_bsp_HEADERS += hwlib/include/alt_fpga_manager.h |
---|
| 24 | #include_bsp_HEADERS += hwlib/include/alt_globaltmr.h |
---|
| 25 | #include_bsp_HEADERS += hwlib/include/alt_system_manager.h |
---|
| 26 | #include_bsp_HEADERS += hwlib/include/alt_timers.h |
---|
| 27 | #include_bsp_HEADERS += hwlib/include/alt_watchdog.h |
---|
| 28 | #The following Altera hwlib headers would be problematic with RTEMS: |
---|
| 29 | #include_bsp_HEADERS += hwlib/include/alt_interrupt.h |
---|
[1642d27e] | 30 | |
---|
| 31 | # Some of the headers from hwlib need the files from socal. Install them. |
---|
[f73cfe99] | 32 | ############################################################################### |
---|
| 33 | # Data # |
---|
| 34 | ############################################################################### |
---|
| 35 | |
---|
[ec32100] | 36 | start.$(OBJEXT): ../shared/start/start.S |
---|
| 37 | $(CPPASCOMPILE) -o $@ -c $< |
---|
[f73cfe99] | 38 | project_lib_DATA = start.$(OBJEXT) |
---|
| 39 | |
---|
[2afb22b] | 40 | project_lib_DATA += linkcmds |
---|
| 41 | dist_project_lib_DATA += startup/linkcmds.altcycv |
---|
| 42 | dist_project_lib_DATA += startup/linkcmds.altcycv_devkit |
---|
| 43 | dist_project_lib_DATA += startup/linkcmds.altcycv_devkit_smp |
---|
[f73cfe99] | 44 | |
---|
| 45 | ############################################################################### |
---|
| 46 | # LibBSP # |
---|
| 47 | ############################################################################### |
---|
| 48 | |
---|
[ec32100] | 49 | noinst_LIBRARIES = libbsp.a |
---|
[f73cfe99] | 50 | |
---|
| 51 | libbsp_a_SOURCES = |
---|
[2afb22b] | 52 | libbsp_a_CPPFLAGS = $(AM_CPPFLAGS) |
---|
[f73cfe99] | 53 | |
---|
| 54 | # for the Altera hwlib |
---|
[9907dde] | 55 | libbsp_a_CPPFLAGS += -I${srcdir}/hwlib/include |
---|
[f73cfe99] | 56 | libbsp_a_CPPFLAGS += -std=gnu99 |
---|
[ad010285] | 57 | CFLAGS += -Wno-missing-prototypes |
---|
[f73cfe99] | 58 | |
---|
| 59 | # hwlib from Altera |
---|
[76386c1] | 60 | libbsp_a_SOURCES += hwlib/src/hwmgr/alt_16550_uart.c |
---|
[f73cfe99] | 61 | libbsp_a_SOURCES += hwlib/src/hwmgr/alt_address_space.c |
---|
| 62 | libbsp_a_SOURCES += hwlib/src/hwmgr/alt_clock_manager.c |
---|
[76386c1] | 63 | libbsp_a_SOURCES += hwlib/src/hwmgr/alt_dma.c |
---|
| 64 | libbsp_a_SOURCES += hwlib/src/hwmgr/alt_dma_program.c |
---|
[f73cfe99] | 65 | libbsp_a_SOURCES += hwlib/src/hwmgr/alt_generalpurpose_io.c |
---|
[3f9cd87d] | 66 | libbsp_a_SOURCES += hwlib/src/hwmgr/alt_i2c.c |
---|
[76386c1] | 67 | libbsp_a_SOURCES += hwlib/src/hwmgr/alt_qspi.c |
---|
[f73cfe99] | 68 | libbsp_a_SOURCES += hwlib/src/hwmgr/alt_reset_manager.c |
---|
| 69 | #The following Altera hwlib source files have been left out because so far |
---|
| 70 | #they are not required: |
---|
| 71 | #libbsp_a_SOURCES += hwlib/src/hwmgr/alt_bridge_manager.c |
---|
| 72 | #libbsp_a_SOURCES += hwlib/src/hwmgr/alt_fpga_manager.c |
---|
| 73 | #libbsp_a_SOURCES += hwlib/src/hwmgr/alt_globaltmr.c |
---|
| 74 | #libbsp_a_SOURCES += hwlib/src/hwmgr/alt_system_manager.c |
---|
| 75 | #libbsp_a_SOURCES += hwlib/src/hwmgr/alt_timers.c |
---|
| 76 | #libbsp_a_SOURCES += hwlib/src/hwmgr/alt_watchdog.c |
---|
| 77 | # The following Altera hwlib source files would be problematic with RTEMS: |
---|
| 78 | #libbsp_a_SOURCES += hwlib/src/hwmgr/alt_interrupt.c |
---|
| 79 | |
---|
| 80 | |
---|
| 81 | # Shared |
---|
| 82 | libbsp_a_SOURCES += ../../shared/bootcard.c |
---|
[ca4895c] | 83 | libbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c |
---|
[f73cfe99] | 84 | libbsp_a_SOURCES += ../../shared/bsppredriverhook.c |
---|
| 85 | libbsp_a_SOURCES += ../../shared/cpucounterdiff.c |
---|
| 86 | libbsp_a_SOURCES += ../../shared/gnatinstallhandler.c |
---|
| 87 | libbsp_a_SOURCES += ../../shared/sbrk.c |
---|
| 88 | libbsp_a_SOURCES += ../../shared/timerstub.c |
---|
[217913b] | 89 | libbsp_a_SOURCES += ../../shared/src/bsp-fdt.c |
---|
[f73cfe99] | 90 | libbsp_a_SOURCES += ../../shared/src/stackalloc.c |
---|
| 91 | libbsp_a_SOURCES += ../shared/startup/bsp-start-memcpy.S |
---|
| 92 | libbsp_a_SOURCES += ../shared/arm-cp15-set-exception-handler.c |
---|
| 93 | libbsp_a_SOURCES += ../shared/arm-cp15-set-ttb-entries.c |
---|
| 94 | |
---|
| 95 | # Startup |
---|
[d62dfc7] | 96 | libbsp_a_SOURCES += startup/bspclean.c |
---|
[f0e5e17] | 97 | libbsp_a_SOURCES += startup/bspgetworkarea.c |
---|
[f73cfe99] | 98 | libbsp_a_SOURCES += startup/bspreset.c |
---|
| 99 | libbsp_a_SOURCES += startup/bspstart.c |
---|
[2a1d86c] | 100 | libbsp_a_SOURCES += startup/bspstarthooks.c |
---|
[7ab6046] | 101 | libbsp_a_SOURCES += startup/mmu-config.c |
---|
[2a1d86c] | 102 | if HAS_SMP |
---|
[50440c0] | 103 | libbsp_a_SOURCES += ../shared/arm-a9mpcore-smp.c |
---|
[2a1d86c] | 104 | libbsp_a_SOURCES += startup/bspsmp.c |
---|
| 105 | endif |
---|
[f73cfe99] | 106 | |
---|
| 107 | # IRQ |
---|
| 108 | libbsp_a_SOURCES += ../../shared/src/irq-default-handler.c |
---|
| 109 | libbsp_a_SOURCES += ../../shared/src/irq-generic.c |
---|
| 110 | libbsp_a_SOURCES += ../../shared/src/irq-info.c |
---|
| 111 | libbsp_a_SOURCES += ../../shared/src/irq-legacy.c |
---|
| 112 | libbsp_a_SOURCES += ../../shared/src/irq-server.c |
---|
| 113 | libbsp_a_SOURCES += ../../shared/src/irq-shell.c |
---|
| 114 | libbsp_a_SOURCES += ../shared/arm-gic-irq.c |
---|
| 115 | |
---|
| 116 | # Console |
---|
[6ec438e] | 117 | libbsp_a_SOURCES += ../../shared/console-termios-init.c |
---|
| 118 | libbsp_a_SOURCES += ../../shared/console-termios.c |
---|
[f73cfe99] | 119 | libbsp_a_SOURCES += console/console-config.c |
---|
| 120 | |
---|
| 121 | # Clock |
---|
| 122 | libbsp_a_SOURCES += ../../shared/clockdrv_shell.h |
---|
| 123 | libbsp_a_SOURCES += ../shared/arm-a9mpcore-clock-config.c |
---|
| 124 | |
---|
[3f9cd87d] | 125 | # I2C |
---|
| 126 | libbsp_a_SOURCES += i2c/i2cdrv.c |
---|
| 127 | libbsp_a_SOURCES += i2c/i2cdrv-config.c |
---|
[81329f9] | 128 | # RTC |
---|
| 129 | libbsp_a_SOURCES += ../../shared/tod.c |
---|
| 130 | libbsp_a_SOURCES += rtc/rtc.c |
---|
| 131 | |
---|
[f73cfe99] | 132 | # Cache |
---|
[4cf93658] | 133 | libbsp_a_SOURCES += ../../../../../../bsps/arm/shared/cache/cache-l2c-310.c |
---|
[f73cfe99] | 134 | |
---|
| 135 | ############################################################################### |
---|
| 136 | # Special Rules # |
---|
| 137 | ############################################################################### |
---|
| 138 | |
---|
| 139 | DISTCLEANFILES = include/bspopts.h |
---|
| 140 | |
---|
| 141 | include $(top_srcdir)/../../../../automake/local.am |
---|
[2afb22b] | 142 | include $(srcdir)/../../../../../../bsps/arm/altera-cyclone-v/headers.am |
---|