source: rtems/bsps/powerpc/tqm8xx/include/bsp.h @ 7632906

5
Last change on this file since 7632906 was 2afb22b, checked in by Chris Johns <chrisj@…>, on Dec 23, 2017 at 7:18:56 AM

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: 4.0 KB
Line 
1/*
2 *  RTEMS TQM8xx BSP
3 *  This include file contains all board IO definitions.
4 */
5
6/*
7 * This file has been adapted to MPC8xx by:
8 *    Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
9 *    Copyright (c) 2008
10 *    Embedded Brains GmbH
11 *    Obere Lagerstr. 30
12 *    D-82178 Puchheim
13 *    Germany
14 *    rtems@embedded-brains.de
15 *
16 *  COPYRIGHT (c) 1989-2008.
17 *  On-Line Applications Research Corporation (OAR).
18 *
19 *  The license and distribution terms for this file may be
20 *  found in the file LICENSE in this distribution or at
21 *  http://www.rtems.org/license/LICENSE.
22 */
23
24#ifndef LIBBSP_POWERPC_TQM8XX_BSP_H
25#define LIBBSP_POWERPC_TQM8XX_BSP_H
26
27/*
28 * indicate, that BSP is booted via TQMMon
29 */
30#define BSP_HAS_TQMMON
31
32#include <libcpu/powerpc-utility.h>
33
34LINKER_SYMBOL(TopRamReserved);
35
36LINKER_SYMBOL( bsp_ram_start);
37LINKER_SYMBOL( bsp_ram_end);
38LINKER_SYMBOL( bsp_ram_size);
39
40LINKER_SYMBOL( bsp_rom_start);
41LINKER_SYMBOL( bsp_rom_end);
42LINKER_SYMBOL( bsp_rom_size);
43
44LINKER_SYMBOL( bsp_section_text_start);
45LINKER_SYMBOL( bsp_section_text_end);
46LINKER_SYMBOL( bsp_section_text_size);
47
48LINKER_SYMBOL( bsp_section_data_start);
49LINKER_SYMBOL( bsp_section_data_end);
50LINKER_SYMBOL( bsp_section_data_size);
51
52LINKER_SYMBOL( bsp_section_bss_start);
53LINKER_SYMBOL( bsp_section_bss_end);
54LINKER_SYMBOL( bsp_section_bss_size);
55
56LINKER_SYMBOL( bsp_interrupt_stack_start);
57LINKER_SYMBOL( bsp_interrupt_stack_end);
58LINKER_SYMBOL( bsp_interrupt_stack_size);
59
60LINKER_SYMBOL( bsp_work_area_start);
61
62#ifndef ASM
63
64#include <bspopts.h>
65
66#include <rtems.h>
67#include <rtems/irq.h>
68#include <mpc8xx.h>
69#include <mpc8xx/cpm.h>
70#include <mpc8xx/mmu.h>
71#include <mpc8xx/console.h>
72#include <bsp/vectors.h>
73#include <bsp/tqm.h>
74#include <libcpu/powerpc-utility.h>
75#include <bsp/default-initial-extension.h>
76
77#ifdef __cplusplus
78extern "C" {
79#endif
80
81/*
82 * Network driver configuration
83 */
84struct rtems_bsdnet_ifconfig;
85
86#if BSP_USE_NETWORK_FEC
87extern int rtems_fec_enet_driver_attach (struct rtems_bsdnet_ifconfig *config,
88                                         int attaching);
89#define RTEMS_BSP_FEC_NETWORK_DRIVER_NAME       "fec1"
90#define RTEMS_BSP_FEC_NETWORK_DRIVER_ATTACH     rtems_fec_enet_driver_attach
91#endif
92
93#if BSP_USE_NETWORK_SCC
94extern int rtems_scc_enet_driver_attach (struct rtems_bsdnet_ifconfig *config,
95                                         int attaching);
96#define RTEMS_BSP_SCC_NETWORK_DRIVER_NAME       "scc1"
97#define RTEMS_BSP_SCC_NETWORK_DRIVER_ATTACH     rtems_scc_enet_driver_attach
98#endif
99
100#if BSP_USE_NETWORK_FEC
101#define RTEMS_BSP_NETWORK_DRIVER_NAME   RTEMS_BSP_FEC_NETWORK_DRIVER_NAME
102#define RTEMS_BSP_NETWORK_DRIVER_ATTACH RTEMS_BSP_FEC_NETWORK_DRIVER_ATTACH
103#elif BSP_USE_NETWORK_SCC
104#define RTEMS_BSP_NETWORK_DRIVER_NAME   RTEMS_BSP_SCC_NETWORK_DRIVER_NAME
105#define RTEMS_BSP_NETWORK_DRIVER_ATTACH RTEMS_BSP_SCC_NETWORK_DRIVER_ATTACH
106#endif
107/*
108 * We need to decide how much memory will be non-cacheable. This
109 * will mainly be memory that will be used in DMA (network and serial
110 * buffers).
111 */
112#define NOCACHE_MEM_SIZE 512*1024
113
114/*
115 * indicate, that BSP has IDE driver
116 */
117#undef RTEMS_BSP_HAS_IDE_DRIVER
118
119/*
120 * SPI driver configuration
121 */
122
123  /* select values for SPI addressing */
124#define PGHPLUS_SPI_ADDR_EEPROM 0
125#define PGHPLUS_SPI_ADDR_DISP4  1
126  /* NOTE: DISP4 occupies two consecutive addresses for data and control port */
127#define PGHPLUS_SPI_ADDR_DISP4_DATA  (PGHPLUS_SPI_ADDR_DISP4)
128#define PGHPLUS_SPI_ADDR_DISP4_CTRL  (PGHPLUS_SPI_ADDR_DISP4_DATA+1)
129
130  /* bit masks for Port B lines */
131#define PGHPLUS_PB_SPI_EEP_CE_MSK     (1<< 0)
132#define PGHPLUS_PB_SPI_DISP4_RS_MSK   (1<<15)
133#define PGHPLUS_PB_SPI_DISP4_CE_MSK   (1<<14)
134
135/*
136 * our (internal) bus frequency
137 */
138extern uint32_t BSP_bus_frequency;
139
140/*
141 *  Interfaces to required Clock Driver support methods
142 */
143int BSP_disconnect_clock_handler(void);
144int BSP_connect_clock_handler (rtems_irq_hdl);
145
146extern uint32_t bsp_clock_speed;
147
148char serial_getc(void);
149
150int serial_tstc(void);
151
152void serial_init(void);
153
154int mbx8xx_console_get_configuration(void);
155
156void _InitTQM8xx (void);
157
158rtems_status_code bsp_register_spi(void);
159
160void *bsp_idle_thread( uintptr_t ignored );
161
162void cpu_init(void);
163
164#ifdef __cplusplus
165}
166#endif
167
168#endif
169#endif
Note: See TracBrowser for help on using the repository browser.