From b1c8bb5df090d65cdd37a7acafb5dee8e3c530c6 Mon Sep 17 00:00:00 2001 From: Oxore Date: Sun, 9 Oct 2022 02:54:07 +0300 Subject: Add CMakeLists.txt and make it compile with GCC --- Project/ld/_flash.ld | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Project/ld/_flash.ld (limited to 'Project/ld/_flash.ld') diff --git a/Project/ld/_flash.ld b/Project/ld/_flash.ld new file mode 100644 index 0000000..ec94ea7 --- /dev/null +++ b/Project/ld/_flash.ld @@ -0,0 +1,33 @@ +SECTIONS { + . = ORIGIN(FLASH); + .text : { + KEEP(*(.stack)) + KEEP(*(.vectors)) + KEEP(*(.vectors*)) + KEEP(*(.text)) + . = ALIGN(4); + *(.text*) + . = ALIGN(4); + KEEP(*(.rodata)) + *(.rodata*) + . = ALIGN(4); + } >FLASH + + .preinit_array ALIGN(4): { + __preinit_array_start = .; + KEEP(*(.preinit_array)) + __preinit_array_end = .; + } >FLASH + + .init_array ALIGN(4): { + __init_array_start = .; + KEEP(*(.init_array)) + __init_array_end = .; + } >FLASH + + .fini_array ALIGN(4): { + __fini_array_start = .; + KEEP(*(.fini_array)) + __fini_array_end = .; + } >FLASH +} -- cgit v1.2.3