xref: /aosp_15_r20/external/pigweed/third_party/pico_sdk/pi_pico.gni (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1# Copyright 2022 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
15declare_args() {
16  # PIGWEED ONLY: Since Pigweed doesn't host 3p code, this points to the actual
17  # location of the Pi Pico source. If the GN build is ever upstreamed, this
18  # variable would not be needed.
19  PICO_SRC_DIR = ""
20}
21
22# Actual Pi Pico build configuration options.
23declare_args() {
24  PICO_BARE_METAL = false
25  PICO_BOARD = "\"rp2040\""
26  PICO_BOARD_HEADER_DIR = get_path_info("src/boards", "abspath")
27
28  # TODO(amontanez): This needs to be thought through fully.
29  PICO_GENERATED_CONFIG = get_path_info("src/rp2040:rp2040_config", "abspath")
30
31  # TODO(amontanez): This needs to be thought through fully, but can wait until
32  # a Pi Pico successor that requires it.
33  PICO_PLATFORM_DIR = get_path_info("src/rp2040", "abspath")
34
35  # Allows defining a custom linker script.
36  PICO_LINKER_SCRIPT = ":linker_script"
37}
38