• For a day or so, V3.0 is released.
    We've been waiting long time for this step.
    My plan now is, to get Espruino running with actual sources, which are

    • Espruino itself
    • ESP-IDF V3.0
    • Bluetooth support for ESP32
    • support PSRAM in WROVER boards giving us 20000 jsVars (or more ?)
    • support of BLE serial (NRF UART) is under development. Windows 10 Is not really helpful for that. This will take some time.
      -last not least documents
      Everything will be done first in ESP32 branch.

    There are some restrictions like

    • reduce jsvars to 2500, I'm just testing with 3000 and got no problems(yet). If you need more, WROVER boards are available. Last not least, there is somebody in the ESP32 forum adding a 8MB PSRAM, priced less than 1$
    • Bluetooth eats memory like crazy. Size of binary, including BLE Uart and bonding is 1280KB. There is a build option to build Espruino without Bluetooth, but even that is really big
    • do we need OTA for ESP32 ? Flashing more than 1MB over the air, is this really helpful ? It reduces available Flash a lot.

    Once this upgrade to V3.0 is done and works fine, next steps are

    • merge ESP32 branch into master. For this step @Gordon is the man
    • upgrade EspruinoBuildTools to V3.0. This is a tool from @Wilberforce, so he has the knowhow

    Please take my plan as starting point only.
    Any comments, especially from guys (hopefully) involved, are welcome.

  • This sounds great - thanks! I don't think OTA works on ESP32 at the moment, so I wouldn't waste time worrying about it.

    I imagine most users would prefer BLE to the extra few vars given the choice, and memory usage isn't such a nightmare now it's reasonably easy to upload code directly to flash.

  • Your right - the ota stuff was never completed.
    My two cents worth... this is a possible plan

    1. Make a partition table to use for BLE and non BLE
    2. Update espurino build tools - add a espv3 branch and get that working
    3. Add an espv3 branch to espruino and get that building against the build tools branch
    4. Once this is working, this can be pulled into master
    5. Look at merging the esp32 branch

    At this stage I'm not sure if the esp32 ble branch builds if the BLE Makefile flags are off?

    I believe we should offer a build without BLE, as the increased RAM usage and power requirements might not suit everyone.

    Perhaps it can be one firmware with the option to turn BLE on from JavaScript?
    Or the other options to offer two firmware - one with BLE and one without?

    How does this sound?

  • sounds ble-eding good ;-)

  • @Wilberforce, thanks for your feedback

    • So we have agreement for removing OTA, great.
    • I've seen, you already created an espv3 branch. Would it be correct, to change line 3 to v3 and line 4 to esp32 branch in build-idf.sh ? I will do my best to bring up a version. Pretty sure, I've to contact you to get a better understanding of BuildTool. For example, right now, I've no idea how to test my changes.
    • For compiling we will need a new compiler version. How/where would we tell which compiler to use ?
    • with/without BLE is a problem. Creating 2 firmware binaries would mean 2 different precompiled templates, more maintenance, etc. etc. An option to switch BLE on/off during runtime would not help, since we would need a kind of jsVar-renumber to increase or decrease number of jsVars.
    • and, number of jsVars, hmm, using V3 already eats a lot of RAM, much more than V2.1. My assumption is, maximum will be somewhere between 3500 and 4000 jsVars. If there is anybody interested in that and having the time to check this seriously, please go ahead and give us some feedback.
    • BTW, do you have experience with Gordons point to upload code directly to flash ?
    • I had a big discussion with Gordon in Nürnberg. He has a great idea, how to reduce RAM usage for jsVars and store them in Flash. This is future talk, but will be a big step.
  • I’ve started an issue page here - it’s probably best to track there.
    https://github.com/espruino/Espruino/iss­ues/1387

    I have done a pull request on the master branch which updated the compiler. This is done in the provision script.

    Will add more answers to your questions today.

  • At this stage I still can't get a build running, as it's expecting the psram, and that not available on the standard boards. I need to get the build working with a standard board and v3 before we can move on...

  • I've got a plain build with v3 and 4000 vars booting. Please see the github post above.

    Next step is to update the build tools so this can be part of master, then look at bring in the Bluetooth

  • Hi! I've tried to build ESP32 branch, and I have no success.
    First of all, I have found that 'source scripts/provision.sh ESP32' (as in docs) gets app and esp-idf from master branch of EspruinoBuildTools while code uses newer version already. I have corrected it to get ESP32 branch.
    Then I have got an error about unknown gcc option '-mfix-esp32-psram-cache-issue'. After removing it from makefile (in any case I have no board with psram) I have all files compiled. But at linking stage I have got "undefined reference to `esp_ble_gap_set_security_param'" error.
    While I think the build will not work without the call, I have commented all calls of esp_ble_gap_set_security_param() to look for next stop. It is "cp: cannot stat '/home/serge/Projects/ESP32/Espruino/app­/build/partitions_espruinoBLE.bin': No such file or directory"
    My build commands are:

    source scripts/provision.sh ESP32
    make clean && BOARD=ESP32 DEBUG=1 USE_BLUETOOTH=1 make
    
  • Sorry - this stuff is in flux at the moment. I have created a new branch to resolve the issues, then will push once all the testing is done. This branch updates the tool chain and solves all the issues you are seeing.
    I then have the task to merge the two branches into master...

    Can you wait a bit longer?

    If it is firmware you want to try with Ble compiled, I can provide a link for that.

  • Thank you. My idea is to transfer Puck.JS BLE-MQTT bridge from Raspberry-like system to ESP32 and use one of public MQTT services with it. It may be cheap and simple solution.

  • @SergeP

    @JumJum published a build here:

    https://github.com/espruino/Espruino/tre­e/545cce3a201ca65cea73a1faf49c92dae2264c­00/targets/esp32/BLE/Firmware

    You will need to use all bin files, as the partition table is different. Please note that it will be changing from what is in the firmware linked above. You might want to do a flash erase.

    If you do get a puck linked to the esp32 as a bridge, please start a new topic and share!

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

Moving to ESP-IDF release 3.0, and some Bluetooth, and ....

Posted by Avatar for JumJum @JumJum

Actions