Avatar for JumJum


Member since Oct 2013 • Last active Jul 2022
  • 156 conversations

Most recent activity

  • in Porting to new Devices
    Avatar for JumJum

    @user143733 I sent you a message

  • in JavaScript
    Avatar for JumJum

    Save the module in Storage.
    See more here http://www.espruino.com/Modules#from-sto­rage

  • in Porting to new Devices
    Avatar for JumJum

    @fanoush, based on your comments I changed adressing.
    Flash.getFree now returns real address in Flash.
    Flash.erasePage, .read and .write also use real address and are recalculated to match API
    Sideeffect: found and fixed a problem in jshWriteFlash and got save() running.

    BTW, interest in this port is not really overwhelming ;-)

  • in Porting to new Devices
    Avatar for JumJum

    reading directly from flash works fine
    writing needs disabling of irq
    If somebody has a better solution, you are welcome

    mask = getIrqMask();
      flash_range_program(FLASH_TARGET_OFFSET,­ addr + i * FLASH_PAGE_SIZE, FLASH_PAGE_SIZE);
  • in Porting to new Devices
    Avatar for JumJum

    @fanoush, thanks for feedback.
    Advantage in my eyes is handling of flash.
    Moving calculation of real addresses in flash from Firmware to each Javascript project adds burden to the user.
    I'm pretty sure only a few guys will know XIP-address, or are willing to search for
    Anyway, I don't see the reason for this test.
    IMHO testing for negative numbers would be a good solution.

  • in Porting to new Devices
    Avatar for JumJum

    Some weeks ago, I started a project to get Espruino running on PI Pico (RPI2040)
    I had no idea how to do, but gave it a try.
    Target was, not to change Espruino code itself, no additional ifdef etc.
    Right now I'm somewhere around pre-alpha. Simple version is running.
    Development is based on pico-examples, not on Espruino make

    As expected tons of problems/question are on the road.
    In my implementation flash starts at virtual addr 0, which is translated to 2nd MB in flash
    This makes Flash-commands easy to understand. Require("flash") runs fine.
    Actual problem, one of a lot is jsfGetFileHeader.
    Unfortunally addr is tested with this line: if (!addr) return false which stops some other functions.
    Any idea, how to get around without changes in jsflash.c ?

    BTW, if some body wants to help in this project, you are welcome.

  • in General
    Avatar for JumJum

    Just checked an idea for "format only the selected code" in my environment.
    At the end it is extremly easy to implement.
    Should be similiar for prettier

    	var code = Espruino.Core.EditorJavaScript.getCode()­;
    	var selected = Espruino.Core.EditorJavaScript.getSelect­edCode();
    	if(selected) code = code.replace(selected,js_beautify(select­ed,options) + "\n"); //had to add linefeed for beautify, don't know wether prettier  needs this
    	else code = js_beautify(code,options);
  • in General
    Avatar for JumJum

    @neshanjo great to see what you did. Your point of adding setCursor, great idea.
    Looking forward to see a pull request for github ;-)

    Thanks for your nice feedback. Applause is what keeps artists going ;-)

    Beautifier was the first I used and it worked.
    At the end, using prettier or beautify does'nt matter (to me).
    BTW, could it be an option/help/possible to use prettier for selected code only ?

  • in General
    Avatar for JumJum

    thanks but it would need some more work.
    For example:

    • add settings page
    • add options based on settings
    • is there a better tool, prettier for example ?
    • find a better icon
      My intention was to give a starting point ;-)