2015-03-06 19:46:12 +01:00
|
|
|
/****************************************************************************
|
2021-12-12 00:51:31 +01:00
|
|
|
* boards/arm/samv7/common/scripts/memory.ld
|
2015-03-06 19:46:12 +01:00
|
|
|
*
|
2021-03-17 18:14:12 +01:00
|
|
|
* 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
|
2015-03-06 19:46:12 +01:00
|
|
|
*
|
2021-03-17 18:14:12 +01:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2015-03-06 19:46:12 +01:00
|
|
|
*
|
2021-03-17 18:14:12 +01:00
|
|
|
* 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.
|
2015-03-06 19:46:12 +01:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2021-12-12 00:51:31 +01:00
|
|
|
/* The SAMV7 can have up to 2048Kb of FLASH beginning at address 0x0040:0000
|
|
|
|
* and 384Kb of SRAM beginining at 0x2040:0000
|
2015-03-06 19:46:12 +01:00
|
|
|
*
|
|
|
|
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
|
|
|
* where the code expects to begin execution by jumping to the entry point in
|
2015-03-10 14:50:32 +01:00
|
|
|
* the 0x0400:0000 address range.
|
|
|
|
*
|
2015-03-06 19:46:12 +01:00
|
|
|
* The user space partition will be spanned with a single region of size
|
|
|
|
* 2**n bytes. The alignment of the user-space region must be the same.
|
|
|
|
* As a consequence, as the user-space increases in size, the alignment
|
|
|
|
* requirement also increases. The sizes below give the largest possible
|
|
|
|
* user address spaces (but leave far too much for the OS).
|
|
|
|
*
|
|
|
|
* The solution to this wasted memory is to (1) use more than one region to
|
|
|
|
* span the user spaces, or (2) poke holes in a larger region to trim it
|
|
|
|
* to fit better.
|
|
|
|
*
|
|
|
|
* A detailed memory map for the 384KB SRAM region is as follows:
|
|
|
|
*
|
2017-01-30 19:49:07 +01:00
|
|
|
* 0x2040 0000: Kernel .data region. Typical size: 0.1KB
|
|
|
|
* ------ ---- Kernel .bss region. Typical size: 1.8KB
|
|
|
|
* 0x2040 0800: Kernel IDLE thread stack (approximate). Size is
|
|
|
|
* determined by CONFIG_IDLETHREAD_STACKSIZE and
|
|
|
|
* adjustments for alignment. Typical is 1KB.
|
|
|
|
* ------ ---- Padded to 4KB
|
|
|
|
* 0x2042 0000: User .data region. Size is variable.
|
|
|
|
* ------- ---- User .bss region Size is variable.
|
|
|
|
* 0x2044 0000: Beginning of kernel heap. Size determined by
|
|
|
|
* CONFIG_MM_KERNEL_HEAPSIZE.
|
|
|
|
* ------ ---- Beginning of user heap. Can vary with other settings.
|
|
|
|
* 0x2046 0000: End+1 of mappable internal SRAM
|
2015-03-06 19:46:12 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
MEMORY
|
|
|
|
{
|
2019-09-15 23:27:58 +02:00
|
|
|
/* 2048KiB of internal FLASH */
|
2015-03-06 19:46:12 +01:00
|
|
|
|
2019-09-15 23:27:58 +02:00
|
|
|
kflash (rx) : ORIGIN = 0x00400000, LENGTH = 1M
|
|
|
|
uflash (rx) : ORIGIN = 0x00500000, LENGTH = 1M
|
2015-03-06 19:46:12 +01:00
|
|
|
|
2019-09-15 23:27:58 +02:00
|
|
|
/* 384Kb of internal SRAM */
|
2015-03-06 19:46:12 +01:00
|
|
|
|
2019-09-15 23:27:58 +02:00
|
|
|
ksram (rwx) : ORIGIN = 0x20400000, LENGTH = 128K
|
|
|
|
usram (rwx) : ORIGIN = 0x20420000, LENGTH = 128K
|
|
|
|
xsram (rwx) : ORIGIN = 0x20440000, LENGTH = 128K
|
2015-03-06 19:46:12 +01:00
|
|
|
}
|