1################################################################################ 2# \file cy8c6xx4_cm4.mk 3# \version 2.95.1 4# 5# \brief 6# Specifies the starting address and the size of the segments in the output 7# file. 8# 9# \note The section definitions in this file are generic and handle all common 10# use cases. 11# 12################################################################################ 13# \copyright 14# Copyright 2018-2021 Cypress Semiconductor Corporation 15# SPDX-License-Identifier: Apache-2.0 16# 17# Licensed under the Apache License, Version 2.0 (the "License"); 18# you may not use this file except in compliance with the License. 19# You may obtain a copy of the License at 20# 21# http://www.apache.org/licenses/LICENSE-2.0 22# 23# Unless required by applicable law or agreed to in writing, software 24# distributed under the License is distributed on an "AS IS" BASIS, 25# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 26# See the License for the specific language governing permissions and 27# limitations under the License. 28################################################################################ 29 30### CM4 ### 31export HEAP_SIZE_CM4 := 0x400 32export VECT_BASE_CM4 := 0x10000000 33export RAM_VECT_BASE_CM4 := 0x08000000 34export VECT_SIZE_CM4 := 0x000002FC 35export TEXT_BASE_CM4 := 0x100002FC 36export TEXT_SIZE_CM4 := 0x00040000 37export RAM_BASE_CM4 := 0x080002FC 38export RAM_SIZE_CM4 := 0x0001F780 39export CYMETA_BASE_CM4 := 0x90500000 40export STACK_SIZE_CM4 := 0x2000 41STACK_ADDRESS_TOP_CM4 := $(shell printf "0x%x" $$(($(RAM_BASE_CM4) + $(RAM_SIZE_CM4)))) 42STACK_ADDRESS_BOTTOM_CM4 := $(shell printf "0x%x" $$(($(STACK_ADDRESS_TOP_CM4) - $(STACK_SIZE_CM4)))) 43TOOLCHAIN_VECT_BASE_CM4 := $(VECT_BASE_CM4) 44 45SECTIONS_CM4 := \ 46 -segaddr __VECT $(VECT_BASE_CM4) \ 47 -segaddr __TEXT $(TEXT_BASE_CM4) \ 48 -segaddr __DATA $(RAM_BASE_CM4) \ 49 -segaddr __RAMVECTORS $(RAM_VECT_BASE_CM4) \ 50 -segaddr __CYMETA $(CYMETA_BASE_CM4) \ 51 -segaddr __STACK $(STACK_ADDRESS_TOP_CM4) 52 53# Pass section addresses to the linker 54ifeq ($(MTB_RECIPE__CORE),CM4) 55ACLANG_MEM_LDFLAGS += \ 56 -segalign 4 \ 57 $(SECTIONS_CM4) 58endif 59 60# EOF 61