Topic: compile errors for Arudino DUE

I have the wolfssl lib configured for ARDUINO, and I can successfully compile and run a small wolfssl test program for  Arduino mega2560, ZERO, Teensy 3*, Teensy LC,  and dragonfly.  But I get compile errors if I try to compile for Arduino DUE.

In file included from /home/d/sketchbook/libraries/wolfssl/wolfssl/wolfcrypt/types.h:30:0,
                 from /home/d/sketchbook/libraries/wolfssl/wolfssl/wolfcrypt/logging.h:33,
                 from /home/d/sketchbook/libraries/wolfssl/wolfssl/ssl.h:35,
                 from /home/d/sketchbook/libraries/wolfssl/wolfssl.h:3,
                 from /home//sketchbook/teensy/ssl/ssl.ino:1:
/home/d/sketchbook/libraries/wolfssl/wolfssl/wolfcrypt/wc_port.h:514:12: error: redefinition of 'struct tm'
     struct tm {
            ^
In file included from /home/linux/myarduino/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/arm-none-eabi/include/sys/stat.h:9:0,
                 from /home/d/.arduino15/packages/arduino/hardware/sam/1.6.11/cores/arduino/syscalls.h:32,
                 from /home/d/.arduino15/packages/arduino/hardware/sam/1.6.11/variants/arduino_due_x/variant.h:50,
                 from /home/d/.arduino15/packages/arduino/hardware/sam/1.6.11/cores/arduino/Arduino.h:201,
                 from sketch/ssl.ino.cpp:1:
/home/linux/myarduino/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/arm-none-eabi/include/time.h:31:8: error: previous definition of 'struct tm'
 struct tm
        ^
exit status 1
Error compiling for board Arduino Due (Programming Port).

Using IDE 1.8.5 on Ubuntu.

Share

Re: compile errors for Arudino DUE

Hi @manitou,

Could you try commenting out the define for TIME_OVERRIDES in wolfssl/wolfcrypt/settings.h under the WOLFSSL_ARDUINO section and let me know if that resolves the redefinition issue?

Warm Regards,

- K

3 (edited by manitou 2018-12-15 17:48:25)

Re: compile errors for Arudino DUE

Yes, i was able to compile for DUE after commenting out TIME_OVERRIDES, but it will be a few days before I can run it on DUE.
thanks

EDIT:  OK, my wolfssl test worked on DUE.

Share

Re: compile errors for Arudino DUE

Hi! Did you encounter the gettimeofday undefined error? How did you get past this?

Share