Changeset 2afb22b in rtems for c/src/lib/libbsp/arm/tms570


Ignore:
Timestamp:
Dec 23, 2017, 7:18:56 AM (23 months ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
d8de6b9
Parents:
9704efb4
git-author:
Chris Johns <chrisj@…> (12/23/17 07:18:56)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/25/18 07:45:26)
Message:

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.

Location:
c/src/lib/libbsp/arm/tms570
Files:
1 deleted
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/tms570/Makefile.am

    r9704efb4 r2afb22b  
    1212include $(top_srcdir)/../../bsp.am
    1313
    14 include_bspdir = $(includedir)/bsp
    15 
    16 include_bsp_ti_herculesdir = $(includedir)/bsp/ti_herc
    17 
    18 dist_project_lib_DATA = bsp_specs
     14dist_project_lib_DATA = startup/bsp_specs
    1915
    2016# ----------------------------
    2117# ------  Headers
    2218# ----------------------------
    23 
    24 include_HEADERS = include/bsp.h
    25 
    26 nodist_include_HEADERS = include/bspopts.h
    27 
    28 nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h
    29 
    30 include_bsp_HEADERS =
    31 include_bsp_HEADERS += ../../shared/include/utility.h
    32 include_bsp_HEADERS += ../../shared/include/irq-generic.h
    33 include_bsp_HEADERS += ../../shared/include/irq-info.h
    34 include_bsp_HEADERS += ../../shared/include/stackalloc.h
    35 include_bsp_HEADERS += ../../shared/include/uart-output-char.h
    36 include_bsp_HEADERS += ../shared/include/start.h
    37 include_bsp_HEADERS += include/tms570.h
    38 include_bsp_HEADERS += include/tms570-sci.h
    39 include_bsp_HEADERS += include/irq.h
    40 include_bsp_HEADERS += include/tms570-rti.h
    41 include_bsp_HEADERS += include/tms570-vim.h
    42 include_bsp_HEADERS += include/tms570-pom.h
    43 include_bsp_HEADERS += include/tms570-sci-driver.h
    44 include_bsp_HEADERS += include/system-clocks.h
    45 include_bsp_HEADERS += include/tms570-pinmux.h
    46 
    47 include_bsp_HEADERS += include/tms570-pins.h
    48 include_bsp_HEADERS += include/tms570ls3137zwt-pins.h
    49 include_bsp_HEADERS += include/tms570lc4357-pins.h
    50 
    51 include_bsp_ti_hercules_HEADERS = include/ti_herc/reg_adc.h
    52 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_ccmsr.h
    53 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_crc.h
    54 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_dcan.h
    55 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_dcc.h
    56 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_dma.h
    57 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_dmm.h
    58 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_efuse.h
    59 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_emacc.h
    60 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_emacm.h
    61 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_emif.h
    62 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_esm.h
    63 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_flash.h
    64 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_flex_ray.h
    65 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_gio.h
    66 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_htu.h
    67 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_i2c.h
    68 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_iomm.h
    69 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_lin.h
    70 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_mdio.h
    71 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_n2het.h
    72 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_pbist.h
    73 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_pll.h
    74 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_pmm.h
    75 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_rti.h
    76 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_rtp.h
    77 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_sci.h
    78 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_tcr.h
    79 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_tcram.h
    80 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_vim.h
    81 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_pom.h
    82 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_spi.h
    83 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_stc.h
    84 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_sys.h
    85 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_sys2.h
    86 include_bsp_ti_hercules_HEADERS += include/ti_herc/reg_pcr.h
    87 
    88 include_HEADERS += include/tm27.h
    8919
    9020# ----------------------------
     
    9626        $(CPPASCOMPILE) -o $@ -c $<
    9727project_lib_DATA = start.$(OBJEXT)
    98 project_lib_DATA += startup/linkcmds
    9928
    100 EXTRA_DIST += startup/linkcmds.tms570ls3137_hdk
    101 EXTRA_DIST += startup/linkcmds.tms570ls3137_hdk_with_loader
    102 EXTRA_DIST += startup/linkcmds.tms570ls3137_hdk_sdram
    103 EXTRA_DIST += startup/linkcmds.tms570ls3137_hdk_intram
     29project_lib_DATA += linkcmds
     30dist_project_lib_DATA += startup/linkcmds.tms570ls3137_hdk
     31dist_project_lib_DATA += startup/linkcmds.tms570ls3137_hdk_intram
     32dist_project_lib_DATA += startup/linkcmds.tms570ls3137_hdk_sdram
     33dist_project_lib_DATA += startup/linkcmds.tms570ls3137_hdk_with_loader
    10434
    10535# ----------------------------
     
    11040
    11141libbsp_a_SOURCES =
    112 libbsp_a_CPPFLAGS =
     42libbsp_a_CPPFLAGS = $(AM_CPPFLAGS)
    11343libbsp_a_LIBADD =
    11444
     
    185115libbsp_a_SOURCES += hwinit/tms570_tcram_tests.c
    186116
    187 include_bsp_HEADERS += hwinit/tms570_selftest_parity.h
    188 include_bsp_HEADERS += hwinit/tms570_hwinit.h
    189 include_bsp_HEADERS += hwinit/tms570_selftest.h
    190 
    191117# Start hooks
    192118libbsp_a_SOURCES += hwinit/bspstarthooks-hwinit.c
     
    202128DISTCLEANFILES = include/bspopts.h
    203129
    204 include $(srcdir)/preinstall.am
    205130include $(top_srcdir)/../../../../automake/local.am
     131include $(srcdir)/../../../../../../bsps/arm/tms570/headers.am
  • c/src/lib/libbsp/arm/tms570/configure.ac

    r9704efb4 r2afb22b  
    1111AC_CONFIG_SRCDIR([make/custom/tms570ls3137_hdk.cfg])
    1212RTEMS_TOP(../../../../../..)
     13RTEMS_SOURCE_TOP
     14RTEMS_BUILD_TOP
     15RTEMS_BSP_LINKCMDS
    1316
    1417RTEMS_CANONICAL_TARGET_CPU
     
    5659
    5760RTEMS_BSP_CLEANUP_OPTIONS
    58 RTEMS_BSP_LINKCMDS
    5961
    6062AC_CONFIG_FILES([Makefile])
Note: See TracChangeset for help on using the changeset viewer.