Use all of the 512 kbyte of the 4M flash
Posted: Tue Jul 21, 2015 4:53 am
Hello,
Is it possible to use all of the 512 kbyte of the 4M flash? I am not going to do any OTA-updating, so I think it's a pity I can't use this part of the flash. When I flash firmwares beyond the 192 kbyte boundary, the code won't run.
Would it be possible to define an extra segment + section(s) in the linker script that maps to offset 0x40000 (256 k) and put some code there?
Something like this:
Thanks!
Is it possible to use all of the 512 kbyte of the 4M flash? I am not going to do any OTA-updating, so I think it's a pity I can't use this part of the flash. When I flash firmwares beyond the 192 kbyte boundary, the code won't run.
Would it be possible to define an extra segment + section(s) in the linker script that maps to offset 0x40000 (256 k) and put some code there?
Something like this:
Code: Select all
MEMORY
{
dport0_0_seg : org = 0x3FF00000, len = 0x10
dram0_0_seg : org = 0x3FFE8000, len = 0x14000
iram1_0_seg : org = 0x40100000, len = 0x8000
irom0_0_seg : org = 0x40240000, len = 0x3C000
+ irom0_1_seg: org = 0x40280000, len = 0x3c000
}
PHDRS
{
dport0_0_phdr PT_LOAD;
dram0_0_phdr PT_LOAD;
dram0_0_bss_phdr PT_LOAD;
iram1_0_phdr PT_LOAD;
irom0_0_phdr PT_LOAD;
+ irom0_1_phdr PT_LOAD;
}
Code: Select all
.irom0.text : ALIGN(4)
{
_irom0_text_start = ABSOLUTE(.);
*(.irom0.literal .irom.literal .irom.text.literal .irom0.text .irom.text)
_irom0_text_end = ABSOLUTE(.);
} >irom0_0_seg :irom0_0_phdr
+
+ .irom1.text : ALIGN(4)
+ {
+ _irom1_text_start = ABSOLUTE(.);
+ *(.irom1.text)
+ _irom1_text_end = ABSOLUTE(.);
+ } >irom0_1_seg :irom0_1_phdr
Thanks!