Avatar for TTBangler


Member since Aug 2021 • Last active Oct 2021
  • 2 conversations

Most recent activity

  • in Bangle.js
    Avatar for TTBangler

    'The English Language at times can be quite persnickety'

    And you identified a prime example I completely overlooked, thanks for pointing that out :-)

  • in Bangle.js
    Avatar for TTBangler


    The values in my screenshot for post #22 came from the Web IDE connected to my Bangle.js v1. I actually never even noticed the blocksize before and haven't done anything I'm aware of to change the default value. 13 definitely seems like an odd number, though.

  • in Bangle.js
    Avatar for TTBangler


    I wasn't aware of your UI framework--it looks very impressive, thanks for bringing it to my attention! I'll definitely look more into your framework once I get my Bangle.js v2 (since it has a full touchscreen).

    Thanks also for the explanation about what happens during an upload. Overloading the Espruino interpreter buffer on upload could indeed be what happened in my case. The IDE crash behavior was the same when uploading my very large app to either the emulator or my Bangle.js.

  • in Bangle.js
    Avatar for TTBangler

    Hi @Robin,

    Thanks, I tend to do most development using the IDE Emulator (since it's faster than the actual hardware) and I just discovered that my full app code I minified for Bangle.js v2 that works for the Bangle.js v1 emulator gets a strange error and doesn't run on my actual Bangle.js v1 hardware.

    By the way, I believe version 2v10 of the firmware somehow increased the amount of usable memory so here are the numbers I get on my real Bangle.js v1 after connecting and before loading anything:

      VERSION: "2v10",
      GIT_COMMIT: "63dafbf9f",
      FLASH: 524288, SPIFLASH: 4194304, HWVERSION: 1, STORAGE: 4194304, RAM: 65536,
      SERIAL: "8614df71-b4fb9fc0",
      CONSOLE: "Bluetooth",
      MODULES: "Flash,Storage,hea" ... "tensorflow,locale",
      EXPTR: 536882372 }
    ={ free: 1928, usage: 656, total: 2584, history: 11,
      gc: 27, gctime: 5.79833984375, blocksize: 13, stackEndAddress: 536925152, flash_start: 0,
      flash_binary_end: 450188, flash_code_start: 1610612736, flash_length: 524288 }

    That's a good point about Espruino needing space for housekeeping. I've actually been very pleasantly surprised by how much I was able to do before I started running into out-of-memory problems at runtime. And I believe the Bangle.js v2 has 4x more memory so can't wait to receive mine!

  • in Bangle.js
    Avatar for TTBangler

    Hello Robin, Gordon,

    Sorry if I caused any confusion. Just to clarify, the app I uploaded to this post (that is a subset of a much larger app) results in the 'JSCODE' exceeded error for me on Chrome/Ubuntu with the non-beta Web IDE Bangle.js v1 Emulator. I've just confirmed that with the change Gordon made, the (subset) app does now successfully minify/upload for me on the same Chrome/Ubuntu system using the beta Web IDE Bangle.js v1 Emulator. Also, by entering 'window.localStorage.clear()' after getting the 'JSCODE' error in the non-beta IDE, the (subset) app can also be successfully uploaded/minified.

    My full app (that I have not posted here) results in an "Execution Interrupted"/"Prompt not detected - upload failed" IDE crash even with the beta Web IDE Bangle.js v1 Emulator on both Windows and Ubuntu. However--and this is great news--my full app does successfully upload/minify with either the non-beta or beta Bangle.js v2 Web IDE Emulator on Ubuntu. Moreover, I just discovered that I can download the minified source code from the Bangle.js v2 emulator and upload it into storage in the Bangle.js v1 emulator, and the minified version of the source reduces the process.memory() usage from 1239 down to 1215. I had to make a couple of minor changes to the minified source code to get the app to run but it seems to run fine. Oh, and I forgot to mention that the message I receive when uploading my full app to the v2 Emulator is "No errors. Minified 74751 bytes to 37349 bytes."

    Hope that clarifies things--thank you both very much again for your help!

  • in Bangle.js
    Avatar for TTBangler

    Thanks Gordon for following up on this!

    Below I've attached the result of what happened after I pasted what you requested into the Chrome/Ubuntu console. I'm sorry I don't understand what you mean by "offline mode", however the good news is that after entering window.localStorage.clear() into the Chrome console I was able to upload and minify my source code. I also tried pasting my full app into the source code pane and tried to upload it, and got the same "Execution interrupted" errors as I did on Windows. If there's anything else you'd like me to do to help track down what's happening, please let me know.

    In the meantime, I believe I read somewhere in the Espruino documentation about Linux command-line development tools so I'll try to see if those will allow me to minify my full app (~2.5K lines, ~80K).

  • in Bangle.js
    Avatar for TTBangler

    Oh, the mystery deepens! I see the same behavior on Ubuntu regardless of which minification setting I use, even when it's turned off. And sorry for not doing this sooner but when I looked at Chrome's debug console I noticed "'JSCODE' exceeded the quota" errors when doing "Send to Espruino". From what I could learn by searching for the error it appears that Chrome ran out of storage, but as shown in the attached screenshot it still seems to have plenty available.

    If whoever develops the Web IDE has any suggestions on what to try next I'd be happy to do more investigation as I can reproduce the issue consistently on my machine.

  • in Bangle.js
    Avatar for TTBangler

    Wow Robin, thank you so much for all the helpful info and links about how memory is handled in Espruino! And thank you also for thinking to ask what browser/OS I use and for actually running my code. I have been using Chrome on Ubuntu and the Web IDE has been working so well that it never occurred to me that my OS might be relevant. Well I just tried uploading my code with Chrome/Windows 10 and it was successfully minified and uploaded, thank you! (And this surprised me because my Windows machine has half as much memory as by Ubuntu box, 8G vs 16G).

    Unfortunately, the code I uploaded here is just a small subset of my app. If I put my app's full source code into the right-hand pane of the IDE on Windows and do "Send to Espruino"/RAM then I get the crash-like behavior I think Gordon was alluding to. Specifically, the message "Execution Interrupted" is written many times to the console followed by "Prompt not detected - upload failed. Trying to recover...". If I do "Send to Espruino"/Storage as Gordon mentioned I am able to upload my full source code but it isn't minified. So I guess I will have to employ some of the tricks you've kindly referenced to reduce the size of my app.

    Well hopefully this post will be of some help to others who run into problems with large apps.

    Thanks again Robin and Gordon for your gracious help with my issue!

  • in Bangle.js
    Avatar for TTBangler

    Thank you very much for your reply Gordon, and congratulations on another successful Kickstarter campaign!

    I was indeed uploading my code to the emulator, but whether I try to upload it to the emulator or my Bangle.js the result is the same (i.e., nothing happens). After clicking the upload ("Send to Espruino") button, the left-hand pane of the IDE flashes briefly, but I can still interact with it normally. If I click the down-arrow and enter a storage file, again nothing happens, and I can still interact with the left-hand pane as usual.

    I would not be at all surprised if there's something in my code causing the problem, however as I noted previously if I cut-and-paste each function alone into the right-hand pane, each one is uploaded successfully without any EMSCRIPTEN errors. The problem only occurs when I try to upload all the functions at once, leading me to believe I'd exceeded some size limit.

    Anyway, I have attached a file that reproduces the problem in the emulator and my Bangle.js. I'm not sure it adheres completely to the recommended coding guidelines but I think it's pretty close. Thank you in advance for investigating the issue and pointing out any obvious missteps in my code (I'm still learning how to write code for my Bangle.js).

    Best of luck with Bangle.js v2, I can't wait to receive mine and start updating my apps for it!