Firmware oversize

Basic Information:

Printer Model: Any
MCU / Printerboard: Custom
Host / SBC: x64
klippy.log: Not required

Greetings! When creating firmware for STM32F103… with 32 kb memory, the firmware takes up 33 kb and cannot be loaded into the microcontroller. When creating firmware for some AVRs, it is possible to disable functions to reduce the size of the firmware, any ideas on how to add this function for other microcontrollers? Thank you!

Or how can I disable unused modules myself?

This is bit of a far shot but try to modify:

into

select HAVE_LIMITED_CODE_SIZE if MACH_STM32F031 || MACH_STM32F042 || MACH_STM32F1

Don’t blame me, if aliens abduct your dog afterwards. Not sure if further modifications would be needed to accomodate for this MCU variant.

1 Like

I haven’t flashed or tested it yet, but your advice helped reduce the firmware to 31 kb!!! (I just disabled “eddy” support). Since this board is auxiliary (on the CAN bus), I plan to disable unnecessary “modules” from the firmware for it (possibly for the main board as well). I deviated a little from your advice, instead of “MACH_STM32F1” i added “MACH_STM32F103”. Please do not close this topic quickly, there are no tests yet! Thank you! PS: Aliens didn’t abducting my Dog, they said “No Klipper - no interest !!!”.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.