From d93e3ea38be29e99321ea4cabe4a8139967baa7e Mon Sep 17 00:00:00 2001 From: Joseph Coffland Date: Fri, 13 Jan 2017 17:21:42 -0800 Subject: [PATCH] Define VERSION in Makefile, other minor changes --- Makefile | 25 +++++++++++-------------- src/config.h | 9 +++------ 2 files changed, 14 insertions(+), 20 deletions(-) diff --git a/Makefile b/Makefile index 4611331..ed6910d 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,8 @@ # Makefile for the project Bulidbotics firmware -PROJECT = buildbotics +PROJECT = bbctrl-avr-firmware MCU = atxmega192a3u CLOCK = 32000000 +VERSION = 0.3.1 TARGET = $(PROJECT).elf @@ -17,7 +18,7 @@ CFLAGS += -Wno-error=strict-aliasing # for _invsqrt CFLAGS += -std=gnu99 -DF_CPU=$(CLOCK)UL -O3 #-funroll-loops CFLAGS += -funsigned-bitfields -fpack-struct -fshort-enums -funsigned-char CFLAGS += -MD -MP -MT $@ -MF build/dep/$(@F).d -CFLAGS += -Isrc +CFLAGS += -Isrc -DVERSION=\"$(VERSION)\" # Linker flags LDFLAGS += $(COMMON) -Wl,-u,vfprintf -lprintf_flt -lm @@ -82,21 +83,17 @@ xboot.elf: $(BOOT_OBJ) %.lss: %.elf avr-objdump -h -S $< > $@ +_size: + @for X in A B C; do\ + echo '****************************************************************' ;\ + avr-size -$$X --mcu=$(MCU) $(SIZE_TARGET) ;\ + done + boot-size: xboot.elf - @echo '********************************************************************' - @avr-size -A --mcu=$(MCU) xboot.elf - @echo '********************************************************************' - @avr-size -B --mcu=$(MCU) xboot.elf - @echo '********************************************************************' - @avr-size -C --mcu=$(MCU) xboot.elf + @$(MAKE) SIZE_TARGET=$< _size size: $(TARGET) - @echo '********************************************************************' - @avr-size -A --mcu=$(MCU) $(TARGET) - @echo '********************************************************************' - @avr-size -B --mcu=$(MCU) $(TARGET) - @echo '********************************************************************' - @avr-size -C --mcu=$(MCU) $(TARGET) + @$(MAKE) SIZE_TARGET=$< _size # Program init: diff --git a/src/config.h b/src/config.h index 8183ad5..5255a0c 100644 --- a/src/config.h +++ b/src/config.h @@ -32,9 +32,6 @@ #include -#define VERSION "0.3.0" - - // Pins enum { STALL_X_PIN = PORT_A << 3, @@ -111,7 +108,7 @@ enum { // Motor settings. See motor.c #define MOTOR_MAX_CURRENT 1.0 // 1.0 is full power -#define MOTOR_MIN_CURRENT 0.15 // 1.0 is full power +#define MOTOR_MIN_CURRENT 0.25 // 1.0 is full power #define MOTOR_IDLE_CURRENT 0.05 // 1.0 is full power #define MOTOR_STALL_THRESHOLD 0 // 0 -> 1 is least -> most sensitive #define MOTOR_MICROSTEPS 32 @@ -157,7 +154,7 @@ enum { //#define STEP_CORRECTION // Enable step correction #define MAX_STEP_CORRECTION 4 // In steps per segment #define CHORDAL_TOLERANCE 0.01 // chordal accuracy for arcs -#define JERK_MAX 50 // yes, that's km/min^3 +#define JERK_MAX 5 // yes, that's km/min^3 #define JUNCTION_DEVIATION 0.05 // default value, in mm #define JUNCTION_ACCELERATION 100000 // centripetal corner accel #define JOG_JERK_MULT 4 // Jogging jerk multipler @@ -165,7 +162,7 @@ enum { #define CAL_ACCELERATION 500000 // mm/min^2 // Axis settings -#define VELOCITY_MAX 10000 // mm/min +#define VELOCITY_MAX 13000 // mm/min #define FEEDRATE_MAX VELOCITY_MAX #define X_VELOCITY_MAX VELOCITY_MAX // G0 max velocity in mm/min -- 2.27.0