mirror of
https://github.com/apache/nuttx.git
synced 2026-08-15 17:33:18 +00:00
boards/arm/stm32l4: build through common STM32 board infrastructure
Add boards/arm/stm32l4/common so STM32L4 boards build through the shared STM32 board-common tree (boards/arm/common/stm32), like the other split STM32 families. Convert each STM32L4 board's src/Makefile to src/Make.defs so the per-board sources are pulled in by the common board Makefile. Signed-off-by: raiden00pl <raiden00@railab.me>
This commit is contained in:
parent
0e5d8d6c85
commit
699ffc3271
12 changed files with 96 additions and 9 deletions
|
|
@ -34,4 +34,6 @@ ifeq ($(CONFIG_SPIRIT_NETDEV),y)
|
|||
CSRCS += stm32_spirit.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
|
||||
25
boards/arm/stm32l4/common/CMakeLists.txt
Normal file
25
boards/arm/stm32l4/common/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# ##############################################################################
|
||||
# boards/arm/stm32l4/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()
|
||||
6
boards/arm/stm32l4/common/Kconfig
Normal file
6
boards/arm/stm32l4/common/Kconfig
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see the file kconfig-language.txt in the NuttX tools repository.
|
||||
#
|
||||
|
||||
source "boards/arm/common/stm32/Kconfig"
|
||||
38
boards/arm/stm32l4/common/Makefile
Normal file
38
boards/arm/stm32l4/common/Makefile
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#############################################################################
|
||||
# boards/arm/stm32l4/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)
|
||||
|
|
@ -100,4 +100,6 @@ CSRCS += stm32_netinit.c
|
|||
endif
|
||||
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
|
||||
|
|
@ -42,4 +42,6 @@ ifeq ($(CONFIG_DAC),y)
|
|||
CSRCS += stm32_dac.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
|
||||
|
|
@ -117,4 +117,6 @@ CSRCS += stm32_netinit.c
|
|||
endif
|
||||
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
|
||||
|
|
@ -71,4 +71,6 @@ CSRCS += stm32_netinit.c
|
|||
endif
|
||||
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
|
||||
|
|
@ -32,4 +32,6 @@ ifeq ($(CONFIG_STM32_OTGFS),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
|
||||
|
|
@ -36,4 +36,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
|
||||
|
|
@ -64,4 +64,6 @@ CSRCS += stm32_netinit.c
|
|||
endif
|
||||
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
|
||||
|
|
@ -77,4 +77,6 @@ CSRCS += stm32_netinit.c
|
|||
endif
|
||||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue