cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE can't use gmp.h?

HYoun
Associate II

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????

1 ACCEPTED SOLUTION

Accepted Solutions
EJOHA
Senior

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).

View solution in original post

3 REPLIES 3
EJOHA
Senior

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).

Thank u for reply, EJOHA!

Actually, i wanna using 2^512 bits integer.

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

EJOHA
Senior

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.