diff --git a/pio-genespfs.py b/pio-genespfs.py index 4aff19f..737653d 100644 --- a/pio-genespfs.py +++ b/pio-genespfs.py @@ -15,7 +15,9 @@ buf = BytesIO() espfsimg = mkespfs(dir, buf) fd = Path(espfile).open(mode='w') -fd.write("unsigned char espfs_image[] __attribute__((section(\".irom.text\"))) = {"); +fd.write("unsigned char espfs_image[] "); +fd.write("__attribute__((aligned(4))) "); +fd.write("__attribute__((section(\".irom.text\"))) = {"); for i, b in enumerate(buf.getbuffer()): if i%16 == 0: fd.write("\n") fd.write(" 0x{:02x},".format(b)) diff --git a/src/main.c b/src/main.c index 09a4805..3eddd20 100644 --- a/src/main.c +++ b/src/main.c @@ -185,10 +185,9 @@ user_init(void) { // Wifi wifiInit(); // init the flash filesystem with the html stuff - espFsInit(espLinkCtx, espfs_image, ESPFS_MEMORY); + EspFsInitResult res = espFsInit(espLinkCtx, espfs_image, ESPFS_MEMORY); + os_printf("espFsInit %s (%d)\n", res?"ERR":"ok", res); - //EspFsInitResult res = espFsInit(&_binary_espfs_img_start); - //os_printf("espFsInit %s\n", res?"ERR":"ok"); // mount the http handlers httpdInit(builtInUrls, 80); #ifdef WEBSERVER