Skip to content
Commit 8c7aded4 authored by Christoph Winklhofer's avatar Christoph Winklhofer Committed by Benjamin Cabé
Browse files

logging: Assign module data to memory partition 'k_log_partition'



The logging module data is assigned to the memory partition
'k_log_partition' so that a user mode thread can access this data (see
k_mem_domain_add_thread()). The 'k_log_partition' is created when:
- CONFIG_USERSPACE=y
- CONFIG_LOG_ALWAYS_RUNTIME=y

The option CONFIG_NO_OPTIMIZATIONS=y forces the logging module to use
the runtime message creation CONFIG_LOG_ALWAYS_RUNTIME=y. This raises a
MPU violation when logging is used in a user mode thread since this
thread is not allowed to access the module data (e.g. __log_level,
__log_current_const_data).

Note that the user mode thread may also require access to the partition
'z_libc_partition'.

Signed-off-by: default avatarChristoph Winklhofer <cj.winklhofer@gmail.com>
parent 77925656
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment