/* * 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 { /* Code section, mapped to Flash memory */ .tect : { KEEP(*(.isr_vector)) /* Vector table, which must be at the beginning of Flash*/ *(.text) /* All code goes here */ *(.rodata) /* Read-only data (e.g., const vars) */ _etext = .; /* Mark the end of text section */ } > FLASH /* Initialized data section, copied from Flash to RAM on startup. */ .data : { _sdata = .; /* Start of data section */ *(.data) /* Initialized data */ _edata = .; /* End of data section */ } > RAM AT > FLASH }