source: rtems/c/src/lib/libbsp/arm/stm32f4/Makefile.am @ 7db6953

4.11
Last change on this file since 7db6953 was 7db6953, checked in by Tomasz Gregorek <tomasz.gregorek@…>, on Sep 21, 2014 at 6:07:41 PM

bsp/stm32f4XXXX: System clock configuration

Added simple math to caclulate register values for the PLL
and for the prescalers. It will try to keep 48MHz for the USB OTG FS.
Also it will set latency on the Flash memory for the high speeds.

Limitations:
It is assumed that 1MHz resolution is enough.
Best fits for the clocks are achieved with multiplies of 42MHz.
Even though APB1, APB2 and AHB are calculated user is still required
to provide correct values for the bsp configuration for the:
STM32F4_PCLK1
STM32F4_PCLK2
STM32F4_HCLK (= system clock)
as those are used for the peripheral clocking calculations.

  • Property mode set to 100644
File size: 4.9 KB
Line 
1ACLOCAL_AMFLAGS = -I ../../../../aclocal
2
3include $(top_srcdir)/../../../../automake/compile.am
4
5include_bspdir = $(includedir)/bsp
6
7###############################################################################
8#                  Data                                                       #
9###############################################################################
10
11dist_project_lib_DATA = bsp_specs
12
13noinst_LIBRARIES = libbspstart.a
14
15libbspstart_a_SOURCES = ../shared/start/start.S
16
17project_lib_DATA =
18project_lib_DATA += start.$(OBJEXT)
19project_lib_DATA += startup/linkcmds
20
21EXTRA_DIST = startup/linkcmds.stm32f4
22EXTRA_DIST += startup/linkcmds.stm32f105rc
23
24###############################################################################
25#                  Header                                                     #
26###############################################################################
27
28include_HEADERS =
29include_HEADERS += ../../shared/include/tm27.h
30include_HEADERS += include/bsp.h
31
32nodist_include_HEADERS =
33nodist_include_HEADERS += ../../shared/include/coverhd.h
34nodist_include_HEADERS += include/bspopts.h
35
36nodist_include_bsp_HEADERS =
37nodist_include_bsp_HEADERS += ../../shared/include/bootcard.h
38
39include_bsp_HEADERS =
40include_bsp_HEADERS += ../../shared/include/utility.h
41include_bsp_HEADERS += ../../shared/include/irq-generic.h
42include_bsp_HEADERS += ../../shared/include/irq-info.h
43include_bsp_HEADERS += ../../shared/include/stackalloc.h
44include_bsp_HEADERS += ../shared/include/start.h
45include_bsp_HEADERS += ../shared/armv7m/include/armv7m-irq.h
46include_bsp_HEADERS += include/irq.h
47include_bsp_HEADERS += include/usart.h
48include_bsp_HEADERS += include/stm32f4.h
49include_bsp_HEADERS += include/stm32f10xxx_gpio.h
50include_bsp_HEADERS += include/stm32f10xxx_rcc.h
51include_bsp_HEADERS += include/stm32f10xxx_exti.h
52include_bsp_HEADERS += include/stm32f4xxxx_gpio.h
53include_bsp_HEADERS += include/stm32f4xxxx_rcc.h
54include_bsp_HEADERS += include/stm32f4xxxx_flash.h
55include_bsp_HEADERS += include/stm32_i2c.h
56include_bsp_HEADERS += include/i2c.h
57include_bsp_HEADERS += include/stm32_usart.h
58include_bsp_HEADERS += include/io.h
59include_bsp_HEADERS += include/rcc.h
60
61###############################################################################
62#                  LibBSP                                                     #
63###############################################################################
64
65noinst_LIBRARIES += libbsp.a
66
67libbsp_a_SOURCES =
68libbsp_a_CPPFLAGS =
69libbsp_a_LIBADD =
70
71# Shared
72libbsp_a_SOURCES += ../../shared/bootcard.c
73libbsp_a_SOURCES += ../../shared/bspclean.c
74libbsp_a_SOURCES += ../../shared/bspgetworkarea.c
75libbsp_a_SOURCES += ../../shared/bsplibc.c
76libbsp_a_SOURCES += ../../shared/bsppost.c
77libbsp_a_SOURCES += ../../shared/bsppredriverhook.c
78libbsp_a_SOURCES += ../../shared/bsppretaskinghook.c
79libbsp_a_SOURCES += ../../shared/cpucounterread.c
80libbsp_a_SOURCES += ../../shared/cpucounterdiff.c
81libbsp_a_SOURCES += ../../shared/gnatinstallhandler.c
82libbsp_a_SOURCES += ../../shared/sbrk.c
83libbsp_a_SOURCES += ../../shared/src/stackalloc.c
84
85# Startup
86libbsp_a_SOURCES += ../shared/startup/bsp-start-memcpy.S
87libbsp_a_SOURCES += startup/bspstart.c
88libbsp_a_SOURCES += startup/bspstarthook.c
89libbsp_a_SOURCES += startup/bspreset.c
90libbsp_a_SOURCES += startup/io.c
91libbsp_a_SOURCES += startup/rcc.c
92libbsp_a_SOURCES += startup/start-config-io.c
93
94# IRQ
95libbsp_a_SOURCES += ../../shared/src/irq-default-handler.c
96libbsp_a_SOURCES += ../../shared/src/irq-generic.c
97libbsp_a_SOURCES += ../../shared/src/irq-info.c
98libbsp_a_SOURCES += ../../shared/src/irq-legacy.c
99libbsp_a_SOURCES += ../../shared/src/irq-server.c
100libbsp_a_SOURCES += ../../shared/src/irq-shell.c
101libbsp_a_SOURCES += ../shared/armv7m/irq/armv7m-irq.c
102libbsp_a_SOURCES += ../shared/armv7m/irq/armv7m-irq-dispatch.c
103
104# Console
105libbsp_a_SOURCES += ../../shared/console.c
106libbsp_a_SOURCES += ../../shared/console_control.c
107libbsp_a_SOURCES += ../../shared/console_read.c
108libbsp_a_SOURCES += ../../shared/console_select.c
109libbsp_a_SOURCES += ../../shared/console_write.c
110libbsp_a_SOURCES += console/console-config.c
111libbsp_a_SOURCES += console/usart.c
112
113# I2C
114libbsp_a_SOURCES += i2c/i2c.c
115libbsp_a_SOURCES += i2c/i2c-config.c
116
117# Clock
118libbsp_a_SOURCES += ../../shared/clockdrv_shell.h
119libbsp_a_SOURCES += ../shared/armv7m/clock/armv7m-clock-config.c
120
121# Timer
122libbsp_a_SOURCES += ../../shared/timerstub.c
123
124# Cache
125libbsp_a_SOURCES += ../../../libcpu/shared/src/cache_manager.c
126libbsp_a_SOURCES += ../../../libcpu/arm/shared/cache/cache_.h
127libbsp_a_CPPFLAGS += -I$(srcdir)/../../../libcpu/arm/shared/include
128
129###############################################################################
130#                  Special Rules                                              #
131###############################################################################
132
133DISTCLEANFILES = include/bspopts.h
134
135include $(srcdir)/preinstall.am
136include $(top_srcdir)/../../../../automake/local.am
Note: See TracBrowser for help on using the repository browser.