reset() and dump()

Posted on
  • still have some commands, any idea?

    >reset();
    =undefined
    1v82.627 Copyright 2015 G.Williams
    WARNING: the esp8266 port is in beta, do not expect everything to work
    Flash map 4MB:512/512, manuf 0xe0 chip 0x4016
    >dump();
    digitalWrite(D12,0);
    digitalWrite(D13,0);
    digitalWrite(D14,0);
    =undefined
    
  • dump() tries to work out what the pins were set to by looking at the state of the hardware. My guess is that D12-14 are used for something like the serial port, but the Espruino compile for the ESP8266 that you're using isn't aware of that.

    For @Kolban and @tve it's to do with the IS_PIN_USED_INTERNALLY macro created by build_platform_config

  • those digitalWrites are definitive from old saves,
    what about the loader running during power on or hard reset.

  • Ahh, it's because jshReset hasn't been implemented on ESP8266. It should reset the hardware to power-on states.

    As I usually say...

    If you bought a proper Espruino Board, this would be working correctly :)

    I'm moving this thread to the Porting area of the forum for now - it's an ESP8266-specific issue that I'm sure will be fixed soon.

  • and badly resets during save, have to flash to solve that

    >dump()
    digitalWrite(D12,0);
    digitalWrite(D13,0);
    digitalWrite(D14,0);
    =undefined
    >save();
    =undefined
    Erasing Flash...
     ets Jan  8 2013,rst cause:4, boot mode:(3,7)
    wdt reset
    load 0x40100000, len 1396, room 16
    tail 4
    chksum 0x09
    load 0x3ffe8000, len 776, room 4
    tail 4
    chksum 0x68
    load 0x3ffe8308, len 540, room 4
    tail 8
    chksum 0x40
    csum 0x40
    csum err
    ets_main.c rll|là|lìb|ìrbbònnlnnâìbpìlrlrlpònàlbnâ|lìlbònnîll`nnlnrnll`pònàrâàbnâ|ìbònnîl`nnlnrnâl`pònàrâàìbnâ|lbònnîl`nnl`nrnl`rnl`rnl|`rònàbânbpürll|là|lìb|ìrbbònnlnnâìbppìlrlrl
    Disconnected
    
  • I can't retrace which version you're running. The latest build I published shows the following:

    >esp=require('ESP8266')
    =function () { [native code] }
    >esp.restart()
    =undefined
    >`f
     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v81.tve_esp8266_flash_strings_f1a06a5 Copyright 2015 G.Williams
    WARNING: the esp8266 port is in beta, don't expect everything to work
    Flash map 4MB:512/512, manuf 0xe0 chip 0x4016
    >dump()
    =undefined
    >save()
    =undefined
    Erasing Flash.....
    Writing...
    Compressed 12276 bytes to 320
    Checking...
    Done!
    > 
    

    and

    >reset()
    =undefined
     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v81.tve_esp8266_flash_strings_f1a06a5 Copyright 2015 G.Williams
    WARNING: the esp8266 port is in beta, don't expect everything to work
    Flash map 4MB:512/512, manuf 0xe0 chip 0x4016
    >dump()
    =undefined
    

    https://s3.amazonaws.com/s3.voneicken.co­m/espruino/espruino_1v81.tve_esp8266-fla­sh-strings_f1a06a5_esp8266.tgz

  • On the pins stuff, would love some help in defining 'A0' as analog input pin in the board file. I tried and failed. I see that jshReset is indeed not resetting all the pins.

    D12-D14 is not used by anything, so I'm not sure what is going on there.

    WRT figuring out what the state of a pin is, well, it's not that easy. Right now the code remembers what it sets a pin to and returns that, Should be ok for 90+% of cases. If someone wants to write the code to derive the state from the hardware register bits: be my guest :-)

    I do not know what IS_PIN_USED_INTERNALLY is supposed to do. Right now the generated macro is:

    [#define](http://forum.espruino.com/sear­ch/?q=%23define) IS_PIN_USED_INTERNALLY(PIN) ((false))
    

    It might be good to define D6 through D11 as used internally (for the flash chip), but I'm not sure how to accomplish that. Maybe also D1 and D3 for the uart0 and D2 for uart1 (debug output).

  • was running on

    1v82.627 Copyright 2015 G.Williams

    and decided to switch back to

    "VERSION": "1v81.tve_unify_350abe6"

    btw: using ESP8266-12E with AI cloud symbol

  • Ah, so maybe my next build will have the same problem...

  • Yes, flashed this one 1v82 espruino_1v82_esp8266.tgz 26-Nov-2015 15:28 584K

    >reset();
    =undefined
     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v82 Copyright 2015 G.Williams
    WARNING: the esp8266 port is in beta, donot expect everything to work
    Flash map 4MB:512/512, manuf 0xe0 chip 0x4016
    >process.memory();
    ={ "free": 999, "usage": 24, "total": 1023, "history": 0 }
    >process.env.GIT_COMMIT
    ="04f5d15645aa3da4d55552f9d4c0b3bc7102ec­56"
    >dump();
    digitalWrite(D12,0);
    digitalWrite(D13,0);
    digitalWrite(D14,0);
    =undefined
    > 
    

    and no more problems with save() ;-)

    Ups, wifi cannot connect to the AP, do we have to wait for the kolban build ?!

    Cool, someone decided to ship wifi disabled ?!

    >wifi.getStatus();
    ={ "isStation": false, "isAP": false }
    
  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

reset() and dump()

Posted by Avatar for MaBe @MaBe

Actions