[PATCH 01/15] Add build support files for HiFive1 BSP
Gedare Bloom
gedare at rtems.org
Thu Aug 17 14:51:53 UTC 2017
Generally you should add the build system files after you add the
source files so that the rtems build isn't broken on this particular
commit. This is helpful for git-bisect. So please re-arrange your
commits so the build won't fail on any particular commit.
On Wed, Aug 16, 2017 at 11:12 AM, Denis Obrezkov
<denisobrezkov at gmail.com> wrote:
> ---
> c/src/lib/libbsp/riscv32/hifive1/Makefile.am | 104 ++++++++++++++++++++++++++
> c/src/lib/libbsp/riscv32/hifive1/bsp_specs | 13 ++++
> c/src/lib/libbsp/riscv32/hifive1/configure.ac | 39 ++++++++++
> 3 files changed, 156 insertions(+)
> create mode 100644 c/src/lib/libbsp/riscv32/hifive1/Makefile.am
> create mode 100644 c/src/lib/libbsp/riscv32/hifive1/bsp_specs
> create mode 100644 c/src/lib/libbsp/riscv32/hifive1/configure.ac
>
> diff --git a/c/src/lib/libbsp/riscv32/hifive1/Makefile.am b/c/src/lib/libbsp/riscv32/hifive1/Makefile.am
> new file mode 100644
> index 0000000..f8332d7
> --- /dev/null
> +++ b/c/src/lib/libbsp/riscv32/hifive1/Makefile.am
> @@ -0,0 +1,104 @@
> +##
> +#
> +# @brief Makefile of LibBSP for the RISCV HiFive1 board.
> +#
> +#
> +ACLOCAL_AMFLAGS = -I ../../../../aclocal
> +
> +include $(top_srcdir)/../../../../automake/compile.am
> +
> +include_bspdir = $(includedir)/bsp
> +include_libcpudir = $(includedir)/libcpu
> +
> +dist_project_lib_DATA = bsp_specs
> +
> +###############################################################################
> +# Header #
> +###############################################################################
> +
> +include_HEADERS = include/bsp.h
> +include_HEADERS += ../../shared/include/tm27.h
> +include_HEADERS += ../../shared/include/coverhd.h
> +
> +nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h
> +include_bsp_HEADERS = ../shared/include/linker-symbols.h
> +
> +include_bsp_HEADERS += ../../../libbsp/shared/include/mm.h
> +include_bsp_HEADERS += ../../shared/include/utility.h
> +include_bsp_HEADERS += ../../shared/include/irq-generic.h
> +include_bsp_HEADERS += ../../shared/include/irq-info.h
> +include_bsp_HEADERS += ../../shared/include/stackalloc.h
> +include_bsp_HEADERS += ../../shared/include/console-termios.h
> +include_bsp_HEADERS += ../../shared/include/console-polled.h
> +include_bsp_HEADERS += include/irq.h
> +include_bsp_HEADERS += include/prci.h
> +include_bsp_HEADERS += include/fe310.h
> +include_bsp_HEADERS += include/fe310-uart.h
> +include_bsp_HEADERS += include/fe310-gpio.h
> +
> +
> +nodist_include_HEADERS = include/bspopts.h
> +
> +###############################################################################
> +# Data #
> +###############################################################################
> +noinst_LIBRARIES = libbspstart.a
> +
> +libbspstart_a_SOURCES = start/start.S
> +
> +project_lib_DATA = start.$(OBJEXT)
> +# project_lib_DATA = start/start.$(OBJEXT)
> +
> +project_lib_DATA += startup/linkcmds
> +
> +###############################################################################
> +# LibBSP #
> +###############################################################################
> +
> +noinst_LIBRARIES += libbsp.a
> +
> +# Startup
> +libbsp_a_SOURCES = ../../shared/bspreset.c
> +libbsp_a_SOURCES += start/bspstart.c
> +
> +# Start
> +libbsp_a_SOURCES += start/prci.c
> +
> +# Shared
> +libbsp_a_SOURCES += ../../shared/bootcard.c
> +libbsp_a_SOURCES += ../../shared/bspclean.c
> +libbsp_a_SOURCES += ../../shared/bsppredriverhook.c
> +libbsp_a_SOURCES += ../../shared/gnatinstallhandler.c
> +libbsp_a_SOURCES += ../../shared/sbrk.c
> +libbsp_a_SOURCES += ../../shared/src/stackalloc.c
> +libbsp_a_SOURCES += ../../shared/bspgetworkarea.c
> +
> +# clock
> +libbsp_a_SOURCES += clock/clock.c
> +
> +# Timer
> +libbsp_a_SOURCES += timer/timer.c
> +
> +# console
> +libbsp_a_SOURCES += ../../shared/console-termios.c
> +libbsp_a_SOURCES += ../../shared/console-polled.c
> +libbsp_a_SOURCES += console/fe310-uart.c
> +
> +# IRQ
> +libbsp_a_SOURCES += ../../shared/src/irq-default-handler.c
> +libbsp_a_SOURCES += ../../shared/src/irq-generic.c
> +libbsp_a_SOURCES += ../../shared/src/irq-info.c
> +libbsp_a_SOURCES += irq/irq.c
> +
> +# Cache
> +libbsp_a_SOURCES += ../../../libcpu/shared/src/cache_manager.c
> +libbsp_a_SOURCES += ../../shared/include/cache_.h
> +libbsp_a_CPPFLAGS = -I$(srcdir)/../../shared/include
> +
> +# debugio
> +#libbsp_a_SOURCES += console/console-io.c
> +
> +DISTCLEANFILES = include/bspopts.h
> +
> +include $(srcdir)/preinstall.am
> +include $(top_srcdir)/../../../../automake/local.am
> diff --git a/c/src/lib/libbsp/riscv32/hifive1/bsp_specs b/c/src/lib/libbsp/riscv32/hifive1/bsp_specs
> new file mode 100644
> index 0000000..32c105f
> --- /dev/null
> +++ b/c/src/lib/libbsp/riscv32/hifive1/bsp_specs
> @@ -0,0 +1,13 @@
> +%rename endfile old_endfile
> +%rename startfile old_startfile
> +%rename link old_link
> +
> +*startfile:
> +%{!qrtems: %(old_startfile)} \
> +%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s -e _start}}
> +
> +*link:
> +%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
> +
> +*endfile:
> +%{!qrtems: %(old_endfiles)} %{qrtems: crtend.o%s crtn.o%s }
> diff --git a/c/src/lib/libbsp/riscv32/hifive1/configure.ac b/c/src/lib/libbsp/riscv32/hifive1/configure.ac
> new file mode 100644
> index 0000000..0954cac
> --- /dev/null
> +++ b/c/src/lib/libbsp/riscv32/hifive1/configure.ac
> @@ -0,0 +1,39 @@
> +##
> +#
> +# @file
> +#
> +# @brief Configure script of LibBSP for riscv HiFive1 BSP.
> +#
> +
> +AC_PREREQ([2.69])
> +AC_INIT([rtems-c-src-lib-libbsp-hifive1],[_RTEMS_VERSION],[http://www.rtems.org/bugzilla])
> +AC_CONFIG_SRCDIR([bsp_specs])
> +RTEMS_TOP(../../../../../..)
> +
> +RTEMS_CANONICAL_TARGET_CPU
> +AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2])
> +RTEMS_BSP_CONFIGURE
> +
> +RTEMS_BSPOPTS_SET([BSP_START_RESET_VECTOR],[*],[])
> +RTEMS_BSPOPTS_HELP([BSP_START_RESET_VECTOR],[reset vector address for BSP
> +start])
> +
> +RTEMS_BSPOPTS_SET([BSP_RISCV32_PERIPHCLK],[*],[100000000U])
> +RTEMS_BSPOPTS_HELP([BSP_RISCV32_PERIPHCLK],[riscv PERIPHCLK clock
> +frequency in Hz])
> +
> +RTEMS_BSPOPTS_SET([TESTS_USE_PRINTK],[*],[1])
> +RTEMS_BSPOPTS_HELP([TESTS_USE_PRINTK],[tests use printk() for output])
> +
> +RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm])
> +RTEMS_CANONICALIZE_TOOLS
> +RTEMS_PROG_CCAS
> +
> +RTEMS_CHECK_SMP
> +AM_CONDITIONAL(HAS_SMP,[test "$rtems_cv_HAS_SMP" = "yes"])
> +
> +RTEMS_BSP_CLEANUP_OPTIONS(0, 1)
> +RTEMS_BSP_LINKCMDS
> +
> +AC_CONFIG_FILES([Makefile])
> +AC_OUTPUT
> --
> 2.1.4
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
More information about the devel
mailing list