Pete Brahman's answer suggests what a good answer this question should: non-biasing and combining weak sources of entropy. I would hesitate a bit to use uninitialized memory in this process; I can think of scenarios where a system based on the assumption that uninitialized memory was not previously used by an attacker may be compromised. Other than that, I cannot but agree.
In the interest of saving time on the invention of a possibly already invented wheel, I would like to briefly consider cryptlib providing you have not done so; "Highly portable cryptlib means it is also used in a variety of custom embedded system environments, including AMX, ChorusOS, eCos, FreeRTOS / OpenRTOS, uITRON, MQX, PalmOS, RTEMS, ThreadX, T-Kernel, uC / OS II, VDK, VxWorks and XMK. " This library probably does most of the work for you; Assuming it is possible to use cryptlib, you may only need to pass it random information (from several sources): "The random data collection operation is controlled using cryptAddRandom, which can be used to enter your own random information into the internal randomness pool or inform cryptlib about the survey systems for random information. "
source share