esp8266 build unification

Posted on
  • I finally unified the two esp8266 builds. Now there's only one :-) This changes the way the firmware is flashed on a 512KB module, the new instructions are at
    https://github.com/tve/Espruino/blob/uni­fy/targets/esp8266/README_flash.txt
    and also in the downloaded tgz.

    If you'd like to try it out, the firmware is now automatically built by travis and can be downloaded from
    http://s3.voneicken.com/espruino/espruin­o_esp8266_1v81_tve_unify.tgz

    The short form to flash this on linux to a 4MB module is:

    curl -Ls http://s3.voneicken.com/espruino/espruin­o_esp8266_1v81_tve_unify.tgz | tar xfz -
    cd espruino_esp8266_1v81_tve_unify
    esptool.py --port [/dev/ttyUSB0|COM1] --baud 460800 write_flash \
      --flash_freq 80m --flash_mode qio --flash_size 32m \
      0x0000 "boot_v1.4(b1).bin" 0x1000 espruino_esp8266_user1.bin 0x37E000 blank.bin
    
  • That's great - thanks! I'll merge those changes in in a bit.

    Does it make sense to use dd in the build process to unify boot, espruino and blank firmwares into one big 512kB binary? Then users of 512k boards have a much more simple process, and on others a big blank image will only be needed if they care about having the remaining flash zeroed?

    Or am I missing something, like is the MAC address in there or something like that?

  • I could merge the bootloader and user1.bin. I would still need user1.bin separately for OTA updates. I don't want to merge blank.bin in because that wipes out the wifi settings, which you only want to do to reset the chip, not to update the firmware. Also, blank.bin goes to a different location depending on flash chip size.

  • Ahh, thanks! Probably not worth it then - realistically most people are just going to copy/paste the command so I guess it doesn't matter :)

  • Hello tve,
    weekend is gone, some time is free to test your new build.
    Right now I get this message:

    AccessDenied
    Access Denied
    AFC98212586720A3

    myqc7IivAaBw9vPT1m6LXD5zKCCRvrXl+OHTxAbJ­0PwEPp0U3tK9cjQPzP4dC6oWnUGWNbr0cnQ=


    I'm pretty sure, I was doing a download at the weekend, but that computer is far, far away.

  • Hi tve,
    where do we find the ./wiflash named in the README_flash.txt ?

  • Ugh, looks like I didn't double-check the readme_flash after the last round of changes. Looking now...

    wiflash is in ./scripts/wiflash

    WRT download, apologies for the dead link, please use: https://s3.voneicken.com/espruino/esprui­no_1v81.tve_unify_350abe6_esp8266.tgz

  • @tve, your version made a test on 4MB version.

    • Upload happened with ESP8266 Flasher and worked fine.
    • Testing my http-Server worked fine.
    • testing flash:

      var f = require("Flash"),s = 0x68000;
      for(var i = s;i < 0x80000;i+=4096){
      console.log(i.toString(16),f.read(8,i));­
      }
      for(i = 0x80000; i < 0x100000; i += 0x4000){
      console.log(i.toString(16),f.read(8,i));­
      }
      

    worked. Some results are strange in my eyes:

    • reading from 0x7E000 and 0x7F000 returns an empty array. This usually happens for areas, that can't be read using flash
    • same for 0x80000 and 0x84000
    • at 0x88000 is some data, is this some old data, or something totally different
      Everything else looks fine to me.
      Testing with wiflash will follow later, its time for bed now.
  • Thanks for checking! I may have a new version tonight that frees ~10KB of memory :-). Finally we'll be able to open network connections without running out of memory!

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

esp8266 build unification

Posted by Avatar for tve @tve

Actions