Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is posible reduce size of the final binary ? #120

Open
semos2k opened this issue Apr 27, 2024 · 2 comments
Open

Is posible reduce size of the final binary ? #120

semos2k opened this issue Apr 27, 2024 · 2 comments

Comments

@semos2k
Copy link

semos2k commented Apr 27, 2024

Hi, i used katapult on multiples MCU and work great, but i tried on stm32f042 this contains 32kb flash. I tried to compile katapult using application start offset 4k but final binary is more large than this size. My intention is install klipper but the size of the binary and katapult is more than 32k.

Is posible reduce this binary ? reduce the number off features ?

@WegnerDan
Copy link

I have the same issue. Trying to build katapult for the voron 0 display and expander MCUs.

The "Initial Release" has some compiled binaries that are below 4096 byte, but I'm wondering if this is still doable

image

make output
  Creating symbolic link out/board
  Building out/autoconf.h
  Compiling out/src/sched.o
  Compiling out/src/bootentry.o
  Compiling out/src/command.o
  Compiling out/src/flashcmd.o
  Compiling out/src/generic/armcm_canboot.o
  Compiling out/src/initial_pins.o
  Compiling out/src/stm32/gpio.o
  Compiling out/src/stm32/flash.o
  Compiling out/src/stm32/clockline.o
  Compiling out/src/stm32/dfu_reboot.o
  Compiling out/src/generic/armcm_irq.o
  Compiling out/src/generic/crc16_ccitt.o
  Compiling out/src/../lib/stm32f0/system_stm32f0xx.o
  Compiling out/src/stm32/stm32f0.o
  Compiling out/src/stm32/stm32f0_timer.o
  Compiling out/src/stm32/gpioperiph.o
  Compiling out/src/stm32/usbfs.o
  Compiling out/src/stm32/chipid.o
  Compiling out/src/generic/usb_cdc.o
  Preprocessing out/src/generic/armcm_link.ld
  Compiling out/src/deployer.o
  Compiling out/src/generic/armcm_boot.o
  Compiling out/src/generic/armcm_reset.o
  Preprocessing out/src/generic/armcm_deployer.ld
  Building out/compile_time_request.o
  Linking out/katapult.elf
  Building out/deployer_ctr.o
  Creating bin file out/katapult.bin

The Katapult binary is too large for the configured LAUNCH_APP_ADDRESS.

Rerun "make menuconfig" and either increase the LAUNCH_APP_ADDRESS or
disable features to reduce the final binary size.

Maximum size 4096. Current size 4328.

make: *** [Makefile:85: out/katapult.bin] Error 255

@WegnerDan
Copy link

I was able to flash the old canboot binary from "Initial Release" and use it to update klipper on the v0 display and klipper expander MCUs. Now the boot jumper isn't necessary anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants