Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ratel problem #17

Open
Martinix75 opened this issue Sep 12, 2023 · 4 comments
Open

ratel problem #17

Martinix75 opened this issue Sep 12, 2023 · 4 comments

Comments

@Martinix75
Copy link

Martinix75 commented Sep 12, 2023

Good morning,
I wanted to try Ratle, to play a little with the "Arduino" that I have around the house / laboratory.
I created the config.nims file

 
import boardConf
board "unor3"

--avr.any.gcc.path: "/home/andrea/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin" #"/usr/bin"

Which should be the valid way up to the AVR compiler (I hope).
I try the example file that I call "rttTest.nim" within the "rttTest Directory.

import board
import board / [times, serial, progmem]

Serial.init(9600.Hz)
Serial.send p"Hello world\n"
Led.output()

while true:
  Led.high()
  Serial.send p"Led is on\n"
  delayMs(1000)
  Led.low()
  Serial.send p"Led is off\n"
  delayMs(1000) 

But after the "ratel ruild" command I get the following mistake:

andrea@tec-martin:~/Scrivania/rttTest> ratel build
Hint: used config file '/home/andrea/bin/nim/config/nim.cfg' [Conf]
Hint: used config file '/home/andrea/bin/nim/config/config.nims' [Conf]
Hint: used config file '/home/andrea/Scrivania/rttTest/config.nims' [Conf]
..........................................................................
/home/andrea/bin/nim/lib/pure/unicode.nim(849, 36) Error: type mismatch: got 'int32' for 'RuneImpl(toLower(ar)) - RuneImpl(toLower(br))' but expected 'int'
vmops.nim(7)             exec
Error: unhandled exception: nim c -d:danger --os:any rttTest.nim [OSError]
andrea@tec-martin:~/Scrivania/rttTest> ratel build

I'm wrong something sensational or do you come any problem in ratel?
Good evening from Martin A.
p.s i use NIM 2.0.0

@PMunch
Copy link
Owner

PMunch commented Sep 12, 2023

Just tested and it appears to be a Nim 2.0 breaking change. I'll hopefully have time to look at this tomorrow!

@Martinix75
Copy link
Author

Hi, have you been able to see (understand) the compilation problem? Thanks and sorry for the disorder

@PMunch
Copy link
Owner

PMunch commented Oct 18, 2023

Had a quick look at it today (sorry I had completely forgotten about this). Not entirely sure what the underlying issue is though. The unicode module the error is reported in doesn't appear to have changed, so my best guess is that something must've changed with type coercion on 16-byt architectures. I'm looking into it, hopefully I'll have a solution soon enough.

@Martinix75
Copy link
Author

A thousand thanks!
Let's say that my real purpose, is to try some Libs that I wrote for RP2040, on Arduino, which feasible (according to me) with a few changes, but it would be interesting to try! In the meantime, thanks for your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants