| # Copyright 2022 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_rpc/system_server/backend.gni") |
| import("$dir_pw_sys_io/backend.gni") |
| import("$dir_pw_third_party/stm32cube/stm32cube.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 = "stm32f429i_executable" |
| |
| pw_build_EXECUTABLE_TARGET_TYPE_FILE = |
| get_path_info("stm32f429i_executable.gni", "abspath") |
| |
| # Path to the bloaty config file for the output binaries. |
| pw_bloat_BLOATY_CONFIG = "$dir_pw_boot_cortex_m/bloaty_config.bloaty" |
| |
| #TODO: Fix test server: likely have to fork stm32f429i-disc1 implementation |
| # if (pw_use_test_server) { |
| # _test_runner_script = "py/stm32f429i_disc1_utils/unit_test_client.py" |
| # pw_unit_test_AUTOMATIC_RUNNER = |
| # get_path_info(_test_runner_script, "abspath") |
| # } |
| |
| # Facade backends |
| pw_assert_BACKEND = dir_pw_assert_basic |
| pw_boot_BACKEND = "$dir_pw_boot_cortex_m:armv7m" |
| |
| pw_chrono_SYSTEM_CLOCK_BACKEND = "$dir_pw_chrono_freertos:system_clock" |
| pw_interrupt_CONTEXT_BACKEND = "$dir_pw_interrupt_cortex_m:context_armv7m" |
| pw_sync_MUTEX_BACKEND = "$dir_pw_sync_freertos:mutex" |
| pw_sync_INTERRUPT_SPIN_LOCK_BACKEND = |
| "$dir_pw_sync_freertos:interrupt_spin_lock" |
| pw_sync_COUNTING_SEMAPHORE_BACKEND = |
| "$dir_pw_sync_freertos:counting_semaphore" |
| |
| ### pw_cpu_exception not yet used |
| # pw_cpu_exception_ENTRY_BACKEND = |
| # "$dir_pw_cpu_exception_cortex_m:cpu_exception_armv7m" |
| # pw_cpu_exception_HANDLER_BACKEND = "$dir_pw_cpu_exception:basic_handler" |
| # pw_cpu_exception_SUPPORT_BACKEND = |
| # "$dir_pw_cpu_exception_cortex_m:support_armv7m" |
| pw_log_BACKEND = dir_pw_log_basic |
| pw_sys_io_BACKEND = dir_pw_sys_io_stm32cube |
| pw_sys_io_stm32cube_CONFIG = "$dir_pigweed_experimental/targets/stm32f429i_disc1_stm32cube:module_config_overrides" |
| |
| pw_third_party_freertos_CONFIG = "$dir_pigweed_experimental/targets/stm32f429i_disc1_stm32cube:stm32f4xx_freertos_config" |
| pw_third_party_freertos_PORT = |
| "$dir_pigweed_experimental/third_party/freertos:arm_cm4f_freertos_port" |
| |
| #TODO: remove dependency on stm32f429i-disc1 rpc server. |
| pw_rpc_system_server_BACKEND = |
| "$dir_pigweed/targets/stm32f429i_disc1:system_rpc_server" |
| pw_malloc_BACKEND = dir_pw_malloc_freelist |
| |
| pw_display_DISPLAY_RESIZE = 1 |
| |
| pw_boot_cortex_m_LINK_CONFIG_DEFINES = [ |
| "PW_BOOT_FLASH_BEGIN=0x08000200", |
| "PW_BOOT_FLASH_SIZE=2048K", |
| |
| # TODO(pwbug/219): Currently "pw_tokenizer/detokenize_test" requires at |
| # least 6K bytes in heap when using pw_malloc_freelist. The heap size |
| # required for tests should be investigated. |
| "PW_BOOT_HEAP_SIZE=7K", |
| "PW_BOOT_MIN_STACK_SIZE=1K", |
| "PW_BOOT_RAM_BEGIN=0x20000000", |
| "PW_BOOT_RAM_SIZE=192K", |
| "PW_BOOT_VECTOR_TABLE_BEGIN=0x08000000", |
| "PW_BOOT_VECTOR_TABLE_SIZE=512", |
| ] |
| |
| 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 = "" |
| |
| pw_board_led_BACKEND = dir_pw_board_led_stm32cube |
| pw_board_led_stm32cube_gpio_port = "G" |
| pw_board_led_stm32cube_gpio_pin = "13" |
| app_common_BACKEND = |
| "$dir_pigweed_experimental/applications/app_common_impl:stm32cube" |
| pw_app_common_DISPLAY_WIDTH = "320" |
| pw_app_common_DISPLAY_HEIGHT = "240" |
| pw_app_common_STM32_DISPLAY_CS_PORT = "C" |
| pw_app_common_DISPLAY_CS_GPIO = "2" |
| pw_app_common_STM32_DISPLAY_DC_PORT = "D" |
| pw_app_common_DISPLAY_DC_GPIO = "13" |
| pw_app_common_DISPLAY_RESET_GPIO = "-1" |
| |
| pw_display_driver_ili9341_MADCTL = "0xA8" # BGR + rotate 90 (MY|MV). |
| |
| pw_spin_delay_BACKEND = dir_pw_spin_delay_stm32cube |
| |
| # Configure backend for pw_touchscreen |
| pw_touchscreen_BACKEND = "$dir_pw_touchscreen_null" |
| |
| dir_pw_third_party_stm32cube = dir_pw_third_party_stm32cube_f4 |
| pw_third_party_stm32cube_PRODUCT = "STM32F429xx" |
| pw_third_party_stm32cube_CONFIG = "$dir_pigweed_experimental/targets/stm32f429i_disc1_stm32cube:stm32f4xx_hal_config" |
| pw_third_party_stm32cube_CORE_INIT = "" |
| } |
| |
| _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_stm32f429i_disc1 = { |
| _excluded_members = [ |
| "defaults", |
| "name", |
| ] |
| |
| debug = { |
| name = "stm32f429i_disc1_stm32cube_debug" |
| _toolchain_base = pw_toolchain_arm_gcc.cortex_m4f_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 = "stm32f429i_disc1_stm32cube_speed_optimized" |
| _toolchain_base = pw_toolchain_arm_gcc.cortex_m4f_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 = "stm32f429i_disc1_stm32cube_size_optimized" |
| _toolchain_base = pw_toolchain_arm_gcc.cortex_m4f_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_stm32f429i_disc1_list = [ |
| pw_target_toolchain_stm32f429i_disc1.debug, |
| pw_target_toolchain_stm32f429i_disc1.speed_optimized, |
| pw_target_toolchain_stm32f429i_disc1.size_optimized, |
| ] |