This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

what kind of data saved in .text in flash memory?

Hello, 

The flash memory of my existing project originally occupied about 200kb, but suddenly the capacity increased to about 255kb.

So I checked and found that the amount of .text has doubled.

I don't remember exactly what I touched in the process of increasing the capacity.

What causes this increase and what data is stored in .text?

1)                                                                                        2)

    

  • Hello,

    I don't remember exactly what I touched in the process of increasing the capacity.

    What causes this increase and what data is stored in .text?

    Since this memory segment is where the logger statements is stored it is likely that you either have changed the overall logging level (NRF_LOG_DEFAULT_LEVEL) or that you have enabled new modules with more loggings.
    For instance, if you add a module to your project, and dont specifically set its logging level, it will use the default level. If the default level is 4, the logger will need to store all NRF_LOG_* messages in the entire module.
    If you have not enabled new modules recently, then you will need to look at the amount of NRF_LOG_* statements you have added to your project.

    If you want to reduce the size of this memory segment, please try to reduce the logging level for specific modules (by changing their logging severity, such as SAADC_CONFIG_LOG_LEVEL for example), or change the default logging level for your entire project (NRF_LOG_DEFAULT_LEVEL). If you want to remove this memory segment all together, you will have to disable logging in your project.

    Best regards,
    Karl

Related