sam4e8e: Add the SAM4e8e port
This can be flashed to e.g. the duet wifi using bossac. It requires a later version as is currently included in the klipper repo (1.8 vs. 1.2). Comms are currently via UART0 only, USB serial is still TBD Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
This commit is contained in:
committed by
Kevin O'Connor
parent
d15c106288
commit
64e6d85898
37
src/sam4e8e/Makefile
Normal file
37
src/sam4e8e/Makefile
Normal file
@@ -0,0 +1,37 @@
|
||||
# Additional sam4e8e build rules
|
||||
|
||||
# Setup the toolchain
|
||||
CROSS_PREFIX=arm-none-eabi-
|
||||
dirs-y += src/sam4e8e src/generic
|
||||
|
||||
CFLAGS += -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard
|
||||
CFLAGS += -D__SAM4E8E__
|
||||
|
||||
CFLAGS_klipper.elf += -L lib/cmsis-sam4e/gcc/gcc
|
||||
CFLAGS_klipper.elf += -T lib/cmsis-sam4e/gcc/gcc/sam4e8e_flash.ld
|
||||
CFLAGS_klipper.elf += --specs=nano.specs --specs=nosys.specs
|
||||
|
||||
dirs-y += lib/cmsis-sam4e/gcc \
|
||||
lib/cmsis-sam4e/gcc/gcc
|
||||
CFLAGS += -Ilib/cmsis-sam4e/include \
|
||||
-Ilib/cmsis-core
|
||||
src-y += ../lib/cmsis-sam4e/gcc/system_sam4e.c \
|
||||
../lib/cmsis-sam4e/gcc/gcc/startup_sam4e.c
|
||||
|
||||
src-$(CONFIG_HAVE_GPIO_SPI) += sam4e8e/spi.c
|
||||
src-$(CONFIG_SERIAL) += sam4e8e/serial.c generic/serial_irq.c
|
||||
src-$(CONFIG_HAVE_GPIO) += sam4e8e/gpio.c
|
||||
src-y += generic/crc16_ccitt.c generic/alloc.c
|
||||
src-y += generic/armcm_irq.c generic/timer_irq.c
|
||||
src-y += sam4e8e/main.c sam4e8e/timer.c
|
||||
|
||||
# Build the additional hex output file
|
||||
target-y += $(OUT)klipper.bin
|
||||
|
||||
$(OUT)klipper.bin: $(OUT)klipper.elf
|
||||
@echo " Creating bin file $@"
|
||||
$(Q)$(OBJCOPY) -O binary $< $@
|
||||
|
||||
flash: $(OUT)klipper.bin
|
||||
@echo " Flashing $^ to $(FLASH_DEVICE) via bossac"
|
||||
$(Q)tools/bossa/bin/bossac --port="$(FLASH_DEVICE)" -b -U -e -w -v $(OUT)klipper.bin -R
|
||||
Reference in New Issue
Block a user