-
• #2
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.
-
• #3
Your right - the ota stuff was never completed.
My two cents worth... this is a possible plan- Make a partition table to use for BLE and non BLE
- Update espurino build tools - add a espv3 branch and get that working
- Add an espv3 branch to espruino and get that building against the build tools branch
- Once this is working, this can be pulled into master
- 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?
- Make a partition table to use for BLE and non BLE
-
• #4
sounds ble-eding good ;-)
-
• #5
@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.
- So we have agreement for removing OTA, great.
-
• #6
I’ve started an issue page here - it’s probably best to track there.
https://github.com/espruino/Espruino/issues/1387I 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.
-
• #7
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...
-
• #9
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
-
• #10
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
-
• #11
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.
-
• #12
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.
-
• #13
@JumJum published a build here:
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!
-
• #14
PS, as a commercial entity, OTA is critical to update client devices.. That's a showstopper if its not available.
-
• #15
What is the state of the jsvars-in-psram thing for wrover boards? What will the maximum number of jsvars be, assuming we accept that we can't fill it all the way and then save() it? There s got to be some maximum at which it needs more bits to address it than there are in the 16-byte jsvar....
-
• #17
Actual ESP-IDF release supports WROOM or WROVER boards.
Problem is the or, you cannot build a binary which runs WROOM and WROVER
There was an simple extension in master for some month before release, but it did not make it to release 3.0
Since Espressif does not give any information like a roadmap, we have to wait and hope for 20000 or even more jsVars.
Obviously you could build your own firmware for WROVER boards. You only have to switch PSRAM support on in menuconfig. Espruino itself is ready for that. See line 51 to 54 in targets/esp32/main.c -
• #19
Espressif is to allow WROOM or WROVER to be supported with the same binary
They do support this, however it was not in the v3.0 release. It is the working branch ( unstable) at the moment.
To build with wrover with the v3.0, you have to make a change to the library, and then the same binary can't used on a regular board.
-
• #20
https://github.com/espressif/esp-idf/releases/tag/v3.0.1
There is a new release - not sure if this addresses any of your concerns.
I can try a build with espruino-build tools and see if it works directly or if there are other changes required.
-
• #21
@Wilberforce
V3.01 does not, but there is a prerelease V3.1 which supports with/without PSRAM
I'll take a look to that to see how to get it running with Espruino.
Already known is renaming of directories and header files
Prerelease comes very soon after release, much faster than in the past.
Lets see how long we have to wait for release of V3.1 -
• #24
@Wilberforce
There is a call in API to get the minimal size of heap (heap_caps_get_minimum_free_size)
AFAIK, this is the minimum size which happened during processing.
The idea is to find out, which function uses how much heap.
For example, create http-server and check this value, reset, create https and check, etc. etc.
Up to now, I did not work on this, with other words, no experience yet ;-) -
• #25
I have updated the build tools to use esp-idf 3.0.1
Let's keep a watch here:
https://github.com/espressif/esp-idf/releases
There is a v3.1-beta1 there now.
Should be update the old esp32 branch to current and use that? The v3.0 branch is now named incorrectly for the current v3.1.
I suppose we could drop that branch and add a 3.1 that we can then advance as the beta becomes live?
You mentioned Makefile and path changes that will need to be sorted.
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
-last not least documents
Everything will be done first in ESP32 branch.
There are some restrictions like
Once this upgrade to V3.0 is done and works fine, next steps are
Please take my plan as starting point only.
Any comments, especially from guys (hopefully) involved, are welcome.