From d2f48ac35dada251b88a103960b49350e9a69209 Mon Sep 17 00:00:00 2001 From: Krzysztof Chruscinski Date: Mon, 17 May 2021 11:06:14 +0200 Subject: [PATCH] shell: log_backend: Add mpsc_pbuf buffer alignment Buffer used for storing log messages must be aligned as specified by Z_LOG_MSG2_ALIGNMENT. Added missing alignment. Signed-off-by: Krzysztof Chruscinski --- include/shell/shell_log_backend.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/shell/shell_log_backend.h b/include/shell/shell_log_backend.h index b1f87f933b7..14a737a1241 100644 --- a/include/shell/shell_log_backend.h +++ b/include/shell/shell_log_backend.h @@ -75,7 +75,7 @@ int z_shell_log_backend_output_func(uint8_t *data, size_t length, void *ctx); LOG_OUTPUT_DEFINE(_name##_log_output, z_shell_log_backend_output_func,\ _buf, _size); \ static struct shell_log_backend_control_block _name##_control_block; \ - static uint32_t _name##_buf[128]; \ + static uint32_t __aligned(Z_LOG_MSG2_ALIGNMENT) _name##_buf[128]; \ const struct mpsc_pbuf_buffer_config _name##_mpsc_buffer_config = { \ .buf = _name##_buf, \ .size = ARRAY_SIZE(_name##_buf), \