[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 | |
---|
[d584269] | 49 | project_lib_LIBRARIES = librtemsbsp.a |
---|
[f73cfe99] | 50 | |
---|
[d584269] | 51 | librtemsbsp_a_SOURCES = |
---|
| 52 | librtemsbsp_a_CPPFLAGS = $(AM_CPPFLAGS) |
---|
[f73cfe99] | 53 | |
---|
| 54 | # for the Altera hwlib |
---|
[d584269] | 55 | librtemsbsp_a_CPPFLAGS += -I${srcdir}/hwlib/include |
---|
| 56 | librtemsbsp_a_CPPFLAGS += -std=gnu99 |
---|
[ad010285] | 57 | CFLAGS += -Wno-missing-prototypes |
---|
[f73cfe99] | 58 | |
---|
| 59 | # hwlib from Altera |
---|
[d584269] | 60 | librtemsbsp_a_SOURCES += hwlib/src/hwmgr/alt_16550_uart.c |
---|
| 61 | librtemsbsp_a_SOURCES += hwlib/src/hwmgr/alt_address_space.c |
---|
| 62 | librtemsbsp_a_SOURCES += hwlib/src/hwmgr/alt_clock_manager.c |
---|
| 63 | librtemsbsp_a_SOURCES += hwlib/src/hwmgr/alt_dma.c |
---|
| 64 | librtemsbsp_a_SOURCES += hwlib/src/hwmgr/alt_dma_program.c |
---|
| 65 | librtemsbsp_a_SOURCES += hwlib/src/hwmgr/alt_generalpurpose_io.c |
---|
| 66 | librtemsbsp_a_SOURCES += hwlib/src/hwmgr/alt_i2c.c |
---|
| 67 | librtemsbsp_a_SOURCES += hwlib/src/hwmgr/alt_qspi.c |
---|
| 68 | librtemsbsp_a_SOURCES += hwlib/src/hwmgr/alt_reset_manager.c |
---|
[f73cfe99] | 69 | #The following Altera hwlib source files have been left out because so far |
---|
| 70 | #they are not required: |
---|
[d584269] | 71 | #librtemsbsp_a_SOURCES += hwlib/src/hwmgr/alt_bridge_manager.c |
---|
| 72 | #librtemsbsp_a_SOURCES += hwlib/src/hwmgr/alt_fpga_manager.c |
---|
| 73 | #librtemsbsp_a_SOURCES += hwlib/src/hwmgr/alt_globaltmr.c |
---|
| 74 | #librtemsbsp_a_SOURCES += hwlib/src/hwmgr/alt_system_manager.c |
---|
| 75 | #librtemsbsp_a_SOURCES += hwlib/src/hwmgr/alt_timers.c |
---|
| 76 | #librtemsbsp_a_SOURCES += hwlib/src/hwmgr/alt_watchdog.c |
---|
[f73cfe99] | 77 | # The following Altera hwlib source files would be problematic with RTEMS: |
---|
[d584269] | 78 | #librtemsbsp_a_SOURCES += hwlib/src/hwmgr/alt_interrupt.c |
---|
[f73cfe99] | 79 | |
---|
| 80 | |
---|
| 81 | # Shared |
---|
[d584269] | 82 | librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c |
---|
| 83 | librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c |
---|
| 84 | librtemsbsp_a_SOURCES += ../../shared/cpucounterdiff.c |
---|
| 85 | librtemsbsp_a_SOURCES += ../../shared/sbrk.c |
---|
| 86 | librtemsbsp_a_SOURCES += ../../shared/timerstub.c |
---|
| 87 | librtemsbsp_a_SOURCES += ../../shared/src/bsp-fdt.c |
---|
| 88 | librtemsbsp_a_SOURCES += ../../shared/src/stackalloc.c |
---|
| 89 | librtemsbsp_a_SOURCES += ../shared/startup/bsp-start-memcpy.S |
---|
| 90 | librtemsbsp_a_SOURCES += ../shared/arm-cp15-set-exception-handler.c |
---|
| 91 | librtemsbsp_a_SOURCES += ../shared/arm-cp15-set-ttb-entries.c |
---|
[f73cfe99] | 92 | |
---|
| 93 | # Startup |
---|
[d584269] | 94 | librtemsbsp_a_SOURCES += startup/bspclean.c |
---|
| 95 | librtemsbsp_a_SOURCES += startup/bspgetworkarea.c |
---|
| 96 | librtemsbsp_a_SOURCES += startup/bspreset.c |
---|
| 97 | librtemsbsp_a_SOURCES += startup/bspstart.c |
---|
| 98 | librtemsbsp_a_SOURCES += startup/bspstarthooks.c |
---|
| 99 | librtemsbsp_a_SOURCES += startup/mmu-config.c |
---|
[2a1d86c] | 100 | if HAS_SMP |
---|
[d584269] | 101 | librtemsbsp_a_SOURCES += ../shared/arm-a9mpcore-smp.c |
---|
| 102 | librtemsbsp_a_SOURCES += startup/bspsmp.c |
---|
[2a1d86c] | 103 | endif |
---|
[f73cfe99] | 104 | |
---|
| 105 | # IRQ |
---|
[9b7c456] | 106 | librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/irq/irq-default-handler.c |
---|
[d584269] | 107 | librtemsbsp_a_SOURCES += ../shared/arm-gic-irq.c |
---|
[f73cfe99] | 108 | |
---|
| 109 | # Console |
---|
[d584269] | 110 | librtemsbsp_a_SOURCES += ../../shared/console-termios-init.c |
---|
| 111 | librtemsbsp_a_SOURCES += ../../shared/console-termios.c |
---|
| 112 | librtemsbsp_a_SOURCES += console/console-config.c |
---|
[f73cfe99] | 113 | |
---|
| 114 | # Clock |
---|
[d584269] | 115 | librtemsbsp_a_SOURCES += ../shared/arm-a9mpcore-clock-config.c |
---|
[f73cfe99] | 116 | |
---|
[3f9cd87d] | 117 | # I2C |
---|
[d584269] | 118 | librtemsbsp_a_SOURCES += i2c/i2cdrv.c |
---|
| 119 | librtemsbsp_a_SOURCES += i2c/i2cdrv-config.c |
---|
[81329f9] | 120 | # RTC |
---|
[90013f59] | 121 | librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/rtc/rtc-support.c |
---|
[d584269] | 122 | librtemsbsp_a_SOURCES += rtc/rtc.c |
---|
[81329f9] | 123 | |
---|
[f73cfe99] | 124 | # Cache |
---|
[d584269] | 125 | librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/cache/cache-l2c-310.c |
---|
[f73cfe99] | 126 | |
---|
| 127 | ############################################################################### |
---|
| 128 | # Special Rules # |
---|
| 129 | ############################################################################### |
---|
| 130 | |
---|
| 131 | |
---|
| 132 | include $(top_srcdir)/../../../../automake/local.am |
---|
[9b7c456] | 133 | include $(srcdir)/../../../../../../bsps/shared/irq-sources.am |
---|
[ce0ea6f] | 134 | include $(srcdir)/../../../../../../bsps/shared/shared-sources.am |
---|
[2afb22b] | 135 | include $(srcdir)/../../../../../../bsps/arm/altera-cyclone-v/headers.am |
---|