# Copyright 2024 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.
load("@pigweed//pw_build:merge_flags.bzl", "flags_from_dict")
load("@pigweed//targets/rp2040:transition.bzl", "RP2_SYSTEM_FLAGS")

package(default_visibility = ["//visibility:public"])

# This is an incomplete platform, do NOT try to pass this
# as a --platforms flag value. Use :rp2040 or :rp2350.
platform(
    name = "rp2_common",
    constraint_values = [
        "@freertos//:disable_task_statics",
        "@pigweed//pw_build/constraints/rtos:freertos",
        "@pigweed//pw_build/constraints/chipset:rp2040",  # TODO: https://pwbug.dev/343487589 - Use Pico SDK constraints.
        "@pigweed//pw_cpu_exception:enabled",
        "@pigweed//pw_interrupt_cortex_m:backend",
        "@platforms//os:none",
    ],
    flags = flags_from_dict(RP2_SYSTEM_FLAGS | {
        "//system:system": "//targets/rp2:system",
        "@freertos//:freertos_config": "//targets/rp2:freertos_config",
        "@pico-sdk//bazel/config:PICO_CLIB": "llvm_libc",
        "@pico-sdk//bazel/config:PICO_TOOLCHAIN": "clang",
        "@pigweed//pw_build:default_module_config": "//system:module_config",
        "@pigweed//pw_system:extra_platform_libs": "//targets/rp2:extra_platform_libs",
        "@pigweed//pw_system:io_backend": "@pigweed//pw_system:sys_io_target_io",
        "@pigweed//pw_toolchain:cortex-m_toolchain_kind": "clang",
        "@pigweed//pw_unit_test:config_override": "//targets/rp2:64k_unit_tests",
        "@pigweed//pw_unit_test:main": "//targets/rp2:unit_test_rpc_main",
    }),
)

platform(
    name = "rp2040",
    constraint_values = [
        "@freertos//:port_ARM_CM0",
        "@pico-sdk//bazel/constraint:rp2040",
        # For toolchain selection.
        "@platforms//cpu:armv6-m",
        "@pw_toolchain//constraints/arm_mcpu:cortex-m0",
    ],
    flags = flags_from_dict({
        "@pico-sdk//bazel/config:PICO_DEFAULT_LINKER_SCRIPT": "@pigweed//targets/rp2040:rp2040_linker_script",
    }),
    parents = [":rp2_common"],
)

platform(
    name = "rp2350",
    constraint_values = [
        "@freertos//:port_ARM_CM33_NTZ",
        "@pico-sdk//bazel/constraint:rp2350",
        # For toolchain selection.
        "@platforms//cpu:armv8-m",
        "@pw_toolchain//constraints/arm_mcpu:cortex-m33",
    ],
    flags = flags_from_dict({
        "@pico-sdk//bazel/config:PICO_DEFAULT_LINKER_SCRIPT": "@pigweed//targets/rp2040:rp2350_linker_script",
    }),
    parents = [":rp2_common"],
)

cc_library(
    name = "extra_platform_libs",
    deps = [
        "@pico-sdk//src/rp2_common/pico_stdlib:pico_stdlib",
        "@pigweed//pw_tokenizer:linker_script",
    ] + select({
        "@pigweed//pw_toolchain/cc/current_toolchain:compiler_is_clang": [
            "@pigweed//pw_libcxx",
        ],
        "//conditions:default": [],
    }),
    alwayslink = 1,
)

cc_library(
    name = "freertos_config",
    hdrs = [
        "config/FreeRTOSConfig.h",
    ],
    includes = ["config"],
    deps = ["@pigweed//third_party/freertos:config_assert"],
)

cc_library(
    name = "thread_config_overrides",
    defines = [
        "PW_THREAD_FREERTOS_CONFIG_JOINING_ENABLED=1",
    ],
)

cc_library(
    name = "system",
    srcs = [
        "led.cc",
        "system.cc",
    ],
    implementation_deps = [
        "//system:headers",
        "@pico-sdk//src/rp2_common/cmsis:cmsis_core",
        "@pico-sdk//src/rp2_common/hardware_adc",
        "@pico-sdk//src/rp2_common/hardware_exception:hardware_exception",
        "@pico-sdk//src/rp2_common/pico_stdlib:pico_stdlib",
        "@pigweed//pw_channel",
        "@pigweed//pw_channel:rp2_stdio_channel",
        "@pigweed//pw_cpu_exception:entry_backend_impl",
        "@pigweed//pw_digital_io_rp2040",
        "@pigweed//pw_multibuf:simple_allocator",
        "@pigweed//pw_system:async",
        "@pigweed//third_party/freertos:support",
    ],
    deps = ["//system:headers"],
    alwayslink = 1,
)

cc_library(
    name = "unit_test_rpc_main",
    testonly = True,
    srcs = ["unit_test_rpc_main.cc"],
    deps = [
        "//system",
        "@pigweed//pw_log",
        "@pigweed//pw_system:async",
        "@pigweed//pw_unit_test:rpc_service",

        # These should be provided by pw_system:async.
        "@pigweed//pw_assert:assert_backend_impl",
        "@pigweed//pw_assert:check_backend_impl",
        "@pigweed//pw_log:backend_impl",
        "@pigweed//pw_system:extra_platform_libs",
    ],
)

# Several tests store `TestWorker` thread contexts in their unit test object.
# Since these thread stacks are currently 32k, the test objects may be large.
cc_library(
    name = "64k_unit_tests",
    defines = [
        "PW_UNIT_TEST_CONFIG_MEMORY_POOL_SIZE=65536",
    ],
)
