src: Rename source folders for atsam and atsamd architectures
Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
This commit is contained in:
parent
432e6c490a
commit
6256599a6d
|
@ -13,9 +13,9 @@ choice
|
||||||
prompt "Micro-controller Architecture"
|
prompt "Micro-controller Architecture"
|
||||||
config MACH_AVR
|
config MACH_AVR
|
||||||
bool "Atmega AVR"
|
bool "Atmega AVR"
|
||||||
config MACH_SAM3
|
config MACH_ATSAM
|
||||||
bool "SAM3/SAM4 (Due and Duet)"
|
bool "SAM3/SAM4 (Due and Duet)"
|
||||||
config MACH_SAMD21
|
config MACH_ATSAMD
|
||||||
bool "SAMD21 (Arduino Zero)"
|
bool "SAMD21 (Arduino Zero)"
|
||||||
config MACH_LPC176X
|
config MACH_LPC176X
|
||||||
bool "LPC176x (Smoothieboard)"
|
bool "LPC176x (Smoothieboard)"
|
||||||
|
@ -30,8 +30,8 @@ choice
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
source "src/avr/Kconfig"
|
source "src/avr/Kconfig"
|
||||||
source "src/sam3/Kconfig"
|
source "src/atsam/Kconfig"
|
||||||
source "src/samd21/Kconfig"
|
source "src/atsamd/Kconfig"
|
||||||
source "src/lpc176x/Kconfig"
|
source "src/lpc176x/Kconfig"
|
||||||
source "src/stm32f1/Kconfig"
|
source "src/stm32f1/Kconfig"
|
||||||
source "src/pru/Kconfig"
|
source "src/pru/Kconfig"
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# Kconfig settings for SAM3/SAM4 processors
|
# Kconfig settings for Atmel SAM processors
|
||||||
|
|
||||||
if MACH_SAM3
|
if MACH_ATSAM
|
||||||
|
|
||||||
config SAM3_SELECT
|
config ATSAM_SELECT
|
||||||
bool
|
bool
|
||||||
default y
|
default y
|
||||||
select HAVE_GPIO
|
select HAVE_GPIO
|
||||||
|
@ -13,7 +13,7 @@ config SAM3_SELECT
|
||||||
|
|
||||||
config BOARD_DIRECTORY
|
config BOARD_DIRECTORY
|
||||||
string
|
string
|
||||||
default "sam3"
|
default "atsam"
|
||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "Processor model"
|
prompt "Processor model"
|
|
@ -1,9 +1,9 @@
|
||||||
# Additional SAM3/SAM4 build rules
|
# Additional ATSAM build rules
|
||||||
|
|
||||||
# Setup the toolchain
|
# Setup the toolchain
|
||||||
CROSS_PREFIX=arm-none-eabi-
|
CROSS_PREFIX=arm-none-eabi-
|
||||||
|
|
||||||
dirs-y += src/sam3 src/generic
|
dirs-y += src/atsam src/generic
|
||||||
dirs-$(CONFIG_MACH_SAM3X8E) += lib/sam3x/gcc/gcc
|
dirs-$(CONFIG_MACH_SAM3X8E) += lib/sam3x/gcc/gcc
|
||||||
dirs-$(CONFIG_MACH_SAM4S8C) += lib/sam4s/gcc/gcc
|
dirs-$(CONFIG_MACH_SAM4S8C) += lib/sam4s/gcc/gcc
|
||||||
dirs-$(CONFIG_MACH_SAM4E8E) += lib/sam4e/gcc/gcc
|
dirs-$(CONFIG_MACH_SAM4E8E) += lib/sam4e/gcc/gcc
|
||||||
|
@ -25,17 +25,17 @@ eflags-$(CONFIG_MACH_SAM4E8E) += -T lib/sam4e/gcc/gcc/sam4e8e_flash.ld
|
||||||
CFLAGS_klipper.elf += $(eflags-y) --specs=nano.specs --specs=nosys.specs
|
CFLAGS_klipper.elf += $(eflags-y) --specs=nano.specs --specs=nosys.specs
|
||||||
|
|
||||||
# Add source files
|
# Add source files
|
||||||
src-y += sam3/main.c sam3/gpio.c sam3/i2c.c sam3/spi.c
|
src-y += atsam/main.c atsam/gpio.c atsam/i2c.c atsam/spi.c
|
||||||
src-y += generic/crc16_ccitt.c generic/alloc.c
|
src-y += generic/crc16_ccitt.c generic/alloc.c
|
||||||
src-y += generic/armcm_irq.c generic/timer_irq.c
|
src-y += generic/armcm_irq.c generic/timer_irq.c
|
||||||
src-$(CONFIG_USBSERIAL) += sam3/sam4_usb.c generic/usb_cdc.c
|
src-$(CONFIG_USBSERIAL) += atsam/sam4_usb.c generic/usb_cdc.c
|
||||||
src-$(CONFIG_SERIAL) += sam3/serial.c generic/serial_irq.c
|
src-$(CONFIG_SERIAL) += atsam/serial.c generic/serial_irq.c
|
||||||
src-$(CONFIG_MACH_SAM3X8E) += sam3/adc.c sam3/timer.c
|
src-$(CONFIG_MACH_SAM3X8E) += atsam/adc.c atsam/timer.c
|
||||||
src-$(CONFIG_MACH_SAM3X8E) += ../lib/sam3x/gcc/system_sam3xa.c
|
src-$(CONFIG_MACH_SAM3X8E) += ../lib/sam3x/gcc/system_sam3xa.c
|
||||||
src-$(CONFIG_MACH_SAM3X8E) += ../lib/sam3x/gcc/gcc/startup_sam3xa.c
|
src-$(CONFIG_MACH_SAM3X8E) += ../lib/sam3x/gcc/gcc/startup_sam3xa.c
|
||||||
src-$(CONFIG_MACH_SAM4S8C) += sam3/adc.c sam3/sam4s_timer.c sam3/sam4s_sysinit.c
|
src-$(CONFIG_MACH_SAM4S8C) += atsam/adc.c atsam/sam4s_timer.c atsam/sam4s_sysinit.c
|
||||||
src-$(CONFIG_MACH_SAM4S8C) += ../lib/sam4s/gcc/gcc/startup_sam4s.c
|
src-$(CONFIG_MACH_SAM4S8C) += ../lib/sam4s/gcc/gcc/startup_sam4s.c
|
||||||
src-$(CONFIG_MACH_SAM4E8E) += sam3/sam4e_afec.c sam3/timer.c sam3/sam4_cache.c
|
src-$(CONFIG_MACH_SAM4E8E) += atsam/sam4e_afec.c atsam/timer.c atsam/sam4_cache.c
|
||||||
src-$(CONFIG_MACH_SAM4E8E) += ../lib/sam4e/gcc/system_sam4e.c
|
src-$(CONFIG_MACH_SAM4E8E) += ../lib/sam4e/gcc/system_sam4e.c
|
||||||
src-$(CONFIG_MACH_SAM4E8E) += ../lib/sam4e/gcc/gcc/startup_sam4e.c
|
src-$(CONFIG_MACH_SAM4E8E) += ../lib/sam4e/gcc/gcc/startup_sam4e.c
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# Kconfig settings for SAMD21 processors
|
# Kconfig settings for Atmel SAMD processors
|
||||||
|
|
||||||
if MACH_SAMD21
|
if MACH_ATSAMD
|
||||||
|
|
||||||
config SAMD_SELECT
|
config ATSAMD_SELECT
|
||||||
bool
|
bool
|
||||||
default y
|
default y
|
||||||
select HAVE_GPIO
|
select HAVE_GPIO
|
||||||
|
@ -14,7 +14,13 @@ config SAMD_SELECT
|
||||||
|
|
||||||
config BOARD_DIRECTORY
|
config BOARD_DIRECTORY
|
||||||
string
|
string
|
||||||
default "samd21"
|
default "atsamd"
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "Processor model"
|
||||||
|
config MACH_SAMD21A
|
||||||
|
bool "SAMD21G18A (Arduino Zero)"
|
||||||
|
endchoice
|
||||||
|
|
||||||
config CLOCK_FREQ
|
config CLOCK_FREQ
|
||||||
int
|
int
|
|
@ -0,0 +1,54 @@
|
||||||
|
# Additional atsamd build rules
|
||||||
|
|
||||||
|
# Setup the toolchain
|
||||||
|
CROSS_PREFIX=arm-none-eabi-
|
||||||
|
|
||||||
|
dirs-y += src/atsamd src/generic
|
||||||
|
dirs-$(CONFIG_MACH_SAMD21A) += lib/samd21/samd21a/gcc/gcc/
|
||||||
|
|
||||||
|
CFLAGS-$(CONFIG_MACH_SAMD21A) += -mcpu=cortex-m0plus
|
||||||
|
CFLAGS-$(CONFIG_MACH_SAMD21A) += -Ilib/samd21/samd21a/include -D__SAMD21G18A__
|
||||||
|
CFLAGS += $(CFLAGS-y) -mthumb -Ilib/cmsis-core
|
||||||
|
|
||||||
|
eflags-$(CONFIG_MACH_SAMD21A) += -T $(OUT)samd21a.ld
|
||||||
|
CFLAGS_klipper.elf += $(eflags-y) --specs=nano.specs --specs=nosys.specs
|
||||||
|
|
||||||
|
# Add source files
|
||||||
|
src-y += atsamd/main.c atsamd/timer.c atsamd/clock.c atsamd/gpio.c
|
||||||
|
src-y += generic/crc16_ccitt.c generic/alloc.c
|
||||||
|
src-y += generic/armcm_irq.c generic/timer_irq.c
|
||||||
|
src-$(CONFIG_USBSERIAL) += atsamd/usbserial.c generic/usb_cdc.c
|
||||||
|
src-$(CONFIG_SERIAL) += atsamd/serial.c generic/serial_irq.c
|
||||||
|
src-$(CONFIG_HAVE_GPIO_ADC) += atsamd/adc.c
|
||||||
|
src-$(CONFIG_HAVE_GPIO_I2C) += atsamd/i2c.c
|
||||||
|
src-$(CONFIG_HAVE_GPIO_SPI) += atsamd/spi.c
|
||||||
|
src-$(CONFIG_HAVE_GPIO_HARD_PWM) += atsamd/hard_pwm.c
|
||||||
|
src-$(CONFIG_MACH_SAMD21A) += ../lib/samd21/samd21a/gcc/gcc/startup_samd21.c
|
||||||
|
|
||||||
|
# Support bootloader offset address
|
||||||
|
target-$(CONFIG_MACH_SAMD21A) := $(OUT)samd21a.ld $(target-y)
|
||||||
|
|
||||||
|
$(OUT)samd21a.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
|
|
@ -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
|
|
|
@ -1,3 +1,3 @@
|
||||||
# Base config file for Atmel SAM3x8e ARM processor
|
# Base config file for Atmel SAM3x8e ARM processor
|
||||||
CONFIG_MACH_SAM3=y
|
CONFIG_MACH_ATSAM=y
|
||||||
CONFIG_MACH_SAM3X8E=y
|
CONFIG_MACH_SAM3X8E=y
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
# Base config file for Atmel SAM4E8E ARM processor
|
# Base config file for Atmel SAM4E8E ARM processor
|
||||||
CONFIG_MACH_SAM3=y
|
CONFIG_MACH_ATSAM=y
|
||||||
CONFIG_MACH_SAM4E8E=y
|
CONFIG_MACH_SAM4E8E=y
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
# Base config file for Atmel SAM4S8C ARM processor
|
# Base config file for Atmel SAM4S8C ARM processor
|
||||||
CONFIG_MACH_SAM3=y
|
CONFIG_MACH_ATSAM=y
|
||||||
CONFIG_MACH_SAM4S8C=y
|
CONFIG_MACH_SAM4S8C=y
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
# Base config file for SAMD21 boards
|
# Base config file for SAMD21 boards
|
||||||
|
CONFIG_MACH_ATSAMD=y
|
||||||
CONFIG_MACH_SAMD21=y
|
CONFIG_MACH_SAMD21=y
|
||||||
|
|
Loading…
Reference in New Issue