On a bare-metal platform, wc_InitRng() needs a valid entropy source. If your MCU has a hardware TRNG, you'll need to configure wolfSSL to use it instead of the default RNG. Make sure the TRNG is initialized first and, if your platform isn't already supported, implement a custom hardware RNG interface. Also, sharing your MCU, wolfSSL version, and the exact error code would help narrow down the issue.
Please post questions or comments you have about wolfSSL products here. It is helpful to be as descriptive as possible when asking your questions.
ReferencesStable Releases - download stable product releases.
Development Branch - latest development branch on GitHub.
wolfSSL Manual - wolfSSL (formerly CyaSSL) product manual and API reference.