1# Copyright 2024 The Pigweed Authors 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); you may not 4# use this file except in compliance with the License. You may obtain a copy of 5# the License at 6# 7# https://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12# License for the specific language governing permissions and limitations under 13# the License. 14 15load("@rules_python//python:defs.bzl", "py_library") 16load("//pw_build:python.bzl", "pw_py_binary") 17 18package(default_visibility = ["//visibility:public"]) 19 20py_library( 21 name = "pw_build_mcuxpresso", 22 srcs = [ 23 "pw_build_mcuxpresso/__init__.py", 24 "pw_build_mcuxpresso/bazel.py", 25 "pw_build_mcuxpresso/common.py", 26 "pw_build_mcuxpresso/components.py", 27 "pw_build_mcuxpresso/consts.py", 28 "pw_build_mcuxpresso/gn.py", 29 "pw_build_mcuxpresso/readme_generator.py", 30 "pw_build_mcuxpresso/west_wrap.py", 31 ], 32 imports = ["."], 33) 34 35pw_py_binary( 36 name = "mcuxpresso_builder", 37 srcs = [ 38 "pw_build_mcuxpresso/__main__.py", 39 ], 40 main = "pw_build_mcuxpresso/__main__.py", 41 deps = [ 42 ":pw_build_mcuxpresso", 43 "@python_packages//west", 44 ], 45) 46 47pw_py_binary( 48 name = "mcuxpresso_builder_rt595", 49 srcs = [ 50 "pw_build_mcuxpresso/__main__.py", 51 ], 52 args = [ 53 "EVK-MIMXRT595_manifest_v3_14.xml", 54 "--mcuxpresso-repo=https://github.com/nxp-mcuxpresso/mcux-sdk", 55 "--mcuxpresso-rev=MCUX_2.16.000", 56 "--device-core=cm33_MIMXRT595S", 57 "--output-path=$(GENDIR)/mcuxpresso-sdk", 58 "--clean", 59 "--include", 60 "project_template.evkmimxrt595.MIMXRT595S", 61 "component.serial_manager_uart.MIMXRT595S", 62 "platform.drivers.flexcomm_i2c.MIMXRT595S", 63 "platform.drivers.i3c.MIMXRT595S", 64 "platform.drivers.flexcomm_spi.MIMXRT595S", 65 "platform.drivers.flexcomm_usart_dma.MIMXRT595S", 66 "platform.drivers.flexcomm_usart_freertos.MIMXRT595S", 67 "platform.drivers.flexio_spi.MIMXRT595S", 68 "platform.drivers.inputmux.MIMXRT595S", 69 "platform.drivers.lpc_dma.MIMXRT595S", 70 "platform.drivers.lpc_gpio.MIMXRT595S", 71 "platform.drivers.mu.MIMXRT595S", 72 "platform.drivers.pint.MIMXRT595S", 73 "platform.drivers.power.MIMXRT595S", 74 "component.serial_manager.MIMXRT595S", 75 "platform.utilities.assert.MIMXRT595S", 76 "utility.debug_console.MIMXRT595S", 77 "--exclude", 78 "device.MIMXRT595S_startup.MIMXRT595S", 79 # Don't need to generate build rules for freertos, we use pigweed's. 80 "middleware.freertos-kernel.MIMXRT595S", 81 ], 82 main = "pw_build_mcuxpresso/__main__.py", 83 deps = [ 84 ":pw_build_mcuxpresso", 85 "@python_packages//west", 86 ], 87) 88