diff gsm-fw/finlink/ld-script.src @ 636:06ecb305f650

flashImage for BootROM-enabled targets: put something sensible at 0
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 01 Sep 2014 19:34:31 +0000
parents da72b51c0572
children 46e5c90fd0b8
line wrap: on
line diff
--- a/gsm-fw/finlink/ld-script.src	Mon Sep 01 18:45:37 2014 +0000
+++ b/gsm-fw/finlink/ld-script.src	Mon Sep 01 19:34:31 2014 +0000
@@ -29,8 +29,26 @@
 ')dnl
 
 SECTIONS {
-ifelse(Buildmem,FLASH,`
-	/* Flash boot entry point */
+dnl The following sections exist only in the flashImage build,
+dnl and only on targets that use the Calypso boot ROM.
+ifelse(Buildmem-FLASH_BOOT_VIA_BOOTROM,FLASH-1,
+`	/* Part of flash overlaid by the boot ROM */
+	bootrom.overlay 0 : {
+		*(bootrom.overlay)
+	} > FLASH_OVERLAY
+
+	/* code that enables the boot ROM and jumps to it */
+	bootrom.switch : {
+		*(bootrom.switch)
+	} > IRAM AT> FLASH_OVERLAY
+	__romswitch_ram_addr = ADDR(bootrom.switch);
+	__romswitch_flash_addr = LOADADDR(bootrom.switch);
+	__romswitch_size = SIZEOF(bootrom.switch);
+')dnl
+
+dnl all flashImage builds
+ifelse(Buildmem,FLASH,
+`	/* Flash boot entry point */
 	flashboot.text FLASHIMAGE_BASE_ADDR : {
 		*(flashboot.text)
 	} > FLASH