# 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 | {
        "//apps/production:threads": "//targets/rp2:production_app_threads",
        "//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_thread_freertos:config_override": "//targets/rp2:thread_config_overrides",
        "@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",
    ],
    hdrs = [
        "enviro_pins.h",
    ],
    implementation_deps = [
        "//device:bme688",
        "//device:ltr559",
        "//device:pico_board",
        "//device:pico_pwm_gpio",
        "//modules/buttons:manager",
        "//system:headers",
        "//system:worker",
        "@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_i2c_rp2040",
        "@pigweed//pw_multibuf:simple_allocator",
        "@pigweed//pw_system:async",
        "@pigweed//third_party/freertos:support",
    ],
    deps = ["//system:headers"],
    alwayslink = 1,
)

cc_library(
    name = "production_app_threads",
    srcs = ["production_app_threads.cc"],
    implementation_deps = ["@pigweed//pw_thread_freertos:thread"],
    deps = ["//apps/production:threads_headers"],
)

cc_library(
    name = "unit_test_rpc_main",
    testonly = True,
    srcs = ["unit_test_rpc_main.cc"],
    deps = [
        "//system:worker",
        "//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",
    ],
)
