| # 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/pigweed.gni") |
| |
| import("$dir_pw_boot/backend.gni") |
| import("$dir_pw_log/backend.gni") |
| import("$dir_pw_rpc/system_server/backend.gni") |
| import("$dir_pw_sync/backend.gni") |
| import("$dir_pw_sys_io/backend.gni") |
| |
| import("$dir_pw_toolchain/arm_gcc/toolchains.gni") |
| |
| _target_config = { |
| # Use the logging main. |
| pw_unit_test_MAIN = "$dir_pw_unit_test:logging_main" |
| |
| # Configuration options for Pigweed executable targets. |
| pw_build_EXECUTABLE_TARGET_TYPE = "mimxrt595_executable" |
| |
| pw_build_EXECUTABLE_TARGET_TYPE_FILE = |
| get_path_info("mimxrt595_executable.gni", "abspath") |
| |
| # Facade backends |
| pw_assert_BACKEND = dir_pw_assert_basic |
| pw_boot_BACKEND = "$dir_pw_boot_cortex_m:armv8m" |
| pw_chrono_SYSTEM_CLOCK_BACKEND = "$dir_pw_chrono_freertos:system_clock" |
| pw_chrono_SYSTEM_TIMER_BACKEND = "$dir_pw_chrono_freertos:system_timer" |
| pw_interrupt_CONTEXT_BACKEND = "$dir_pw_interrupt_cortex_m:context_armv8m" |
| pw_log_BACKEND = dir_pw_log_basic |
| pw_malloc_BACKEND = dir_pw_malloc_freelist |
| pw_sync_BINARY_SEMAPHORE_BACKEND = "$dir_pw_sync_freertos:binary_semaphore" |
| pw_sync_COUNTING_SEMAPHORE_BACKEND = |
| "$dir_pw_sync_freertos:counting_semaphore" |
| pw_sync_MUTEX_BACKEND = "$dir_pw_sync_freertos:mutex" |
| pw_sync_TIMED_MUTEX_BACKEND = "$dir_pw_sync_freertos:timed_mutex" |
| pw_sync_INTERRUPT_SPIN_LOCK_BACKEND = |
| "$dir_pw_sync_freertos:interrupt_spin_lock" |
| pw_sync_THREAD_NOTIFICATION_BACKEND = |
| "$dir_pw_sync_freertos:thread_notification" |
| pw_sync_TIMED_THREAD_NOTIFICATION_BACKEND = |
| "$dir_pw_sync_freertos:timed_thread_notification" |
| pw_sys_io_BACKEND = "$dir_pw_sys_io_mcuxpresso" |
| pw_thread_ID_BACKEND = "$dir_pw_thread_freertos:id" |
| pw_thread_SLEEP_BACKEND = "$dir_pw_thread_freertos:sleep" |
| pw_thread_THREAD_BACKEND = "$dir_pw_thread_freertos:thread" |
| pw_thread_YIELD_BACKEND = "$dir_pw_thread_freertos:yield" |
| |
| pw_rpc_system_server_BACKEND = "$dir_pw_hdlc:hdlc_sys_io_system_server" |
| |
| # Override the default pw_boot_cortex_m linker script and set the memory |
| # regions for the target. |
| pw_boot_cortex_m_LINKER_SCRIPT = |
| "//targets/mimxrt595_evk_freertos:flash_linker_script" |
| pw_target_mimxrt595_evk_freertos_LINK_CONFIG_DEFINES = [ |
| "PW_BOOT_FLASH_BEGIN=0x08001180", |
| "PW_BOOT_FLASH_SIZE=0x001FEE80", |
| "PW_BOOT_HEAP_SIZE=200K", |
| "PW_BOOT_MIN_STACK_SIZE=1K", |
| "PW_BOOT_RAM_BEGIN=0x20080000", |
| "PW_BOOT_RAM_SIZE=0x00280000", |
| "PW_BOOT_VECTOR_TABLE_BEGIN=0x08001000", |
| "PW_BOOT_VECTOR_TABLE_SIZE=0x00000180", |
| ] |
| |
| # Use FreeRTOS with locally specified config and port. |
| pw_third_party_freertos_CONFIG = |
| "//targets/mimxrt595_evk_freertos:freertos_config" |
| pw_third_party_freertos_PORT = |
| "//targets/mimxrt595_evk_freertos:freertos_port" |
| |
| pw_build_LINK_DEPS = [ |
| "$dir_pw_assert:impl", |
| "$dir_pw_log:impl", |
| "$dir_pw_toolchain/arm_gcc:arm_none_eabi_gcc_support", |
| ] |
| |
| current_cpu = "arm" |
| current_os = "" |
| } |
| |
| _toolchain_properties = { |
| final_binary_extension = ".elf" |
| } |
| |
| _target_default_configs = [ |
| "$dir_pw_build:extra_strict_warnings", |
| "$dir_pw_toolchain/arm_gcc:enable_float_printf", |
| ] |
| |
| pw_target_toolchain_mimxrt595_evk_freertos = { |
| _excluded_members = [ |
| "defaults", |
| "name", |
| ] |
| |
| debug = { |
| name = "mimxrt595_evk_freertos_debug" |
| _toolchain_base = pw_toolchain_arm_gcc.cortex_m33f_debug |
| forward_variables_from(_toolchain_base, "*", _excluded_members) |
| forward_variables_from(_toolchain_properties, "*") |
| defaults = { |
| forward_variables_from(_toolchain_base.defaults, "*") |
| forward_variables_from(_target_config, "*") |
| default_configs += _target_default_configs |
| } |
| } |
| |
| speed_optimized = { |
| name = "mimxrt595_evk_freertos_speed_optimized" |
| _toolchain_base = pw_toolchain_arm_gcc.cortex_m33f_speed_optimized |
| forward_variables_from(_toolchain_base, "*", _excluded_members) |
| forward_variables_from(_toolchain_properties, "*") |
| defaults = { |
| forward_variables_from(_toolchain_base.defaults, "*") |
| forward_variables_from(_target_config, "*") |
| default_configs += _target_default_configs |
| } |
| } |
| |
| size_optimized = { |
| name = "mimxrt595_evk_freertos_size_optimized" |
| _toolchain_base = pw_toolchain_arm_gcc.cortex_m33f_size_optimized |
| forward_variables_from(_toolchain_base, "*", _excluded_members) |
| forward_variables_from(_toolchain_properties, "*") |
| defaults = { |
| forward_variables_from(_toolchain_base.defaults, "*") |
| forward_variables_from(_target_config, "*") |
| default_configs += _target_default_configs |
| } |
| } |
| } |
| |
| # This list just contains the members of the above scope for convenience to make |
| # it trivial to generate all the toolchains in this file via a |
| # `generate_toolchains` target. |
| pw_target_toolchain_mimxrt595_evk_freertos_list = [ |
| pw_target_toolchain_mimxrt595_evk_freertos.debug, |
| pw_target_toolchain_mimxrt595_evk_freertos.speed_optimized, |
| pw_target_toolchain_mimxrt595_evk_freertos.size_optimized, |
| ] |