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
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(
-funsigned-char
-fno-function-sections
+ -fdata-sections
"$<$<COMPILE_LANGUAGE:CXX>:-fno-unwind-tables;-fno-rtti;-fno-exceptions>")
# Arch compile options:
@@ -88,12 +89,13 @@
-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.