From c24758dfc58016dd0225a3806a636fda03fa0920 Mon Sep 17 00:00:00 2001 From: Joseph Coffland Date: Sun, 22 Jan 2017 16:03:27 -0800 Subject: [PATCH] xboot -> boot --- avr/Makefile | 16 ++++++++-------- avr/src/{xboot/xboot.c => boot/boot.c} | 2 +- avr/src/{xboot/xboot.h => boot/boot.h} | 0 avr/src/{xboot => boot}/sp_driver.S | 0 avr/src/{xboot => boot}/sp_driver.h | 0 avr/src/drv8711.c | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) rename avr/src/{xboot/xboot.c => boot/boot.c} (99%) rename avr/src/{xboot/xboot.h => boot/boot.h} (100%) rename avr/src/{xboot => boot}/sp_driver.S (100%) rename avr/src/{xboot => boot}/sp_driver.h (100%) diff --git a/avr/Makefile b/avr/Makefile index 89e0930..a332d06 100644 --- a/avr/Makefile +++ b/avr/Makefile @@ -47,8 +47,8 @@ SRC += $(wildcard src/plan/*.c) OBJ = $(patsubst src/%.c,build/%.o,$(SRC)) # Boot SRC -BOOT_SRC = $(wildcard src/xboot/*.S) -BOOT_SRC += $(wildcard src/xboot/*.c) +BOOT_SRC = $(wildcard src/boot/*.S) +BOOT_SRC += $(wildcard src/boot/*.c) BOOT_OBJ = $(patsubst src/%.c,build/%.o,$(BOOT_SRC)) BOOT_OBJ := $(patsubst src/%.S,build/%.o,$(BOOT_OBJ)) @@ -57,7 +57,7 @@ BOOT_LDFLAGS = $(LDFLAGS) -Wl,--section-start=.text=0x030000 # Build all: $(PROJECT).hex build/vars.json boot size -boot: xboot.hex boot-size +boot: boot.hex boot-size build/vars.json: src/vars.def @@ -77,7 +77,7 @@ build/%.o: src/%.S $(TARGET): $(OBJ) $(CC) $(LDFLAGS) $(OBJ) $(LIBS) -o $@ -xboot.elf: $(BOOT_OBJ) +boot.elf: $(BOOT_OBJ) $(CC) $(BOOT_LDFLAGS) $(BOOT_OBJ) -o $@ %.hex: %.elf @@ -95,7 +95,7 @@ _size: avr-size -$$X --mcu=$(MCU) $(SIZE_TARGET) ;\ done -boot-size: xboot.elf +boot-size: boot.elf @$(MAKE) SIZE_TARGET=$< _size size: $(TARGET) @@ -120,8 +120,8 @@ program: $(PROJECT).hex verify: $(PROJECT).hex avrdude $(AVRDUDE_OPTS) -U flash:v:$(PROJECT).hex:i -program-boot: xboot.hex - avrdude $(AVRDUDE_OPTS) -U flash:w:xboot.hex:i +program-boot: boot.hex + avrdude $(AVRDUDE_OPTS) -U flash:w:boot.hex:i fuses: avrdude $(AVRDUDE_OPTS) -U fuse0:w:$(FUSE0):m -U fuse1:w:$(FUSE1):m \ @@ -146,7 +146,7 @@ tidy: clean: tidy rm -rf $(PROJECT).elf $(PROJECT).hex $(PROJECT).eep $(PROJECT).lss \ - $(PROJECT).map build xboot.hex xboot.elf + $(PROJECT).map build boot.hex boot.elf .PHONY: tidy clean size all reset erase program fuses read_fuses prodsig .PHONY: signature usersig diff --git a/avr/src/xboot/xboot.c b/avr/src/boot/boot.c similarity index 99% rename from avr/src/xboot/xboot.c rename to avr/src/boot/boot.c index e2d700f..ff66553 100644 --- a/avr/src/xboot/xboot.c +++ b/avr/src/boot/boot.c @@ -26,7 +26,7 @@ \******************************************************************************/ -#include "xboot.h" +#include "boot.h" #include "sp_driver.h" #include diff --git a/avr/src/xboot/xboot.h b/avr/src/boot/boot.h similarity index 100% rename from avr/src/xboot/xboot.h rename to avr/src/boot/boot.h diff --git a/avr/src/xboot/sp_driver.S b/avr/src/boot/sp_driver.S similarity index 100% rename from avr/src/xboot/sp_driver.S rename to avr/src/boot/sp_driver.S diff --git a/avr/src/xboot/sp_driver.h b/avr/src/boot/sp_driver.h similarity index 100% rename from avr/src/xboot/sp_driver.h rename to avr/src/boot/sp_driver.h diff --git a/avr/src/drv8711.c b/avr/src/drv8711.c index 7788334..71b840a 100644 --- a/avr/src/drv8711.c +++ b/avr/src/drv8711.c @@ -233,7 +233,7 @@ static void _init_spi_commands() { // Set DECAY commands[spi.ncmds++] = - DRV8711_WRITE(DRV8711_DECAY_REG, DRV8711_DECAY_DECMOD_OPT | 6); + DRV8711_WRITE(DRV8711_DECAY_REG, DRV8711_DECAY_DECMOD_AUTO_OPT | 6); // Set STALL commands[spi.ncmds++] = -- 2.27.0