lask / toit-hc-sr04

MIT License
0 stars 2 forks source link

PRIMITIVE_LOOKUP_FAILED error. #12

Closed pmatatias closed 10 months ago

pmatatias commented 10 months ago

I follow the tutorial from the documentation https://docs.toit.io/tutorials/hardware/ultra/#measuring-by-hand

It successfully works without the package.

image


Next I continue the tutorial using this package. and I get this error

[jaguar] INFO: program edd37d55-64e5-b4a0-d907-9502899269f6 started

******************************************************************************
Decoding by `jag`, device has version <2.0.0-alpha.130>
******************************************************************************
PRIMITIVE_LOOKUP_FAILED error. 
Failed to find primitive 11:0
  0: rmt-init_                 <sdk>\rmt.toit:563:1
  1: resource-group_           <sdk>\rmt.toit:561:21
  2: run-global-initializer__.<block> <sdk>\core\objects.toit:286:28
  3: run-global-initializer__  <sdk>\core\objects.toit:252:1
  4: Channel                   <sdk>\rmt.toit:275:34
  5: Channel                   <sdk>\rmt.toit:320:15
  6: Driver                    <pkg:toit-hc-sr04>\driver.toit:56:16
  7: main                      hcsr04.toit:36:13
******************************************************************************

[jaguar] ERROR: program edd37d55-64e5-b4a0-d907-9502899269f6 stopped - exit code 1

also tried the comment here https://github.com/lask/toit-hc-sr04/issues/9#issuecomment-1426478080 but still no luck.

any suggestions for this issue?

TIA

floitsch commented 10 months ago

We will try to reproduce.

In the meantime, could you tell us which version of the package you are using? Maybe just upload the package.lock file?

pmatatias commented 10 months ago

This is my package.lock

sdk: ^2.0.0-alpha.91
prefixes:
  hc_sr04: toit-hc-sr04
  telegram: toit-telegram
packages:
  pkg-http:
    url: github.com/toitlang/pkg-http
    name: http
    version: 2.3.4
    hash: 39fe52083b4c745cc37420649a48277b45728fd2
  toit-cert-roots:
    url: github.com/toitware/toit-cert-roots
    name: certificate_roots
    version: 1.6.1
    hash: 55d3be82ed53d8d332338b2de931865cf69fe48b
  toit-hc-sr04:
    url: github.com/lask/toit-hc-sr04
    name: hc_sr04
    version: 2.1.1
    hash: da8389adec9f012999c385b69bc42e26e19b51fa
  toit-telegram:
    url: github.com/floitsch/toit-telegram
    name: telegram
    version: 0.5.2
    hash: 86f963b32a97f3d473d4261c19cb9af3f0354688
    prefixes:
      certificate_roots: toit-cert-roots
      http: pkg-http
floitsch commented 10 months ago

That looks good.

Could you also give us information of the device you are using? ESP32, ESP32S3, ...?

Maybe also the command-line you are using to run the program.

pmatatias commented 10 months ago

Im using DOIT ESP32 DevKit V1 , I cant find official datasheet, but I think this is the same board that I use. https://www.circuitstate.com/pinouts/doit-esp32-devkit-v1-wifi-development-board-pinout-diagram-and-reference/

for the command-line first terminal

jag monitor

second terminal

jag watch hcsr04.toit

my file name is hcsr04.toit

floitsch commented 10 months ago

Looks all correct. We will try to reproduce tomorrow and get back to you. (Unfortunately all our ultrasound sensors are at the office...)

erikcorry commented 10 months ago

If you run the following program what output do you get?

import system

main:
  print system.platform
  print system.vm-sdk-version
  print system.app-sdk-version
floitsch commented 10 months ago

I can reproduce now. We will fix this as soon as possible.

floitsch commented 10 months ago

We have submitted a fix to the SDK. We will probably do a release relatively soon, so that Jaguar and the SDK can work again with the RMT (and thus this package). In the meantime you could downgrade to an older Jaguar version.

Thanks for reporting!

pmatatias commented 10 months ago

Awesome 🔥 Thank you for the very fast support. Will try it later.

Sure, no rush. Going to try downgrading my jaguar for a while.

kasperl commented 10 months ago

@pmatatias The new SDK is being built as I am typing this in. I expect us to have an updated Jaguar out within two hours :)

kasperl commented 10 months ago

@pmatatias Jaguar v1.27.2 is out with the fix.

pmatatias commented 10 months ago

Great. Will try is soon. Big thanks 😃