nuttx/boards/arm/nrf53/nrf5340-dk/scripts/Make.defs
raiden00pl 58ad290b0e boards/nrf5340-dk: add MCUboot configurations for the app core
Added configurations:
- mcuboot_loader_cpuapp - MCUboot loader
- mcuboot_app_cpuapp - MCUboot compatible application.
  Needs to be signed manually:
    imgtool.py sign nuttx.hex nuttx_img.hex --align 8 -v 1.0.0 -H 0x200 -S 0x70000 --pad-header --pad
2023-05-31 23:12:21 +08:00

53 lines
2.2 KiB
Plaintext

############################################################################
# boards/arm/nrf53/nrf5340-dk/scripts/Make.defs
#
# 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)/.config
include $(TOPDIR)/tools/Config.mk
include $(TOPDIR)/arch/arm/src/armv8-m/Toolchain.defs
ifeq ($(CONFIG_ARCH_BOARD_COMMON),y)
ifeq ($(CONFIG_ARCH_CHIP_NRF5340_CPUAPP),y)
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)flash_app.ld
endif
ifeq ($(CONFIG_ARCH_CHIP_NRF5340_CPUNET),y)
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)flash_net.ld
endif
else
ifeq ($(CONFIG_ARCH_CHIP_NRF5340_CPUAPP),y)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)flash_app.ld
endif
ifeq ($(CONFIG_ARCH_CHIP_NRF5340_CPUNET),y)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)flash_net.ld
endif
endif
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
AFLAGS := $(CFLAGS) -D__ASSEMBLY__
NXFLATLDFLAGS1 = -r -d -warn-common
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections
LDNXFLATFLAGS = -e main -s 2048