Pages: [1]   Go Down
Author Topic: SHA1/SHA256 library for DUE?  (Read 1158 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I have tried to run the Cryptosuite for the Arduino DUE available from here:
http://code.google.com/p/cryptosuite/downloads/list

Unfortunately, the library only compiles on UNO and Leonardo devices because it uses the PROGMEM.

Has anybody gotten this library to work?  I'm interested in using the library in an Arduino DUE project that connects to a MySQL database directly with Chucks code here:
http://drcharlesbell.blogspot.com/2013/04/introducing-mysql-connectorarduino_6.html


Does anyone have this working or be willing to help me port this library to DUE?

Is there a guide out there on how to un-PROGMEM a project so it will run on DUE?  smiley
I understand it will take up more memory then on other platforms because we can't store a couple of the large char array values in EEPROM but I'm willing to try if anyone can help me.

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I know this is oldish, but frankly, if I posted my own topic, it would be saying the same thing since I'm in the same boat.  So, any ideas on this?
Logged

Nashville Tennessee, USA
Offline Offline
Sr. Member
****
Karma: 15
Posts: 373
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You may have other issues to solve but the newer versions of the libraries eliminate the problems with PROGMEM,  I'm not sure exactly when this change was made but with 1.5.2 you had to put something like this where ever pgmspace.h was used:
Code:
#ifndef __arm__
#include <avr/pgmspace.h>
#else
#define PROGMEM /* empty */
#define pgm_read_byte(x) (*(x))
#define pgm_read_word(x) (*(x))
#define pgm_read_float(x) (*(x))
#define PSTR(x) x
#endif

1.5.4 has  a pgmspace.h set up for the Due with a more comprehensive set of macros, I think 1.5.3 did too but I'm not sure.
Logged

Pages: [1]   Go Up
Jump to: