Code:
libwebpages-espfs.a: webpages.espfs
$(Q) $(OBJCOPY) -I binary -O elf32-xtensa-le -B xtensa --rename-section .data=.irom0.literal \
--redefine-sym _binary_webpages_espfs_start=webpages_espfs_start \
--redefine-sym _binary_webpages_espfs_end=webpages_espfs_end \
--redefine-sym _binary_webpages_espfs_size=webpages_espfs_size \
webpages.espfs build/webpages.espfs.o
$(Q) $(AR) cru $@ build/webpages.espfs.o
Code:
libwebpages-espfs.a: webpages.espfs
$(Q) $(OBJCOPY) -I binary -O elf32-xtensa-le -B xtensa --rename-section .data=.irom0.literal \
webpages.espfs build/webpages.espfs.o.tmp
$(Q) $(LD) -nostdlib -Wl,-r build/webpages.espfs.o.tmp -o build/webpages.espfs.o -Wl,-T webpages.espfs.ld
$(Q) $(AR) cru $@ build/webpages.espfs.o
Code:
OUTPUT_FORMAT("elf32-xtensa-le")
SECTIONS
{
.irom0.literal : ALIGN(4) SUBALIGN(4) {
webpages_espfs_start = .;
*(*)
webpages_espfs_end = .;
webpages_espfs_size = webpages_espfs_end - webpages_espfs_start;
}
}
Statistics: Posted by vinicius.vbf — Tue Apr 12, 2016 11:52 am
should call espfsint first
Code:
void user_init(void)
{
...
/*Initialize espfs containing static webpages*/
espFsInit((void*)(webpages_espfs_start));
...
}
Code:
EspFsInitResult espFsInit(void *flashAddress) {
// base address must be aligned to 4 bytes
if (((int)flashAddress & 3) != 0) {
return ESPFS_INIT_RESULT_BAD_ALIGN;
}
...
}
Statistics: Posted by vinicius.vbf — Wed Mar 02, 2016 10:15 am