summaryrefslogtreecommitdiff
path: root/flash/bootloader/bootloader.lds
diff options
context:
space:
mode:
Diffstat (limited to 'flash/bootloader/bootloader.lds')
-rw-r--r--flash/bootloader/bootloader.lds34
1 files changed, 34 insertions, 0 deletions
diff --git a/flash/bootloader/bootloader.lds b/flash/bootloader/bootloader.lds
new file mode 100644
index 0000000..143d83b
--- /dev/null
+++ b/flash/bootloader/bootloader.lds
@@ -0,0 +1,34 @@
+OUTPUT_FORMAT(elf32-sh)
+INPUT(bootloader.o)
+
+MEMORY
+{
+ /* the boot ROM uses IRAM at 400-430, stay away and start at 500 */
+ IRAM : ORIGIN = 0x0FFFF500, LENGTH = 0xA00
+ /* and leave some room for stack at the end */
+}
+
+SECTIONS
+{
+ .startvector :
+ {
+ *(.startvector)
+ . = ALIGN(0x4);
+ } > IRAM
+
+ .text :
+ {
+ *(.text)
+ . = ALIGN(0x4);
+ } > IRAM
+
+ .data :
+ {
+ *(.data)
+ } > IRAM
+
+ .bss :
+ {
+ *(.bss)
+ } > IRAM
+}