Implications of multiple config's in Kconfig.

What are the implications of doing this in one of the Kconfig files in one of my modules?

should this override the first configuration of NFCT_IRQ_PRIORITY?
from my undersanding it shouldnt but when I try to check this with an example I create on my own, I get it overrides it.

this is how I tested it:


if it doesnt override the dependencies, then I shouldnt be able to get y on all of them, but when I check the .config file I see:


is this a bug? 

  • hey, sorry for the delayed response I missed your replay.
    I know I can do this with imply, but with imply I can only set a variables value to y dont I? 
    I cant set it to n or 4000, what do I do if I want to set it to n or 4000?

    I see. You can set some values to be dependent on others, like I showed in my last reply. E.g.:

    this is not a solution for me as I said in previous responses, I dont want to patch zephyr/nrf sdk for each variable that I want to set a new value to. you understand that if we are talking about a zephyr Kconfig, and lets say I want to set n or 4000 to 10 zephyr variables, your solution forces me to patch zephyr for each one, or am I wrong?

  • shlomots said:
    you understand that if we are talking about a zephyr Kconfig

    That wasn't clear to me, no. And you are correct. You can only set them to y using "imply" or "select". And if you are talking about Kconfigs already present in Zephyr/NCS, and not Kconfigs that you are creating yourself, you are correct. You would need to change these default declarations (which you might not want to do). 

    shlomots said:
    your solution forces me to patch zephyr for each one, or am I wrong?

    Yes, and I don't recommend it. Again, I thought we were discussing custom Kconfigs. 

    Best regards,

    Edvin

  • Ok, but does that mean that there is no way to achieve my objective?
    if my module uses zephyr Kconfig variables, and I want there values to be diffrent then y, my only option is to set the proper values from the prj.conf?
    thank you for all your time,
    shlomo

  • As far as I am aware, we have discussed all possible ways to do this. If you want to store different sets of configurations, you can store these in different prj.conf files, e.g configuration_a.conf and configuration_b.conf, and only include one of them at the time.

    You can use the CMake argument -DEXTRA_CONF_FILE=configuration_b.conf to add an extra .conf file on top of prj.conf. This means it will first include everything from prj.conf, and then read configuration_b.conf, which will overwrite the KConfigs from prj.conf. If a Kconfig that is set in prj.conf is not present in configuration_b.conf, then it will be left as it is in prj.conf.

    Best regards,

    Edvin

  • Ok, thank you for your time, we can close this ticket.

Related