diff --git a/docs/Code_Overview.md b/docs/Code_Overview.md index 3060e0ea..2b5fa621 100644 --- a/docs/Code_Overview.md +++ b/docs/Code_Overview.md @@ -5,17 +5,16 @@ Directory Layout ================ The **src/** directory contains the C source for the micro-controller -code. The **src/avr/** directory contains specific code for Atmel -ATmega micro-controllers. The **src/sam3x8e/** directory contains code -specific to the Arduino Due style ARM micro-controllers. The -**src/pru/** directory contains code specific to the Beaglebone's -on-board PRU micro-controller. The **src/simulator/** contains code -stubs that allow the micro-controller to be test compiled on other -architectures. The **src/generic/** directory contains helper code -that may be useful across different host architectures. The build -arranges for includes of "board/somefile.h" to first look in the -current architecture directory (eg, src/avr/somefile.h) and then in -the generic directory (eg, src/generic/somefile.h). +code. The **src/avr/**, **src/sam3/**, **src/samd21/**, +**src/lpc176x/**, **src/stm32f1/**, **src/pru/**, and **src/linux/** +directories contain architecture specific micro-controller code. The +**src/simulator/** contains code stubs that allow the micro-controller +to be test compiled on other architectures. The **src/generic/** +directory contains helper code that may be useful across different +architectures. The build arranges for includes of "board/somefile.h" +to first look in the current architecture directory (eg, +src/avr/somefile.h) and then in the generic directory (eg, +src/generic/somefile.h). The **klippy/** directory contains the host software. Most of the host software is written in Python, however the **klippy/chelper/** diff --git a/src/Kconfig b/src/Kconfig index cb3d3602..69768a4e 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -25,7 +25,7 @@ choice endchoice source "src/avr/Kconfig" -source "src/sam3x8e/Kconfig" +source "src/sam3/Kconfig" source "src/samd21/Kconfig" source "src/sam4e8e/Kconfig" source "src/lpc176x/Kconfig" diff --git a/src/sam3x8e/Kconfig b/src/sam3/Kconfig similarity index 86% rename from src/sam3x8e/Kconfig rename to src/sam3/Kconfig index 9a254351..03bdac8a 100644 --- a/src/sam3x8e/Kconfig +++ b/src/sam3/Kconfig @@ -1,4 +1,4 @@ -# Kconfig settings for SAM3x8e processors +# Kconfig settings for SAM3 processors if MACH_SAM3X8E @@ -12,7 +12,7 @@ config SAM_SELECT config BOARD_DIRECTORY string - default "sam3x8e" + default "sam3" config CLOCK_FREQ int diff --git a/src/sam3x8e/Makefile b/src/sam3/Makefile similarity index 84% rename from src/sam3x8e/Makefile rename to src/sam3/Makefile index a06b3c46..98809cdd 100644 --- a/src/sam3x8e/Makefile +++ b/src/sam3/Makefile @@ -1,9 +1,9 @@ -# Additional sam3x8e build rules +# Additional SAM3 build rules # Setup the toolchain CROSS_PREFIX=arm-none-eabi- -dirs-y += src/sam3x8e src/generic +dirs-y += src/sam3 src/generic dirs-y += lib/sam3x/gcc/gcc CFLAGS += -mthumb -mcpu=cortex-m3 -falign-loops=16 @@ -15,13 +15,13 @@ CFLAGS_klipper.elf += -T lib/sam3x/gcc/gcc/sam3x8e_flash.ld CFLAGS_klipper.elf += --specs=nano.specs --specs=nosys.specs # Add source files -src-y += sam3x8e/main.c sam3x8e/timer.c -src-y += sam3x8e/gpio.c sam3x8e/adc.c sam3x8e/spi.c +src-y += sam3/main.c sam3/timer.c +src-y += sam3/gpio.c sam3/adc.c sam3/spi.c src-y += generic/crc16_ccitt.c generic/alloc.c src-y += generic/armcm_irq.c generic/timer_irq.c src-y += ../lib/sam3x/gcc/system_sam3xa.c src-y += ../lib/sam3x/gcc/gcc/startup_sam3xa.c -src-$(CONFIG_SERIAL) += sam3x8e/serial.c generic/serial_irq.c +src-$(CONFIG_SERIAL) += sam3/serial.c generic/serial_irq.c # Build the additional hex output file target-y += $(OUT)klipper.bin diff --git a/src/sam3x8e/adc.c b/src/sam3/adc.c similarity index 100% rename from src/sam3x8e/adc.c rename to src/sam3/adc.c diff --git a/src/sam3x8e/gpio.c b/src/sam3/gpio.c similarity index 100% rename from src/sam3x8e/gpio.c rename to src/sam3/gpio.c diff --git a/src/sam3x8e/gpio.h b/src/sam3/gpio.h similarity index 95% rename from src/sam3x8e/gpio.h rename to src/sam3/gpio.h index be9d41c0..1c412d8d 100644 --- a/src/sam3x8e/gpio.h +++ b/src/sam3/gpio.h @@ -1,5 +1,5 @@ -#ifndef __SAM3X8E_GPIO_H -#define __SAM3X8E_GPIO_H +#ifndef __SAM3_GPIO_H +#define __SAM3_GPIO_H #include // uint32_t diff --git a/src/sam3x8e/internal.h b/src/sam3/internal.h similarity index 100% rename from src/sam3x8e/internal.h rename to src/sam3/internal.h diff --git a/src/sam3x8e/main.c b/src/sam3/main.c similarity index 100% rename from src/sam3x8e/main.c rename to src/sam3/main.c diff --git a/src/sam3x8e/serial.c b/src/sam3/serial.c similarity index 100% rename from src/sam3x8e/serial.c rename to src/sam3/serial.c diff --git a/src/sam3x8e/spi.c b/src/sam3/spi.c similarity index 100% rename from src/sam3x8e/spi.c rename to src/sam3/spi.c diff --git a/src/sam3x8e/timer.c b/src/sam3/timer.c similarity index 100% rename from src/sam3x8e/timer.c rename to src/sam3/timer.c