|
| 1 | +# ############################################################################## |
| 2 | +# boards/arm/kl/freedom-kl25z/src/CMakeLists.txt |
| 3 | +# |
| 4 | +# SPDX-License-Identifier: Apache-2.0 |
| 5 | +# |
| 6 | +# Licensed to the Apache Software Foundation (ASF) under one or more contributor |
| 7 | +# license agreements. See the NOTICE file distributed with this work for |
| 8 | +# additional information regarding copyright ownership. The ASF licenses this |
| 9 | +# file to you under the Apache License, Version 2.0 (the "License"); you may not |
| 10 | +# use this file except in compliance with the License. You may obtain a copy of |
| 11 | +# the License at |
| 12 | +# |
| 13 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 14 | +# |
| 15 | +# Unless required by applicable law or agreed to in writing, software |
| 16 | +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 17 | +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 18 | +# License for the specific language governing permissions and limitations under |
| 19 | +# the License. |
| 20 | +# |
| 21 | +# ############################################################################## |
| 22 | + |
| 23 | +set(SRCS kl_boardinitialize.c) |
| 24 | + |
| 25 | +if(CONFIG_BOARDCTL) |
| 26 | + list(APPEND SRCS kl_appinit.c) |
| 27 | +endif() |
| 28 | + |
| 29 | +if(CONFIG_KL_TSI) |
| 30 | + list(APPEND SRCS kl_tsi.c) |
| 31 | +endif() |
| 32 | + |
| 33 | +if(CONFIG_KL_SPI0) |
| 34 | + list(APPEND SRCS kl_spi.c) |
| 35 | +else() |
| 36 | + if(CONFIG_KL_SPI1) |
| 37 | + list(APPEND SRCS kl_spi.c) |
| 38 | + endif() |
| 39 | +endif() |
| 40 | + |
| 41 | +if(CONFIG_ARCH_LEDS) |
| 42 | + list(APPEND SRCS kl_led.c) |
| 43 | +endif() |
| 44 | + |
| 45 | +if(CONFIG_KL_USBOTG) |
| 46 | + list(APPEND SRCS kl_usb.c) |
| 47 | +endif() |
| 48 | + |
| 49 | +if(CONFIG_PWM) |
| 50 | + list(APPEND SRCS kl_pwm.c) |
| 51 | +endif() |
| 52 | + |
| 53 | +if(CONFIG_SENSORS_QENCODER) |
| 54 | + list(APPEND SRCS kl_qencoder.c) |
| 55 | +endif() |
| 56 | + |
| 57 | +if(CONFIG_WATCHDOG) |
| 58 | + list(APPEND SRCS kl_watchdog.c) |
| 59 | +endif() |
| 60 | + |
| 61 | +if(CONFIG_SENSORS_ADXL345) |
| 62 | + list(APPEND SRCS kl_adxl345.c) |
| 63 | +endif() |
| 64 | + |
| 65 | +target_sources(board PRIVATE ${SRCS}) |
| 66 | + |
| 67 | +set_property(GLOBAL PROPERTY LD_SCRIPT |
| 68 | + "${NUTTX_BOARD_DIR}/scripts/freedom-kl25z.ld") |
0 commit comments