Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
yangyong
Level 5
Level 5
Distributor - Jingchuan(GC)
5 comments on blog First comment on blog 50 questions asked

My program has exceeded the flash capacity of the chip. How can I optimize the library. How can I remove some unnecessary things, such as CapSense? I can't tick off CapSense in library manager。How can I only use PDL ?  thanks!

yoya_4785701_1-1652693011645.png

 

 

0 Likes
1 Solution
Panometric
Level 5
Level 5
100 sign-ins 100 replies posted 10 solutions authored

With the exception of BLE binaries, all the libraries are source code, so setting your gdb compiler optimization on the makefile should apply to all your code and those libraries you included. 

Those libraries are locked because the device you have requires them, many are dependent on each other. For example the PDL uses the HAL, so they can't be excluded in the library manager. But your compiler will leave out anything you do not actually use, so it should not matter.  

In makefile, use CFLAGS and CXXFLAGS: Add -Os or -Oz 
https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html

 

View solution in original post

0 Likes
1 Reply
Panometric
Level 5
Level 5
100 sign-ins 100 replies posted 10 solutions authored

With the exception of BLE binaries, all the libraries are source code, so setting your gdb compiler optimization on the makefile should apply to all your code and those libraries you included. 

Those libraries are locked because the device you have requires them, many are dependent on each other. For example the PDL uses the HAL, so they can't be excluded in the library manager. But your compiler will leave out anything you do not actually use, so it should not matter.  

In makefile, use CFLAGS and CXXFLAGS: Add -Os or -Oz 
https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html

 

0 Likes