From 71bb7acb8e9ec5a9838d60604ac9e74614e234b4 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 14 Aug 2017 13:59:41 -0400 Subject: [PATCH] pru: Compile with -Os instead of -O2 The gcc -Os option significantly reduces the size of the PRU binary and it has little impact on performance. Signed-off-by: Kevin O'Connor --- docs/Features.md | 2 +- src/pru/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Features.md b/docs/Features.md index 49980118..9c718977 100644 --- a/docs/Features.md +++ b/docs/Features.md @@ -86,7 +86,7 @@ represent total number of steps per second on the micro-controller. | 20Mhz AVR | 189K | 125K | | 16Mhz AVR | 151K | 100K | | Arduino Due (ARM) | 382K | 337K | -| Beaglebone PRU | 689K | 689K | +| Beaglebone PRU | 680K | 680K | On AVR platforms, the highest achievable step rate is with just one stepper stepping. On the Due, the highest step rate is with two diff --git a/src/pru/Makefile b/src/pru/Makefile index ae70a7da..38f262ec 100644 --- a/src/pru/Makefile +++ b/src/pru/Makefile @@ -6,7 +6,7 @@ CROSS_PREFIX=pru- dirs-y += src/pru src/generic dirs-y += lib/pru_rpmsg -CFLAGS += -minrt -mmcu=am335x.pru1 +CFLAGS += -Os -minrt -mmcu=am335x.pru1 CFLAGS += -Ilib/pru_rpmsg/include -Ilib/pru_rpmsg/include/am335x CFLAGS_klipper.elf := $(filter-out -mmcu=%, $(CFLAGS))