mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 14:53:47 +08:00
build: add initial cmake build system
1. Update all CMakeLists.txt to adapt to new layout 2. Fix cmake build break 3. Update all new file license 4. Fully compatible with current compilation environment(use configure.sh or cmake as you choose) ------------------ How to test From within nuttx/. Configure: cmake -B build -DBOARD_CONFIG=sim/nsh -GNinja cmake -B build -DBOARD_CONFIG=sim:nsh -GNinja cmake -B build -DBOARD_CONFIG=sabre-6quad/smp -GNinja cmake -B build -DBOARD_CONFIG=lm3s6965-ek/qemu-flat -GNinja (or full path in custom board) : cmake -B build -DBOARD_CONFIG=$PWD/boards/sim/sim/sim/configs/nsh -GNinja This uses ninja generator (install with sudo apt install ninja-build). To build: $ cmake --build build menuconfig: $ cmake --build build -t menuconfig -------------------------- 2. cmake/build: reformat the cmake style by cmake-format https://github.com/cheshirekow/cmake_format $ pip install cmakelang $ for i in `find -name CMakeLists.txt`;do cmake-format $i -o $i;done $ for i in `find -name *\.cmake`;do cmake-format $i -o $i;done Co-authored-by: Matias N <matias@protobits.dev> Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
@@ -0,0 +1,183 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/cxd56xx/common/CMakeLists.txt
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||
# license agreements. See the NOTICE file distributed with this work for
|
||||
# additional information regarding copyright ownership. The ASF licenses this
|
||||
# file to you 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
|
||||
#
|
||||
# http://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.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
if(CONFIG_ARCH_BOARD_COMMON)
|
||||
set(SRCS)
|
||||
|
||||
list(APPEND SRCS src/cxd56_boot.c)
|
||||
|
||||
if(CONFIG_AUDIO_CXD56)
|
||||
list(APPEND SRCS src/cxd56_audio.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_CXD56_AUDIO)
|
||||
list(APPEND SRCS src/cxd56_audio.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_MODEM_ALTMDM)
|
||||
list(APPEND SRCS src/cxd56_altmdm.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BOARDCTL_UNIQUEID)
|
||||
list(APPEND SRCS src/cxd56_uid.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_CXD56_BACKUPLOG)
|
||||
list(APPEND SRCS src/cxd56_crashdump.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS)
|
||||
list(APPEND SRCS src/cxd56_sensors.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_AK09912)
|
||||
list(APPEND SRCS src/cxd56_ak09912_i2c.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_AK09912_SCU)
|
||||
list(APPEND SRCS src/cxd56_ak09912_scu.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_APDS9930_SCU)
|
||||
list(APPEND SRCS src/cxd56_apds9930_scu.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_APDS9960)
|
||||
list(APPEND SRCS src/cxd56_apds9960_i2c.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_BH1721FVC_SCU)
|
||||
list(APPEND SRCS src/cxd56_bh1721fvc_scu.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_BH1745NUC_SCU)
|
||||
list(APPEND SRCS src/cxd56_bh1745nuc_scu.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_BM1383GLV_SCU)
|
||||
list(APPEND SRCS src/cxd56_bm1383glv_scu.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_BM1422GMV_SCU)
|
||||
list(APPEND SRCS src/cxd56_bm1422gmv_scu.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_BMI160_I2C)
|
||||
list(APPEND SRCS src/cxd56_bmi160_i2c.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_BMI160_SCU)
|
||||
list(APPEND SRCS src/cxd56_bmi160_scu.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_BMI160_SPI)
|
||||
list(APPEND SRCS src/cxd56_bmi160_spi.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_BMP280)
|
||||
list(APPEND SRCS src/cxd56_bmp280_i2c.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_BMP280_SCU)
|
||||
list(APPEND SRCS src/cxd56_bmp280_scu.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_KX022_SCU)
|
||||
list(APPEND SRCS src/cxd56_kx022_scu.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_LT1PA01_SCU)
|
||||
list(APPEND SRCS src/cxd56_lt1pa01_scu.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_RPR0521RS_SCU)
|
||||
list(APPEND SRCS src/cxd56_rpr0521rs_scu.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_SCD41)
|
||||
list(APPEND SRCS src/cxd56_scd41_i2c.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_NETDEVICES)
|
||||
list(APPEND SRCS src/cxd56_netinit.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_WL_GS2200M)
|
||||
list(APPEND SRCS src/cxd56_gs2200m.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_LCD_ILI9340)
|
||||
list(APPEND SRCS src/cxd56_ili9340.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_LCD_LPM013M091A)
|
||||
list(APPEND SRCS src/cxd56_lpm013m091a.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_CXD56_SFC)
|
||||
list(APPEND SRCS src/cxd56_flash.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_USBMSC)
|
||||
list(APPEND SRCS src/cxd56_usbmsc.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_CXD56_I2C_DRIVER)
|
||||
list(APPEND SRCS src/cxd56_i2cdev.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_I2C_BITBANG)
|
||||
list(APPEND SRCS src/cxd56_i2cdev_bitbang.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_CXD56_SPI_DRIVER)
|
||||
list(APPEND SRCS src/cxd56_spidev.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_VIDEO_ISX012)
|
||||
list(APPEND SRCS src/cxd56_isx012.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_VIDEO_ISX019)
|
||||
list(APPEND SRCS src/cxd56_isx019.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_CXD56_IMAGEPROC)
|
||||
list(APPEND SRCS src/cxd56_imageproc.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BCM20706)
|
||||
list(APPEND SRCS src/cxd56_bcm20706.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_CXD56_EMMC)
|
||||
list(APPEND SRCS src/cxd56_emmcdev.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_CXD56_SPISD)
|
||||
list(APPEND SRCS src/cxd56_spisd.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BOARD_USBDEV_SERIALSTR)
|
||||
list(APPEND SRCS src/cxd56_usbdevserialstr.c)
|
||||
endif()
|
||||
|
||||
target_sources(board PRIVATE ${SRCS})
|
||||
endif()
|
||||
@@ -0,0 +1,45 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/cxd56xx/spresense/CMakeLists.txt
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||
# license agreements. See the NOTICE file distributed with this work for
|
||||
# additional information regarding copyright ownership. The ASF licenses this
|
||||
# file to you 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
|
||||
#
|
||||
# http://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.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
if(NOT CONFIG_BUILD_FLAT)
|
||||
add_subdirectory(kernel)
|
||||
set_property(
|
||||
GLOBAL PROPERTY LD_SCRIPT_USER ${CMAKE_CURRENT_LIST_DIR}/scripts/memory.ld
|
||||
${CMAKE_CURRENT_LIST_DIR}/scripts/user-space.ld)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(
|
||||
nuttx_post_build
|
||||
SOURCE_DIR ${CMAKE_SOURCE_DIR}/tools/cxd56
|
||||
INSTALL_DIR ${CMAKE_BINARY_DIR}/tools/cxd56
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}
|
||||
USES_TERMINAL_CONFIGURE true
|
||||
USES_TERMINAL_BUILD true
|
||||
USES_TERMINAL_INSTALL true
|
||||
DEPENDS nuttx)
|
||||
|
||||
add_custom_command(
|
||||
TARGET nuttx_post_build
|
||||
POST_BUILD
|
||||
BYPRODUCTS nuttx.spk
|
||||
COMMAND ${CMAKE_BINARY_DIR}/bin/mkspk -c2 nuttx nuttx nuttx.spk
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
@@ -0,0 +1,89 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/cxd56xx/spresense/src/CMakeLists.txt
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||
# license agreements. See the NOTICE file distributed with this work for
|
||||
# additional information regarding copyright ownership. The ASF licenses this
|
||||
# file to you 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
|
||||
#
|
||||
# http://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.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
set(SRCS)
|
||||
|
||||
set(SRCS cxd56_main.c cxd56_clock.c cxd56_bringup.c)
|
||||
|
||||
if(CONFIG_BOARDCTL)
|
||||
list(APPEND SRCS cxd56_appinit.c)
|
||||
list(APPEND SRCS cxd56_power.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BOARDCTL_IOCTL)
|
||||
list(APPEND SRCS cxd56_ioctl.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_ARCH_LEDS)
|
||||
list(APPEND SRCS cxd56_leds.c)
|
||||
elseif(CONFIG_USERLED)
|
||||
list(APPEND SRCS cxd56_userleds.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_ARCH_BUTTONS)
|
||||
list(APPEND SRCS cxd56_buttons.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_CXD56_GPIO_IRQ)
|
||||
list(APPEND SRCS cxd56_gpioif.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_CXD56_PWM)
|
||||
list(APPEND SRCS cxd56_pwm.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SPI)
|
||||
list(APPEND SRCS cxd56_spi.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_CXD56_SDIO)
|
||||
list(APPEND SRCS cxd56_sdcard.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_CXD56_SDCARD_AUTOMOUNT)
|
||||
list(APPEND SRCS cxd56_automount.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_CXD56_GAUGE)
|
||||
list(APPEND SRCS cxd56_gauge.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_CXD56_CHARGER)
|
||||
list(APPEND SRCS cxd56_charger.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_USBDEV_COMPOSITE)
|
||||
list(APPEND SRCS cxd56_composite.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_MODEM_ALT1250)
|
||||
list(APPEND SRCS cxd56_alt1250_power.c)
|
||||
endif()
|
||||
|
||||
target_sources(board PRIVATE ${SRCS})
|
||||
|
||||
if(CONFIG_CXD56_USE_SYSBUS)
|
||||
set(LDSCRIPT ramconfig-new.ld)
|
||||
else()
|
||||
set(LDSCRIPT ramconfig.ld)
|
||||
endif()
|
||||
|
||||
# TODO: make this the default and then allow boards to redefine
|
||||
set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/${LDSCRIPT}")
|
||||
@@ -0,0 +1,28 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/imx6/sabre-6quad/CMakeLists.txt
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||
# license agreements. See the NOTICE file distributed with this work for
|
||||
# additional information regarding copyright ownership. The ASF licenses this
|
||||
# file to you 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
|
||||
#
|
||||
# http://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.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
if(NOT CONFIG_BUILD_FLAT)
|
||||
add_subdirectory(kernel)
|
||||
set_property(
|
||||
GLOBAL PROPERTY LD_SCRIPT_USER ${CMAKE_CURRENT_LIST_DIR}/scripts/memory.ld
|
||||
${CMAKE_CURRENT_LIST_DIR}/scripts/user-space.ld)
|
||||
endif()
|
||||
@@ -0,0 +1,36 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/imx6/sabre-6quad/src/CMakeLists.txt
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||
# license agreements. See the NOTICE file distributed with this work for
|
||||
# additional information regarding copyright ownership. The ASF licenses this
|
||||
# file to you 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
|
||||
#
|
||||
# http://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.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
set(SRCS imx_boardinit.c imx_bringup.c)
|
||||
|
||||
if(CONFIG_BOARDCTL)
|
||||
list(APPEND SRCS imx_appinit.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_ARCH_LEDS)
|
||||
list(APPEND SRCS imx_autoleds.c)
|
||||
else()
|
||||
list(APPEND SRCS imx_userleds.c)
|
||||
endif()
|
||||
|
||||
target_sources(board PRIVATE ${SRCS})
|
||||
|
||||
# TODO: make this the default and then allow boards to redefine
|
||||
set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/dramboot.ld")
|
||||
@@ -0,0 +1,22 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/stm32/common/CMakeLists.txt
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||
# license agreements. See the NOTICE file distributed with this work for
|
||||
# additional information regarding copyright ownership. The ASF licenses this
|
||||
# file to you 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
|
||||
#
|
||||
# http://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.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
add_subdirectory(src)
|
||||
target_include_directories(board PRIVATE include)
|
||||
@@ -0,0 +1,127 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/stm32/common/src/CMakeLists.txt
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||
# license agreements. See the NOTICE file distributed with this work for
|
||||
# additional information regarding copyright ownership. The ASF licenses this
|
||||
# file to you 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
|
||||
#
|
||||
# http://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.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
set(SRCS)
|
||||
|
||||
if(CONFIG_SENSORS_BMP180)
|
||||
list(APPEND SRCS stm32_bmp180.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_LEDS_APA102)
|
||||
list(APPEND SRCS stm32_apa102.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_WS2812)
|
||||
list(APPEND SRCS stm32_ws2812.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_MAX6675)
|
||||
list(APPEND SRCS stm32_max6675.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_VEML6070)
|
||||
list(APPEND SRCS stm32_veml6070.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_INPUT_NUNCHUCK)
|
||||
list(APPEND SRCS stm32_nunchuck.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_AUDIO_TONE)
|
||||
list(APPEND SRCS stm32_tone.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_LCD_BACKPACK)
|
||||
list(APPEND SRCS stm32_lcd_backpack.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_LCD_SSD1306)
|
||||
list(APPEND SRCS stm32_ssd1306.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_LM75)
|
||||
list(APPEND SRCS stm32_lm75.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_WL_NRF24L01)
|
||||
list(APPEND SRCS stm32_nrf24l01.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_HCSR04)
|
||||
list(APPEND SRCS stm32_hcsr04.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_APDS9960)
|
||||
list(APPEND SRCS stm32_apds9960.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_ZEROCROSS)
|
||||
list(APPEND SRCS stm32_zerocross.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_QENCODER)
|
||||
list(APPEND SRCS stm32_qencoder.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_INA219)
|
||||
list(APPEND SRCS stm32_ina219.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_L3GD20)
|
||||
list(APPEND SRCS stm32_l3gd20.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_MPL115A)
|
||||
list(APPEND SRCS stm32_mpl115a.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_DHTXX)
|
||||
list(APPEND SRCS stm32_dhtxx.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_XEN1210)
|
||||
list(APPEND SRCS stm32_xen1210.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_BH1750FVI)
|
||||
list(APPEND SRCS stm32_bh1750.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_MLX90614)
|
||||
list(APPEND SRCS stm32_mlx90614.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SENSORS_MAX31855)
|
||||
list(APPEND SRCS stm32_max31855.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_LIS3DSH)
|
||||
list(APPEND SRCS stm32_lis3dsh.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BOARD_STM32_IHM07M1)
|
||||
list(APPEND SRCS stm32_ihm07m1.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BOARD_STM32_IHM08M1)
|
||||
list(APPEND SRCS stm32_ihm08m1.c)
|
||||
endif()
|
||||
|
||||
target_sources(board PRIVATE ${SRCS})
|
||||
@@ -0,0 +1,21 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/stm32/stm32f103-minimum/CMakeLists.txt
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||
# license agreements. See the NOTICE file distributed with this work for
|
||||
# additional information regarding copyright ownership. The ASF licenses this
|
||||
# file to you 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
|
||||
#
|
||||
# http://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.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
add_subdirectory(src)
|
||||
@@ -0,0 +1,153 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/stm32/stm32f103-minimum/src/CMakeLists.txt
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||
# license agreements. See the NOTICE file distributed with this work for
|
||||
# additional information regarding copyright ownership. The ASF licenses this
|
||||
# file to you 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
|
||||
#
|
||||
# http://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.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
set(CSRCS)
|
||||
|
||||
list(APPEND CSRCS stm32_boot.c stm32_bringup.c stm32_spi.c)
|
||||
|
||||
if("${CONFIG_LIB_BOARDCTL}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_appinit.c)
|
||||
endif()
|
||||
|
||||
if("${CONFIG_ARCH_BUTTONS}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_buttons.c)
|
||||
endif()
|
||||
|
||||
if("${CONFIG_ARCH_LEDS}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_autoleds.c)
|
||||
else()
|
||||
list(APPEND CSRCS stm32_userleds.c)
|
||||
endif()
|
||||
|
||||
if("${CONFIG_ADC}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_adc.c)
|
||||
endif()
|
||||
|
||||
if("${CONFIG_DEV_GPIO}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_gpio.c)
|
||||
endif()
|
||||
|
||||
if("${CONFIG_PWM}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_pwm.c)
|
||||
endif()
|
||||
|
||||
if("${CONFIG_SENSORS_ZEROCROSS}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_zerocross.c)
|
||||
endif()
|
||||
|
||||
if("${CONFIG_LEDS_APA102}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_apa102.c)
|
||||
endif()
|
||||
|
||||
if("${CONFIG_SENSORS_BMP180}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_bmp180.c)
|
||||
endif()
|
||||
|
||||
if("${CONFIG_LM75_I2C}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_lm75.c)
|
||||
endif()
|
||||
|
||||
if("${CONFIG_RGBLED}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_rgbled.c)
|
||||
endif()
|
||||
|
||||
if("${CONFIG_MMCSD}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_mmcsd.c)
|
||||
endif()
|
||||
|
||||
if("${CONFIG_MTD_W25}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_w25.c)
|
||||
endif()
|
||||
|
||||
if("${CONFIG_MTD_AT24XX}" STREQUAL "y")
|
||||
if("${CONFIG_STM32_I2C1}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_at24.c)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if("${CONFIG_AUDIO_TONE}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_tone.c)
|
||||
endif()
|
||||
|
||||
if("${CONFIG_CAN_MCP2515}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_mcp2515.c)
|
||||
endif()
|
||||
|
||||
if("${CONFIG_CL_MFRC522}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_mfrc522.c)
|
||||
endif()
|
||||
|
||||
if("${CONFIG_SENSORS_HCSR04}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_hcsr04.c)
|
||||
endif()
|
||||
|
||||
if("${CONFIG_SENSORS_MAX6675}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_max6675.c)
|
||||
endif()
|
||||
|
||||
if("${CONFIG_LCD_MAX7219}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_max7219.c)
|
||||
endif()
|
||||
|
||||
if("${CONFIG_INPUT_NUNCHUCK}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_nunchuck.c)
|
||||
endif()
|
||||
|
||||
if("${CONFIG_LCD_SSD1306_I2C}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_ssd1306.c)
|
||||
endif()
|
||||
|
||||
if("${CONFIG_LCD_ST7567}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_lcd.c)
|
||||
endif()
|
||||
|
||||
if("${CONFIG_LCD_PCD8544}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_pcd8544.c)
|
||||
endif()
|
||||
|
||||
if("${CONFIG_SENSORS_APDS9960}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_apds9960.c)
|
||||
endif()
|
||||
|
||||
if("${CONFIG_SENSORS_QENCODER}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_qencoder.c)
|
||||
endif()
|
||||
|
||||
if("${CONFIG_SENSORS_VEML6070}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_veml6070.c)
|
||||
endif()
|
||||
|
||||
if("${CONFIG_WL_NRF24L01}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_nrf24l01.c)
|
||||
endif()
|
||||
|
||||
if("${CONFIG_USBDEV}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_usbdev.c)
|
||||
endif()
|
||||
|
||||
if("${CONFIG_USBMSC}" STREQUAL "y")
|
||||
list(APPEND CSRCS stm32_usbmsc.c)
|
||||
endif()
|
||||
|
||||
target_sources(board PRIVATE ${CSRCS})
|
||||
|
||||
# Configure linker script TODO: better to place this in boards/CMakeLists.txt?
|
||||
|
||||
set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/ld.script")
|
||||
@@ -0,0 +1,28 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/stm32/stm32f4discovery/CMakeLists.txt
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||
# license agreements. See the NOTICE file distributed with this work for
|
||||
# additional information regarding copyright ownership. The ASF licenses this
|
||||
# file to you 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
|
||||
#
|
||||
# http://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.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
if(NOT CONFIG_BUILD_FLAT)
|
||||
add_subdirectory(kernel)
|
||||
set_property(
|
||||
GLOBAL PROPERTY LD_SCRIPT_USER ${CMAKE_CURRENT_LIST_DIR}/scripts/memory.ld
|
||||
${CMAKE_CURRENT_LIST_DIR}/scripts/user-space.ld)
|
||||
endif()
|
||||
@@ -0,0 +1,21 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/stm32/stm32f4discovery/kernel/CMakeLists.txt
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||
# license agreements. See the NOTICE file distributed with this work for
|
||||
# additional information regarding copyright ownership. The ASF licenses this
|
||||
# file to you 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
|
||||
#
|
||||
# http://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.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
nuttx_add_aux_library(userspace stm32_userspace.c)
|
||||
@@ -0,0 +1,224 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/stm32/stm32f4discovery/src/CMakeLists.txt
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||
# license agreements. See the NOTICE file distributed with this work for
|
||||
# additional information regarding copyright ownership. The ASF licenses this
|
||||
# file to you 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
|
||||
#
|
||||
# http://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.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
set(SRCS stm32_boot.c stm32_bringup.c stm32_spi.c)
|
||||
|
||||
if(CONFIG_ARCH_LEDS)
|
||||
list(APPEND SRCS stm32_autoleds.c)
|
||||
else()
|
||||
list(APPEND SRCS stm32_userleds.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_AUDIO_CS43L22)
|
||||
list(APPEND SRCS stm32_cs43l22.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_ARCH_BUTTONS)
|
||||
list(APPEND SRCS stm32_buttons.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_STM32_CAN_CHARDRIVER)
|
||||
list(APPEND SRCS stm32_can.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_STM32_OTGFS)
|
||||
list(APPEND SRCS stm32_usb.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_LCD_ST7567)
|
||||
list(APPEND SRCS stm32_st7567.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_ENC28J60)
|
||||
list(APPEND SRCS stm32_enc28j60.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_LPWAN_SX127X)
|
||||
list(APPEND SRCS stm32_sx127x.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_LCD_MAX7219)
|
||||
list(APPEND SRCS stm32_max7219.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_LCD_ST7032)
|
||||
list(APPEND SRCS stm32_st7032.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_PCA9635PW)
|
||||
list(APPEND SRCS stm32_pca9635.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_STM32_SDIO)
|
||||
list(APPEND SRCS stm32_sdio.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_STM32_ETHMAC)
|
||||
list(APPEND SRCS stm32_ethernet.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_LEDS_MAX7219)
|
||||
list(APPEND SRCS stm32_max7219_leds.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_RGBLED)
|
||||
list(APPEND SRCS stm32_rgbled.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_RTC_DS1307)
|
||||
list(APPEND SRCS stm32_ds1307.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_PWM)
|
||||
list(APPEND SRCS stm32_pwm.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BOARDCTL)
|
||||
list(APPEND SRCS stm32_appinit.c)
|
||||
if(CONFIG_BOARDCTL_RESET)
|
||||
list(APPEND SRCS stm32_reset.c)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CONFIG_ARCH_CUSTOM_PMINIT)
|
||||
list(APPEND SRCS stm32_pm.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_PM_BUTTONS)
|
||||
list(APPEND SRCS stm32_pmbuttons.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_ARCH_IDLE_CUSTOM)
|
||||
list(APPEND SRCS stm32_idle.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_STM32_FSMC)
|
||||
list(APPEND SRCS stm32_extmem.c)
|
||||
|
||||
if(CONFIG_LCD_SSD1289)
|
||||
list(APPEND SRCS stm32_ssd1289.c)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CONFIG_LCD_SSD1351)
|
||||
list(APPEND SRCS stm32_ssd1351.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_LCD_UG2864AMBAG01)
|
||||
list(APPEND SRCS stm32_ug2864ambag01.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_LCD_UG2864HSWEG01)
|
||||
list(APPEND SRCS stm32_ug2864hsweg01.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_TIMER)
|
||||
list(APPEND SRCS stm32_timer.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_STM32_HCIUART)
|
||||
if(CONFIG_BLUETOOTH_UART)
|
||||
list(APPEND SRCS stm32_hciuart.c)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CONFIG_STM32_ROMFS)
|
||||
list(APPEND SRCS stm32_romfs_initialize.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BOARDCTL_UNIQUEID)
|
||||
list(APPEND SRCS stm32_uid.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_USBMSC)
|
||||
list(APPEND SRCS stm32_usbmsc.c)
|
||||
endif()
|
||||
|
||||
if(NOT CONFIG_STM32_ETHMAC)
|
||||
if(CONFIG_NETDEVICES)
|
||||
list(APPEND SRCS stm32_netinit.c)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CONFIG_MMCSD_SPI)
|
||||
list(APPEND SRCS stm32_mmcsd.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_WL_GS2200M)
|
||||
list(APPEND SRCS stm32_gs2200m.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_LCD_ST7789)
|
||||
list(APPEND SRCS stm32_st7789.c)
|
||||
endif()
|
||||
|
||||
target_sources(board PRIVATE ${SRCS})
|
||||
|
||||
# TODO: make this the default and then allow boards to redefine
|
||||
set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/ld.script")
|
||||
|
||||
# TODO:move this to apropriate arch/toolchain level
|
||||
set_property(
|
||||
GLOBAL APPEND
|
||||
PROPERTY COMPILE_OPTIONS $<$<CONFIG:Release>:-fno-strict-aliasing
|
||||
-fomit-frame-pointer>)
|
||||
|
||||
# TODO: see where to put pic flags set_property(TARGET nuttx APPEND PROPERTY
|
||||
# NUTTX_COMPILE_OPTIONS $<$<NOT:$<COMPILE_LANGUAGE:ASM>>:-fpic -msingle-pic-base
|
||||
# -mpic-register=r10>)
|
||||
|
||||
# ifeq ($(CONFIG_ARMV7M_TOOLCHAIN_CLANGL),y) ARCHCFLAGS += -nostdlib
|
||||
# -ffreestanding ARCHCXXFLAGS += -nostdlib -ffreestanding else ARCHCFLAGS +=
|
||||
# -funwind-tables ARCHCXXFLAGS += -fno-rtti -funwind-tables ifneq
|
||||
# ($(CONFIG_DEBUG_NOOPT),y) ARCHOPTIMIZATION += -fno-strength-reduce endif endif
|
||||
|
||||
set_property(
|
||||
TARGET nuttx
|
||||
APPEND
|
||||
PROPERTY NUTTX_COMPILE_OPTIONS -funwind-tables)
|
||||
set_property(GLOBAL APPEND PROPERTY COMPILE_OPTIONS -fno-strength-reduce)
|
||||
|
||||
# TODO: nxflat NXFLATLDFLAGS1 = -r -d -warn-common NXFLATLDFLAGS2 =
|
||||
# $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld
|
||||
# -no-check-sections LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
# Loadable module definitions
|
||||
|
||||
set_property(
|
||||
TARGET nuttx
|
||||
APPEND
|
||||
PROPERTY NUTTX_ELF_MODULE_COMPILE_OPTIONS -mlong-calls)
|
||||
set_property(
|
||||
TARGET nuttx
|
||||
APPEND
|
||||
PROPERTY NUTTX_ELF_MODULE_LINK_OPTIONS -r -e module_initialize -T
|
||||
${NUTTX_DIR}/libs/libc/modlib/gnu-elf.ld)
|
||||
|
||||
# ELF module definitions
|
||||
|
||||
set_property(
|
||||
TARGET nuttx
|
||||
APPEND
|
||||
PROPERTY NUTTX_ELF_APP_COMPILE_OPTIONS -mlong-calls)
|
||||
set_property(
|
||||
TARGET nuttx
|
||||
APPEND
|
||||
PROPERTY NUTTX_ELF_APP_LINK_OPTIONS -r -e main
|
||||
-T${NUTTX_BOARD_DIR}/scripts/gnu-elf.ld)
|
||||
@@ -0,0 +1,28 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/stm32u5/b-u585i-iot02a/CMakeLists.txt
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||
# license agreements. See the NOTICE file distributed with this work for
|
||||
# additional information regarding copyright ownership. The ASF licenses this
|
||||
# file to you 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
|
||||
#
|
||||
# http://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.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
if(NOT CONFIG_BUILD_FLAT)
|
||||
add_subdirectory(kernel)
|
||||
set_property(
|
||||
GLOBAL PROPERTY LD_SCRIPT_USER ${CMAKE_CURRENT_LIST_DIR}/scripts/memory.ld
|
||||
${CMAKE_CURRENT_LIST_DIR}/scripts/user-space.ld)
|
||||
endif()
|
||||
@@ -0,0 +1,34 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/stm32u5/b-u585i-iot02a/src/CMakeLists.txt
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||
# license agreements. See the NOTICE file distributed with this work for
|
||||
# additional information regarding copyright ownership. The ASF licenses this
|
||||
# file to you 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
|
||||
#
|
||||
# http://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.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
set(SRCS stm32_boot.c stm32_bringup.c stm32_spi.c)
|
||||
|
||||
if(CONFIG_BOARDCTL)
|
||||
list(APPEND SRCS stm32_appinit.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_ARCH_BOARD_STM32U5_CUSTOM_CLOCKCONFIG)
|
||||
list(APPEND SRCS stm32_clockconfig.c)
|
||||
endif()
|
||||
|
||||
target_sources(board PRIVATE ${SRCS})
|
||||
|
||||
# TODO: make this the default and then allow boards to redefine
|
||||
set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash.ld")
|
||||
@@ -0,0 +1,28 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/tiva/lm3s6965-ek/CMakeLists.txt
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||
# license agreements. See the NOTICE file distributed with this work for
|
||||
# additional information regarding copyright ownership. The ASF licenses this
|
||||
# file to you 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
|
||||
#
|
||||
# http://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.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
if(NOT CONFIG_BUILD_FLAT)
|
||||
add_subdirectory(kernel)
|
||||
set_property(
|
||||
GLOBAL PROPERTY LD_SCRIPT_USER ${CMAKE_CURRENT_LIST_DIR}/scripts/memory.ld
|
||||
${CMAKE_CURRENT_LIST_DIR}/scripts/user-space.ld)
|
||||
endif()
|
||||
@@ -0,0 +1,40 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/tiva/lm3s6965-ek/src/CMakeLists.txt
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||
# license agreements. See the NOTICE file distributed with this work for
|
||||
# additional information regarding copyright ownership. The ASF licenses this
|
||||
# file to you 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
|
||||
#
|
||||
# http://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.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
set(SRCS lm_boot.c lm_leds.c lm_ethernet.c lm_ssi.c)
|
||||
|
||||
if(CONFIG_BOARDCTL)
|
||||
list(APPEND SRCS lm_appinit.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_NX_LCDDRIVER)
|
||||
list(APPEND SRCS lm_oled.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BOARD_LATE_INITIALIZE)
|
||||
list(APPEND SRCS lm_bringup.c)
|
||||
elseif(CONFIG_BOARDCTL)
|
||||
list(APPEND SRCS lm_bringup.c)
|
||||
endif()
|
||||
|
||||
target_sources(board PRIVATE ${SRCS})
|
||||
|
||||
# TODO: make this the default and then allow boards to redefine
|
||||
set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/ld.script")
|
||||
Reference in New Issue
Block a user