summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/lm32/lm32_evr
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2017-12-23 18:18:56 +1100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-01-25 08:45:26 +0100
commit2afb22b7e1ebcbe40373ff7e0efae7d207c655a9 (patch)
tree44759efe9374f13200a97e96d91bd9a2b7e5ce2a /c/src/lib/libbsp/lm32/lm32_evr
parentMAINTAINERS: Add myself to Write After Approval. (diff)
downloadrtems-2afb22b7e1ebcbe40373ff7e0efae7d207c655a9.tar.bz2
Remove make preinstall
A speciality of the RTEMS build system was the make preinstall step. It copied header files from arbitrary locations into the build tree. The header files were included via the -Bsome/build/tree/path GCC command line option. This has at least seven problems: * The make preinstall step itself needs time and disk space. * Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error. * There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult. * The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit. * An introduction of a new build system is difficult. * Include paths specified by the -B option are system headers. This may suppress warnings. * The parallel build had sporadic failures on some hosts. This patch removes the make preinstall step. All installed header files are moved to dedicated include directories in the source tree. Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc, etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g. erc32, imx, qoriq, etc. The new cpukit include directories are: * cpukit/include * cpukit/score/cpu/@RTEMS_CPU@/include * cpukit/libnetworking The new BSP include directories are: * bsps/include * bsps/@RTEMS_CPU@/include * bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include There are build tree include directories for generated files. The include directory order favours the most general header file, e.g. it is not possible to override general header files via the include path order. The "bootstrap -p" option was removed. The new "bootstrap -H" option should be used to regenerate the "headers.am" files. Update #3254.
Diffstat (limited to 'c/src/lib/libbsp/lm32/lm32_evr')
-rw-r--r--c/src/lib/libbsp/lm32/lm32_evr/Makefile.am14
-rw-r--r--c/src/lib/libbsp/lm32/lm32_evr/configure.ac3
-rw-r--r--c/src/lib/libbsp/lm32/lm32_evr/include/bsp.h87
-rw-r--r--c/src/lib/libbsp/lm32/lm32_evr/include/system_conf.h180
-rw-r--r--c/src/lib/libbsp/lm32/lm32_evr/include/tm27.h38
-rw-r--r--c/src/lib/libbsp/lm32/lm32_evr/preinstall.am67
-rw-r--r--c/src/lib/libbsp/lm32/lm32_evr/startup/bsp_specs (renamed from c/src/lib/libbsp/lm32/lm32_evr/bsp_specs)0
7 files changed, 6 insertions, 383 deletions
diff --git a/c/src/lib/libbsp/lm32/lm32_evr/Makefile.am b/c/src/lib/libbsp/lm32/lm32_evr/Makefile.am
index c2bbe61944..1cc202819a 100644
--- a/c/src/lib/libbsp/lm32/lm32_evr/Makefile.am
+++ b/c/src/lib/libbsp/lm32/lm32_evr/Makefile.am
@@ -4,27 +4,19 @@ EXTRA_DIST =
include $(top_srcdir)/../../../../automake/compile.am
include $(top_srcdir)/../../bsp.am
-include_bspdir = $(includedir)/bsp
+dist_project_lib_DATA = startup/bsp_specs
-dist_project_lib_DATA = bsp_specs
-
-include_HEADERS = include/bsp.h
-include_HEADERS += include/tm27.h
-
-nodist_include_HEADERS = include/bspopts.h
-nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h
DISTCLEANFILES = include/bspopts.h
noinst_PROGRAMS =
-include_HEADERS += include/system_conf.h
EXTRA_DIST += ../../lm32/shared/start/start.S
start.$(OBJEXT): ../../lm32/shared/start/start.S
$(CPPASCOMPILE) -o $@ -c $<
project_lib_DATA = start.$(OBJEXT)
-dist_project_lib_DATA += startup/linkcmds
+project_lib_DATA += linkcmds
noinst_LIBRARIES = libbsp.a
libbsp_a_SOURCES =
@@ -62,5 +54,5 @@ libbsp_a_LIBADD += network.rel
endif
-include $(srcdir)/preinstall.am
include $(top_srcdir)/../../../../automake/local.am
+include $(srcdir)/../../../../../../bsps/lm32/lm32_evr/headers.am
diff --git a/c/src/lib/libbsp/lm32/lm32_evr/configure.ac b/c/src/lib/libbsp/lm32/lm32_evr/configure.ac
index 9a23e7cacc..93426ffdbc 100644
--- a/c/src/lib/libbsp/lm32/lm32_evr/configure.ac
+++ b/c/src/lib/libbsp/lm32/lm32_evr/configure.ac
@@ -4,6 +4,9 @@ AC_PREREQ([2.69])
AC_INIT([rtems-c-src-lib-libbsp-lm32-lm32_evr],[_RTEMS_VERSION],[https://devel.rtems.org/newticket])
AC_CONFIG_SRCDIR([make/custom/lm32_evr.cfg])
RTEMS_TOP(../../../../../..)
+RTEMS_SOURCE_TOP
+RTEMS_BUILD_TOP
+RTEMS_BSP_LINKCMDS
RTEMS_CANONICAL_TARGET_CPU
AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2])
diff --git a/c/src/lib/libbsp/lm32/lm32_evr/include/bsp.h b/c/src/lib/libbsp/lm32/lm32_evr/include/bsp.h
deleted file mode 100644
index 7c3ac8400d..0000000000
--- a/c/src/lib/libbsp/lm32/lm32_evr/include/bsp.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/**
- * @file
- *
- * @ingroup lm32_evr
- *
- * @brief Global BSP definitions.
- */
-
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- *
- * Jukka Pietarinen <jukka.pietarinen@mrf.fi>, 2008,
- * Micro-Research Finland Oy
- */
-
-#ifndef LIBBSP_LM32_LM32_EVR_BSP_H
-#define LIBBSP_LM32_LM32_EVR_BSP_H
-
-#include <stdint.h>
-#include <bspopts.h>
-#include <bsp/default-initial-extension.h>
-
-#include <rtems.h>
-
-/**
- * @defgroup lm32_evr EVR Support
- *
- * @ingroup bsp_lm32
- *
- * @brief EVR support package.
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define BSP_DIRTY_MEMORY 1
-
- /*
- * lm32 requires certain aligment of mbuf because unaligned uint32_t
- * accesses are not handled properly.
- */
-
-#define CPU_U32_FIX
-
-#if defined(RTEMS_NETWORKING)
-struct rtems_bsdnet_ifconfig;
-
-extern int rtems_tsmac_driver_attach(struct rtems_bsdnet_ifconfig *config,
- int attaching);
-
-#define RTEMS_BSP_NETWORK_DRIVER_NAME "TSMAC0"
-#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_tsmac_driver_attach
-
- /*
- * Due to a hardware design error (RJ45 connector with 10baseT magnetics)
- * we are forced to use 10baseT mode.
- */
-
-#define TSMAC_FORCE_10BASET
-#endif
-
-/* functions */
-rtems_isr_entry set_vector( /* returns old vector */
- rtems_isr_entry handler, /* isr routine */
- rtems_vector_number vector, /* vector number */
- int type /* RTEMS or RAW intr */
-);
-
-/*
- * Prototypes for BSP methods that cross file boundaries
- */
-void BSP_uart_polled_write(char ch);
-int BSP_uart_polled_read( void );
-char BSP_uart_is_character_ready(char *ch);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/c/src/lib/libbsp/lm32/lm32_evr/include/system_conf.h b/c/src/lib/libbsp/lm32/lm32_evr/include/system_conf.h
deleted file mode 100644
index 41f17e2be0..0000000000
--- a/c/src/lib/libbsp/lm32/lm32_evr/include/system_conf.h
+++ /dev/null
@@ -1,180 +0,0 @@
-/**
- * @file
- *
- * @ingroup lm32_evr
- *
- * @brief System configuration.
- */
-
-#ifndef __SYSTEM_CONFIG_H_
-#define __SYSTEM_CONFIG_H_
-
-
-#define FPGA_DEVICE_FAMILY "ECP2M"
-#define PLATFORM_NAME "platform1"
-#define USE_PLL (0)
-#define CPU_FREQUENCY (75000000)
-
-
-/* FOUND 1 CPU UNIT(S) */
-
-/*
- * CPU Instance LM32 component configuration
- */
-#define CPU_NAME "LM32"
-#define CPU_EBA (0x04000000)
-#define CPU_DIVIDE_ENABLED (1)
-#define CPU_SIGN_EXTEND_ENABLED (1)
-#define CPU_MULTIPLIER_ENABLED (1)
-#define CPU_SHIFT_ENABLED (1)
-#define CPU_DEBUG_ENABLED (1)
-#define CPU_HW_BREAKPOINTS_ENABLED (0)
-#define CPU_NUM_HW_BREAKPOINTS (0)
-#define CPU_NUM_WATCHPOINTS (0)
-#define CPU_ICACHE_ENABLED (1)
-#define CPU_ICACHE_SETS (512)
-#define CPU_ICACHE_ASSOC (1)
-#define CPU_ICACHE_BYTES_PER_LINE (16)
-#define CPU_DCACHE_ENABLED (1)
-#define CPU_DCACHE_SETS (512)
-#define CPU_DCACHE_ASSOC (1)
-#define CPU_DCACHE_BYTES_PER_LINE (16)
-#define CPU_DEBA (0x0C000000)
-#define CPU_CHARIO_IN (1)
-#define CPU_CHARIO_OUT (1)
-#define CPU_CHARIO_TYPE "JTAG UART"
-
-/*
- * gpio component configuration
- */
-#define GPIO_NAME "gpio"
-#define GPIO_BASE_ADDRESS (0x80004000)
-#define GPIO_SIZE (128)
-#define GPIO_CHARIO_IN (0)
-#define GPIO_CHARIO_OUT (0)
-#define GPIO_ADDRESS_LOCK (1)
-#define GPIO_DISABLE (0)
-#define GPIO_OUTPUT_PORTS_ONLY (1)
-#define GPIO_INPUT_PORTS_ONLY (0)
-#define GPIO_TRISTATE_PORTS (0)
-#define GPIO_BOTH_INPUT_AND_OUTPUT (0)
-#define GPIO_DATA_WIDTH (4)
-#define GPIO_INPUT_WIDTH (1)
-#define GPIO_OUTPUT_WIDTH (1)
-#define GPIO_IRQ_MODE (0)
-#define GPIO_LEVEL (0)
-#define GPIO_EDGE (0)
-#define GPIO_EITHER_EDGE_IRQ (0)
-#define GPIO_POSE_EDGE_IRQ (0)
-#define GPIO_NEGE_EDGE_IRQ (0)
-
-/*
- * uart component configuration
- */
-#define UART_NAME "uart"
-#define UART_BASE_ADDRESS (0x80006000)
-#define UART_SIZE (128)
-#define UART_IRQ (0)
-#define UART_CHARIO_IN (1)
-#define UART_CHARIO_OUT (1)
-#define UART_CHARIO_TYPE "RS-232"
-#define UART_ADDRESS_LOCK (1)
-#define UART_DISABLE (0)
-#define UART_MODEM (0)
-#define UART_ADDRWIDTH (5)
-#define UART_DATAWIDTH (8)
-#define UART_BAUD_RATE (115200)
-#define UART_IB_SIZE (4)
-#define UART_OB_SIZE (4)
-#define UART_BLOCK_WRITE (1)
-#define UART_BLOCK_READ (1)
-#define UART_DATA_BITS (8)
-#define UART_STOP_BITS (1)
-#define UART_FIFO (0)
-#define UART_INTERRUPT_DRIVEN (1)
-
-/*
- * ebr component configuration
- */
-#define EBR_NAME "ebr"
-#define EBR_BASE_ADDRESS (0x04000000)
-#define EBR_SIZE (32768)
-#define EBR_IS_READABLE (1)
-#define EBR_IS_WRITABLE (1)
-#define EBR_ADDRESS_LOCK (1)
-#define EBR_DISABLE (0)
-#define EBR_EBR_DATA_WIDTH (32)
-#define EBR_INIT_FILE_NAME "none"
-#define EBR_INIT_FILE_FORMAT "hex"
-
-/*
- * ts_mac_core component configuration
- */
-#define TS_MAC_CORE_NAME "ts_mac_core"
-#define TS_MAC_CORE_BASE_ADDRESS (0x80008000)
-#define TS_MAC_CORE_SIZE (8192)
-#define TS_MAC_CORE_IRQ (2)
-#define TS_MAC_CORE_CHARIO_IN (0)
-#define TS_MAC_CORE_CHARIO_OUT (0)
-#define TS_MAC_CORE_ADDRESS_LOCK (1)
-#define TS_MAC_CORE_DISABLE (0)
-#define TS_MAC_CORE_STAT_REGS (1)
-#define TS_MAC_CORE_TXRX_FIFO_DEPTH (512)
-#define TS_MAC_CORE_MIIM_MODULE (1)
-#define TS_MAC_CORE_NGO "l:/mrf/lattice/crio-lm32/platform1/components/ts_mac_top_v27/ipexpress/ts_mac_core/ts_mac_core.ngo"
-#define TS_MAC_CORE_ISPLEVER_PRJ "l:/mrf/lattice/crio-lm32/criomico.syn"
-
-/*
- * timer0 component configuration
- */
-#define TIMER0_NAME "timer0"
-#define TIMER0_BASE_ADDRESS (0x80002000)
-#define TIMER0_SIZE (128)
-#define TIMER0_IRQ (1)
-#define TIMER0_CHARIO_IN (0)
-#define TIMER0_CHARIO_OUT (0)
-#define TIMER0_ADDRESS_LOCK (1)
-#define TIMER0_DISABLE (0)
-#define TIMER0_PERIOD_NUM (20)
-#define TIMER0_PERIOD_WIDTH (32)
-#define TIMER0_WRITEABLE_PERIOD (1)
-#define TIMER0_READABLE_SNAPSHOT (1)
-#define TIMER0_START_STOP_CONTROL (1)
-#define TIMER0_WATCHDOG (0)
-
-/*
- * timer1 component configuration
- */
-#define TIMER1_NAME "timer1"
-#define TIMER1_BASE_ADDRESS (0x8000A000)
-#define TIMER1_SIZE (128)
-#define TIMER1_IRQ (3)
-#define TIMER1_CHARIO_IN (0)
-#define TIMER1_CHARIO_OUT (0)
-#define TIMER1_ADDRESS_LOCK (1)
-#define TIMER1_DISABLE (0)
-#define TIMER1_PERIOD_NUM (20)
-#define TIMER1_PERIOD_WIDTH (32)
-#define TIMER1_WRITEABLE_PERIOD (1)
-#define TIMER1_READABLE_SNAPSHOT (1)
-#define TIMER1_START_STOP_CONTROL (1)
-#define TIMER1_WATCHDOG (0)
-
-/*
- * ddr2_sdram component configuration
- */
-#define DDR2_SDRAM_NAME "ddr2_sdram"
-#define DDR2_SDRAM_BASE_ADDRESS (0x08000000)
-#define DDR2_SDRAM_SIZE (33554432)
-#define DDR2_SDRAM_IS_READABLE (1)
-#define DDR2_SDRAM_IS_WRITABLE (1)
-#define DDR2_SDRAM_BST_CNT_READ (1)
-#define DDR2_SDRAM_ADDRESS_LOCK (1)
-#define DDR2_SDRAM_DISABLE (0)
-#define DDR2_SDRAM_NGO "L:/mrf/lattice/cRIO-LM32/platform1/components/wb_ddr2_ctl_v65/ipexpress/ddr2_sdram/ddr2_sdram.ngo"
-#define DDR2_SDRAM_ISPLEVER_PRJ "l:/mrf/lattice/crio-lm32/criomico.syn"
-#define DDR2_SDRAM_PARAM_FILE "ddr_p_eval/$/src/params/ddr_sdram_mem_params.v"
-#define DDR2_SDRAM_MEM_TOP "ddr_p_eval/$/src/rtl/top/@/ddr_sdram_mem_top.v"
-
-
-#endif /* __SYSTEM_CONFIG_H_ */
diff --git a/c/src/lib/libbsp/lm32/lm32_evr/include/tm27.h b/c/src/lib/libbsp/lm32/lm32_evr/include/tm27.h
deleted file mode 100644
index f62e62e73f..0000000000
--- a/c/src/lib/libbsp/lm32/lm32_evr/include/tm27.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * @file
- *
- * @ingroup lm32_evr
- *
- * @brief TM27 timing test routines.
- */
-
-/*
- * tm27.h
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#ifndef _RTEMS_TMTEST27
-#error "This is an RTEMS internal file you must not include directly."
-#endif
-
-#ifndef __tm27_h
-#define __tm27_h
-
-/*
- * Stuff for Time Test 27
- */
-
-#define MUST_WAIT_FOR_INTERRUPT 0
-
-#define Install_tm27_vector( handler ) set_vector( (handler), 0, 1 )
-
-#define Cause_tm27_intr() /* empty */
-
-#define Clear_tm27_intr() /* empty */
-
-#define Lower_tm27_intr() /* empty */
-
-#endif
diff --git a/c/src/lib/libbsp/lm32/lm32_evr/preinstall.am b/c/src/lib/libbsp/lm32/lm32_evr/preinstall.am
deleted file mode 100644
index 2e6ad01d11..0000000000
--- a/c/src/lib/libbsp/lm32/lm32_evr/preinstall.am
+++ /dev/null
@@ -1,67 +0,0 @@
-## Automatically generated by ampolish3 - Do not edit
-
-if AMPOLISH3
-$(srcdir)/preinstall.am: Makefile.am
- $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am
-endif
-
-PREINSTALL_DIRS =
-DISTCLEANFILES += $(PREINSTALL_DIRS)
-
-all-am: $(PREINSTALL_FILES)
-
-PREINSTALL_FILES =
-CLEANFILES = $(PREINSTALL_FILES)
-
-all-local: $(TMPINSTALL_FILES)
-
-TMPINSTALL_FILES =
-CLEANFILES += $(TMPINSTALL_FILES)
-
-$(PROJECT_LIB)/$(dirstamp):
- @$(MKDIR_P) $(PROJECT_LIB)
- @: > $(PROJECT_LIB)/$(dirstamp)
-PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp)
-
-$(PROJECT_INCLUDE)/$(dirstamp):
- @$(MKDIR_P) $(PROJECT_INCLUDE)
- @: > $(PROJECT_INCLUDE)/$(dirstamp)
-PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp)
-
-$(PROJECT_INCLUDE)/bsp/$(dirstamp):
- @$(MKDIR_P) $(PROJECT_INCLUDE)/bsp
- @: > $(PROJECT_INCLUDE)/bsp/$(dirstamp)
-PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp)
-
-$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs
-PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs
-
-$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h
-
-$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h
-
-$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h
-
-$(PROJECT_INCLUDE)/bsp/bootcard.h: ../../shared/include/bootcard.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bootcard.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bootcard.h
-
-$(PROJECT_INCLUDE)/system_conf.h: include/system_conf.h $(PROJECT_INCLUDE)/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/system_conf.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/system_conf.h
-
-$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT)
-TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT)
-
-$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
-PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds
-
diff --git a/c/src/lib/libbsp/lm32/lm32_evr/bsp_specs b/c/src/lib/libbsp/lm32/lm32_evr/startup/bsp_specs
index 87638cc027..87638cc027 100644
--- a/c/src/lib/libbsp/lm32/lm32_evr/bsp_specs
+++ b/c/src/lib/libbsp/lm32/lm32_evr/startup/bsp_specs