• I saw, that only Bluetooth enabled devices are supported. Could you explain why this is? I really would like to use this feature to speed up some computational work on the Microcontroller.
    I'm currently on version 2.17 and I'm using an Espruino WiFi.
    Thank you :)

  • It was more a case of testing and demand - I'd developed on the nRF52 chips, and nobody ever asked for it to on the STM32s so I never took the time to enable it and try it out.

    I've just had a quick go at enabling it and it does seem to work ok at least on the quick examples I tried, so if you now install one of the latest cutting edge builds then it should work.

    I haven't yet enabled it for the Original Espruino as that does have a slightly different processor (an M3 vs M4) as well as not enough free flash memory without removing other features.

  • Thank you very much. After a bit of experimenting, I'm currently trying to find out, why the following function hangs indefinitly. It's a function which scans a portion (from this.idx to this.next) of an array for a given sequence, starting at an offset using a given stepping width.

    find(sequence, offset, stepping) {
            if (stepping === undefined) {
                stepping = 1;
            if (offset === undefined) {
                offset = 0;
            for (let i = this.idx + offset; i < this.next - sequence.length; i+=stepping) {
                if (this.buffer[i] !== sequence[0]) {
                let idx = i;
                for (let j = 1; j < sequence.length; j++) {
                    if (this.buffer[i + j] !== sequence[j]) {
                        idx = -1;
                        // JIT lacks break statement
                        j = sequence.length - 1;
                if (idx !== -1) {
                    return idx;
            return -1;

    When I run it without jit it works as expected. If the function is jitted, the application hangs without any error. Thank you for your reply

  • Ok, I found the mistake. "continue" is not supported. As I fixed that it worked after turning off any minification of the code. If I minify, it does somehow not work anymore but does not give me any hint why. I was finally able to shave off another 150ms from my computation, which is very good :) Thank you very much Gordon.

  • Great - glad it helped!

    When you used break and continue, did you not get an error? For example if I do:

    function j() { "jit";
       for (var i=0;i<10;i++) {

    It says:

    JIT SyntaxError: Got continue expected EOF
     at line 1 col 42
    function j(){"jit";for(var i=0;i<10;i++){print("Hi",i);continue;}}
  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Why is JIT not enabled on devices like Espruino WiFi even if they are on the latest firmware?

Posted by Avatar for llakie @llakie