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

Optimize code space,nRF52810,s112,SDK15.2.0,example ble_app_hids_keyboard

hi,i have a problem! How to Optimize code space in nRF52810,s112,SDK15.2.0,example ble_app_hids_keyboard.

my method is that disable all the code which run in main function and disable some modules in sdk_config.h. but there is also so many code(also have 21kB) occupy my flash as below.

i want to reduce some code in sdk_config.h but the modules which is necessary for me. 

How can i reduce the code in each module??? 

  

  • I do not know what modules you need or do not need for your specific application. I suggest you turn off modules that you suspect might not be necessary and see if anything breaks. 

    Usually the Board Support Package, Log modules, and their associated drivers and libraries are the first things to go. Since you're using the keyboard example I assume you're going to use buttons. In that case I suggest you keep the app_button library. 

    You should also turn on your compilers code size optimization. 

Related