diff --git a/boards/Kconfig b/boards/Kconfig index 63295a6bb4b..c9be61afe44 100644 --- a/boards/Kconfig +++ b/boards/Kconfig @@ -5257,7 +5257,7 @@ endif if ARCH_CHIP_SAMV7 source "boards/arm/samv7/common/Kconfig" endif -if ARCH_CHIP_STM32C0 || ARCH_CHIP_STM32F0 || ARCH_CHIP_STM32F1 || ARCH_CHIP_STM32F2 || ARCH_CHIP_STM32F3 || ARCH_CHIP_STM32F4 || ARCH_CHIP_STM32F7 || ARCH_CHIP_STM32G0 || ARCH_CHIP_STM32G4 || ARCH_CHIP_STM32L0 || ARCH_CHIP_STM32L1 || ARCH_CHIP_STM32H7 +if ARCH_CHIP_STM32C0 || ARCH_CHIP_STM32F0 || ARCH_CHIP_STM32F1 || ARCH_CHIP_STM32F2 || ARCH_CHIP_STM32F3 || ARCH_CHIP_STM32F4 || ARCH_CHIP_STM32F7 || ARCH_CHIP_STM32G0 || ARCH_CHIP_STM32G4 || ARCH_CHIP_STM32L0 || ARCH_CHIP_STM32L1 || ARCH_CHIP_STM32H7 || ARCH_CHIP_STM32H5 || ARCH_CHIP_STM32L5 || ARCH_CHIP_STM32U5 || ARCH_CHIP_STM32WB || ARCH_CHIP_STM32WL5 || ARCH_CHIP_STM32N6 source "boards/arm/common/stm32/Kconfig" endif if ARCH_CHIP_RP2040 diff --git a/boards/arm/stm32h5/common/CMakeLists.txt b/boards/arm/stm32h5/common/CMakeLists.txt new file mode 100644 index 00000000000..ce5e6dc6bdc --- /dev/null +++ b/boards/arm/stm32h5/common/CMakeLists.txt @@ -0,0 +1,25 @@ +# ############################################################################## +# boards/arm/stm32h5/common/CMakeLists.txt +# +# SPDX-License-Identifier: Apache-2.0 +# +# 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) + add_subdirectory(${NUTTX_DIR}/boards/arm/common/stm32 stm32_common) +endif() diff --git a/boards/arm/stm32h5/common/Makefile b/boards/arm/stm32h5/common/Makefile new file mode 100644 index 00000000000..5d506ac65c3 --- /dev/null +++ b/boards/arm/stm32h5/common/Makefile @@ -0,0 +1,39 @@ +############################################################################# +# boards/arm/stm32h5/common/Makefile +# +# SPDX-License-Identifier: Apache-2.0 +# +# 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. +# +############################################################################# + +include $(TOPDIR)/Make.defs + +STM32_BOARD_COMMON_DIR := $(TOPDIR)$(DELIM)boards$(DELIM)arm$(DELIM)common$(DELIM)stm32 +STM32_COMMON_SRCDIR := $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)common$(DELIM)stm32 + +include board/Make.defs +include $(STM32_BOARD_COMMON_DIR)$(DELIM)src$(DELIM)Make.defs + +DEPPATH += --dep-path board + +include $(TOPDIR)/boards/Board.mk + +ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src +BOARDDIR = $(ARCHSRCDIR)$(DELIM)board +CFLAGS += ${INCDIR_PREFIX}$(BOARDDIR)$(DELIM)include + +CFLAGS += ${INCDIR_PREFIX}$(STM32_COMMON_SRCDIR) diff --git a/boards/arm/stm32h5/nucleo-h563zi/src/Makefile b/boards/arm/stm32h5/nucleo-h563zi/src/Make.defs similarity index 85% rename from boards/arm/stm32h5/nucleo-h563zi/src/Makefile rename to boards/arm/stm32h5/nucleo-h563zi/src/Make.defs index bf97497b304..58888944b0f 100644 --- a/boards/arm/stm32h5/nucleo-h563zi/src/Makefile +++ b/boards/arm/stm32h5/nucleo-h563zi/src/Make.defs @@ -1,5 +1,5 @@ -############################################################################## -# boards/arm/stm32h5/nucleo-h563zi/src/Makefile +############################################################################ +# boards/arm/stm32h5/nucleo-h563zi/src/Make.defs # # SPDX-License-Identifier: Apache-2.0 # @@ -18,11 +18,10 @@ # License for the specific language governing permissions and limitations # under the License. # -############################################################################## +############################################################################ --include $(TOPDIR)/Make.defs +include $(TOPDIR)/Make.defs -ASRCS = CSRCS = stm32_boot.c stm32_bringup.c stm32_clockconfig.c ifeq ($(CONFIG_ARCH_LEDS),y) @@ -55,4 +54,6 @@ ifeq ($(CONFIG_STM32_USBFS_HOST),y) CSRCS += stm32_usb.c endif -include $(TOPDIR)/boards/Board.mk +DEPPATH += --dep-path board +VPATH += :board +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board diff --git a/boards/arm/stm32l5/common/CMakeLists.txt b/boards/arm/stm32l5/common/CMakeLists.txt new file mode 100644 index 00000000000..f84aca046da --- /dev/null +++ b/boards/arm/stm32l5/common/CMakeLists.txt @@ -0,0 +1,25 @@ +# ############################################################################## +# boards/arm/stm32l5/common/CMakeLists.txt +# +# SPDX-License-Identifier: Apache-2.0 +# +# 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) + add_subdirectory(${NUTTX_DIR}/boards/arm/common/stm32 stm32_common) +endif() diff --git a/boards/arm/stm32l5/common/Makefile b/boards/arm/stm32l5/common/Makefile new file mode 100644 index 00000000000..9a9610b0441 --- /dev/null +++ b/boards/arm/stm32l5/common/Makefile @@ -0,0 +1,39 @@ +############################################################################# +# boards/arm/stm32l5/common/Makefile +# +# SPDX-License-Identifier: Apache-2.0 +# +# 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. +# +############################################################################# + +include $(TOPDIR)/Make.defs + +STM32_BOARD_COMMON_DIR := $(TOPDIR)$(DELIM)boards$(DELIM)arm$(DELIM)common$(DELIM)stm32 +STM32_COMMON_SRCDIR := $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)common$(DELIM)stm32 + +include board/Make.defs +include $(STM32_BOARD_COMMON_DIR)$(DELIM)src$(DELIM)Make.defs + +DEPPATH += --dep-path board + +include $(TOPDIR)/boards/Board.mk + +ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src +BOARDDIR = $(ARCHSRCDIR)$(DELIM)board +CFLAGS += ${INCDIR_PREFIX}$(BOARDDIR)$(DELIM)include + +CFLAGS += ${INCDIR_PREFIX}$(STM32_COMMON_SRCDIR) diff --git a/boards/arm/stm32l5/nucleo-l552ze/src/Makefile b/boards/arm/stm32l5/nucleo-l552ze/src/Make.defs similarity index 85% rename from boards/arm/stm32l5/nucleo-l552ze/src/Makefile rename to boards/arm/stm32l5/nucleo-l552ze/src/Make.defs index 28cdefc9f46..ae55afd1c34 100644 --- a/boards/arm/stm32l5/nucleo-l552ze/src/Makefile +++ b/boards/arm/stm32l5/nucleo-l552ze/src/Make.defs @@ -1,5 +1,5 @@ ############################################################################## -# boards/arm/stm32l5/nucleo-l552ze/src/Makefile +# boards/arm/stm32l5/nucleo-l552ze/src/Make.defs # # SPDX-License-Identifier: Apache-2.0 # @@ -35,4 +35,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -include $(TOPDIR)/boards/Board.mk +DEPPATH += --dep-path board +VPATH += :board +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board diff --git a/boards/arm/stm32l5/stm32l562e-dk/src/Makefile b/boards/arm/stm32l5/stm32l562e-dk/src/Make.defs similarity index 86% rename from boards/arm/stm32l5/stm32l562e-dk/src/Makefile rename to boards/arm/stm32l5/stm32l562e-dk/src/Make.defs index aa38e15db50..b0fef85b225 100644 --- a/boards/arm/stm32l5/stm32l562e-dk/src/Makefile +++ b/boards/arm/stm32l5/stm32l562e-dk/src/Make.defs @@ -1,5 +1,5 @@ ############################################################################## -# boards/arm/stm32l5/stm32l562e-dk/src/Makefile +# boards/arm/stm32l5/stm32l562e-dk/src/Make.defs # # SPDX-License-Identifier: Apache-2.0 # @@ -35,4 +35,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -include $(TOPDIR)/boards/Board.mk +DEPPATH += --dep-path board +VPATH += :board +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board diff --git a/boards/arm/stm32n6/common/CMakeLists.txt b/boards/arm/stm32n6/common/CMakeLists.txt new file mode 100644 index 00000000000..fcbbaea5864 --- /dev/null +++ b/boards/arm/stm32n6/common/CMakeLists.txt @@ -0,0 +1,25 @@ +# ############################################################################## +# boards/arm/stm32n6/common/CMakeLists.txt +# +# SPDX-License-Identifier: Apache-2.0 +# +# 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) + add_subdirectory(${NUTTX_DIR}/boards/arm/common/stm32 stm32_common) +endif() diff --git a/boards/arm/stm32n6/common/Makefile b/boards/arm/stm32n6/common/Makefile new file mode 100644 index 00000000000..c4787171aa4 --- /dev/null +++ b/boards/arm/stm32n6/common/Makefile @@ -0,0 +1,39 @@ +############################################################################# +# boards/arm/stm32n6/common/Makefile +# +# SPDX-License-Identifier: Apache-2.0 +# +# 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. +# +############################################################################# + +include $(TOPDIR)/Make.defs + +STM32_BOARD_COMMON_DIR := $(TOPDIR)$(DELIM)boards$(DELIM)arm$(DELIM)common$(DELIM)stm32 +STM32_COMMON_SRCDIR := $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)common$(DELIM)stm32 + +include board/Make.defs +include $(STM32_BOARD_COMMON_DIR)$(DELIM)src$(DELIM)Make.defs + +DEPPATH += --dep-path board + +include $(TOPDIR)/boards/Board.mk + +ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src +BOARDDIR = $(ARCHSRCDIR)$(DELIM)board +CFLAGS += ${INCDIR_PREFIX}$(BOARDDIR)$(DELIM)include + +CFLAGS += ${INCDIR_PREFIX}$(STM32_COMMON_SRCDIR) diff --git a/boards/arm/stm32n6/nucleo-n657x0-q/src/Makefile b/boards/arm/stm32n6/nucleo-n657x0-q/src/Make.defs similarity index 85% rename from boards/arm/stm32n6/nucleo-n657x0-q/src/Makefile rename to boards/arm/stm32n6/nucleo-n657x0-q/src/Make.defs index 74f826721e4..794c50d1b24 100644 --- a/boards/arm/stm32n6/nucleo-n657x0-q/src/Makefile +++ b/boards/arm/stm32n6/nucleo-n657x0-q/src/Make.defs @@ -1,5 +1,5 @@ ############################################################################## -# boards/arm/stm32n6/nucleo-n657x0-q/src/Makefile +# boards/arm/stm32n6/nucleo-n657x0-q/src/Make.defs # # SPDX-License-Identifier: Apache-2.0 # @@ -31,4 +31,6 @@ else CSRCS += stm32_userleds.c endif -include $(TOPDIR)/boards/Board.mk +DEPPATH += --dep-path board +VPATH += :board +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board diff --git a/boards/arm/stm32u5/b-u585i-iot02a/src/Makefile b/boards/arm/stm32u5/b-u585i-iot02a/src/Make.defs similarity index 85% rename from boards/arm/stm32u5/b-u585i-iot02a/src/Makefile rename to boards/arm/stm32u5/b-u585i-iot02a/src/Make.defs index 915275f7e6f..f17f63d0979 100644 --- a/boards/arm/stm32u5/b-u585i-iot02a/src/Makefile +++ b/boards/arm/stm32u5/b-u585i-iot02a/src/Make.defs @@ -1,5 +1,5 @@ ############################################################################## -# boards/arm/stm32u5/b-u585i-iot02a/src/Makefile +# boards/arm/stm32u5/b-u585i-iot02a/src/Make.defs # # SPDX-License-Identifier: Apache-2.0 # @@ -29,4 +29,6 @@ ifeq ($(CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG),y) CSRCS += stm32_clockconfig.c endif -include $(TOPDIR)/boards/Board.mk +DEPPATH += --dep-path board +VPATH += :board +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board diff --git a/boards/arm/stm32u5/common/CMakeLists.txt b/boards/arm/stm32u5/common/CMakeLists.txt new file mode 100644 index 00000000000..665491eb87e --- /dev/null +++ b/boards/arm/stm32u5/common/CMakeLists.txt @@ -0,0 +1,25 @@ +# ############################################################################## +# boards/arm/stm32u5/common/CMakeLists.txt +# +# SPDX-License-Identifier: Apache-2.0 +# +# 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) + add_subdirectory(${NUTTX_DIR}/boards/arm/common/stm32 stm32_common) +endif() diff --git a/boards/arm/stm32u5/common/Makefile b/boards/arm/stm32u5/common/Makefile new file mode 100644 index 00000000000..35c5a123328 --- /dev/null +++ b/boards/arm/stm32u5/common/Makefile @@ -0,0 +1,39 @@ +############################################################################# +# boards/arm/stm32u5/common/Makefile +# +# SPDX-License-Identifier: Apache-2.0 +# +# 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. +# +############################################################################# + +include $(TOPDIR)/Make.defs + +STM32_BOARD_COMMON_DIR := $(TOPDIR)$(DELIM)boards$(DELIM)arm$(DELIM)common$(DELIM)stm32 +STM32_COMMON_SRCDIR := $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)common$(DELIM)stm32 + +include board/Make.defs +include $(STM32_BOARD_COMMON_DIR)$(DELIM)src$(DELIM)Make.defs + +DEPPATH += --dep-path board + +include $(TOPDIR)/boards/Board.mk + +ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src +BOARDDIR = $(ARCHSRCDIR)$(DELIM)board +CFLAGS += ${INCDIR_PREFIX}$(BOARDDIR)$(DELIM)include + +CFLAGS += ${INCDIR_PREFIX}$(STM32_COMMON_SRCDIR) diff --git a/boards/arm/stm32u5/nucleo-u5a5zj-q/src/Makefile b/boards/arm/stm32u5/nucleo-u5a5zj-q/src/Make.defs similarity index 85% rename from boards/arm/stm32u5/nucleo-u5a5zj-q/src/Makefile rename to boards/arm/stm32u5/nucleo-u5a5zj-q/src/Make.defs index 93d9723add3..4f7e99fa88e 100644 --- a/boards/arm/stm32u5/nucleo-u5a5zj-q/src/Makefile +++ b/boards/arm/stm32u5/nucleo-u5a5zj-q/src/Make.defs @@ -1,5 +1,5 @@ ############################################################################## -# boards/arm/stm32u5/nucleo-u5a5zj-q/src/Makefile +# boards/arm/stm32u5/nucleo-u5a5zj-q/src/Make.defs # # SPDX-License-Identifier: Apache-2.0 # @@ -33,4 +33,6 @@ ifeq ($(CONFIG_USBDEV),y) CSRCS += stm32_usb.c endif -include $(TOPDIR)/boards/Board.mk +DEPPATH += --dep-path board +VPATH += :board +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board diff --git a/boards/arm/stm32wb/common/CMakeLists.txt b/boards/arm/stm32wb/common/CMakeLists.txt new file mode 100644 index 00000000000..0fc916a9203 --- /dev/null +++ b/boards/arm/stm32wb/common/CMakeLists.txt @@ -0,0 +1,25 @@ +# ############################################################################## +# boards/arm/stm32wb/common/CMakeLists.txt +# +# SPDX-License-Identifier: Apache-2.0 +# +# 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) + add_subdirectory(${NUTTX_DIR}/boards/arm/common/stm32 stm32_common) +endif() diff --git a/boards/arm/stm32wb/common/Makefile b/boards/arm/stm32wb/common/Makefile new file mode 100644 index 00000000000..37068a41285 --- /dev/null +++ b/boards/arm/stm32wb/common/Makefile @@ -0,0 +1,36 @@ +############################################################################# +# boards/arm/stm32wb/common/Makefile +# +# SPDX-License-Identifier: Apache-2.0 +# +# 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. +# +############################################################################# + +include $(TOPDIR)/Make.defs + +STM32_BOARD_COMMON_DIR := $(TOPDIR)$(DELIM)boards$(DELIM)arm$(DELIM)common$(DELIM)stm32 + +include board/Make.defs +include $(STM32_BOARD_COMMON_DIR)$(DELIM)src$(DELIM)Make.defs + +DEPPATH += --dep-path board + +include $(TOPDIR)/boards/Board.mk + +ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src +BOARDDIR = $(ARCHSRCDIR)$(DELIM)board +CFLAGS += ${INCDIR_PREFIX}$(BOARDDIR)$(DELIM)include diff --git a/boards/arm/stm32wb/flipperzero/src/Makefile b/boards/arm/stm32wb/flipperzero/src/Make.defs similarity index 85% rename from boards/arm/stm32wb/flipperzero/src/Makefile rename to boards/arm/stm32wb/flipperzero/src/Make.defs index 716d6b29001..08de31cb0ab 100644 --- a/boards/arm/stm32wb/flipperzero/src/Makefile +++ b/boards/arm/stm32wb/flipperzero/src/Make.defs @@ -1,5 +1,5 @@ ############################################################################ -# boards/arm/stm32wb/flipperzero/src/Makefile +# boards/arm/stm32wb/flipperzero/src/Make.defs # # SPDX-License-Identifier: Apache-2.0 # @@ -32,4 +32,6 @@ ifeq ($(CONFIG_LCD_ST7565),y) CSRCS += stm32_lcd_st7565.c endif -include $(TOPDIR)/boards/Board.mk +DEPPATH += --dep-path board +VPATH += :board +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board diff --git a/boards/arm/stm32wb/nucleo-wb55rg/src/Makefile b/boards/arm/stm32wb/nucleo-wb55rg/src/Make.defs similarity index 84% rename from boards/arm/stm32wb/nucleo-wb55rg/src/Makefile rename to boards/arm/stm32wb/nucleo-wb55rg/src/Make.defs index 11d004aa68c..6b303424bf7 100644 --- a/boards/arm/stm32wb/nucleo-wb55rg/src/Makefile +++ b/boards/arm/stm32wb/nucleo-wb55rg/src/Make.defs @@ -1,5 +1,5 @@ ############################################################################ -# boards/arm/stm32wb/nucleo-wb55rg/src/Makefile +# boards/arm/stm32wb/nucleo-wb55rg/src/Make.defs # # SPDX-License-Identifier: Apache-2.0 # @@ -30,4 +30,6 @@ else CSRCS += stm32_userleds.c endif -include $(TOPDIR)/boards/Board.mk +DEPPATH += --dep-path board +VPATH += :board +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board diff --git a/boards/arm/stm32wl5/common/CMakeLists.txt b/boards/arm/stm32wl5/common/CMakeLists.txt new file mode 100644 index 00000000000..2f046eaad39 --- /dev/null +++ b/boards/arm/stm32wl5/common/CMakeLists.txt @@ -0,0 +1,25 @@ +# ############################################################################## +# boards/arm/stm32wl5/common/CMakeLists.txt +# +# SPDX-License-Identifier: Apache-2.0 +# +# 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) + add_subdirectory(${NUTTX_DIR}/boards/arm/common/stm32 stm32_common) +endif() diff --git a/boards/arm/stm32wl5/common/Makefile b/boards/arm/stm32wl5/common/Makefile new file mode 100644 index 00000000000..75553202a36 --- /dev/null +++ b/boards/arm/stm32wl5/common/Makefile @@ -0,0 +1,39 @@ +############################################################################# +# boards/arm/stm32wl5/common/Makefile +# +# SPDX-License-Identifier: Apache-2.0 +# +# 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. +# +############################################################################# + +include $(TOPDIR)/Make.defs + +STM32_BOARD_COMMON_DIR := $(TOPDIR)$(DELIM)boards$(DELIM)arm$(DELIM)common$(DELIM)stm32 +STM32_COMMON_SRCDIR := $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)common$(DELIM)stm32 + +include board/Make.defs +include $(STM32_BOARD_COMMON_DIR)$(DELIM)src$(DELIM)Make.defs + +DEPPATH += --dep-path board + +include $(TOPDIR)/boards/Board.mk + +ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src +BOARDDIR = $(ARCHSRCDIR)$(DELIM)board +CFLAGS += ${INCDIR_PREFIX}$(BOARDDIR)$(DELIM)include + +CFLAGS += ${INCDIR_PREFIX}$(STM32_COMMON_SRCDIR) diff --git a/boards/arm/stm32wl5/nucleo-wl55jc/src/Makefile b/boards/arm/stm32wl5/nucleo-wl55jc/src/Make.defs similarity index 87% rename from boards/arm/stm32wl5/nucleo-wl55jc/src/Makefile rename to boards/arm/stm32wl5/nucleo-wl55jc/src/Make.defs index 1c280874bc5..6f8be0ff7f8 100644 --- a/boards/arm/stm32wl5/nucleo-wl55jc/src/Makefile +++ b/boards/arm/stm32wl5/nucleo-wl55jc/src/Make.defs @@ -1,5 +1,5 @@ ############################################################################ -# boards/arm/stm32wl5/nucleo-wl55jc/src/Makefile +# boards/arm/stm32wl5/nucleo-wl55jc/src/Make.defs # # SPDX-License-Identifier: Apache-2.0 # @@ -37,4 +37,6 @@ endif CSRCS += $(CSRCS-y) -include $(TOPDIR)/boards/Board.mk +DEPPATH += --dep-path board +VPATH += :board +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board