Hi i am new with Keil and it my question. I use u8g2 library with nRF52832. This library has a file with fonts in which there are many arrays of very large sizes but only one is used depending on the selected font. When I try to compile my project Keil is an error that the controller does not have enough space for the project is larger than 40MB which is logical since nRF52832 has only 65KB RAM and 512KB ROM. What can I do to Keil use only the currently used arrays and buffers and not all that are in the library's file?
Use "One ELF section per function", and make sure objects within the library are as small and separable as possible so the dead code removal can eliminate things which aren't used/touched.
Perhaps start by understanding why elements which you aren't using are being retained. Look at MAP files, dissect objects with FromELF to understand the content and interrelationships.
Engage the library developers where you pay for advise, support or consulting.