Skip to main content
HYoun
Associate II
Aug 25, 2020 5:00 AM UTC
Solved

STM32CubeIDE can't use gmp.h?

I wanna use big number in my board.

So, i try to use 'gmp.h'.

But when i use 'mpz_init' function, that have error message like this.

-> 'undefined reference to `__gmpz_init''

​

Should I make this function myself????

This topic has been closed for replies.
EJOHA
EJOHABest answer
Associate
Aug 25, 2020 8:24 AM UTC

Hi,

libgmp is not included in STM32CubeIDE toolchain. So if you need to gmp you will need to build the library yourself.

The toolchain included in STM32CubeIDE supports long long to support big integers (64-bits).

3 replies

EJOHA
EJOHABest answer
Associate
Aug 25, 2020 8:24 AM UTC

Hi,

libgmp is not included in STM32CubeIDE toolchain. So if you need to gmp you will need to build the library yourself.

The toolchain included in STM32CubeIDE supports long long to support big integers (64-bits).

HYoun
HYounAuthor
Associate II
Aug 25, 2020 8:56 AM UTC

Thank u for reply, EJOHA!

​

Actually, i wanna using 2^512 bits integer.

What's the best way to do you have any idea?:grinning_face:

EJOHA
Associate
Aug 25, 2020 9:29 AM UTC

No I have not been using such big integers. If you are application is into crypto maybe you can look into the STM32 cryptographic firmware library on ST web site.