blob: f3fea380028249623de318a7dbe0560e6c1c667f [file] [log] [blame]
# Copyright 2023 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
import("//build_overrides/pi_pico.gni")
import("//build_overrides/pigweed.gni")
import("$dir_pw_system/system_target.gni")
pw_system_target("rp2040") {
cpu = PW_SYSTEM_CPU.CORTEX_M0PLUS
scheduler = PW_SYSTEM_SCHEDULER.FREERTOS
use_pw_malloc = false
global_configs = [ "$dir_pigweed/targets/rp2040:rp2040_hal_config" ]
build_args = {
pw_build_EXECUTABLE_TARGET_TYPE = "pico_executable"
pw_build_EXECUTABLE_TARGET_TYPE_FILE =
get_path_info("$dir_pigweed/targets/rp2040/pico_executable.gni",
"abspath")
pw_assert_BACKEND = dir_pw_assert_trap
pw_assert_LITE_BACKEND = dir_pw_assert_trap
pw_cpu_exception_ENTRY_BACKEND =
"$dir_pw_cpu_exception_cortex_m:cpu_exception_armv6m"
pw_cpu_exception_HANDLER_BACKEND = "$dir_pw_cpu_exception:basic_handler"
pw_cpu_exception_SUPPORT_BACKEND = "$dir_pw_cpu_exception_cortex_m:support"
pw_log_BACKEND = dir_pw_log_tokenized
pw_log_tokenized_HANDLER_BACKEND = "$dir_pw_system:log_backend.impl"
pw_third_party_freertos_CONFIG =
"$dir_pigweed/targets/rp2040:rp2040_freertos_config"
pw_third_party_freertos_PORT = "$dir_pw_third_party/freertos:arm_cm0"
pw_sync_INTERRUPT_SPIN_LOCK_BACKEND =
"$dir_pw_sync_freertos:interrupt_spin_lock"
pw_sys_io_BACKEND = dir_pw_sys_io_rp2040
pw_build_LINK_DEPS += [
"$dir_pigweed/targets/rp2040:pre_init",
"$dir_pw_assert:impl",
"$dir_pw_cpu_exception:entry_impl",
"$dir_pw_log:impl",
]
pw_sync_COUNTING_SEMAPHORE_BACKEND =
"$dir_pw_sync_freertos:counting_semaphore"
pw_board_led_BACKEND = "//libraries/pw_board_led_rp2040"
}
}