-
Notifications
You must be signed in to change notification settings - Fork 212
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
Crypto doesn't support next generation AVRs #77
Comments
Same here: Crypto gives build errors with ATTiny3224 and AVR64DD14 |
It shouldn't give build errors for the ATTiny3224 as I integrated the new ATTinys into the library shortly after I raised this issue. There has been an update or two to the IDE since then though. What errors are you getting with each chip and what version of the IDE are you using? |
Actually, I guess more importantly... what version of megaTinyCore are you using? The newer versions should include the fix unless Spence changed something that interferes with it. I doubt that's the case though because it was actually his idea to use CCL for the RNG clock and I implemented it. That being said, if you're using CCL for other purposes it would probably never work with crypto together. |
I am using the latest MegaTinyCore 2.6.8 and Arduino 1.8.19. Here's the log (example "TestEd25519"):
|
Comment from Spence Konde:
|
Ok, what version of THIS library are you using? Because your first error is "L:\Progetti\Arduino\libraries\Crypto\src\RNG.cpp:228:5: warning: 'WDT_vect' appears to be a misspelled 'signal' handler, missing '__vector' prefix [-Wmisspelled-isr]". In the new version of RNG.cpp line 228 is a comment, not an instruction. If you're running the latest version of this library, you shouldn't be able to get that error. But if for some reason something is broken, replace the file in your directory at L:\Progetti\Arduino\libraries\Crypto\src\RNG.cpp with the file at https://github.com/rweather/arduinolibs/blob/master/libraries/Crypto/RNG.cpp |
I am using 0.4.0 (from 16th Aug 2023) |
I don't understand exactly what's going on here but I really don't think you have the proper RNG.cpp file. There are different forks of Crypto and I'm wondering if maybe you're using a different one? The last change to this library that I see is when the new RNG.cpp file I changed got added in April of 2023. Regardless though, your error shouldn't come up if you have the new RNG.cpp file. WDT_vect doesn't exist in the new AVRs and the new RNG.cpp uses CCL instead. The new RNG.cpp tries to determine if the device is a new AVR with CCL (yours is) and uses that instead of WDT. If you replace the file manually, it should work because that's the only file that needed changed to enable use with modern AVRs like the one you're using. |
If you take a look at your file at L:\Progetti\Arduino\libraries\Crypto\src\RNG.cpp I can almost guarantee line 38 doesn't say |
My path looks like this |
I installed the Crypto library from the Arduino IDE Library Manager. |
Yeah, it looks like the Arduino IDE Library Manager is referencing a different fork. Do you know how to remove it and install this one instead or do you want me to walk you through it? |
No, thanks, I can manage it: I just wanted to be sure the "official" one from the Library Manager was not the right one. |
Yeah unfortunately it does and I don't really know how to go about changing it aside from figuring out which fork they're using and suggesting they replace that RNG.cpp file. Really you should be able to change just that file and everything should work. |
Ok, replaced all files with the ones from the latest github zip from master branch, now TestEd25519 builds fine. |
PS: maybe the fact you still use "0.4.0" as library version (despite being much newer) may lead to issues with Arduino IDE Library Manager (at least with 1.8.x)? |
No problem. I did a little searching and believe I found the library you had. It's at https://github.com/OperatorFoundation/Crypto and turns out it's a fork of THIS library but without the proper RNG.cpp file lol. I'll submit a new issue and suggest they change it. People will probably appreciate you running into this problem |
Well, it turns out I can't submit a new issue and whenever I try to do a pull request it ends up bringing me back to this library (admittedly I don't have any experience with pull requests lol). Hopefully they fix it soon or people at least find this issue and realize how to fix it. |
Since Atmel was taken over by Microchip, a lot has changed with AVRs. Timers are completely different now and when I try to run this library with an ATTINY3226 it gives tons of compilation errors because it's referencing timers that don't exist. Also, watchdog timers are not recommended according to the core developer for megatinycore. Would it be possible to port new AVRs such as the ATTINY3226? I wouldn't know where to begin.
The text was updated successfully, but these errors were encountered: