source: rtems/bsps/arm/lpc24xx/include/bsp/start-config.h @ 2afb22b

5
Last change on this file since 2afb22b was 2afb22b, checked in by Chris Johns <chrisj@…>, on 12/23/17 at 07:18:56

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.

  • Property mode set to 100644
File size: 2.7 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup lpc24xx
5 *
6 * @brief BSP start configuration.
7 */
8
9/*
10 * Copyright (c) 2011-2012 embedded brains GmbH.  All rights reserved.
11 *
12 *  embedded brains GmbH
13 *  Obere Lagerstr. 30
14 *  82178 Puchheim
15 *  Germany
16 *  <rtems@embedded-brains.de>
17 *
18 * The license and distribution terms for this file may be
19 * found in the file LICENSE in this distribution or at
20 * http://www.rtems.org/license/LICENSE.
21 */
22
23#ifndef LIBBSP_ARM_LPC24XX_START_CONFIG_H
24#define LIBBSP_ARM_LPC24XX_START_CONFIG_H
25
26#include <rtems/score/armv7m.h>
27
28#include <bsp.h>
29#include <bsp/io.h>
30#include <bsp/start.h>
31#include <bsp/lpc-emc.h>
32
33#ifdef __cplusplus
34extern "C" {
35#endif /* __cplusplus */
36
37/**
38 * @brief Pico seconds @a ps to clock ticks for clock frequency @a f.
39 */
40#define LPC24XX_PS_TO_CLK(ps, f) \
41  (((((uint64_t) (ps)) * ((uint64_t) (f))) + 1000000000000ULL - 1ULL) \
42    / 1000000000000ULL)
43
44/**
45 * @brief Pico seconds @a ps to EMCCLK clock ticks adjusted by @a m.
46 */
47#define LPC24XX_PS_TO_EMCCLK(ps, m) \
48  (LPC24XX_PS_TO_CLK(ps, LPC24XX_EMCCLK) > (m) ? \
49    LPC24XX_PS_TO_CLK(ps, LPC24XX_EMCCLK) - (m) : 0)
50
51typedef struct {
52  uint32_t refresh;
53  uint32_t readconfig;
54  uint32_t trp;
55  uint32_t tras;
56  uint32_t tsrex;
57  uint32_t tapr;
58  uint32_t tdal;
59  uint32_t twr;
60  uint32_t trc;
61  uint32_t trfc;
62  uint32_t txsr;
63  uint32_t trrd;
64  uint32_t tmrd;
65  uint32_t emcdlyctl;
66} lpc24xx_emc_dynamic_config;
67
68typedef struct {
69  volatile lpc_emc_dynamic *chip_select;
70  uint32_t address;
71  uint32_t config;
72  uint32_t rascas;
73  uint32_t mode;
74} lpc24xx_emc_dynamic_chip_config;
75
76typedef struct {
77  volatile lpc_emc_static *chip_select;
78  struct {
79    uint32_t config;
80    uint32_t waitwen;
81    uint32_t waitoen;
82    uint32_t waitrd;
83    uint32_t waitpage;
84    uint32_t waitwr;
85    uint32_t waitrun;
86  } config;
87} lpc24xx_emc_static_chip_config;
88
89extern BSP_START_DATA_SECTION const lpc24xx_pin_range
90  lpc24xx_start_config_pinsel [];
91
92extern BSP_START_DATA_SECTION const lpc24xx_emc_dynamic_config
93  lpc24xx_start_config_emc_dynamic [];
94
95extern BSP_START_DATA_SECTION const lpc24xx_emc_dynamic_chip_config
96  lpc24xx_start_config_emc_dynamic_chip [];
97
98extern BSP_START_DATA_SECTION const size_t
99  lpc24xx_start_config_emc_dynamic_chip_count;
100
101extern BSP_START_DATA_SECTION const lpc24xx_emc_static_chip_config
102  lpc24xx_start_config_emc_static_chip [];
103
104extern BSP_START_DATA_SECTION const size_t
105  lpc24xx_start_config_emc_static_chip_count;
106
107#ifdef ARM_MULTILIB_ARCH_V7M
108
109extern BSP_START_DATA_SECTION const ARMV7M_MPU_Region
110  lpc24xx_start_config_mpu_region [];
111
112extern BSP_START_DATA_SECTION const size_t
113  lpc24xx_start_config_mpu_region_count;
114
115#endif /* ARM_MULTILIB_ARCH_V7M */
116
117#ifdef __cplusplus
118}
119#endif /* __cplusplus */
120
121#endif /* LIBBSP_ARM_LPC24XX_START_CONFIG_H */
Note: See TracBrowser for help on using the repository browser.