Skip to content

Commit

Permalink
logging: set 'log_backend_rtt:panic_mode' before 'log_backend_std_panic'
Browse files Browse the repository at this point in the history
Set 'log_backend_rtt:panic_mode' before calling 'log_backend_std_panic',
because otherwise the RTT backend behaves as if the system is NOT
panicking and tries to do asynchronous writes via RTT_LOCK/UNLOCK.

Signed-Off-By: Andrew Fernandes <andrew@fernandes.org>
  • Loading branch information
adfernandes authored and carlescufi committed May 28, 2020
1 parent 79ff37b commit 4653b4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subsys/logging/log_backend_rtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ static void log_backend_rtt_init(void)

static void panic(struct log_backend const *const backend)
{
log_backend_std_panic(&log_output);
panic_mode = true;
log_backend_std_panic(&log_output);
}

static void dropped(const struct log_backend *const backend, u32_t cnt)
Expand Down

0 comments on commit 4653b4e

Please sign in to comment.