summaryrefslogtreecommitdiff
path: root/scripts/cmake/toolchains
diff options
context:
space:
mode:
authorKshitij Sisodia <kshitij.sisodia@arm.com>2021-11-24 10:39:52 +0000
committerKshitij Sisodia <kshitij.sisodia@arm.com>2021-11-25 10:05:25 +0000
commit661959c6d2fabada5d465e9de8f84128e3f7b684 (patch)
tree3321ebb442c7ec1f7af454dd25d6bd1b54663587 /scripts/cmake/toolchains
parentb59ba684aef4bef16262a1825e787a55fc992f0d (diff)
downloadml-embedded-evaluation-kit-661959c6d2fabada5d465e9de8f84128e3f7b684.tar.gz
MLECO-2426: Support for new Corstone-300 app note AN552 rev B.
These changes will limit the use of FPGA internal SRAM from a max of 4MiB to 2MiB and the BRAM from 2MiB to 1MiB. Change-Id: I69c8e695aee26ff4f235bfe83ffd26efbd66f547
Diffstat (limited to 'scripts/cmake/toolchains')
-rw-r--r--scripts/cmake/toolchains/bare-metal-gcc.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/cmake/toolchains/bare-metal-gcc.cmake b/scripts/cmake/toolchains/bare-metal-gcc.cmake
index 455f5ec..2bf5fd3 100644
--- a/scripts/cmake/toolchains/bare-metal-gcc.cmake
+++ b/scripts/cmake/toolchains/bare-metal-gcc.cmake
@@ -62,6 +62,7 @@ add_compile_options(
add_compile_options(
-funsigned-char
-fno-function-sections
+ -fdata-sections
"$<$<COMPILE_LANGUAGE:CXX>:-fno-unwind-tables;-fno-rtti;-fno-exceptions>")
# Arch compile options:
@@ -88,12 +89,13 @@ add_link_options(
-mlittle-endian
--specs=nosys.specs
--stats
+ "SHELL:-Xlinker --gc-sections"
"$<$<CONFIG:RELEASE>:--no-debug>")
# Function to add a map file output for the linker to dump diagnostic information to.
function(add_target_map_file TARGET_NAME MAP_FILE_PATH)
target_link_options(${TARGET_NAME} PUBLIC
- -Xlinker -Map=${MAP_FILE_PATH})
+ "SHELL:-Xlinker -Map=${MAP_FILE_PATH}")
endfunction()
# Function to add linker option to use the chosen linker script.