JavaScript on ESP32 - Duktape
Re: JavaScript on ESP32 - Duktape
Thank you Mr shadow,
The JavaScript environment continues to be my pet and hobby project. If you or anyone else get interested in it, you will find that I will make time to work with you to get it running and chat about it. Collaborators and commenters are very welcome. This is a long-haul project and not "one and done".
The JavaScript environment continues to be my pet and hobby project. If you or anyone else get interested in it, you will find that I will make time to work with you to get it running and chat about it. Collaborators and commenters are very welcome. This is a long-haul project and not "one and done".
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: JavaScript on ESP32 - Duktape
Hello,
I'd be very interested in lending a hand -- currently really busy, but hopefully in the new year I'll have some time to help.
I'd be very interested in lending a hand -- currently really busy, but hopefully in the new year I'll have some time to help.
Re: JavaScript on ESP32 - Duktape
Project status 2016-12-22 and request for testers
Howdy folks,
We have reached a reasonable level of stability and are ready to let some early folks get their hands on it. We are also writing up guides and documentation. See for example:
https://github.com/nkolban/duktape-esp3 ... llation.md
The technical status of the project is good. We have received a wonderful amount of support from the primary developer and owner of Duktape (JavaScript engine) and he has dramatically reduced RAM overhead meaning that there are lost more for our applications. There is also the hope for a lot more reduction to come.
The notion of using JavaScript to host the JavaScript framework above the native C JavaScript engine is working out well. Now that the engine and framework is in place we can start accelerating our ESP32 functional exploitation.
At this stage, I'm looking for some volunteers to get copies of the ESP32-Duktape flashable images. If you would like to assist, I will give you the ESP32 binaries and together we will flash those onto your ESP32 and get you up and running. No skills needed on your part other than either the ability to write simple JavaScript scripts or the desire to learn to do that. I'm not yet making the binaries publicly available as they haven't been tested on mass audiences yet and I'd prefer to personally assist you to learn what is working and what is not. If you contact me, I'll send you a link to download the binaries and make myself highly available for email, live IRC or Skype chat or other levels of assistance.
I'm hoping a few of you good folks will be willing to assist in the testing. You would truly be helping me out. I can be reached directly via:
* email: kolban1@kolban.com
* skype: neil.kolban
* Internet Relay Chat (IRC) on channel #ESP32 as user "kolban"
Ping anytime ...
Neil
Howdy folks,
We have reached a reasonable level of stability and are ready to let some early folks get their hands on it. We are also writing up guides and documentation. See for example:
https://github.com/nkolban/duktape-esp3 ... llation.md
The technical status of the project is good. We have received a wonderful amount of support from the primary developer and owner of Duktape (JavaScript engine) and he has dramatically reduced RAM overhead meaning that there are lost more for our applications. There is also the hope for a lot more reduction to come.
The notion of using JavaScript to host the JavaScript framework above the native C JavaScript engine is working out well. Now that the engine and framework is in place we can start accelerating our ESP32 functional exploitation.
At this stage, I'm looking for some volunteers to get copies of the ESP32-Duktape flashable images. If you would like to assist, I will give you the ESP32 binaries and together we will flash those onto your ESP32 and get you up and running. No skills needed on your part other than either the ability to write simple JavaScript scripts or the desire to learn to do that. I'm not yet making the binaries publicly available as they haven't been tested on mass audiences yet and I'd prefer to personally assist you to learn what is working and what is not. If you contact me, I'll send you a link to download the binaries and make myself highly available for email, live IRC or Skype chat or other levels of assistance.
I'm hoping a few of you good folks will be willing to assist in the testing. You would truly be helping me out. I can be reached directly via:
* email: kolban1@kolban.com
* skype: neil.kolban
* Internet Relay Chat (IRC) on channel #ESP32 as user "kolban"
Ping anytime ...
Neil
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: JavaScript on ESP32 - Duktape
Tutorial video on installing ESP-32 Dukatpe
Howdy folks,
We've put together a You Tube video (10 minutes) on installing ESP32-Duktape on your ESP32. The video can be found here:
https://www.youtube.com/watch?v=LGRFASrYrZc
In addition, there is now a documentation page on installing ESP32-Duktape that can be found here:
https://github.com/nkolban/duktape-esp3 ... llation.md
As always, any problems or questions, post here and we'll get back to you as soon as we can.
Howdy folks,
We've put together a You Tube video (10 minutes) on installing ESP32-Duktape on your ESP32. The video can be found here:
https://www.youtube.com/watch?v=LGRFASrYrZc
In addition, there is now a documentation page on installing ESP32-Duktape that can be found here:
https://github.com/nkolban/duktape-esp3 ... llation.md
As always, any problems or questions, post here and we'll get back to you as soon as we can.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: JavaScript on ESP32 - Duktape
I have now compiled your source, and installed that on my "WIPY2.0", incl. file system, and are now running via web ide. Now I am ready to. explore and test your system. The first thing I like to test is input/output to pins.
Yes Frida is my watchdog!
Re: JavaScript on ESP32 - Duktape
Awesome. My first goal was to ensure that good folks like yourself can get the software running ... and now that we are making progress on that, we can start to go to the next level. I am working on documentation and my efforts can be found in this directory:
https://github.com/nkolban/duktape-esp3 ... aster/docs
Of those, some are in better state than others ... but all are being improves as fast as we can. Of these, the most important is one called "classes.md"
https://github.com/nkolban/duktape-esp3 ... classes.md
This is a first pass at documenting the classes exposed through the framework.
In there we will find a class called GPIO:
https://github.com/nkolban/duktape-esp3 ... es.md#gpio
I'm also trying to put together tests and samples ... a GPIO test can be found here:
https://github.com/nkolban/duktape-esp3 ... _blinky.js
Here is the reproduced code:
This pulses GPIO pin 18 on and off once a second.
Some functions are in better shape than others ... again, this project is still being cooked and there is lots still to be done. Feedback and comments welcome so that we know what to focus upon ... and its a fully open source project ... so if anyone wants to join in, feel very welcome.
https://github.com/nkolban/duktape-esp3 ... aster/docs
Of those, some are in better state than others ... but all are being improves as fast as we can. Of these, the most important is one called "classes.md"
https://github.com/nkolban/duktape-esp3 ... classes.md
This is a first pass at documenting the classes exposed through the framework.
In there we will find a class called GPIO:
https://github.com/nkolban/duktape-esp3 ... es.md#gpio
I'm also trying to put together tests and samples ... a GPIO test can be found here:
https://github.com/nkolban/duktape-esp3 ... _blinky.js
Here is the reproduced code:
Code: Select all
var GPIO = require("gpio.js");
var pin = new GPIO(18);
var level = true;
pin.setDirection(GPIO.OUTPUT);
setInterval(function() {
pin.setLevel(level);
level = !level;
}, 1000);
Some functions are in better shape than others ... again, this project is still being cooked and there is lots still to be done. Feedback and comments welcome so that we know what to focus upon ... and its a fully open source project ... so if anyone wants to join in, feel very welcome.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: JavaScript on ESP32 - Duktape
Congratulations on the great work.
I've tried to build from sources and all went without a problem.
First impressions are very good, I hope more modules and features will be added soon.
I suggest that you add flashing of the file system images to makefile, something like:
I think it is better than using the included scripts.
I have also configured flash mode to "qio/80MHz" and the difference in speed is noticeable.
I've tried to build from sources and all went without a problem.
First impressions are very good, I hope more modules and features will be added soon.
I suggest that you add flashing of the file system images to makefile, something like:
Code: Select all
#
# Perform flashing of both ESPFS and SPIFFS to ESP32
#
flashdata: images
echo "Flashing both ESPFS and SPIFFS to ESP32"
$(ESPTOOLPY_WRITE_FLASH) --compress 0x360000 build/espfs.img
$(ESPTOOLPY_WRITE_FLASH) --compress 0x180000 build/spiffs.img
#
# Build all, flash app & flash both ESPFS and SPIFFS to ESP32
#
flashall: images all flash
echo "Flashing both ESPFS and SPIFFS to ESP32"
$(ESPTOOLPY_WRITE_FLASH) --compress 0x360000 build/espfs.img
$(ESPTOOLPY_WRITE_FLASH) --compress 0x180000 build/spiffs.img
I have also configured flash mode to "qio/80MHz" and the difference in speed is noticeable.
Re: JavaScript on ESP32 - Duktape
Thank you sir,
I added the Make additions into the Makefile and they'll be there in the next Github commit. Your fragments worked perfectly 1st time. As for the "qio/80MHz", to be honest, Ive no idea what that does. To increase flash speed, I've always set the baud rate to "921600". I wonder what "qio/80MHz" does?
I added the Make additions into the Makefile and they'll be there in the next Github commit. Your fragments worked perfectly 1st time. As for the "qio/80MHz", to be honest, Ive no idea what that does. To increase flash speed, I've always set the baud rate to "921600". I wonder what "qio/80MHz" does?
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: JavaScript on ESP32 - Duktape
Qio is quad spi mode and 80MHz is spi clock meaning all spi flash operations are fasterkolban wrote:Thank you sir,
I added the Make additions into the Makefile and they'll be there in the next Github commit. Your fragments worked perfectly 1st time. As for the "qio/80MHz", to be honest, Ive no idea what that does. To increase flash speed, I've always set the baud rate to "921600". I wonder what "qio/80MHz" does?
Re: JavaScript on ESP32 - Duktape
I have truble with the latest "git pull".
In file: duktape-esp32/main/dukf_utils.c on
I corrected the lines, and it compiles ok, but I cant start the webide.
The last lines from console:
In file: duktape-esp32/main/dukf_utils.c on
Code: Select all
line 41 LOGD("%s: heapSize=%d", localTag, dukf_get_free_heap_size(); , it seems to be missing the closing ')'
line 114 LOGD(">> dukf_loadFile: (ESPFS) %s, heapSize=%d", path, dukf_get_freeHeap()); , it cant find the name, but this one exist 'dukf_get_free_heap_size()'
The last lines from console:
Code: Select all
D (41675) module_os: << js_os_send
D (41678) module_fs: >> js_fs_readSync
D (41680) module_fs: Buffer pointer size returned as 128
D (41685) duktape_spiffs: >> read fd=1, dst=0x3ffc3a84, size=128
D (41691) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (41696) module_fs: << js_fs_readSync: sizeRead: 128
D (41702) log: Size read: 128
D (41705) module_os: >> js_os_send
D (41706) module_os: About to send 128 bytes of data to sockfd=2
D (41712) module_os: - data: "he JavaScript editor used in this project is: https://ace.c9.io
Neil Kolban, 2016
-->
<html lang="en">
<head>
<title>ESP32 - "
Yes Frida is my watchdog!
Who is online
Users browsing this forum: No registered users and 53 guests