source: rtems/c/src/lib/libbsp/arm/stm32f4/configure.ac @ 2d0bc83

5
Last change on this file since 2d0bc83 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 
1AC_PREREQ([2.69])
2AC_INIT([rtems-c-src-lib-libbsp-arm-stm32f4],[_RTEMS_VERSION],[https://devel.rtems.org/newticket])
3AC_CONFIG_SRCDIR([make/custom/stm32f4.cfg])
4RTEMS_TOP(../../../../../..)
5RTEMS_SOURCE_TOP
6RTEMS_BUILD_TOP
7RTEMS_BSP_LINKCMDS
8
9RTEMS_CANONICAL_TARGET_CPU
10AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2])
11RTEMS_BSP_CONFIGURE
12
13RTEMS_PROG_CC_FOR_TARGET
14RTEMS_CANONICALIZE_TOOLS
15RTEMS_PROG_CCAS
16
17RTEMS_CHECK_NETWORKING
18AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")
19
20RTEMS_BSPOPTS_SET([STM32F4_FAMILY_F10XXX],[stm32f1*],[1])
21RTEMS_BSPOPTS_HELP([STM32F4_FAMILY_F10XXX],[Chip belongs to the STM32F10XXX family.])
22
23RTEMS_BSPOPTS_SET([STM32F4_FAMILY_F4XXXX],[stm32f4*],[1])
24RTEMS_BSPOPTS_HELP([STM32F4_FAMILY_F4XXXX],[Chip belongs to the STM32F4XXXX family.])
25
26RTEMS_BSPOPTS_SET([STM32F4_HSE_OSCILLATOR],[*],[8000000])
27RTEMS_BSPOPTS_HELP([STM32F4_HSE_OSCILLATOR],[HSE oscillator frequency in Hz])
28
29RTEMS_BSPOPTS_SET([STM32F4_SYSCLK],[stm32f1*],[8000000])
30RTEMS_BSPOPTS_SET([STM32F4_SYSCLK],[*],[16000000])
31RTEMS_BSPOPTS_HELP([STM32F4_SYSCLK],[SYSCLK frequency in Hz])
32
33RTEMS_BSPOPTS_SET([STM32F4_HCLK],[stm32f1*],[8000000])
34RTEMS_BSPOPTS_SET([STM32F4_HCLK],[*],[16000000])
35RTEMS_BSPOPTS_HELP([STM32F4_HCLK],[HCLK frequency in Hz])
36
37RTEMS_BSPOPTS_SET([STM32F4_PCLK1],[stm32f1*],[8000000])
38RTEMS_BSPOPTS_SET([STM32F4_PCLK1],[*],[16000000])
39RTEMS_BSPOPTS_HELP([STM32F4_PCLK1],[PCLK1 frequency in Hz])
40
41RTEMS_BSPOPTS_SET([STM32F4_PCLK1],[stm32f1*],[8000000])
42RTEMS_BSPOPTS_SET([STM32F4_PCLK2],[*],[16000000])
43RTEMS_BSPOPTS_HELP([STM32F4_PCLK2],[PCLK2 frequency in Hz])
44
45RTEMS_BSPOPTS_SET([STM32F4_USART_BAUD],[*],[115200])
46RTEMS_BSPOPTS_HELP([STM32F4_USART_BAUD],[baud for USARTs])
47
48RTEMS_BSPOPTS_SET([STM32F4_ENABLE_USART_1],[*],[])
49RTEMS_BSPOPTS_HELP([STM32F4_ENABLE_USART_1],[enable USART 1])
50
51RTEMS_BSPOPTS_SET([STM32F4_ENABLE_USART_2],[*],[])
52RTEMS_BSPOPTS_HELP([STM32F4_ENABLE_USART_2],[enable USART 2])
53
54RTEMS_BSPOPTS_SET([STM32F4_ENABLE_USART_3],[*],[1])
55RTEMS_BSPOPTS_HELP([STM32F4_ENABLE_USART_3],[enable USART 3])
56
57RTEMS_BSPOPTS_SET([STM32F4_ENABLE_UART_4],[*],[])
58RTEMS_BSPOPTS_HELP([STM32F4_ENABLE_UART_4],[enable UART 4])
59
60RTEMS_BSPOPTS_SET([STM32F4_ENABLE_UART_5],[*],[])
61RTEMS_BSPOPTS_HELP([STM32F4_ENABLE_UART_5],[enable UART 5])
62
63RTEMS_BSPOPTS_SET([STM32F4_ENABLE_USART_6],[*],[])
64RTEMS_BSPOPTS_HELP([STM32F4_ENABLE_USART_6],[enable USART 6])
65
66RTEMS_BSPOPTS_SET([STM32F4_ENABLE_I2C1],[stm32f1*],[1])
67RTEMS_BSPOPTS_SET([STM32F4_ENABLE_I2C1],[*],[])
68RTEMS_BSPOPTS_HELP([STM32F4_ENABLE_I2C1],[enable I2C 1])
69
70RTEMS_BSPOPTS_SET([STM32F4_ENABLE_I2C2],[*],[])
71RTEMS_BSPOPTS_HELP([STM32F4_ENABLE_I2C2],[enable I2C 2])
72
73RTEMS_BSP_CLEANUP_OPTIONS
74
75AC_CONFIG_FILES([Makefile])
76AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.