aboutsummaryrefslogtreecommitdiffstats
path: root/src/samd21/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/samd21/Makefile')
-rw-r--r--src/samd21/Makefile54
1 files changed, 0 insertions, 54 deletions
diff --git a/src/samd21/Makefile b/src/samd21/Makefile
deleted file mode 100644
index 24ef1e49..00000000
--- a/src/samd21/Makefile
+++ /dev/null
@@ -1,54 +0,0 @@
-# Additional samd21 build rules
-
-# Setup the toolchain
-CROSS_PREFIX=arm-none-eabi-
-
-dirs-y += src/samd21 src/generic
-dirs-y += lib/samd21/samd21a/gcc/gcc/
-
-CFLAGS += -mthumb -mcpu=cortex-m0plus
-CFLAGS += -Ilib/cmsis-core -Ilib/samd21/samd21a/include
-CFLAGS += -D__SAMD21G18A__
-
-CFLAGS_klipper.elf += -T $(OUT)samd21.ld
-CFLAGS_klipper.elf += --specs=nano.specs --specs=nosys.specs
-
-# Add source files
-src-y += samd21/main.c samd21/timer.c samd21/clock.c samd21/gpio.c
-src-y += generic/crc16_ccitt.c generic/alloc.c
-src-y += generic/armcm_irq.c generic/timer_irq.c
-src-y += ../lib/samd21/samd21a/gcc/gcc/startup_samd21.c
-src-$(CONFIG_USBSERIAL) += samd21/usbserial.c generic/usb_cdc.c
-src-$(CONFIG_SERIAL) += samd21/serial.c generic/serial_irq.c
-src-$(CONFIG_HAVE_GPIO_ADC) += samd21/adc.c
-src-$(CONFIG_HAVE_GPIO_I2C) += samd21/i2c.c
-src-$(CONFIG_HAVE_GPIO_SPI) += samd21/spi.c
-src-$(CONFIG_HAVE_GPIO_HARD_PWM) += samd21/hard_pwm.c
-
-# Support bootloader offset address
-target-y := $(OUT)samd21.ld $(target-y)
-
-$(OUT)samd21.ld: lib/samd21/samd21a/gcc/gcc/samd21g18a_flash.ld $(OUT)board-link
- @echo " Preprocessing $@"
- $(Q)$(CPP) -P -MD -MT $@ -DFLASH_START=$(CONFIG_FLASH_START) $< -o $@
-
-# Build the additional hex and bin output files
-target-y += $(OUT)klipper.bin $(OUT)klipper.elf.hex
-
-$(OUT)klipper.bin: $(OUT)klipper.elf
- @echo " Creating hex file $@"
- $(Q)$(OBJCOPY) -O binary $< $@
-
-$(OUT)klipper.elf.hex: $(OUT)klipper.elf
- @echo " Creating hex file $@"
- $(Q)$(OBJCOPY) -j .text -j .relocate -O ihex $< $@
-
-# Flash rules
-lib/bossac/bin/bossac:
- @echo " Building bossac"
- $(Q)make -C lib/bossac bin/bossac
-
-flash: $(OUT)klipper.bin lib/bossac/bin/bossac
- @echo " Flashing $^ to $(FLASH_DEVICE) via bossac"
- $(Q)if [ -z $(FLASH_DEVICE) ]; then echo "Please specify FLASH_DEVICE"; exit 1; fi
- $(Q)lib/bossac/bin/bossac -U -p "$(FLASH_DEVICE)" -a --offset=0x2000 -w $(OUT)klipper.bin -v -b -R