espruino / Espruino

The Espruino JavaScript interpreter - Official Repo
http://www.espruino.com/
Other
2.76k stars 742 forks source link

ESP32: Unstable console #1177

Closed opichals closed 7 years ago

opichals commented 7 years ago

I have gotten the DOIT ESP32 board and have issues with basic espruino stuff like the following keyboard presses get corrupted on the way it seems (e.g. see the mangled process words below).

Any ideas?

$ npm run espruino

> d1-dht11@1.0.0 espruino /Users/standa/Dev/private/d1-dht11
> espruino -b 115200

Espruino Command-line Tool 0.0.30
-----------------------------------

Using first port, {"path":"/dev/cu.SLAB_USBtoUART","usb":[4292,60000],"description":"Silicon Labs"}
Connecting to '/dev/cu.SLAB_USBtoUART'
Connected
prûcÙss.memory()
Uncaught SyntaxError: Got ?[251] expected EOF
 at line 1 col 3
prûcÙss.memory()
  ^
>process.memory()
={ "free": 4963, "usage": 37, "total": 5000, "history": 10 }
>procesî.ÛemorÞ()
Uncaught SyntaxError: Got ?[238] expected EOF
 at line 1 col 7
procesî.ÛemorÞ()
      ^
>process.memory()
={ "free": 4963, "usage": 37, "total": 5000, "history": 16 }
>process.memory()
={ "free": 4963, "usage": 37, "total": 5000, "history": 16 }
>process.env
={ 
  "VERSION": "1v92.73", 
  "BUILD_DATE": "May 30 2017", 
  "BUILD_TIME": "08:14:01", 
  "GIT_COMMIT": "3206eecda556ce9c96a781e2811b2043f2831eae", 
  "BOARD": "ESP32", 
  "CHIP": "ESP32", 
  "CHIP_FAMILY": "ESP32", 
  "FLASH": 0, "RAM": 524288, 
  "SERIAL": "30aea400-fe90", 
  "CONSOLE": "Serial1", 
  "EXPORTS": { "jsvLock": 1074775772, "jsvLockAgainSafe": 1075142760, "jsvUnLock": 1074777712, "jsvSkipName": 1074792772, 
    "jsvMathsOp": 1074802380, "jsvMathsOpSkipNames": 1074805880, "jsvNewFromFloat": 1074787948, "jsvNewFromInteger": 1074787860, "jsvNewFromString": 1074786876, 
    "jsvNewFromBool": 1074787920, "jsvGetFloat": 1074796724, "jsvGetInteger": 1074791156, "jsvGetBool": 1074797472, "jspeiFindInScopes": 1074815288, 
    "jspReplaceWith": 1074815056, "jspeFunctionCall": 1074824480, "jspGetNamedVariable": 1074816920, "jspGetNamedField": 1074817304, "jspGetVarNamedField": 1074817412, 
    "jsvNewWithFlags": 1074786604 }
 }
opichals commented 7 years ago

Could also be related to other stuff I observe like https://github.com/espressif/arduino-esp32/issues/409 which sounds strange. Not sure.

wilberforce commented 7 years ago

First I have heard if anything like this. What power supply is used?

If characters are getting mangled, I'm surprised the flashing works.

wilberforce commented 7 years ago

Does it work from the web IDE?

opichals commented 7 years ago

I have it connected to a MacBook Pro USB port only. Will try the web IDE and write more later (had no such issues with the ESP8266 (d1 mini) on the exact same machine, using the espruino npm package though).

Thanks!

opichals commented 7 years ago

Same thing in the IDE.

opichals commented 7 years ago

No such issue with WeMos LoLin32 board observed

wilberforce commented 7 years ago

I think it is related to USB to serial chip used, and the driver for that chipset and the OS.

All of the boards seem to use a different chipset, so unless we document the board and the chip and OS, it will be hard to track. At least some patterns could be observed.

wilberforce commented 7 years ago

@opichals Want to leave this open? Do you think it was the board?

opichals commented 7 years ago

I tested MH-ET LIVE MiniKit for ESP32 and I didn't observe anything like this there.

I think it was a faulty board.