-->
Page 1 of 1

Add AES library

PostPosted: Wed Nov 02, 2016 3:34 pm
by jellefresen
Hi,

I'm having trouble adding this library to my project: https://github.com/spaniakos/AES.git. Can anyone tell me what I did wrong?

What I did is clone the repository to d:\workspace\arduino\aes, then in the Arduino IDE I navigated to the menu item Sketch -> Include Library -> Add .ZIP Library and selected said folder. The status bar told me that the import was done successfully and I could see the library when navigating to Manage Libraries. I then clicked on the menu item Sketch -> Include Library -> AES, which resulted in three .h files being included in my .ino file. I clicked on Verify to compile it all, and it gave me this error:

Code: Select allArduino: 1.6.8 (Windows 10), Board: "Generic ESP8266 Module, 80 MHz, 40MHz, DIO, 921600, 512K (64K SPIFFS), ck, Disabled, None"

In file included from C:\Users\Jelle\Documents\Arduino\libraries\AES/AES.h:4:0,

                 from D:\workspace\my-project\ProjectName\ProjectName.ino:1:

C:\Users\Jelle\Documents\Arduino\libraries\AES/AES_config.h:33:27: fatal error: avr/pgmspace.h: No such file or directory

  #include <avr/pgmspace.h>

                           ^

compilation terminated.

exit status 1
Error compiling for board Generic ESP8266 Module.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Re: Add AES library

PostPosted: Thu Nov 03, 2016 8:24 am
by martinayotte
In ArduinoESP framework, the "pgmspace.h" is not located inside an "avr" subfolder.
Simply try with "#include <pgmspace.h>" instead ...

Re: Add AES library

PostPosted: Fri Nov 11, 2016 1:31 pm
by jellefresen
Thx! That was the problem indeed :)

For future reference: after solving this problem, I stumbled upon the next compiler error, which was related to the printf.h used in the AES library. As described here, the problem was that fdevopen did not exist. The solution given there seems to work.