mirror of
https://github.com/Fishwaldo/bl_mcu_sdk.git
synced 2025-07-08 05:48:28 +00:00
[chore] fix bl702 ram linkscript
This commit is contained in:
parent
1b1acc8510
commit
c0518d0e3e
2 changed files with 8 additions and 19 deletions
|
@ -1,9 +1,9 @@
|
||||||
/****************************************************************************************
|
/****************************************************************************************
|
||||||
* @file map.txt
|
* @file bl702_ram.ld
|
||||||
*
|
*
|
||||||
* @brief This file is the map file (gnuarm or armgcc).
|
* @brief This file is the map file (gnuarm or armgcc).
|
||||||
*
|
*
|
||||||
* Copyright (C) BouffaloLab 2018
|
* Copyright (C) BouffaloLab 2021
|
||||||
*
|
*
|
||||||
****************************************************************************************
|
****************************************************************************************
|
||||||
*/
|
*/
|
||||||
|
@ -18,7 +18,6 @@ OUTPUT_ARCH( "riscv" )
|
||||||
ENTRY(_enter)
|
ENTRY(_enter)
|
||||||
|
|
||||||
StackSize = 0x0400; /* 1KB */
|
StackSize = 0x0400; /* 1KB */
|
||||||
HeapSize = 0x1000; /* 4KB */
|
|
||||||
|
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
|
@ -82,22 +81,6 @@ SECTIONS
|
||||||
__tcm_data_end__ = .;
|
__tcm_data_end__ = .;
|
||||||
} > dtcm_memory
|
} > dtcm_memory
|
||||||
|
|
||||||
/* .heap_dummy section doesn't contains any symbols. It is only
|
|
||||||
* used for linker to calculate size of heap sections, and assign
|
|
||||||
* values to heap symbols later */
|
|
||||||
.heap_dummy (NOLOAD):
|
|
||||||
{
|
|
||||||
. = ALIGN(0x4);
|
|
||||||
. = . + HeapSize;
|
|
||||||
. = ALIGN(0x4);
|
|
||||||
} > dtcm_memory
|
|
||||||
|
|
||||||
_HeapBase = ORIGIN(dtcm_memory) + LENGTH(dtcm_memory) - StackSize - HeapSize;
|
|
||||||
_HeapSize = HeapSize;
|
|
||||||
|
|
||||||
/* Check if data + heap + stack exceeds RAM limit */
|
|
||||||
ASSERT(_HeapBase >= __tcm_data_end__, "region RAM overflowed with stack")
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* .stack_dummy section doesn't contains any symbols. It is only
|
/* .stack_dummy section doesn't contains any symbols. It is only
|
||||||
* used for linker to calculate size of stack sections, and assign
|
* used for linker to calculate size of stack sections, and assign
|
||||||
|
@ -189,5 +172,10 @@ SECTIONS
|
||||||
__HeapLimit = .;
|
__HeapLimit = .;
|
||||||
} > ram_memory
|
} > ram_memory
|
||||||
|
|
||||||
|
PROVIDE (__heap_min_size = 0x400);
|
||||||
|
__HeapLimit = ORIGIN(ram_memory) + LENGTH(ram_memory);
|
||||||
|
|
||||||
|
ASSERT((__HeapLimit - __HeapBase ) >= __heap_min_size, "heap size is too short.")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,4 +7,5 @@ list(APPEND GLOBAL_C_FLAGS -march=${MARCH} -mabi=${MABI})
|
||||||
list(APPEND GLOBAL_LD_FLAGS -march=${MARCH} -mabi=${MABI})
|
list(APPEND GLOBAL_LD_FLAGS -march=${MARCH} -mabi=${MABI})
|
||||||
|
|
||||||
SET(LINKER_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/bl702_flash.ld)
|
SET(LINKER_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/bl702_flash.ld)
|
||||||
|
SET(RAM_LINKER_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/bl702_ram.ld)
|
||||||
SET(BOOT2_LINKER_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/blsp_boot2_iap_flash.ld)
|
SET(BOOT2_LINKER_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/blsp_boot2_iap_flash.ld)
|
Loading…
Add table
Add a link
Reference in a new issue