1 (edited by Sharklasers 2019-06-03 05:58:46)

Topic: [SOLVED] build error in wolfssl/wolfcrypt/settings.h

Hello, being new to wolfSSL and this forum I could not find any helpful clue as
to solving the following build error:

/usr/local/stow/riscv64-unknown-elf-gcc/bin/riscv64-unknown-elf-gcc -DWOLFSSL_USER_SETTINGS -DIPADDR="192.168.0.2" -DNETMASK="255.255.255.0" -g -ffunction-sections -fdata-sections -march=rv32imac -mabi=ilp32 -mcmodel=medany -msmall-data-limit=8 -mdiv -Os -I. -I../ext/multizone -I../ext/picotcp/build/include -I../ext/wolfssl -I../bsp/X300 -c -o main.o main.c
In file included from main.c:18: ../ext/wolfssl/wolfssl/wolfcrypt/settings.h:1698:10: error: #error "FFDHE parameters are too large for FP_MAX_BIT as set"

The build is a subsidiary build with the enclosing one being a build of the IoT stack by Hex Five. I can build wolfSSL
in a stand-alone fashion without any problem. Toolchain is the RISC-V GNU toolchain supplied by SiFive.

Regards
Mike

Share

Re: [SOLVED] build error in wolfssl/wolfcrypt/settings.h

Hi Sharklasers,

Can you tell us what the project is and for whom? If you can not share details on a public forum please contact us via support@wolfssl.com, we would enjoy learning more about your project and end goals.

The error is telling you to configure FP_MAX_BITS to be larger. That define should be set to the largest key size time 2 so for RSA-4096 bit you would want to set it to 8192, if the largest key is DH-2048-bit then set it to 4096 and so on. Configure with

CFLAGS="<other flags> -DFP_MAX_BITS=8192"

(for example)

Regards,

K

Re: [SOLVED] build error in wolfssl/wolfcrypt/settings.h

Thx, I could solve it along those lines.

Share

4 (edited by coco21 2019-09-06 07:03:27)

Re: [SOLVED] build error in wolfssl/wolfcrypt/settings.h

Hey all,

Just started to use HexFive Iot stack and hit same problem as reported in this thread.

Using code from here: https://github.com/hex-five/multizone-secure-iot-stack
Using toolchains and OCD from SiFive here: https://www.sifive.com/boards/

Tried various things including tweaking wolfSSL macros but am not able to make it compile, remains stucked in zone 2.
Attached my make process output - hope that helps, certainly a stupid thing I forgot but cannot find ...

Can you please advise?

Thanks much already
coco21

Post's attachments

HexFive_IoTStack_wolfSSL_Issue.txt 19.85 kb, 1 downloads since 2019-09-06 

You don't have the permssions to download the attachments of this post.

Share

Re: [SOLVED] build error in wolfssl/wolfcrypt/settings.h

Hi coco21,

The MultiZone Secure IoT Stack is certified to work with wolfSSL 3.15.7 @272181b.

Any different versions of its dependencies may not work as expected or require some tweaking.

External dependencies include: FreeRTOS, picoTCP, wolfSSL, and MultiZone TEE. These are all included in the MultiZone Secure IoT Stack repository on GitHub

Hex Five's prebuilt reference toolchainis is optional and recomended
https://hex-five.com/wp-content/uploads … 226.tar.xz

Please follow the instructions in readme and manual and let us know if you need help with your RISC-V project.

https://github.com/hex-five/multizone-s … /README.md
https://github.com/hex-five/multizone-s … manual.pdf

Thanks!

Hex Five Tech Support

Re: [SOLVED] build error in wolfssl/wolfcrypt/settings.h

Hi HexFive team,

Great it now works. You mention it here and I was thinking this as well: there is a specific need regarding the wolfSSL version.
What I initially did

1. $ git clone https://github.com/hex-five/multizone-s … -stack.git
2. $ git clone https://github.com/wolfSSL/wolfssl.git
3. Manually copy the wolfSSL into the HexFive folder structure at ..\multizone-secure-iot-stack\ext\wolfssl
4. Attempt to do a "make all"

Whereas I simply had to use the "--recursive" keyword to pick correct @272181b.

$ git clone --recursive https://github.com/hex-five/multizone-s … -stack.git

With that it work, thanks much, I can now start playing with it, cool!

Thx coco21

Share

Re: [SOLVED] build error in wolfssl/wolfcrypt/settings.h

Hi HexFive team,

Another question popping up in my head since I don't have any FPGA board yet.

Is it possible to run the whole HexFive stack on SiFive "FreedomStudio-4.7.2.2019-05-0-win32.win32.x86_64", namely on QEMU emulation? That would be great and in line what I am seeking for.

I see SiFive's studio is using some .dts and qemu configuration files, can I find this somewhere?
Or can I simply run a E31 based (RV32IMAC) platform right ahead? I mean E300 (or X300 softcore) at the end runs he E31 coreplex plus some mem-mapped peripherals.

You help is greatly appreciated, thanks in advance!
coco21

Share

Re: [SOLVED] build error in wolfssl/wolfcrypt/settings.h

UPDATE on related threads "SiFive":

https://github.com/wolfSSL/wolfssl/pull/2456
Support for SiFive HiFive Unleashed board

- KH