mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 06:39:01 +08:00
cmake: convert more stm32 boards
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
# ##############################################################################
|
||||
# boards/arm/stm32/b-g431b-esc1/CMakeLists.txt
|
||||
#
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
|
||||
set(SRCS stm32_boot.c stm32_bringup.c)
|
||||
|
||||
if(CONFIG_ARCH_LEDS)
|
||||
@@ -40,12 +39,12 @@ if(CONFIG_STM32_FOC)
|
||||
endif()
|
||||
|
||||
if(CONFIG_STM32_FDCAN)
|
||||
if(CONFIG_STM32_FDCAN_CHARDRIVER)
|
||||
list(APPEND SRCS stm32_can.c)
|
||||
endif()
|
||||
if(CONFIG_STM32_FDCAN_SOCKET)
|
||||
list(APPEND SRCS stm32_cansock.c)
|
||||
endif()
|
||||
if(CONFIG_STM32_FDCAN_CHARDRIVER)
|
||||
list(APPEND SRCS stm32_can.c)
|
||||
endif()
|
||||
if(CONFIG_STM32_FDCAN_SOCKET)
|
||||
list(APPEND SRCS stm32_cansock.c)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_sources(board PRIVATE ${SRCS})
|
||||
|
||||
@@ -124,4 +124,8 @@ if(CONFIG_BOARD_STM32_IHM08M1)
|
||||
list(APPEND SRCS stm32_ihm08m1.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BOARD_STM32_IHM16M1)
|
||||
list(APPEND SRCS stm32_ihm16m1.c)
|
||||
endif()
|
||||
|
||||
target_sources(board PRIVATE ${SRCS})
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/stm32/nucleo-f103rb/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,53 @@
|
||||
############################################################################
|
||||
# boards/arm/stm32/nucleo-f103rb/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)
|
||||
|
||||
if(CONFIG_ARCH_LEDS)
|
||||
list(APPEND SRCS stm32_autoleds.c)
|
||||
else()
|
||||
list(APPEND SRCS stm32_userleds.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_ARCH_BUTTONS)
|
||||
list(APPEND SRCS stm32_buttons.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BOARDCTL)
|
||||
list(APPEND SRCS stm32_appinit.c)
|
||||
endif()
|
||||
|
||||
if(NOT CONFIG_STM32_FOC)
|
||||
if(CONFIG_ADC)
|
||||
list(APPEND SRCS stm32_adc.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_PWM)
|
||||
list(APPEND SRCS stm32_pwm.c)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CONFIG_BOARD_STM32_IHM07M1)
|
||||
list(APPEND SRCS stm32_foc_ihm07m1.c)
|
||||
endif()
|
||||
|
||||
target_sources(board PRIVATE ${SRCS})
|
||||
|
||||
set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/ld.script")
|
||||
@@ -0,0 +1,21 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/stm32/nucleo-f207zg/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,51 @@
|
||||
############################################################################
|
||||
# boards/arm/stm32/nucleo-f207zg/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)
|
||||
|
||||
if(CONFIG_ARCH_LEDS)
|
||||
list(APPEND SRCS stm32_autoleds.c)
|
||||
else()
|
||||
list(APPEND SRCS stm32_userleds.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_ARCH_BUTTONS)
|
||||
list(APPEND SRCS stm32_buttons.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_STM32_OTGFS)
|
||||
list(APPEND SRCS stm32_usb.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BOARDCTL)
|
||||
list(APPEND SRCS stm32_appinitialize.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_ADC)
|
||||
list(APPEND SRCS stm32_adc.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_PWM)
|
||||
list(APPEND SRCS stm32_pwm.c)
|
||||
endif()
|
||||
|
||||
target_sources(board PRIVATE ${SRCS})
|
||||
|
||||
set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/ld.script")
|
||||
@@ -0,0 +1,21 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/stm32/nucleo-f303re/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,71 @@
|
||||
############################################################################
|
||||
# boards/arm/stm32/nucleo-f303re/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)
|
||||
|
||||
if(CONFIG_ARCH_LEDS)
|
||||
list(APPEND SRCS stm32_autoleds.c)
|
||||
else()
|
||||
list(APPEND SRCS stm32_userleds.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_ARCH_BUTTONS)
|
||||
list(APPEND SRCS stm32_buttons.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BOARDCTL)
|
||||
list(APPEND SRCS stm32_appinitialize.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_ADC)
|
||||
list(APPEND SRCS stm32_adc.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_STM32_CAN_CHARDRIVER)
|
||||
list(APPEND SRCS stm32_can.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_DAC)
|
||||
list(APPEND SRCS stm32_dac.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_PWM)
|
||||
list(APPEND SRCS stm32_pwm.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SPI)
|
||||
list(APPEND SRCS stm32_spi.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_LCD_SSD1351)
|
||||
list(APPEND SRCS stm32_ssd1351.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_TIMER)
|
||||
list(APPEND SRCS stm32_timer.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BOARDCTL_UNIQUEID)
|
||||
list(APPEND SRCS stm32_uid.c)
|
||||
endif()
|
||||
|
||||
target_sources(board PRIVATE ${SRCS})
|
||||
|
||||
set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/ld.script")
|
||||
@@ -0,0 +1,21 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/stm32/nucleo-f303ze/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,47 @@
|
||||
############################################################################
|
||||
# boards/arm/stm32/nucleo-f303ze/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)
|
||||
|
||||
if(CONFIG_ARCH_LEDS)
|
||||
list(APPEND SRCS stm32_autoleds.c)
|
||||
else()
|
||||
list(APPEND SRCS stm32_userleds.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_ARCH_BUTTONS)
|
||||
list(APPEND SRCS stm32_buttons.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BOARDCTL)
|
||||
list(APPEND SRCS stm32_appinitialize.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_ADC)
|
||||
list(APPEND SRCS stm32_adc.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_LCD_SSD1306)
|
||||
list(APPEND SRCS stm32_lcd.c)
|
||||
endif()
|
||||
|
||||
target_sources(board PRIVATE ${SRCS})
|
||||
|
||||
set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/ld.script")
|
||||
@@ -0,0 +1,21 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/stm32/nucleo-f410rb/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,43 @@
|
||||
############################################################################
|
||||
# boards/arm/stm32/nucleo-f410rb/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)
|
||||
|
||||
if(CONFIG_ARCH_LEDS)
|
||||
list(APPEND SRCS stm32_autoleds.c)
|
||||
else()
|
||||
list(APPEND SRCS stm32_userleds.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_ARCH_BUTTONS)
|
||||
list(APPEND SRCS stm32_buttons.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_ADC)
|
||||
list(APPEND SRCS stm32_adc.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BOARDCTL)
|
||||
list(APPEND SRCS stm32_appinit.c)
|
||||
endif()
|
||||
|
||||
target_sources(board PRIVATE ${SRCS})
|
||||
|
||||
set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/f410rb.ld")
|
||||
@@ -0,0 +1,21 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/stm32/nucleo-f412zg/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,37 @@
|
||||
############################################################################
|
||||
# boards/arm/stm32/nucleo-f412zg/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)
|
||||
|
||||
if(CONFIG_ARCH_LEDS)
|
||||
list(APPEND SRCS stm32_autoleds.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_NSH_LIBRARY)
|
||||
list(APPEND SRCS stm32_appinit.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_STM32_OTGFS)
|
||||
list(APPEND SRCS stm32_usb.c)
|
||||
endif()
|
||||
|
||||
target_sources(board PRIVATE ${SRCS})
|
||||
|
||||
set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/f412zg.ld")
|
||||
@@ -0,0 +1,21 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/stm32/nucleo-f429zi/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,75 @@
|
||||
############################################################################
|
||||
# boards/arm/stm32/nucleo-f429zi/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)
|
||||
|
||||
if(CONFIG_ARCH_LEDS)
|
||||
list(APPEND SRCS stm32_autoleds.c)
|
||||
else()
|
||||
list(APPEND SRCS stm32_userleds.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_ARCH_BUTTONS)
|
||||
list(APPEND SRCS stm32_buttons.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BOARDCTL)
|
||||
list(APPEND SRCS stm32_appinitialize.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_DEV_GPIO)
|
||||
list(APPEND SRCS stm32_gpio.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SPI)
|
||||
list(APPEND SRCS stm32_spi.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_ADC)
|
||||
list(APPEND SRCS stm32_adc.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_PWM)
|
||||
list(APPEND SRCS stm32_pwm.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_MMCSD)
|
||||
list(APPEND SRCS stm32_sdio.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_STM32_OTGFS)
|
||||
list(APPEND SRCS stm32_usb.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_STM32_BBSRAM)
|
||||
list(APPEND SRCS stm32_bbsram.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BOARDCTL_RESET)
|
||||
list(APPEND SRCS stm32_reset.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_STM32_ROMFS)
|
||||
list(APPEND SRCS stm32_romfs_initialize.c)
|
||||
endif()
|
||||
|
||||
target_sources(board PRIVATE ${SRCS})
|
||||
|
||||
set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/ld.script")
|
||||
@@ -0,0 +1,21 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/stm32/nucleo-f4x1re/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,60 @@
|
||||
############################################################################
|
||||
# boards/arm/stm32/nucleo-f4x1re/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_spi.c stm32_bringup.c)
|
||||
|
||||
if(CONFIG_VIDEO_FB)
|
||||
if(CONFIG_LCD_SSD1306)
|
||||
list(APPEND SRCS stm32_lcd_ssd1306.c)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CONFIG_ARCH_LEDS)
|
||||
list(APPEND SRCS stm32_autoleds.c)
|
||||
else()
|
||||
list(APPEND SRCS stm32_userleds.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_ARCH_BUTTONS)
|
||||
list(APPEND SRCS stm32_buttons.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_ADC)
|
||||
list(APPEND SRCS stm32_adc.c)
|
||||
if(CONFIG_INPUT_AJOYSTICK)
|
||||
list(APPEND SRCS stm32_ajoystick.c)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CONFIG_CAN_MCP2515)
|
||||
list(APPEND SRCS stm32_mcp2515.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BOARDCTL)
|
||||
list(APPEND SRCS stm32_appinit.c)
|
||||
endif()
|
||||
|
||||
target_sources(board PRIVATE ${SRCS})
|
||||
|
||||
if(CONFIG_ARCH_CHIP_STM32F401RE)
|
||||
set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/f401re.ld")
|
||||
elseif(CONFIG_ARCH_CHIP_STM32F411RE)
|
||||
set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/f411re.ld")
|
||||
endif()
|
||||
@@ -0,0 +1,21 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/stm32/nucleo-g431kb/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,47 @@
|
||||
############################################################################
|
||||
# boards/arm/stm32/nucleo-g431kb/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)
|
||||
|
||||
if(CONFIG_ARCH_LEDS)
|
||||
list(APPEND SRCS stm32_autoleds.c)
|
||||
else()
|
||||
list(APPEND SRCS stm32_userleds.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_PWM)
|
||||
list(APPEND SRCS stm32_pwm.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BOARDCTL)
|
||||
list(APPEND SRCS stm32_appinit.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_STM32_COMP)
|
||||
list(APPEND SRCS stm32_comp.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_STM32_DAC)
|
||||
list(APPEND SRCS stm32_dac.c)
|
||||
endif()
|
||||
|
||||
target_sources(board PRIVATE ${SRCS})
|
||||
|
||||
set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/ld.script")
|
||||
@@ -0,0 +1,21 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/stm32/nucleo-g431rb/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,66 @@
|
||||
############################################################################
|
||||
# boards/arm/stm32/nucleo-g431rb/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)
|
||||
|
||||
if(CONFIG_ARCH_LEDS)
|
||||
list(APPEND SRCS stm32_autoleds.c)
|
||||
else()
|
||||
list(APPEND SRCS stm32_userleds.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_ARCH_BUTTONS)
|
||||
list(APPEND SRCS stm32_buttons.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BOARDCTL)
|
||||
list(APPEND SRCS stm32_appinit.c)
|
||||
endif()
|
||||
|
||||
if(NOT CONFIG_STM32_FOC)
|
||||
if(CONFIG_PWM)
|
||||
list(APPEND SRCS stm32_pwm.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_ADC)
|
||||
list(APPEND SRCS stm32_adc.c)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CONFIG_BOARD_STM32_IHM16M1)
|
||||
list(APPEND SRCS stm32_foc_ihm16m1.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_MATH_CORDIC)
|
||||
list(APPEND SRCS stm32_cordic.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_STM32_FDCAN)
|
||||
if(CONFIG_STM32_FDCAN_CHARDRIVER)
|
||||
list(APPEND SRCS stm32_can.c)
|
||||
endif()
|
||||
if(CONFIG_STM32_FDCAN_SOCKET)
|
||||
list(APPEND SRCS stm32_cansock.c)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_sources(board PRIVATE ${SRCS})
|
||||
|
||||
set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/ld.script")
|
||||
@@ -0,0 +1,21 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/stm32/nucleo-g474re/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,39 @@
|
||||
############################################################################
|
||||
# boards/arm/stm32/nucleo-g474re/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)
|
||||
|
||||
if(CONFIG_ARCH_LEDS)
|
||||
list(APPEND SRCS stm32_autoleds.c)
|
||||
else()
|
||||
list(APPEND SRCS stm32_userleds.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BOARDCTL)
|
||||
list(APPEND SRCS stm32_appinit.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_USBDEV)
|
||||
list(APPEND SRCS stm32_usbdev.c)
|
||||
endif()
|
||||
|
||||
target_sources(board PRIVATE ${SRCS})
|
||||
|
||||
set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/ld.script")
|
||||
@@ -0,0 +1,21 @@
|
||||
# ##############################################################################
|
||||
# boards/arm/stm32/nucleo-l152re/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,51 @@
|
||||
############################################################################
|
||||
# boards/arm/stm32/nucleo-l152re/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)
|
||||
|
||||
if(CONFIG_ARCH_LEDS)
|
||||
list(APPEND SRCS stm32_autoleds.c)
|
||||
else()
|
||||
list(APPEND SRCS stm32_userleds.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_ARCH_BUTTONS)
|
||||
list(APPEND SRCS stm32_buttons.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BOARDCTL)
|
||||
list(APPEND SRCS stm32_appinitialize.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_LCD_ILI9341)
|
||||
list(APPEND SRCS stm32_ili93418b.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_MMCSD_SPI)
|
||||
list(APPEND SRCS stm32_spisd.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_STM32_SPI)
|
||||
list(APPEND SRCS stm32_spi.c)
|
||||
endif()
|
||||
|
||||
target_sources(board PRIVATE ${SRCS})
|
||||
|
||||
set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/ld.script")
|
||||
Reference in New Issue
Block a user