Added linker.ld file

Added a half-finished linker file with lots of comments.
This commit is contained in:
Jake Goodwin 2024-11-10 06:35:01 -08:00
parent a28d4dd937
commit b966fccf75
1 changed files with 47 additions and 0 deletions

47
linker.ld Normal file
View File

@ -0,0 +1,47 @@
/*
* Filename: linker.ld
* Micro-Controller: stm32f103c8t6
*/
/*
* Program Entry Point:
* This part is put into the elf file header.
*/
ENTRY(Reset_Handler)
/*
* FORMAT:
* R: Read only section.
* W: Read/Write section.
* X: Executable section.
* A: Allocation section.
* I: Initialized section.
* !: Invert following attribute.
*/
/*
* MEMORY Format:
* name [(attr)] : ORIGIN = origin, LENGTH = len
*/
/* You will want to change these values to match your uC.*/
MEMORY
{
FLASH(rx):ORIGIN =0x08000000,LENGTH =64K
SRAM(rwx):ORIGIN =0x20000000,LENGTH =20K
}
floating_point = 0;
SECTIONS
{
. = 0x10000;
.text : { *(.text) }
. = 0x8000000;
.data : { *(.data) }
.bss : { *(.bss) }
}