PMunch / ratel

128 stars 4 forks source link

blink sketch doesn't compile #13

Closed blippy closed 2 years ago

blippy commented 2 years ago

I tried a basic blink sketch at https://github.com/PMunch/ratel, but it didn't compile.

mkdir blink-ratel
cd blink-ratel
vim config.nims # as per README.md
vim main.nim # likewise
ratel build

It complained:

Script Error: config:46:1 undeclared identifier: 'avr'
candidates (edit distance, scope distance); see '--spellSuggest': 
...
options.nim(222)         get
Error: unhandled exception: Can't obtain a value from a `none` [UnpackDefect]

I have avr-gcc installed in /usr/bin.

blippy commented 2 years ago

I re-read the instructions. It seems that I have to call it blink-ratel.nim instead of main.nim. The errors are still the same, though.

blippy commented 2 years ago

Also, do I have to set the following?

export nim=$HOME/.nimble/bin
PMunch commented 2 years ago

Oh, that was a tiny mistake in the README after I migrated from nim.cfg to config.nims. I've updated the README so it should work now, I'll update the website soon as well.

And no, you don't have to set any environment variables for Ratel.