Coder Social home page Coder Social logo

toitlang / jaguar Goto Github PK

View Code? Open in Web Editor NEW
172.0 172.0 12.0 1.17 MB

Use live reloading over WiFI to turbo-charge developing for your ESP32.

License: MIT License

Makefile 1.61% Go 80.41% Shell 0.45% Batchfile 0.14% Inno Setup 1.07% Toit 16.31%
esp32 livereload toit

jaguar's People

Contributors

andersjohnsen avatar dependabot[bot] avatar erikcorry avatar floitsch avatar jstroem avatar kasperl avatar lask avatar mikkeldamsgaard avatar nivoc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jaguar's Issues

Catch version mismatch between SDK/images and devices/simulators

When upgrading the SDK and images for a jag installation through 'jag setup', it is easy to get to a situation where a device or a simulator runs an old version of the firmware image. This leads to very hard to understand errors (primitive numbering may have changed).

We should let the devices and simulators announce the version they are running - or cache the version information for a device id somewhere - to avoid this.

Crash and reboot on loss of WiFi

I sometimes see log output from the ESP32 like this:

unhandled WiFi event: 21

which leads to an uncaught exception that causes a crash and a reboot:

EXCEPTION error. 
Routing problem
  0: udp_send_                 <sdk>/net/modules/udp.toit:134:3
  1: Socket.send_              <sdk>/net/modules/udp.toit:94:16
  2: Socket.send               <sdk>/net/modules/udp.toit:73:12
  3: identify                  /home/runner/work/jaguar/jaguar/src/jaguar.toit:104:12
  4: main.<lambda>             /home/runner/work/jaguar/jaguar/src/jaguar.toit:55:5

Reply to HTTP requests with error code on failures

Today, Jaguar doesn't reply with an error to HTTP requests that fail in unexpected ways (exceptions, timeouts, etc.).

We probably need to wrap the HTTP request handling in something that acts on exceptions. It isn't quite clear if the request should be considered handled if we sent the exception back to the user or if we should continue unwinding.

server.listen socket:: | request/http.Request writer/http.ResponseWriter |

No old version displayed in `jag setup --check`

I tried jag setup --check and got the following error:

Error: SDK in '/home/lau/.cache/jaguar/sdk' is version , but Jaguar v0.5.0 needs version v0.12.0.
Run 'jag setup' to fix this.```
This is helpful, but the old version is blank.

Jaguar drops a trace when the snapshot does not fit in the 'programs' partition

Ideally, jaguar should report an error to 'jag run' when the image size of the toit program exceeds the available space on the 'programs' partition.

For now, the trace looks like this (in 1.0.7):

Class 'Null_' does not have any method 'write'.
  0: ProgramManager.write.<block> <jag_src>/jaguar/src/programs.toit:59:15
  1: List.chunk_up             <sdk>/core/collections.toit:766:12
  2: ProgramManager.write      <jag_src>/jaguar/src/programs.toit:58:9
  3: install_program.<block>.<block> <jag_src>/jaguar/src/jaguar.toit:137:15
  4: Mutex.do.<block>          <sdk>/monitor.toit:24:27
  5: __Monitor__.locked_.<block> <sdk>/core/monitor_impl.toit:80:12
  6: __Monitor__.locked_       <sdk>/core/monitor_impl.toit:75:3
  7: Mutex.do                  <sdk>/monitor.toit:24:3
  8: install_program.<block>   <jag_src>/jaguar/src/jaguar.toit:130:43
  9: Task_.with_deadline_.<block> <sdk>/core/task.toit:79:21
 10: Task_.with_deadline_      <sdk>/core/task.toit:73:3
 11: with_timeout              <sdk>/core/utils.toit:172:15
 12: with_timeout              <sdk>/core/utils.toit:164:10
 13: install_program           <jag_src>/jaguar/src/jaguar.toit:130:3
 14: serve_incoming_requests.<lambda> <jag_src>/jaguar/src/jaguar.toit:183:7
 15: Server.run_connection_.<block> <pkg:pkg-http>/server.toit:85:17
 16: catch.<block>             <sdk>/core/exceptions.toit:114:10
 17: catch                     <sdk>/core/exceptions.toit:112:1
 18: catch                     <sdk>/core/exceptions.toit:87:10
 19: Server.run_connection_    <pkg:pkg-http>/server.toit:84:7
 20: Server.listen.<lambda>.<block>.<block> <pkg:pkg-http>/server.toit:66:24
 21: catch.<block>             <sdk>/core/exceptions.toit:114:10
 22: catch                     <sdk>/core/exceptions.toit:112:1
 23: catch                     <sdk>/core/exceptions.toit:63:10
 24: Server.listen.<lambda>.<block> <pkg:pkg-http>/server.toit:65:16
 25: Server.listen.<lambda>    <pkg:pkg-http>/server.toit:52:24

Automatically erase or repair NVS partition if corrupt

Jaguar doesn't behave very well if the NVS partition becomes corrupt. We've seen it fail in the flash_kv_init primitive, so maybe we can catch that error and clear the NVS partition? Maybe that is too much, but let's consider it.


My guess would be that somehow the NVS partition has become corrupt. Maybe Jaguar needs to handle that and erase the partition? Or maybe it should report it in a nicer way so it is possible for the user to erase the flash manually.

Originally posted by @kasperl in toitlang/toit#458 (comment)

'jag simulate' fails on windows

'jag simulate' fails with error:

> jag simulate
----
Decode system message with:
----
jag decode --system WyNVBVVYU1UAU1UAWyRVI1UQAAAAAAAAAAAAAAAAAAAAAFsjVQRVRVNVF1BSSU1JVElWRV9MT09LVVBfRkFJTEVEU1UcRmFpbGVkIHRvIGZpbmQgcHJpbWl0aXZlIDI6MFsjVQJVU1sjVRBbI1UDVUZVAEkge1sjVQNVRlUBSQE/WyNVA1VGVQJJE1RbI1UDVUZVA0kTgFsjVQNVRlUESSgzWyNVA1VGVQVJfBhbI1UDVUZVBkkB5lsjVQNVRlUHSQsLWyNVA1VGVQhJFiFbI1UDVUZVCUlDDlsjVQNVRlUKSQwBWyNVA1VGVQtJDBZbI1UDVUZVDEkLxlsjVQNVRlUNSUMhWyNVA1VGVQ5JQzZbI1UDVUZVD0kLMA==
Error: exit status 0xc0000374

Add --device flag to watch and run

Make it possible to specify the device to run or watch by naming it. This would make it easier to support multiple devices in the VS Code extension.

jag run example/hello.toit --device new-puppy
jag watch example/hello.toit --device new-puppy

Default timeout for 'jag scan' with IP address is too low

It seems pretty common that we cannot complete the HTTP /identify request in 600ms. Perhaps we need a higher default timeout when we're scanning specific addresses because it involves a HTTP roundtrip that isn't necessary when just listening for broadcasted UDP packets?

Support developing applications that use multiple individual containers

Jaguar works by loading the application into a separate container, but it only runs one at a time. We start installing the program here https://github.com/toitlang/jaguar/blob ... r.toit#L49 (this is what kills the old version of the program) and we start running it here https://github.com/toitlang/jaguar/blob ... r.toit#L60.

This issue is suggesting to implement a new feature to load the applications into individual containers identified by the name: <App name> from https://docs.toit.io/platform/apps/appspec/#the-specification-file

Inspired by https://esp32.com/viewtopic.php?f=2&t=24941#p88621

Add support for `jag ports`

This would list all the relevant ports just like toit serial ports. This would allow an improvement of the VS Code extension.

Image writer out of bounds

Got the following exception when using Jag:

$ jag decode --system WyNVBVVYU1UAU1UAWyRVI1UQAAAAAAAAAAAAAAAAAAAAAFsjVQRVRVNVCUVYQ0VQVElPTlNVDU9VVF9PRl9CT1VORFNbI1UCVVNbI1UZWyNVA1VGVQBJCNVbI1UDVUZVAUl7AlsjVQNVRlUCSXybWyNVA1VGVQNJA9BbI1UDVUZVBEkB1VsjVQNVRlUFSUV3WyNVA1VGVQZJDs5bI1UDVUZVB0kO41sjVQNVRlUISQ7AWyNVA1VGVQlJRcBbI1UDVUZVCklEglsjVQNVRlULSQ7OWyNVA1VGVQxJDuNbI1UDVUZVDUkOk1sjVQNVRlUOSUStWyNVA1VGVQ9JRPtbI1UDVUZVEEkY+lsjVQNVRlURSUm9WyNVA1VGVRJJDs5bI1UDVUZVE0kO41sjVQNVRlUUSQ6TWyNVA1VGVRVJSdBbI1UDVUZVFklJ5VsjVQNVRlUXSRifWyNVA1VGVRhJGRM=
EXCEPTION error. 
OUT_OF_BOUNDS
  0: image_writer_commit_      /home/runner/work/jaguar/jaguar/src/programs.toit:130:3
  1: FlashImageWriter_.commit  /home/runner/work/jaguar/jaguar/src/programs.toit:106:5
  2: ProgramManager.commit     /home/runner/work/jaguar/jaguar/src/programs.toit:41:13
  3: install_program           /home/runner/work/jaguar/jaguar/src/jaguar.toit:73:22
  4: main.<lambda>             /home/runner/work/jaguar/jaguar/src/jaguar.toit:58:7
  5: Server.run_connection_.<block> <pkg:pkg-http>/server.toit:81:17
  6: catch.<block>             <sdk>/core/exceptions.toit:114:10
  7: catch                     <sdk>/core/exceptions.toit:112:1
  8: catch                     <sdk>/core/exceptions.toit:87:10
  9: Server.run_connection_    <pkg:pkg-http>/server.toit:80:7
 10: Server.listen.<lambda>.<block>.<block> <pkg:pkg-http>/server.toit:65:13
 11: catch.<block>             <sdk>/core/exceptions.toit:114:10
 12: catch                     <sdk>/core/exceptions.toit:112:1
 13: catch                     <sdk>/core/exceptions.toit:63:10
 14: Server.listen.<lambda>.<block> <pkg:pkg-http>/server.toit:64:16
 15: Server.listen.<lambda>    <pkg:pkg-http>/server.toit:52:24

Error: didn't find any Jaguar devices

From tmit to time Jaguar application stops running:

failed to ping 'device'.
Scanning ...
Error: didn't find any Jaguar devices

[wifi] DEBUG: connecting
[wifi] DEBUG: connected
[wifi] DEBUG: closing
[jaguar] WARN: running Jaguar failed due to 'DEADLINE_EXCEEDED' (2/3)

??? any glue?

Running non-existing file leads to lengthy output

kasper@foxxy toit % jag run examples/hel       
Running 'examples/hel' on 'dry-nail' ...
File not found: '/Users/kasper/Toitlang/toit/examples/hel'
Error: exit status 1
Error: exit status 1

It feels like the 'File not found' line should be enough. In particular, the two 'Error: exit status' line look more like debug output.

Programs not starting after reboot

A user is reporting that the program is crashing after reboot.
My guess is, that we are running the program too early, and are hitting the network stack just between the "connecting" and "connected" phase:

PS D:\Projekte\Toit\Artemia> jag monitor
Starting serial monitor of port 'COM3' ...
ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:188
ho 0 tail 12 room 4
load:0x40078000,len:12180
load:0x40080400,len:2936
entry 0x400805c8
clearing RTC memory: RTC memory is in inconsistent state
[flash reg] address 0x3f430000, size 0x00200000
[jaguar] INFO: program 1 re-starting from flash @ [53248,106496]
[wifi] DEBUG: connecting

Decode system message with:

jag decode WyNVBVVYU1UGdjEuNi43U1UAWyRVI1UQAAAAAAAAAAAAAAAAAAAAAFsjVQRVRVNVCUVYQ0VQVElPTlNVD1JvdXRpbmcgcHJvYmxlbVsjVQJVU1sjVRRbI1UDVUZVAEkkWFsjVQNVRlUBSTTgWyNVA1VGVQJJNMJbI1UDVUZVA0lWRFsjVQNVRlUESVUgWyNVA1VGVQVJAgJbI1UDVUZVBlUJWyNVA1VGVQdJEAtbI1UDVUZVCEkQN1sjVQNVRlUJSQKKWyNVA1VGVQpJAbtbI1UDVUZVC0kGeVsjVQNVRlUMSRW1WyNVA1VGVQ1JWrhbI1UDVUZVDkkHe1sjVQNVRlUPSQeQWyNVA1VGVRBJB0BbI1UDVUZVEUlay1sjVQNVRlUSSVrgWyNVA1VGVRNJBp4=
[jaguar] INFO: program 1 terminated with exit code 1
[wifi] DEBUG: connected
[wifi] INFO: got ip ip=192.168.178.131
[jaguar] INFO: running Jaguar device 'working-heat' (id: 'b9b29686-dcc3-43b4-a6f4-083f849ee6ec') on 'http://192.168.178.131:9000'

The decoded stacktrace:

EXCEPTION error.
Routing problem
0: tcp_connect_ <sdk>\net\modules\tcp.toit:174:3
1: TcpSocket.connect <sdk>\net\modules\tcp.toit:134:12
2: TcpSocket.connect <sdk>\net\modules\tcp.toit:130:12
3: SystemInterface_.tcp_connect <sdk>\net\impl.toit:39:12
4: Interface.tcp_connect <sdk>\net\net.toit:22:12
5: SmartHome SmartHome.toit:18:27
6: SmartHome.instance SmartHome.toit:15:25
7: run_global_initializer_.<block> <sdk>\core\objects.toit:205:26
8: run_global_initializer_ <sdk>\core\objects.toit:194:1
9: ArtemiaBreeder ArtemiaBreeder.toit:19:28
10: main main.toit:17:23
11: entry.<lambda> <sdk>\core\entry.toit:48:20

WiFi times out waiting for IP address from DHCP server

after successfull start and longer run, the toit firmware reports wifi reconnection errors:

Restart Message:
grafik

Decoded Error:
EXCEPTION error.
DEADLINE_EXCEEDED
0: Monitor.await /core/monitor_impl.toit:28:20
1: ResourceState_.wait_for_state_ /core/events.toit:55:5
2: ResourceState_.wait. /core/events.toit:22:12
3: Monitor.locked_. /core/monitor_impl.toit:123:12
4: Monitor.locked_ /core/monitor_impl.toit:95:3
5: ResourceState_.wait /core/events.toit:21:3
6: WifiModule.wait_for_ip_address system/extensions/esp32/wifi.toit:208:25
7: WifiServiceDefinition.turn_on.. system/extensions/esp32/wifi.toit:67:47
8: Task_.with_deadline_. /core/task.toit:73:21
9: Task_.with_deadline_ /core/task.toit:67:3
10: with_timeout /core/utils.toit:179:15
11: with_timeout /core/utils.toit:162:12
12: WifiServiceDefinition.turn_on. system/extensions/esp32/wifi.toit:67:7
13: WifiServiceDefinition.turn_on system/extensions/esp32/wifi.toit:62:3
14: WifiState.up.. system/extensions/esp32/wifi.toit:102:31
15: WifiState.up. system/extensions/esp32/wifi.toit:98:3
16: Monitor.locked_. /core/monitor_impl.toit:123:12
17: Monitor.locked_ /core/monitor_impl.toit:95:3
18: WifiState.up system/extensions/esp32/wifi.toit:98:3
19: WifiServiceDefinition.connect system/extensions/esp32/wifi.toit:53:23
20: WifiServiceDefinition.connect system/extensions/esp32/wifi.toit:44:12
21: NetworkServiceDefinitionBase.handle system/extensions/shared/network_base.toit:26:14
22: WifiServiceDefinition.handle system/extensions/esp32/wifi.toit:41:12
23: ServiceManager_. /system/services.toit:332:15
24: RpcRequest_.process. /rpc/broker.toit:98:26
25: RpcRequest_.process /rpc/broker.toit:95:3
26: RpcRequestQueue_.ensure_processing_task_... /rpc/broker.toit:214:20
27: RpcRequestQueue_.ensure_processing_task_.. /rpc/broker.toit:209:9
28: RpcRequestQueue_.ensure_processing_task_. /rpc/broker.toit:204:81

Threading issue with exit code

Sometimes "process terminated - exit code: 0" is before the output of the program:

[3.toit] 2022-02-17T21:21:07.057094Z: <process initiated>
[3.toit] There are 8 elements in the list
[3.toit] Here they are (sorted):
[3.toit] 0. Baboon
[3.toit] 1. Cat
[3.toit] 2. Fish
[3.toit] 3. Helicopter
[3.toit] 4. Horse
[3.toit] 5. Mouse
[3.toit] 6. Penguin
[3.toit] 2022-02-17T21:21:07.557674Z: <process terminated - exit code: 0>
[3.toit] 7. Radish
[3.toit] list is Baboon, Cat, Fish, Helicopter, Horse, Mouse, Penguin, Radish

Support providing runtime-accessible configurations as part of flashing

(this might impact the toit language as such not only jaguar)

Imagine you want to write (more or less) portable code for different versions of hardware (such as M5stackCore2 or M5StackBasic) with different sensors built in. Those sensors might even perform the same functions but are programmed differently. Rather than writing a separate program for each configuration one might identify the device at runtime and act accordingly (think: switch (hw) or #ifdef hw1 in c/c++).

It would thus be beneficial to "know" what particular device a program runs on. Name and ip address are configurable/change, USB serial number is fix.

(By the way: can I access ip and name in toit as supplied by flash?)

Since the USB device description is not available inside the esp32 itself (since this is handled by the CP... which can only be accessed from outside) it would be helpful to supply this when "jag flash"ing (like the wifi credentials) AND make it available from inside a toit program (or write it to EEPROM, but does toit support EEPROM?). Candidates are serial number (on a Mac /dev/ttyXXXXXX) and maybe vendor/manufacturer/product id as given by the USB device descriptor (lsusb -v in Linux).

Thinking this a little further, could we supply a "configuration key" by using "flash" (or any other means) which can be used at runtime in a toit program for such config purposes?

Automatically decode information when running 'jag simulate' like it is done for 'jag monitor'

Right now, we just tell folks to run 'jag decode' manually. Feels like back in May :)

kasper@mole jaguar % jag simulate
[jaguar] INFO: running Jaguar device 'relevant-sun' (id: '5ad77da4-fe4e-4ef0-82d2-52528e5e9bbb') on 'http://192.168.86.26:49581'
[jaguar] INFO: starting program 17544521-721d-5964-aed1-fcf72f716851
Hello, World!
[jaguar] INFO: starting program 3035991e-58dc-5d6f-a2e7-2299040ac322
----
Received a Toit stack trace. Executing the command below will
make it human readable:
----
jag decode WyNVBVVYU1UPdjIuMC4wLWFscGhhLjE0U1UAWyRVI1UQMDWZHljcXW+i5yKZBArDIlsjbAAAABRVT1NVC2l0ZXJhdGlvbj0wVQFVAVVAVQNVAVVoVQVVAVUgVQxVAUkCKFUYVQFVGFUaVQFVEA==
----

WATCHDOG INTERRUPT error

jag version
Version:         v1.0.5
SDK version:     v1.6.7
Build date:      2022-02-16T17:03:36Z

Stupid program:

main:
  i := 0
  while true:
    print "$i"
    i++

Reproducible every run: with slight variation of final count:

18059
18060
18061
----
Decode system message with:
----
jag decode WyNVBVVYU1UGdjEuNi43U1UAWyRVI1UQAAAAAAAAAAAAAAAAAAAAAFsjVQRVRVNVEldBVENIRE9HIElOVEVSUlVQVFNVAFsjVQJVU1sjVQtbI1UDVUZVAEkFnlsjVQNVRlUBVUVbI1UDVUZVAkkDSlsjVQNVRlUDSQhqWyNVA1VGVQRJEXNbI1UDVUZVBUkD/1sjVQNVRlUGSQQUWyNVA1VGVQdJA+9bI1UDVUZVCEkRhlsjVQNVRlUJSRGbWyNVA1VGVQpJA28=
[jaguar] INFO: program 3 terminated with exit code 1
WATCHDOG INTERRUPT error.
  0: watchdog_                 <sdk>\core\exceptions.toit:202:1
  1: main                      test.toit:1:1
  2: __entry__.<lambda>        <sdk>\core\entry.toit:48:20

Why it failed with WATCHDOG ?
I would expect something like output stream overrun etc.

unhandled Wifi event: 21

unhandled Wifi event: 21
this message introduces further misbehaviour:
=> Error: didn't find any Jaguar devices

Use Jaguar device name to automatically set hostname

when running toit on two devices I get with nmap:
...
Nmap scan report for toit.fritz.box (192.168.1.56)
...

Nmap scan report for toit.fritz.box (192.168.1.65)
...

lutz@HONOR:~/jaguar/third_party/toit$ /home/lutz/jaguar/build/jag scan
Scanning ...
Use the arrow keys to navigate: ↓ ↑ → ←
? Choose what Jaguar device you want to use:
▸ core2_WHITE (address: http://192.168.1.56:9000, 32-bit)
core_BLACK_BROKEN_EDGE (address: http://192.168.1.65:9000, 32-bit)

so how would I make , i.e. core2_WHITE to be used as hostname, as in
Nmap scan report for core2_WHITE.fritz.box (192.168.1.56)?

using the ARDUINO IDE I would set:
WiFi.setHostname("core2_WHITE");

Report crashes to improve Jaguar stability

Anonymous crash reports can significantly improve the stability of Jaguar over time. When jag crashes, it would be good to gather non-personal information about the crash for analysis. Something along the lines of:

  • The version of Jaguar.
  • The name and version of your host operating system.
  • The stack trace generated by the crash, which contains references to jag's own code and contains no references to your application code.

Support flashing with multiple wifi configurations

Support multiple wifi configurations during flash - maybe a "add extra wifi connection?" or similar to flash process after initial wifi setup

Could also be a separate command to run after initial configuration

Device identity/name changes are not synchronized until next scan

If you re-flash a device, it gets a new name. However, we still remember the device based on its IP address, so run/watch might believe they are talking to an old device. Re-scanning fixes the problem, but not knowing the identity/name of the device might cause confusion and troubles when decoding stack traces later.

tried jag and get stuck

hi
tried jaguar following tutorial on an esp32 I have lying around DFRobot DFR0478

jag setup
setup seems ok

jag flash                                                                                    
Enter WiFi network (SSID): My_SSID
Enter WiFi password for 'Livebox-6070': ******
Flashing device over serial on port '/dev/ttyUSB0' ...
esptool.py v3.0
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP32-D0WD (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: f0:08:d1:65:c8:d0
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 16MB
Flash params set to 0x0240
Compressed 15408 bytes to 10785...
Wrote 15408 bytes (10785 compressed) at 0x00001000 in 0.1 seconds (effective 848.8 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 119...
Wrote 3072 bytes (119 compressed) at 0x00008000 in 0.0 seconds (effective 4731.9 kbit/s)...
Hash of data verified.
Compressed 1091696 bytes to 719903...
Wrote 1091696 bytes (719903 compressed) at 0x00010000 in 11.1 seconds (effective 788.1 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

here looks good too and the device appear in my router device list

jag monitor                                                                                   
Starting serial monitor of port '/dev/ttyUSB0' ...
����������������������������������ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x1b (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371 
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x1b (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:188
ho 0 tail 12 room 4
load:0x40078000,len:12180
load:0x40080400,len:2944
entry 0x400805c8
clearing RTC memory: RTC memory is in inconsistent state
E (463) esp_ota_ops: not found otadata
[flash reg] address 0x3f430000, size 0x00200000
[wifi] DEBUG: connecting
[wifi] DEBUG: connected
[wifi] INFO: got ip ip=192.168.1.20
INFO: Running Jaguar device 'sad-lorry' (id: '3ea2d2ee-54fd-4f05-bf25-5840d9381f89') on 'http://192.168.1.20:9000'

some weird thing here I think

and finally got stuck there :/ (monitor was still active)

jag scan                                                                                      
Scanning ...
Error: didn't find any Jaguar devices

Is my device dead ?
Or maybe I do something wrong ?

'jag monitor' doesn't always flush output on Windows

Reported by @muhlpachr. It seems 'jag monitor' hangs sometimes on Windows:

PS C:\Users\michal\test> jag monitor -a
Starting serial monitor of port 'COM11' ...
o world!
158 Hello world!
159 Hello world!
160 Hello world!
1

Serial port seams to be fine, when I connect with terminal emulator or from Python, it continues without problem and do not hang.

Just for reference used toit code is this simple:

main:
  i := 1
  while true:
    print "$i Hello world!"
    i++
    sleep --ms=500

Originally posted by @muhlpachr in toitlang/toit#457 (comment)

Catch version mismatch between jag and cached SDK/images

When upgrading jag, it is easy to forget to run 'jag setup' again. We should verify that the downloaded and cached versions of the SDK and images have the expected versions, so we can remind users to run 'jag setup' again if it isn't the case.

Right now, it is quite confusing and easy to get to a point where the versions mismatch.

Add support for 'jag setup --check'

jag setup --check

returns an exit code of zero if jag has been set up and the jag binary and the SDK in $HOME/.cache/jaguar/sdk match. Otherwise, it returns an exit code of 1 and indicates what is missing:

$ jag setup --check
SDK in $HOME/.cache/jaguar/sdk is version xxx, but Jaguar v0.3.3 needs version yyy.
Run 'jag setup' to fix this.

or

$ jag setup --check
No SDK found in $HOME/.cache/jaguar/sdk, but Jaguar v0.3.3 needs version yyy.
Run 'jag setup' to fix this.

Support specifying address and port when scanning

jag scan 192.168.0.27:9000

The device should respond with the same information it usually broadcasts over UDP, and should verify the Jaguar version but not the device id.

This is likely to have solved the issues reported in #87.

Let jag download and run examples like 'go install' does

Could we let 'jag run' and 'jag watch' start from URLs to make it really straightforward to try examples?

jag run https://github.com/toitlang/toit/blob/master/examples/hello.toit

Extra points if it could run examples from packages and automatically get the dependencies right.

Ping sometimes times out

Every now and then the 'pre-run' ping times out and forces me to select a device from the drop down menu. Looks like a slightly longer timeout might be needed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.