diff --git a/boards/arm/stm32/b-g431b-esc1/CMakeLists.txt b/boards/arm/stm32/b-g431b-esc1/CMakeLists.txt index 4c469703172..c16a1498035 100644 --- a/boards/arm/stm32/b-g431b-esc1/CMakeLists.txt +++ b/boards/arm/stm32/b-g431b-esc1/CMakeLists.txt @@ -1,4 +1,3 @@ - # ############################################################################## # boards/arm/stm32/b-g431b-esc1/CMakeLists.txt # diff --git a/boards/arm/stm32/b-g431b-esc1/src/CMakeLists.txt b/boards/arm/stm32/b-g431b-esc1/src/CMakeLists.txt index c32aeba6db7..4725971e67a 100644 --- a/boards/arm/stm32/b-g431b-esc1/src/CMakeLists.txt +++ b/boards/arm/stm32/b-g431b-esc1/src/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}) diff --git a/boards/arm/stm32/common/src/CMakeLists.txt b/boards/arm/stm32/common/src/CMakeLists.txt index f56d5f6d57f..7ee6cf5ed98 100644 --- a/boards/arm/stm32/common/src/CMakeLists.txt +++ b/boards/arm/stm32/common/src/CMakeLists.txt @@ -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}) diff --git a/boards/arm/stm32/nucleo-f103rb/CMakeLists.txt b/boards/arm/stm32/nucleo-f103rb/CMakeLists.txt new file mode 100644 index 00000000000..a30f1c0f53f --- /dev/null +++ b/boards/arm/stm32/nucleo-f103rb/CMakeLists.txt @@ -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) diff --git a/boards/arm/stm32/nucleo-f103rb/src/CMakeLists.txt b/boards/arm/stm32/nucleo-f103rb/src/CMakeLists.txt new file mode 100644 index 00000000000..a5d1bba8b8d --- /dev/null +++ b/boards/arm/stm32/nucleo-f103rb/src/CMakeLists.txt @@ -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") diff --git a/boards/arm/stm32/nucleo-f207zg/CMakeLists.txt b/boards/arm/stm32/nucleo-f207zg/CMakeLists.txt new file mode 100644 index 00000000000..fb7d9bec399 --- /dev/null +++ b/boards/arm/stm32/nucleo-f207zg/CMakeLists.txt @@ -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) diff --git a/boards/arm/stm32/nucleo-f207zg/src/CMakeLists.txt b/boards/arm/stm32/nucleo-f207zg/src/CMakeLists.txt new file mode 100644 index 00000000000..d5a98a26215 --- /dev/null +++ b/boards/arm/stm32/nucleo-f207zg/src/CMakeLists.txt @@ -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") diff --git a/boards/arm/stm32/nucleo-f303re/CMakeLists.txt b/boards/arm/stm32/nucleo-f303re/CMakeLists.txt new file mode 100644 index 00000000000..bbe3cd46ad7 --- /dev/null +++ b/boards/arm/stm32/nucleo-f303re/CMakeLists.txt @@ -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) diff --git a/boards/arm/stm32/nucleo-f303re/src/CMakeLists.txt b/boards/arm/stm32/nucleo-f303re/src/CMakeLists.txt new file mode 100644 index 00000000000..03ab901ab25 --- /dev/null +++ b/boards/arm/stm32/nucleo-f303re/src/CMakeLists.txt @@ -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") diff --git a/boards/arm/stm32/nucleo-f303ze/CMakeLists.txt b/boards/arm/stm32/nucleo-f303ze/CMakeLists.txt new file mode 100644 index 00000000000..7fe90ed0666 --- /dev/null +++ b/boards/arm/stm32/nucleo-f303ze/CMakeLists.txt @@ -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) diff --git a/boards/arm/stm32/nucleo-f303ze/src/CMakeLists.txt b/boards/arm/stm32/nucleo-f303ze/src/CMakeLists.txt new file mode 100644 index 00000000000..2fe186500a4 --- /dev/null +++ b/boards/arm/stm32/nucleo-f303ze/src/CMakeLists.txt @@ -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") diff --git a/boards/arm/stm32/nucleo-f410rb/CMakeLists.txt b/boards/arm/stm32/nucleo-f410rb/CMakeLists.txt new file mode 100644 index 00000000000..daec3e069b6 --- /dev/null +++ b/boards/arm/stm32/nucleo-f410rb/CMakeLists.txt @@ -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) diff --git a/boards/arm/stm32/nucleo-f410rb/src/CMakeLists.txt b/boards/arm/stm32/nucleo-f410rb/src/CMakeLists.txt new file mode 100644 index 00000000000..d08969c8001 --- /dev/null +++ b/boards/arm/stm32/nucleo-f410rb/src/CMakeLists.txt @@ -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") diff --git a/boards/arm/stm32/nucleo-f412zg/CMakeLists.txt b/boards/arm/stm32/nucleo-f412zg/CMakeLists.txt new file mode 100644 index 00000000000..3f3c7769bc7 --- /dev/null +++ b/boards/arm/stm32/nucleo-f412zg/CMakeLists.txt @@ -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) diff --git a/boards/arm/stm32/nucleo-f412zg/src/CMakeLists.txt b/boards/arm/stm32/nucleo-f412zg/src/CMakeLists.txt new file mode 100644 index 00000000000..4ff65d106fd --- /dev/null +++ b/boards/arm/stm32/nucleo-f412zg/src/CMakeLists.txt @@ -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") diff --git a/boards/arm/stm32/nucleo-f429zi/CMakeLists.txt b/boards/arm/stm32/nucleo-f429zi/CMakeLists.txt new file mode 100644 index 00000000000..527b6454c48 --- /dev/null +++ b/boards/arm/stm32/nucleo-f429zi/CMakeLists.txt @@ -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) diff --git a/boards/arm/stm32/nucleo-f429zi/src/CMakeLists.txt b/boards/arm/stm32/nucleo-f429zi/src/CMakeLists.txt new file mode 100644 index 00000000000..5ee08ffb09b --- /dev/null +++ b/boards/arm/stm32/nucleo-f429zi/src/CMakeLists.txt @@ -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") diff --git a/boards/arm/stm32/nucleo-f4x1re/CMakeLists.txt b/boards/arm/stm32/nucleo-f4x1re/CMakeLists.txt new file mode 100644 index 00000000000..3b0b46b41cb --- /dev/null +++ b/boards/arm/stm32/nucleo-f4x1re/CMakeLists.txt @@ -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) diff --git a/boards/arm/stm32/nucleo-f4x1re/src/CMakeLists.txt b/boards/arm/stm32/nucleo-f4x1re/src/CMakeLists.txt new file mode 100644 index 00000000000..17d0f94205a --- /dev/null +++ b/boards/arm/stm32/nucleo-f4x1re/src/CMakeLists.txt @@ -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() diff --git a/boards/arm/stm32/nucleo-g431kb/CMakeLists.txt b/boards/arm/stm32/nucleo-g431kb/CMakeLists.txt new file mode 100644 index 00000000000..7fbd309e863 --- /dev/null +++ b/boards/arm/stm32/nucleo-g431kb/CMakeLists.txt @@ -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) diff --git a/boards/arm/stm32/nucleo-g431kb/src/CMakeLists.txt b/boards/arm/stm32/nucleo-g431kb/src/CMakeLists.txt new file mode 100644 index 00000000000..84e088dec1a --- /dev/null +++ b/boards/arm/stm32/nucleo-g431kb/src/CMakeLists.txt @@ -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") diff --git a/boards/arm/stm32/nucleo-g431rb/CMakeLists.txt b/boards/arm/stm32/nucleo-g431rb/CMakeLists.txt new file mode 100644 index 00000000000..73ec84ee164 --- /dev/null +++ b/boards/arm/stm32/nucleo-g431rb/CMakeLists.txt @@ -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) diff --git a/boards/arm/stm32/nucleo-g431rb/src/CMakeLists.txt b/boards/arm/stm32/nucleo-g431rb/src/CMakeLists.txt new file mode 100644 index 00000000000..7eaae19f0a7 --- /dev/null +++ b/boards/arm/stm32/nucleo-g431rb/src/CMakeLists.txt @@ -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") diff --git a/boards/arm/stm32/nucleo-g474re/CMakeLists.txt b/boards/arm/stm32/nucleo-g474re/CMakeLists.txt new file mode 100644 index 00000000000..6a143b78f2e --- /dev/null +++ b/boards/arm/stm32/nucleo-g474re/CMakeLists.txt @@ -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) diff --git a/boards/arm/stm32/nucleo-g474re/src/CMakeLists.txt b/boards/arm/stm32/nucleo-g474re/src/CMakeLists.txt new file mode 100644 index 00000000000..11316599d1c --- /dev/null +++ b/boards/arm/stm32/nucleo-g474re/src/CMakeLists.txt @@ -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") diff --git a/boards/arm/stm32/nucleo-l152re/CMakeLists.txt b/boards/arm/stm32/nucleo-l152re/CMakeLists.txt new file mode 100644 index 00000000000..04d3e13499a --- /dev/null +++ b/boards/arm/stm32/nucleo-l152re/CMakeLists.txt @@ -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) diff --git a/boards/arm/stm32/nucleo-l152re/src/CMakeLists.txt b/boards/arm/stm32/nucleo-l152re/src/CMakeLists.txt new file mode 100644 index 00000000000..93754a4d165 --- /dev/null +++ b/boards/arm/stm32/nucleo-l152re/src/CMakeLists.txt @@ -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")