<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[wolfSSL - Embedded SSL Library — crash in wc_InitRng_ex() on embedded Arm Cortex M7]]></title>
	<link rel="self" href="https://www.wolfssl.com/forums/feed-atom-topic2167.xml" />
	<updated>2024-09-11T23:57:31Z</updated>
	<generator>PunBB</generator>
	<id>https://www.wolfssl.com/forums/topic2167-crash-in-wcinitrngex-on-embedded-arm-cortex-m7.html</id>
		<entry>
			<title type="html"><![CDATA[Re: crash in wc_InitRng_ex() on embedded Arm Cortex M7]]></title>
			<link rel="alternate" href="https://www.wolfssl.com/forums/post7841.html#p7841" />
			<content type="html"><![CDATA[<p>Hi dcanthony,</p><p>How much stack are you giving wolfSSL?&nbsp; A very common source of crashes/issues is insufficient stack, wolfSSL generally needs about 20-30KB of stack.&nbsp; As you are on an embedded system I would also recommend defining WOLFSSL_SMALL_STACK.<br />You may also be running into issues with entropy from your RNG or your RNG in general.&nbsp; Are you confident your RNG is functioning correctly?</p><p>You are correct that you&#039;ll usually need additional defines for your RNG, I am not seeing a seed generation function for your platform&#039;s RNG so you will need to define your own.</p><p>I recommend basing your user_settings.h off of our template here: <a href="https://github.com/wolfSSL/wolfssl/blob/master/examples/configs/user_settings_template.h">https://github.com/wolfSSL/wolfssl/blob … template.h</a><br />You will want to define your own seed generation function with CUSTOM_RAND_GENERATE: <a href="https://github.com/wolfSSL/wolfssl/blob/master/examples/configs/user_settings_template.h#L424">https://github.com/wolfSSL/wolfssl/blob … ate.h#L424</a></p><p>Since you&#039;re able to see debug logging, if possible I would recommend upgrading to 5.7.2 and defining WOLFSSL_DEBUG_TRACE_ERROR_CODES in addition to DEBUG_WOLFSSL, this will print error and line numbers in our debug logs.&nbsp; This feature was added in 5.7.2 so you would need to upgrade for it.</p><p>It looks like you have an active support contract with us, can you follow up on this by emailing us at support [AT] wolfssl [DOT] com?&nbsp; Please provide debug logs and your user_settings.h as well.</p><p>Thanks,<br />Kareem</p>]]></content>
			<author>
				<name><![CDATA[kareem_wolfssl]]></name>
				<uri>https://www.wolfssl.com/forums/user4055.html</uri>
			</author>
			<updated>2024-09-11T23:57:31Z</updated>
			<id>https://www.wolfssl.com/forums/post7841.html#p7841</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[crash in wc_InitRng_ex() on embedded Arm Cortex M7]]></title>
			<link rel="alternate" href="https://www.wolfssl.com/forums/post7839.html#p7839" />
			<content type="html"><![CDATA[<p>I&#039;m trying to run the wolfSSL crypto benchmarks on an NXP S32G3.&nbsp; The S32G3 has several Arm Cortex M7 cores.</p><p>1.&nbsp; WolfSSL version is 5.7.0<br />2.&nbsp; Running on Bare Metal, No OS<br />3.&nbsp; Compiler - NXP S32 Design Studio version 3.5&nbsp; </p><p>My code is crashing in the wc_InitRng_ex() function.</p><p>I can&#039;t use printf() for typical debug information, since my only connection to the device is via a putty terminal interface over UART.&nbsp; The call to wc_InitRng_ex() fails in such a way that I don&#039;t even get any feedback messages.&nbsp; Yet, I think the failure occurs inside this function because if I comment out this function call then I see debug messages that come after this.</p><p>I suspect solving my problem may be related to correctly configuring the device in the user_settings.h file.&nbsp; I&#039;m just not sure what #defines I need to set or not set.</p><p>BTW- everything runs just fine for me when compiling in Visual Studio and running on Windows.&nbsp; Unfortunately, I really need benchmarks on the M7.</p>]]></content>
			<author>
				<name><![CDATA[dcanthony]]></name>
				<uri>https://www.wolfssl.com/forums/user5519.html</uri>
			</author>
			<updated>2024-09-11T20:13:21Z</updated>
			<id>https://www.wolfssl.com/forums/post7839.html#p7839</id>
		</entry>
</feed>
