stevenvar / OMicroB

An OCaml generic virtual machine for microcontrollers
Other
138 stars 23 forks source link

Unbound module "Avr" running tuto_1_led #27

Closed joefiorini closed 2 years ago

joefiorini commented 4 years ago

I'm on macOS 10.15.4. I'm using ocaml 4.07 inside an opam switch. Following the instructions in the readme I commented out target_pic32 (since I'm targeting an Arduino Uno) then ran ./configure && make && sudo make install (needed sudo since my /usr/local/libexec directory wasn't world writeable). Then I cd'd into tests/tuto_1_led and ran make all. I get the following output:

~/S/O/t/tuto_1_led (master)> make all
/Users/josephfiorini/Source/OMicroB/bin/omicrob -v led.ml -mlopt -verbose -stack-size 200 -heap-size 200
+ CAMLLIB=/Users/josephfiorini/Source/OMicroB/lib /Users/josephfiorini/.opam/4.07.1/bin/ocamlc.opt -g -w A -safe-string -strict-sequence -strict-formats -ccopt -D__OCAML__ -custom -verbose led.ml -o led.byte
File "led.ml", line 1, characters 5-8:
Error: Unbound module Avr
make: *** [led.byte] Error 2

I checked that /usr/local/lib/omicrob/targets/avr/avr.ml does get created, but I'm not sure if it's referenced anywhere.

joefiorini commented 4 years ago

Solved the problem by adding -device arduino-uno omicrob call in all & flash.