This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Help with Kconfig autoconf

Hi, I am new to Zephyr and Nrf, I am trying to replicate the event manager arch from asset tracker v2 but I am stuck in the setup. I am trying to use the logging capacities as in the example but trying to use 

LOG_MODULE_REGISTER(MODULE, CONFIG_APPLICATION_MODULE_LOG_LEVEL); 
CONFIG_APPLICATION_MODULE_LOG_LEVEL is not defined.

In the example this variable is generated in autoconf.h but I don't know how.
This is mi Kconfig file

menu "Playground"

config APPLICATION_WORKQUEUE_STACK_SIZE
	int "Application workqueue stack size"
	default 4096

config APPLICATION_WORKQUEUE_PRIORITY
	int "Application workqueue priority"
	default SYSTEM_WORKQUEUE_PRIORITY

endmenu

menu "Zephyr Kernel"
source "Kconfig.zephyr"
endmenu

module = PLAYGROUND
module-str = Playground
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config"

and this is my .conf file

#General config
CONFIG_LOG=y
CONFIG_LOG_MODE_IMMEDIATE=y

#Modules config
CONFIG_GPIO=y

thanks for your help
  • Hello,

    what version of NCS is this?

    In the example this variable is generated in autoconf.h but I don't know how.

    What variable?

  • CONFIG_APPLICATION_MODULE_LOG_LEVEL is the macro I don't know how it generates,  i think that if I add to the Kconfig file, that config will generate the macro but no options appear in the menuconfig related to that template. NCS 1.7.0

    module = UTIL_MODULE
    module-str = Utility module
    source "subsys/logging/Kconfig.template.log_config"
  • I found where the configuration comes from, it si from adding this 

    module = UI_MODULE
    module-str = User Interface module
    source "subsys/logging/Kconfig.template.log_config"
    for some reason using source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config" didnt do the job

Related