Most recent activity
-
Hello @Gordon, sorry for the late reply. Is there a documentation for how much flash is available for code? I was under the impression that 512kb Flash refers to space available for my program.
I have tested some of the devices I have using various file sizes (see attachments). I tested them using the
save()
method as well asE.setBootCode()
. For the Pixl.js 5.000kb usingE.setBootCode()
seems extremly low.(I generated these file sizes using a long string. I tried a different method as well, but that led to simlar results.)
-
Most of the output I received was
New interpreter error: Execution Interrupted
. I tried running it with and without minification, but that didn't make a difference. Supposedly something could have went wrong when transpiling, as a lot of the code uses features not available on Espruino (async
comes to mind).@Gordon the bundled file is essentially a process engine that expects the PIXL to perform certain tasks on events. An example would be the task of writing something to the screen based on an interaction with another IOT device running the engine.
Can you elaborate what you mean by saying "around 40k JS code"? Is there a list of JavaScript features/libraries available on Espruino? Maybe I don't need to transpile the entirety of code.
-
Hi @Robin, I edited the original post to include the
process.memory()
output.
Unfortunately I am not able to get rid of parts of the code as it's an engine that needs most of it's parts running. -
-
Hello,
I'm having trouble uploading a bundled file to my PIXL.js. It will take a while to complete the upload, but it won't give positive feedback.
The code which I'm trying to execute looks something like this:
const engine = require('engine'); E.on('init', () => { Terminal.println('Something.'); });
where
engine
is the aforementioned file and I'm runningsave()
to save to the flash storage.
I am already having doubts that my bundle is too big, but it would be helpful if there was an indicator for that.Edit:
Output forprocess.memory()
:{ free: 2348, usage: 152, total: 2500, history: 22 }
I have not used the IDE to test this, but the espruino npm package. As far as I understood the "direct to flash" method uses
E.setBootCode()
under the hood, which I have used in the second attachment as well.What would be the difference between a long string and code for the interpreter? Is there a reasonable way to benchmark this?