About how to disable CONFIG_THREAD_LOCAL_STORAGE

Hi,

When I was developing, I found that the matter sample is a little different from the Bluetooth sample.

I want to disable CONFIG_THREAD_LOCAL_STORAGE  in the Bluetooth sample,  but I can't.

The matter sample is closed by default.

In the Bluetooth example, this config is locked. 

I also tried to add config.But failed.

CONFIG_THREAD_LOCAL_STORAGE=n
CONFIG_CURRENT_THREAD_USE_TLS=n

I want to reduce memory consumption. How do I close this CONFIG_THREAD_LOCAL_STORAG in Bluetooth project?

Parents
  • What makes you think that disabling CONFIG_THREAD_LOCAL_STORAGE in a BLE project reduces the memory consumption?

    I believe it is forcefully selected by this one:

    # force TLS when using toolchain with TLS support
    config PICOLIBC_USE_TOOLCHAIN
    	bool "Picolibc from toolchain"
    	depends on "$(TOOLCHAIN_HAS_PICOLIBC)" = "y"
    	select THREAD_LOCAL_STORAGE if ARCH_HAS_THREAD_LOCAL_STORAGE && TOOLCHAIN_SUPPORTS_THREAD_LOCAL_STORAGE
    	help
    	  Use picolibc included with the toolchain.
    	  This is required when using a full C++ standard library (`REQUIRES_FULL_LIBCPP=y`).

    (NCS\zephyr\lib\libc\picolib\Kconfig)

    But I don't think I would spend too much time trying to disable this. 

    What is the actual issue that you are seeing? Why do you need to reduce the memory consumption of your bluetooth project?

    Best regards,

    Edvin

Reply
  • What makes you think that disabling CONFIG_THREAD_LOCAL_STORAGE in a BLE project reduces the memory consumption?

    I believe it is forcefully selected by this one:

    # force TLS when using toolchain with TLS support
    config PICOLIBC_USE_TOOLCHAIN
    	bool "Picolibc from toolchain"
    	depends on "$(TOOLCHAIN_HAS_PICOLIBC)" = "y"
    	select THREAD_LOCAL_STORAGE if ARCH_HAS_THREAD_LOCAL_STORAGE && TOOLCHAIN_SUPPORTS_THREAD_LOCAL_STORAGE
    	help
    	  Use picolibc included with the toolchain.
    	  This is required when using a full C++ standard library (`REQUIRES_FULL_LIBCPP=y`).

    (NCS\zephyr\lib\libc\picolib\Kconfig)

    But I don't think I would spend too much time trying to disable this. 

    What is the actual issue that you are seeing? Why do you need to reduce the memory consumption of your bluetooth project?

    Best regards,

    Edvin

Children
No Data
Related