• Hello,

    as I read about Espurino I was very interested. I currently develop on Atmel 8Bit but I really love JavaScript.

    But I have some questions:

    (1) I couldn't find anything about how much RAM and FLASH is available for my programs on the Espurino?!

    (2) Is this Hardware and the JS Interpreter free? Can it be used commercially (e.g. on boards I would make myself for some commercial projects)?

    (3) Is there a way of creating uploadable programs that cannot be read by a customer? (If I want to provide updates for my own projects to the customers)

    Thanks in advance.

  • Hi!

    I couldn't find anything about how much RAM and FLASH is available for my programs on the Espruino?!

    JavaScript values take up more space than compiled code, but for instance if you were to make a big array you'd be able to allocate around 29kB (but you also have to share that space with program code).

    Flash is accessed just by typing save() - it saves all your program code and variables into flash. You can read/write it directly but it's not a good idea. It's shared with Espruino so you could easily overwrite it by accident!

    (2) Is this Hardware and the JS Interpreter free? Can it be used commercially (e.g. on boards I would make myself for some commercial projects)?

    Yes. It's the MPLv2 licence for software and CC-BY-SA for the hardware. Basically you have to say your product contains Espruino, but you can't call your product an 'Espruino' without agreeing with us. It's a bit like Arduino really.

    (3) Is there a way of creating uploadable programs that cannot be read by a customer? (If I want to provide updates for my own projects to the customers)

    Customers can always connect via USB/Serial and read out what's on the chip, but you can 'minify' your code. That will generally rename all the variables/functions, remove all whitespace and comments, and often inline code - making it pretty much useless to anyone who'd try and read it.

  • 1) 48k RAM, 36000 bytes available to javascript (in 1800 20 byte allocation units). 256k of flash, most of which I believe is used up with Espruino firmware and the space to save that 36000 bytes of data from RAM

  • Just to clear up, @DrAzzy is right about the 36kB of RAM - but within each 20 byte storage unit there is a 4 byte overhead, so the maximum actual data you could store is just shy of 1800*16 = 28800 bytes.

  • Is code minified automatically as it is uploaded to the espruino? How can I see how much space my code takes?

  • Type in process.memory() to get info on your memory usage, and code is only minified if you choose that option in the Web IDE.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Newbie Question about free memory, commercial use and uploading programs

Posted by Avatar for user6861 @user6861

Actions