cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE to version 1.15.0: (.text._getentropy_r+0xe): warning: _getentropy is not implemented

Beside an already solved warning (.elf has a LOAD segment with RWX permissions),

after updating the STM32CubeIDE to version 1.15.0 I am observing the second warning below:

C:\ProgramFiles\STMicroelectronics\STM32Cube\STM32CubeIDE_1.15.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.100.202403111256\tools\arm-none-eabi\bin\ld.exe: C:/Program Files/STMicroelectronics/STM32Cube/STM32CubeIDE_1.15.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.100.202403111256/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard\libc.a(libc_a-getentropyr.o): in function `_getentropy_r':

(.text._getentropy_r+0xe): warning: _getentropy is not implemented and will always fail

 

In those C++ projects I’m retargeting std::cout from iostream to the serial line. But the same problem comes up,
when I’m retargeting printf from cstdio
or stdio.

Are there any ideas to solve the problem?

This discussion is locked. Please start a new topic to ask your question.
1 ACCEPTED SOLUTION

Accepted Solutions

Hi Pavel A.,

thanks for your fast feedback and solution!

(With parameter type void* instead of void for buffer[] it works fine.)

Is this topic only related to C++ projects, because I tried also to rebuild some C projects, where I didn't get this warning?

 

View solution in original post

4 REPLIES 4
Pavel A.
Super User

 It is not related to printf or stdio. Add it somewhere with other "syscall" stubs.

int getentropy(void buffer[], size_t length)
{
  buffer = buffer; length = length;
  return -ENOSYS;
}

 

Hi Pavel A.,

thanks for your fast feedback and solution!

(With parameter type void* instead of void for buffer[] it works fine.)

Is this topic only related to C++ projects, because I tried also to rebuild some C projects, where I didn't get this warning?

 

Pavel A.
Super User

@EmbeddedSystemsEngineer this can be used in any C or C++ project where a real getentropy function is not needed. Various versions of C or C++ runtime libraries may refer to getentropy or not.

Hi Pavel A.,

Thank you for the answer!