nuttx/boards/arm/at32/at32f437-mini/src/Makefile

88 lines
2.0 KiB
Makefile
Raw Normal View History

############################################################################
# boards/arm/at32/at32f437-mini/src/Makefile
#
# 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
CSRCS = at32_boot.c at32_bringup.c
ifeq ($(CONFIG_BOARDCTL),y)
CSRCS += at32_appinit.c
endif
ifeq ($(CONFIG_DEV_GPIO),y)
CSRCS += at32_gpio.c
endif
ifeq ($(CONFIG_ARCH_LEDS),y)
CSRCS += at32_autoleds.c
else
CSRCS += at32_userleds.c
endif
ifeq ($(CONFIG_SPI),y)
CSRCS += at32_spi.c
endif
ifeq ($(CONFIG_MTD_W25),y)
CSRCS += at32_w25.c
endif
ifeq ($(CONFIG_AT32_CAN_CHARDRIVER),y)
CSRCS += at32_can.c
endif
ifeq ($(CONFIG_AT32_CAN_SOCKET),y)
CSRCS += at32_cansock.c
endif
ifeq ($(CONFIG_AT32_ETHMAC),y)
CSRCS += at32_ethernet.c
endif
ifeq ($(CONFIG_AT32_OTGFS),y)
CSRCS += at32_usb.c
endif
ifeq ($(CONFIG_AT32_SDIO),y)
CSRCS += at32_mmcsd.c
endif
ifeq ($(CONFIG_AT32_PWM),y)
CSRCS += at32_pwm.c
endif
ifeq ($(CONFIG_TIMER),y)
CSRCS += at32_timer.c
endif
ifeq ($(CONFIG_AT32_ADC),y)
CSRCS += at32_adc.c
endif
ifeq ($(CONFIG_MTD_AT24XX),y)
CSRCS += at32_at24.c
endif
sched: move etc romfs mount from nsh to sched/init Usually the startup script is placed under /etc. The contents of the etc directory are compiled and linked with Nuttx binary in the form of romfs. After startup, it will be mounted by Nsh. etc is generated by the different boards, that use genromfs and xxd tools to generate and compile it into the Nuttx, for example: boards/arm/at32/at32f437-mini/tool/mkromfs.sh The more common method is etc image generated from the content in the corresponding board/arch/board/board/src/etc directory, and added by Makefile for example: boards/sim/sim/sim/src/etc. But in kernel/protected mode, Nuttx kernel and apps are run in different privileged/ non-privileged mode or the isolated binarys, so as that nsh should use syscall to access Nuttx kernel by exported API. In this scenario, nsh can not mount the etc image content, because that is generated in board and as a part of Nuttx kernel. changes: - move etc romfs mount from nsh to Nuttx, but keep the script to parse and execute. - move and rename the related CONFIG, move customized nsh_romfsimg.h to etc_romfs.c in boards, and no need declaration for romfs_img/romfs_img_len. This commit changes and updates all configurations in Nuttx arch/board as much as possible, but if any missing, please refer to the following simple guide: - rename CONFIG_NSH_ROMFSETC to CONFIG_ETC_ROMFS, and delete CONFIG_NSH_ARCHROMFS in defconfig - rename the etc romfs mount configs, for example CONFIG_NSH_FATDEVNO to CONFIG_ETC_FATDEVNO - move customized nsh_romfsimg.h to etc_romfs.c in board/arch/board/board/src and no need declaration for romfs_img/romfs_img_len. - delete default nsh_romfsimg.h, if ROMFSETC is enabled, should generate and compile etc_romfs.c in board/arch/board/board/src. Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2023-11-26 04:51:46 +01:00
ifeq ($(CONFIG_ETC_ROMFS),y)
CSRCS += etc_romfs.c
endif
include $(TOPDIR)/boards/Board.mk