xref: /aosp_15_r20/external/pigweed/third_party/stm32cube/stm32cube.gni (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1# Copyright 2021 The Pigweed Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4# use this file except in compliance with the License. You may obtain a copy of
5# the License at
6#
7#     https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations under
13# the License.
14
15import("//build_overrides/pigweed.gni")
16
17declare_args() {
18  # stm32cube_xx install directories
19  dir_pw_third_party_stm32cube_f0 = ""
20  dir_pw_third_party_stm32cube_f1 = ""
21  dir_pw_third_party_stm32cube_f2 = ""
22  dir_pw_third_party_stm32cube_f3 = ""
23  dir_pw_third_party_stm32cube_f4 = ""
24  dir_pw_third_party_stm32cube_f7 = ""
25  dir_pw_third_party_stm32cube_g0 = ""
26  dir_pw_third_party_stm32cube_g4 = ""
27  dir_pw_third_party_stm32cube_h7 = ""
28  dir_pw_third_party_stm32cube_l0 = ""
29  dir_pw_third_party_stm32cube_l1 = ""
30  dir_pw_third_party_stm32cube_l4 = ""
31  dir_pw_third_party_stm32cube_l5 = ""
32  dir_pw_third_party_stm32cube_wb = ""
33  dir_pw_third_party_stm32cube_wl = ""
34
35  # The currently selected stm32cube_xx package
36  # This can be selected by the target by doing something like:
37  #  dir_pw_third_party_stm32cube = dir_pw_third_party_stm32cube_f4
38  dir_pw_third_party_stm32cube = ""
39
40  # The Product specified in as much detail as possible.
41  # i.e. "stm32f429zit", "stm32l552ze", "stm32f207zg", etc.
42  pw_third_party_stm32cube_PRODUCT = ""
43
44  # pw_source_set with `stm32{family}xx_hal_conf.h`
45  # The default uses the in-tree `stm32{family}xx_hal_conf_template.h`.
46  pw_third_party_stm32cube_CONFIG =
47      "$dir_pw_third_party/stm32cube:hal_config_template"
48
49  # pw_source_set containing timebase
50  # The default uses the in-tree `stm32{family}xx_hal_timebase_tim_template.c`
51  pw_third_party_stm32cube_TIMEBASE =
52      "$dir_pw_third_party/stm32cube:hal_timebase_template"
53
54  # pw_source_set containing cmsis init logic
55  # The default uses the in-tree `system_stm32{family}xx.c`
56  pw_third_party_stm32cube_CMSIS_INIT =
57      "$dir_pw_third_party/stm32cube:cmsis_init_template"
58
59  # pw_source_set containing the core initization logic. This normally includes
60  # a `startup_stm32{...}.s` + a dependent `pw_linker_script`. The default
61  # `core_init_template` uses the upstream startup and linker script matching
62  # $pw_third_party_stm32cube_PRODUCT. If set to "", you must provide your own
63  # linker/startup logic somewhere else in the build.
64  pw_third_party_stm32cube_CORE_INIT =
65      "$dir_pw_third_party/stm32cube:core_init_template"
66}
67