Questions and discussions about the software that runs on the TD RF module itself.
giovanni
 
Posts: 10
Joined: Mon Jun 22, 2015 1:04 pm

Random number generation

by giovanni Thu Aug 13, 2015 1:37 pm

When trying to generate a random integer I get following error:

c:/td/td_rf_module_sdk-v4.0.0/gnu/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/lib/thumb2\libcs3unhosted.a(unhosted-sbrk.o): In function `_sbrk':
sbrk.c:(.text+0x3c): undefined reference to `__cs3_heap_limit'

I have included stdlib.h and am calling the rand() function like I would do in any C program.
Any suggestions?

Kind regards.
User avatar
lcheminade
 
Posts: 146
Joined: Mon May 11, 2015 7:47 am

Re: Random number generation

by lcheminade Thu Aug 13, 2015 2:11 pm

This basically means your binary requires more RAM than available on board. Keep in mind we only have 16Kb of RAM and that using standard librairies usually links a lot of things... A good random number is RTC->CNT for example but you can also use ADC inputs to read some noise.
Return to Firmware

Who is online

Users browsing this forum: No registered users and 26 guests