Avatar for Proceed

Proceed

Member since Jul 2019 • Last active Sep 2019
  • 1 conversations
  • 6 comments

Most recent activity

  • in General
    Avatar for Proceed

    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?

  • in General
    Avatar for Proceed

    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 as E.setBootCode(). For the Pixl.js 5.000kb using E.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.)

  • in General
    Avatar for Proceed

    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.

  • in General
    Avatar for Proceed

    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.

  • in General
    Avatar for Proceed

    If there's need for it, I can clarify what is happening in the bundled file. However I didn't seem to be relevant for uploading the code.

  • in General
    Avatar for Proceed

    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 running save() 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 for process.memory():

    {
       free: 2348,
       usage: 152,
       total: 2500,
       history: 22
    }
    
Actions