]> granicus.if.org Git - esp-idf/commitdiff
bootloader: move iram_seg 1k up to have better looking idf_monitor output
authorIvan Grokhotkov <ivan@espressif.com>
Wed, 4 Jul 2018 04:33:11 +0000 (12:33 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Wed, 4 Jul 2018 04:33:11 +0000 (12:33 +0800)
When 2nd stage bootloader loads the ROM bootloader, it prints a
message similar to "entry 0x40080xxx", which idf_monitor decodes
(using application ELF file) as one of the reset vectors (xxx is <
400h). This moves the iram_seg of bootloader 1k up to prevent overlap
of bootloader .text and application vectors, making the output look
nicer. There is still a chance that the entry point decodes as some
symbol in application ELF file, but at least it won't have
"Exception" in its name.

components/bootloader/subproject/main/esp32.bootloader.ld

index 2c5778c39cda6b39d32917b028f02d16a669baff..385c9a434483f45bb931dcff194257dce02f5e99 100644 (file)
@@ -15,7 +15,12 @@ MEMORY
   dport0_seg (RW) :                    org = 0x3FF00000, len = 0x10
   /* IRAM POOL1, used for APP CPU cache. Bootloader runs from here during the final stage of loading the app because APP CPU is still held in reset, the main app enables APP CPU cache */
   iram_loader_seg (RWX) :           org = 0x40078000, len = 0x8000  /* 32KB, APP CPU cache */
-  iram_seg (RWX) :                  org = 0x40080000, len = 0x10000 /* 64KB, IRAM */
+  /* 63kB, IRAM. We skip the first 1k to prevent the entry point being
+     placed into the same range as exception vectors in the app.
+     This leads to idf_monitor decoding ROM bootloader "entry 0x40080xxx"
+     message as one of the exception vectors, which looks scary to users.
+  */
+  iram_seg (RWX) :                  org = 0x40080400, len = 0xfc00
   /* 64k at the end of DRAM, after ROM bootloader stack */
   dram_seg (RW) :                      org = 0x3FFF0000, len = 0x10000
 }