2020-12-14 03:02 AM
Hi,
I have created a CubeMx project for STM32F042K6. I am using following components:
I just defined the pins and tried to compile but compiler says FLASH overflows around 2.5K
I didn't even write one line of code. Then I realized USB HID library takes a lot of space (around 21K) on the FLASH.
How can I reduce this size? Is there anyway to use it as Keyboard+Mouse without using entire library? Or is there any 'Lite' libray for USB HID?
Thanks
Solved! Go to Solution.
2020-12-14 04:22 AM
2020-12-14 04:22 AM
Hello
Change compiler optimizations for smaller code.
2020-12-14 04:52 AM
Thanks! It solved the problem. Code size reduced to half (around 16K). Does this method has any side effects?
2020-12-14 06:51 AM
hello
When reduce size , depending on the code, results varies. May observed slower execution.