<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hard fault handler issue (HardfaultHandler.S)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80786/hard-fault-handler-issue-hardfaulthandler-s</link><description>Hello All, 
 I am developing an nRF52840 MCU base thread product. 
 For this I am using nRF52840-Dev_kit for Development and SDK - nRF5_SDK_for_Thread_and_Zigbee_v4.0.0_dc7186b. 
 For my project, I am going to use an external COAP server stack and this</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 22 Oct 2021 03:24:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80786/hard-fault-handler-issue-hardfaulthandler-s" /><item><title>RE: Hard fault handler issue (HardfaultHandler.S)</title><link>https://devzone.nordicsemi.com/thread/335386?ContentTypeID=1</link><pubDate>Fri, 22 Oct 2021 03:24:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8483a8b-e43f-4d41-a5bf-9245d2dcb386</guid><dc:creator>Rohit Rajapure</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Edvin,&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you for the support,&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have resolved the hard fault problem.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have replaced the startup_ARMCM_GCC.s file with gcc_startup_nrf52840.s file and code got built successfully and able to run thread_init() function.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you for the support.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In case of any queries in further development, I will get back to you.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks and Regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Rohit R&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hard fault handler issue (HardfaultHandler.S)</title><link>https://devzone.nordicsemi.com/thread/334968?ContentTypeID=1</link><pubDate>Wed, 20 Oct 2021 03:35:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4aca58fa-cd28-4032-8f79-fbdaf0e4e58c</guid><dc:creator>Rohit Rajapure</dc:creator><description>&lt;p&gt;Hi Edvin,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for the response,&amp;nbsp;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/80786/hard-fault-handler-issue-hardfaulthandler-s/334911#334911"]I am not familiar with these KNX libraries, unfortunately. What do they do? Are they controlling any hardware registers? If so, are you sure that they will work on the nRF?&amp;nbsp;[/quote]
&lt;p&gt;- yeah, I know you guys don&amp;#39;t know about the KNX so didn&amp;#39;t mention it in the code. It is the latter part that I will take care of. You do not need to worry about the KNX part.&amp;nbsp;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/80786/hard-fault-handler-issue-hardfaulthandler-s/334911#334911"]I assume the project that you sent here is not made by modifying one of the examples from SDK4.0.0, since they have the different startup files? I suggest that you start with one of the examples, and then try to add the external library.[/quote]
&lt;p&gt;- I tried in the initial stage of development to build the code using an inbuilt example. But as I told there are C++ libraries in KNX (again in the latter part not included in current code because we are going step by step increment) that are not supported by the inbuilt segger toolchain.&amp;nbsp;So, we built the code using an external toolchain.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- Second, yes, I got the start-up difference, so I thought this was the main problem for hard fault where ISR is not handled correctly. I compared both the ses_startup file and ARMC_GCC startup file there is a difference in vector table ISR include.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you tell me how I can link the segger startup files in the code with an external toolchain and build/develop the code successfully.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Or let me know how to handle this ISR in start-up file means a procedure to include ISR in vector table and assigning handler to them like ses_startup file.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I think if I map the start-up file correctly, maybe we can run the code without a hard fault issue.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Again, I can not use inbuilt code to develop KNX libraries because of differences and since we are going step by step increment in current code KNX is not included. So let me know the finding cause for hard fault and resolving procedure.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for understanding&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Rohit R&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hard fault handler issue (HardfaultHandler.S)</title><link>https://devzone.nordicsemi.com/thread/334911?ContentTypeID=1</link><pubDate>Tue, 19 Oct 2021 13:32:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a91313d-dd0b-4d33-a269-1785fb8f4e06</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am not familiar with these KNX libraries, unfortunately. What do they do? Are they controlling any hardware registers? If so, are you sure that they will work on the nRF?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I assume the project that you sent here is not made by modifying one of the examples from SDK4.0.0, since they have the different startup files? I suggest that you start with one of the examples, and then try to add the external library. If that is what you did, when/why did you change the startup files?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>