-
-
-
Are you talking about updating firmware or updating the current espruino script?
If it is the latter, the telnet module allows you to connect via ip, so if the GSM is up, you should be able to connect the in the web i.e., connect via the ip rather than serial.
Sorry, I have only tested on the esp8266 (in which the wifi is always connected). With GSM I guess you'll need to have oninit() that will see that network up. I'm also unsure on how you would know what ip it is on - perhaps you could get it to send that to a website via a http get?
-
-
The code compiles, but I've not had a chance to test yet:
https://github.com/espruino/Espruino/compare/master...wilberforce:master -
-
Hi, I've written the crypto module as js module, so you can in the esp...
http://forum.espruino.com/conversations/276175/?offset=25#comment12817146
-
Don't abandon espuruino - you code make a custom firmware with your function that needs to be fast.
@Gordon - have you thought about a binary style of require that takes a char array and loads that at run time, not sure how this could work?
Take the contents of a .o file and load that as address independent code? I know I'm simplifying here....
-
-
@DrAzzy. How do you measure the cpu use on the esp8266?
-
-
-
Espurino both side would be best!
I've been thinking about the two systems - arm and esp8266 and the way they would talk to each other. The esp8266 side as @DrAzzy suggests, can do the web side and wifi, and the "grunt work" requiring more ram on the arm side. What is the best bus between the two systems - is a socket system via serial, or can we use direct pins via i2c or similar, although side would need to be master? -
Hey, there is one great side effect here, that is the image size is soooo much smaller:
-rw-r--r-- root/root 462244 2016-01-08 16:01 ./espruino_1v84.48_esp8266/espruino_esp8266_user1.bin
After a git pull with the linked mathlib:
-rw-r--r-- 1 root root 437812 Mar 11 07:36 espruino_esp8266_user1.bin
So I though there would be space for the graphics lib:root@esp8266-VirtualBox:/home/esp8266/Espruino# cat ./build-graphics.sh
#! /bin/bash export ESP8266_BOARD=1 export FLASH_4MB=1 export USE_GRAPHICS=1 export ESP8266_SDK_ROOT=/home/esp8266/Espruino/esp_iot_sdk_v1.5.0 export PATH=/home/esp8266/esp-open-sdk/xtensa-lx106-elf/bin:$PATH export COMPORT=/dev/ttyUSB0 make $*
-rw-r--r-- 1 root root 454596 Mar 11 07:41 espruino_esp8266_user1.bin
I've not yet tested this binary, however it looks really promising!
@MaBe - not sure if we need to reduce the # of varsAdd in USE_CRYPTO=1, the build fails due to:
/home/esp8266/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: address 0x3fffca00 of espruino_esp8266_user2.elf section `.bss' is not within region `dram0_0_seg'
So I still need to try to reduce the size to get the SHA1 function for use in web sockets.
-
Thanks. So there there is a new lib dependency to download and install, or is this in the 1.5 package already? I noticed that @jumjum 's reference above was for a 1.4 library..
Oh - I see you have added- targets/esp8266/libmirom.a.
-
So when build errors occurs, is the travis builds the best place to find out what changes have occured?
https://travis-ci.org/espruino/Espruino/builds
Last working:
#1570 passed
master update sourcecode docs for analog - fix #808 avatar Gordon Williams
https://travis-ci.org/espruino/Espruino/builds/113648205
#1571 failed
https://travis-ci.org/espruino/Espruino/builds/113648205Remove Espruino's built-in strcpy/etc Remove Espruino's built-in maths
Add basic Taylor series sin and atan for when we're trying to save memory -
Thanks. I've been looking at the size of the FlashStore modules I've made. It looks like you can gain quite a bit by shorting variable names I.e, address -> addr and shorting up internal this.xxx vars.
It also uses child objects pointing to a parent, so I'm wondering if a single class that is both will reduce the overall code size considerably, as its 2000 byes for both the flashItem and FlashStore modules (not fully minimized yet) -
There is a 16kb block here if you have > 512 kb device -
0x07C000 496KB 16KB 512KB flash: Espressif SDK system params, else unusedThere is some conversation around this on gitter
https://gitter.im/espruino/Espruino -
-
Looking at your link above lead me to here: http://www.espruino.com/Compilation
This only works for the arm boards right?
-
Does using the api get around the memory mapped limitation of accessing > 1mb memory for flash?
https://github.com/espruino/Espruino/blob/9781bacee8185b58438604cb22672389bc3ff42d/targets/esp8266/jshardware.c
Line 1193For writing the api call is used,but for reading it is just accessing memory. If the Api was used for the reading could we using the flash module for accessing > 1 mb?
-
We can also cache Modules in Eprom, and load on demand:
var fs = new(require("FlashStoreWrite"))(0x7c000); // Save module source in EEPROM fs.item('clock').wget('http://www.espruino.com/modules/clock.min.js');
var fs = new(require("FlashStore"))(0x7c000); // Retrieve module source, add to module cache and then use.. require( fs.item('clock').module() ); var Clock = require("clock").Clock; var clk=new Clock(2014,4,15,23,45,0,0);
require( fs.item('clock').module() );
={ "Clock": function () { ... } }
var Clock = require("clock").Clock;
=function () { ... }
var clk=new Clock(2014,4,15,23,45,0,0);
={ "lastTime": 1457230986.79778003692, "date": { "ms": 1400197500000 } }This means you can use require on the left hand side of the IDE on a pre-cached module, and then use that module.
-
Compressed objects.
The
item.wget()
allows web assets to be fetched and stored:fs.item('/css/bootstrap.min.css').wget('http://www.espruino.com/css/bootstrap.min.css',{compress:'gzip'});
With the compress options, the headers are modfied and the content is compressed, and this is what is sorted in flash.
When the webserver .pipe method retrieves the object, it is sent back compressed to the browser and the browser unzips on the fly. This means that we don't need gzip/ungzip libraries for espurino, but can store large libraries for the browser front end efficiently with no overhead.
It's not particularly quick - just under 9 secs to load.However it means a web server can be set up in AP mode, and not be connected to the internet, and have bootstrap.css!
The wifi lbrary
wifi.save()
saves EESID and password for you already!So it might just be the 16 bit counter...
the Flasheprom module stores with indexes, it might be over complicated for your needs - the flash module might be enough!