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 <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruscinski 2021-05-17 11:06:14 +02:00 committed by Kumar Gala
commit d2f48ac35d

View file

@ -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), \