<p></p>
<blockquote>
<p>Thanks for your advice! I try to run BOARD=nrf52840dk make debug. However, there is a error —"Cannot find bounds of current function" when I debug the code step by step. the output is as below.</p>
</blockquote>
<p>Try running the code without stepping manually, I would usually do:</p>
<pre><code>>monitor reset
>continue
# Hardfault should be reached, now show backtrace
> bt
</code></pre>
<p>Other thing to consider is the message <code>Context before hardfault</code>  should probably print a message that says:</p>
<blockquote>
<p>Attempting to reconstruct state for debugging...</p>
</blockquote>
<p>Containing some instructions for you to insert on GDB to inspect where the hardfault happened.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/issues/16512#issuecomment-852192904">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYDFBSFO6KETED6SUY3TQTYG7ANCNFSM452IPFXQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABE7WYDURJFEG5GKX34BTHTTQTYG7A5CNFSM452IPFX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGLFW5CA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/issues/16512#issuecomment-852192904",
"url": "https://github.com/RIOT-OS/RIOT/issues/16512#issuecomment-852192904",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>