source: rtems/bsps/arm/lpc32xx/include/bsp/boot.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.4 KB
RevLine 
[3103d4cb]1/**
2 * @file
3 *
4 * @ingroup lpc32xx_boot
5 *
6 * @brief Boot support API.
7 */
8
9/*
10 * Copyright (c) 2010
11 * embedded brains GmbH
12 * Obere Lagerstr. 30
13 * D-82178 Puchheim
14 * Germany
15 * <rtems@embedded-brains.de>
16 *
17 * The license and distribution terms for this file may be
18 * found in the file LICENSE in this distribution or at
[c499856]19 * http://www.rtems.org/license/LICENSE.
[3103d4cb]20 */
21
22#ifndef LIBBSP_ARM_LPC32XX_BOOT_H
23#define LIBBSP_ARM_LPC32XX_BOOT_H
24
25#include <stdint.h>
26
27#include <bsp/nand-mlc.h>
28
29#ifdef __cplusplus
30extern "C" {
31#endif /* __cplusplus */
32
33/**
34 * @defgroup lpc32xx_boot Boot Support
35 *
[2d6543d4]36 * @ingroup arm_lpc32xx
[3103d4cb]37 *
38 * @brief Boot support.
39 *
40 * The NXP internal boot program shall be the "stage-0 program".
41 *
42 * The boot program within the first page of the first or second block shall be
43 * "stage-1 program".  It will be invoked by the stage-0 program from NXP.
44 *
45 * The program loaded by the stage-1 program will be the "stage-2 program" or the
46 * "boot loader".
47 *
48 * The program loaded by the stage-2 program will be the "stage-3 program" or the
49 * "application".
50 *
51 * The stage-1 program image must have a format specified by NXP.
52 *
53 * The stage-2 and stage-3 program images may have any format.
54 *
55 * @{
56 */
57
[f437107]58#define LPC32XX_BOOT_BLOCK_0 0
59#define LPC32XX_BOOT_BLOCK_1 1
[3103d4cb]60
61#define LPC32XX_BOOT_ICR_SP_3AC_8IF 0xf0
62#define LPC32XX_BOOT_ICR_SP_4AC_8IF 0xd2
63#define LPC32XX_BOOT_ICR_LP_4AC_8IF 0xb4
64#define LPC32XX_BOOT_ICR_LP_5AC_8IF 0x96
65
66typedef union {
67  struct {
68    uint8_t d0;
69    uint8_t reserved_0 [3];
70    uint8_t d1;
71    uint8_t reserved_1 [3];
72    uint8_t d2;
73    uint8_t reserved_2 [3];
74    uint8_t d3;
75    uint8_t reserved_3 [3];
76    uint8_t d4;
77    uint8_t reserved_4 [3];
78    uint8_t d5;
79    uint8_t reserved_5 [3];
80    uint8_t d6;
81    uint8_t reserved_6 [3];
82    uint8_t d7;
83    uint8_t reserved_7 [3];
84    uint8_t d8;
85    uint8_t reserved_8 [3];
86    uint8_t d9;
87    uint8_t reserved_9 [3];
88    uint8_t d10;
89    uint8_t reserved_10 [3];
90    uint8_t d11;
91    uint8_t reserved_11 [3];
92    uint8_t d12;
93    uint8_t reserved_12 [463];
94  } field;
95  uint32_t data [MLC_SMALL_DATA_WORD_COUNT];
96} lpc32xx_boot_block;
97
98void lpc32xx_setup_boot_block(
99  lpc32xx_boot_block *boot_block,
100  uint8_t icr,
101  uint8_t page_count
102);
103
[82525a75]104void lpc32xx_set_boot_block_bad(
105  lpc32xx_boot_block *boot_block
106);
107
[3103d4cb]108/** @} */
109
110#ifdef __cplusplus
111}
112#endif /* __cplusplus */
113
114#endif /* LIBBSP_ARM_LPC32XX_BOOT_H */
Note: See TracBrowser for help on using the repository browser.