Skip to content

Commit e5b09ec

Browse files
jaz1-nordicrlubos
authored andcommitted
applications: sdp: mspi: Add custom assert_post_action() implementation
Added own assert_post_action() function implementation to make it possible to test trap_handler using _ASSERT. Signed-off-by: Jakub Zymelka <[email protected]>
1 parent 0bc7031 commit e5b09ec

File tree

1 file changed

+17
-0
lines changed
  • applications/sdp/mspi/src

1 file changed

+17
-0
lines changed

applications/sdp/mspi/src/main.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,23 @@ void init_trap_handler(void)
676676
: "r"(trap_entry_addr));
677677
}
678678

679+
#if defined(CONFIG_ASSERT)
680+
#ifdef CONFIG_ASSERT_NO_FILE_INFO
681+
void assert_post_action(void)
682+
#else
683+
void assert_post_action(const char *file, unsigned int line)
684+
#endif
685+
{
686+
#ifndef CONFIG_ASSERT_NO_FILE_INFO
687+
ARG_UNUSED(file);
688+
ARG_UNUSED(line);
689+
#endif
690+
691+
/* force send trap_handler signal */
692+
trap_entry();
693+
}
694+
#endif
695+
679696
int main(void)
680697
{
681698
int ret = 0;

0 commit comments

Comments
 (0)