From 2583daaa3521161687f0556c9fecaeeb7dac2aea Mon Sep 17 00:00:00 2001 From: Travis Geiselbrecht Date: Tue, 22 May 2012 20:04:39 -0700 Subject: [PATCH] [sam] move adk2 variant out of hardware/google into hardware/arduino --- hardware/arduino/sam/boards.txt | 14 +++++ .../sam/variants/adk2/build_gcc/Makefile | 0 .../sam/variants/adk2/build_gcc/debug.mk | 0 .../sam/variants/adk2/build_gcc/gcc.mk | 0 .../adk2/build_gcc/libvariant_adk2.mk | 0 .../sam/variants/adk2/build_gcc/release.mk | 0 .../adk2/debug_scripts/gcc/adk2_flash.gdb | 0 .../adk2/debug_scripts/gcc/adk2_sram.gdb | 0 .../variants/adk2/linker_scripts/gcc/flash.ld | 0 .../variants/adk2/linker_scripts/gcc/sram.ld | 0 .../adk2/linker_scripts/iar/flash.icf | 0 .../variants/adk2/linker_scripts/iar/sram.icf | 0 .../sam/variants/adk2/variant.cpp | 0 .../sam/variants/adk2/variant.h | 0 hardware/google/sam/boards.txt | 13 ---- hardware/google/sam/platform.txt | 62 ------------------- hardware/google/sam/programmers.txt | 18 ------ 17 files changed, 14 insertions(+), 93 deletions(-) rename hardware/{google => arduino}/sam/variants/adk2/build_gcc/Makefile (100%) rename hardware/{google => arduino}/sam/variants/adk2/build_gcc/debug.mk (100%) rename hardware/{google => arduino}/sam/variants/adk2/build_gcc/gcc.mk (100%) rename hardware/{google => arduino}/sam/variants/adk2/build_gcc/libvariant_adk2.mk (100%) rename hardware/{google => arduino}/sam/variants/adk2/build_gcc/release.mk (100%) rename hardware/{google => arduino}/sam/variants/adk2/debug_scripts/gcc/adk2_flash.gdb (100%) rename hardware/{google => arduino}/sam/variants/adk2/debug_scripts/gcc/adk2_sram.gdb (100%) rename hardware/{google => arduino}/sam/variants/adk2/linker_scripts/gcc/flash.ld (100%) rename hardware/{google => arduino}/sam/variants/adk2/linker_scripts/gcc/sram.ld (100%) rename hardware/{google => arduino}/sam/variants/adk2/linker_scripts/iar/flash.icf (100%) rename hardware/{google => arduino}/sam/variants/adk2/linker_scripts/iar/sram.icf (100%) rename hardware/{google => arduino}/sam/variants/adk2/variant.cpp (100%) rename hardware/{google => arduino}/sam/variants/adk2/variant.h (100%) delete mode 100644 hardware/google/sam/boards.txt delete mode 100644 hardware/google/sam/platform.txt delete mode 100644 hardware/google/sam/programmers.txt diff --git a/hardware/arduino/sam/boards.txt b/hardware/arduino/sam/boards.txt index 529b18201fa..aa2ffe3b88f 100644 --- a/hardware/arduino/sam/boards.txt +++ b/hardware/arduino/sam/boards.txt @@ -29,3 +29,17 @@ arduino_due_x.build.variant=arduino_due_x arduino_due_x.build.variant_system_lib=libsam_sam3x8e_gcc_rel.a arduino_due_x.build.vid=0x2341 arduino_due_x.build.pid=0x003e + +############################################################## + +adk2.name=Google ADK2 +adk2.upload.tool=bossac +adk2.upload.protocol=sam-ba +adk2.upload.maximum_size=49152 +adk2.build.mcu=cortex-m3 +adk2.build.f_cpu=84000000L +adk2.build.core=arduino +adk2.build.extra_flags=-D__SAM3X8E__ -mthumb +adk2.build.ldscript=linker_scripts/gcc/flash.ld +adk2.build.variant=adk2 +adk2.build.variant_system_lib=libsam_sam3x8e_gcc_rel.a diff --git a/hardware/google/sam/variants/adk2/build_gcc/Makefile b/hardware/arduino/sam/variants/adk2/build_gcc/Makefile similarity index 100% rename from hardware/google/sam/variants/adk2/build_gcc/Makefile rename to hardware/arduino/sam/variants/adk2/build_gcc/Makefile diff --git a/hardware/google/sam/variants/adk2/build_gcc/debug.mk b/hardware/arduino/sam/variants/adk2/build_gcc/debug.mk similarity index 100% rename from hardware/google/sam/variants/adk2/build_gcc/debug.mk rename to hardware/arduino/sam/variants/adk2/build_gcc/debug.mk diff --git a/hardware/google/sam/variants/adk2/build_gcc/gcc.mk b/hardware/arduino/sam/variants/adk2/build_gcc/gcc.mk similarity index 100% rename from hardware/google/sam/variants/adk2/build_gcc/gcc.mk rename to hardware/arduino/sam/variants/adk2/build_gcc/gcc.mk diff --git a/hardware/google/sam/variants/adk2/build_gcc/libvariant_adk2.mk b/hardware/arduino/sam/variants/adk2/build_gcc/libvariant_adk2.mk similarity index 100% rename from hardware/google/sam/variants/adk2/build_gcc/libvariant_adk2.mk rename to hardware/arduino/sam/variants/adk2/build_gcc/libvariant_adk2.mk diff --git a/hardware/google/sam/variants/adk2/build_gcc/release.mk b/hardware/arduino/sam/variants/adk2/build_gcc/release.mk similarity index 100% rename from hardware/google/sam/variants/adk2/build_gcc/release.mk rename to hardware/arduino/sam/variants/adk2/build_gcc/release.mk diff --git a/hardware/google/sam/variants/adk2/debug_scripts/gcc/adk2_flash.gdb b/hardware/arduino/sam/variants/adk2/debug_scripts/gcc/adk2_flash.gdb similarity index 100% rename from hardware/google/sam/variants/adk2/debug_scripts/gcc/adk2_flash.gdb rename to hardware/arduino/sam/variants/adk2/debug_scripts/gcc/adk2_flash.gdb diff --git a/hardware/google/sam/variants/adk2/debug_scripts/gcc/adk2_sram.gdb b/hardware/arduino/sam/variants/adk2/debug_scripts/gcc/adk2_sram.gdb similarity index 100% rename from hardware/google/sam/variants/adk2/debug_scripts/gcc/adk2_sram.gdb rename to hardware/arduino/sam/variants/adk2/debug_scripts/gcc/adk2_sram.gdb diff --git a/hardware/google/sam/variants/adk2/linker_scripts/gcc/flash.ld b/hardware/arduino/sam/variants/adk2/linker_scripts/gcc/flash.ld similarity index 100% rename from hardware/google/sam/variants/adk2/linker_scripts/gcc/flash.ld rename to hardware/arduino/sam/variants/adk2/linker_scripts/gcc/flash.ld diff --git a/hardware/google/sam/variants/adk2/linker_scripts/gcc/sram.ld b/hardware/arduino/sam/variants/adk2/linker_scripts/gcc/sram.ld similarity index 100% rename from hardware/google/sam/variants/adk2/linker_scripts/gcc/sram.ld rename to hardware/arduino/sam/variants/adk2/linker_scripts/gcc/sram.ld diff --git a/hardware/google/sam/variants/adk2/linker_scripts/iar/flash.icf b/hardware/arduino/sam/variants/adk2/linker_scripts/iar/flash.icf similarity index 100% rename from hardware/google/sam/variants/adk2/linker_scripts/iar/flash.icf rename to hardware/arduino/sam/variants/adk2/linker_scripts/iar/flash.icf diff --git a/hardware/google/sam/variants/adk2/linker_scripts/iar/sram.icf b/hardware/arduino/sam/variants/adk2/linker_scripts/iar/sram.icf similarity index 100% rename from hardware/google/sam/variants/adk2/linker_scripts/iar/sram.icf rename to hardware/arduino/sam/variants/adk2/linker_scripts/iar/sram.icf diff --git a/hardware/google/sam/variants/adk2/variant.cpp b/hardware/arduino/sam/variants/adk2/variant.cpp similarity index 100% rename from hardware/google/sam/variants/adk2/variant.cpp rename to hardware/arduino/sam/variants/adk2/variant.cpp diff --git a/hardware/google/sam/variants/adk2/variant.h b/hardware/arduino/sam/variants/adk2/variant.h similarity index 100% rename from hardware/google/sam/variants/adk2/variant.h rename to hardware/arduino/sam/variants/adk2/variant.h diff --git a/hardware/google/sam/boards.txt b/hardware/google/sam/boards.txt deleted file mode 100644 index 79530a14acc..00000000000 --- a/hardware/google/sam/boards.txt +++ /dev/null @@ -1,13 +0,0 @@ -############################################################## - -adk2.name=Google ADK2 -adk2.upload.tool=bossac -adk2.upload.protocol=sam-ba -adk2.upload.maximum_size=49152 -adk2.build.mcu=cortex-m3 -adk2.build.f_cpu=84000000L -adk2.build.core=sam -adk2.build.extra_flags=-D__SAM3X8E__ -mthumb -adk2.build.ldscript=linker_scripts/gcc/flash.ld -adk2.build.variant=adk2 -adk2.build.variant_system_lib=libsam_sam3x8e_gcc_rel.a diff --git a/hardware/google/sam/platform.txt b/hardware/google/sam/platform.txt deleted file mode 100644 index b61412eb225..00000000000 --- a/hardware/google/sam/platform.txt +++ /dev/null @@ -1,62 +0,0 @@ - -# SAM3 compile variables -# --------------------- - -name=Atmel SAM3 -compiler.path={runtime.ide.path}/hardware/tools/g++_arm_none_eabi/bin/ -compiler.c.cmd=arm-none-eabi-gcc -compiler.c.flags=-c -g -Os -w -mlong-calls -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -Dprintf=iprintf -compiler.c.elf.cmd=arm-none-eabi-gcc -compiler.c.elf.flags=-Os -Wl,--gc-sections -compiler.S.flags=-c -g -assembler-with-cpp -compiler.cpp.cmd=arm-none-eabi-g++ -compiler.cpp.flags=-c -g -Os -w -mlong-calls -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf -compiler.ar.cmd=arm-none-eabi-ar -compiler.ar.flags=rcs -compiler.objcopy.cmd=arm-none-eabi-objcopy -compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 -compiler.elf2hex.flags=-O binary -compiler.elf2hex.cmd=arm-none-eabi-objcopy -compiler.ldflags= -compiler.size.cmd=arm-none-eabi-size -compiler.define=-DARDUINO= - -compiler.libsam.c.flags=-I{build.system.path}/libsam -I{build.system.path}/CMSIS/CMSIS/Include/ -I{build.system.path}/CMSIS/Device/ATMEL/ - -# SAM3 compile patterns -# --------------------- - -## Compile c files -recipe.c.o.pattern={compiler.path}{compiler.c.cmd} {compiler.c.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={runtime.ide.version} {build.extra_flags} {compiler.libsam.c.flags} {includes} {source_file} -o {object_file} - -## Compile c++ files -recipe.cpp.o.pattern={compiler.path}{compiler.cpp.cmd} {compiler.cpp.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={runtime.ide.version} {build.extra_flags} {compiler.libsam.c.flags} {includes} {source_file} -o {object_file} - -## Create archives -recipe.ar.pattern={compiler.path}{compiler.ar.cmd} {compiler.ar.flags} {build.path}/{archive_file} {object_file} - -## Combine gc-sections, archives, and objects -recipe.c.combine.pattern={compiler.path}{compiler.c.elf.cmd} {compiler.c.elf.flags} -mcpu={build.mcu} -T{build.variant.path}/{build.ldscript} -Wl,-Map,{build.path}/{build.project_name}.map -o {build.path}/{build.project_name}.elf -L{build.path} -lm -lgcc -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group {object_files} {build.variant.path}/{build.variant_system_lib} {build.path}/{archive_file} -Wl,--end-group - -## Create eeprom -recipe.objcopy.eep.pattern= - -## Create hex -recipe.objcopy.hex.pattern={compiler.path}{compiler.elf2hex.cmd} {compiler.elf2hex.flags} {build.path}/{build.project_name}.elf {build.path}/{build.project_name}.bin - -## Compute size -recipe.size.pattern={compiler.path}{compiler.size.cmd} -A {build.path}/{build.project_name}.elf -recipe.size.regex=\.text\s+([0-9]+).* - - -# SAM3 Uploader tools -# ------------------- - -tools.bossac.cmd=bossac -tools.bossac.cmd.windows=bossac.exe -tools.bossac.path={runtime.ide.path}/hardware/tools - -tools.bossac.upload.params.verbose=-i -d -tools.bossac.upload.params.quiet= -tools.bossac.upload.pattern={path}/{cmd} {upload.verbose} --port={serial.port.file} -e -w -v -b {build.path}/{build.project_name}.bin - diff --git a/hardware/google/sam/programmers.txt b/hardware/google/sam/programmers.txt deleted file mode 100644 index 371e5ae8272..00000000000 --- a/hardware/google/sam/programmers.txt +++ /dev/null @@ -1,18 +0,0 @@ -samba.name=SAM-BA -samba.communication=serial -samba.protocol=sam-ba -samba.speed=19200 - -sambausb.name=SAM-BA -sambausb.communication=usb -sambausb.protocol=sam-ba - -arduinosamba.name=Arduino as SAM-BA -arduinosamba.communication=serial -arduinosamba.protocol=sam-ba -arduinosamba.speed=19200 - -arduinosambausb.name=Arduino as SAM-BA USB -arduinosambausb.communication=usb -arduinosambausb.protocol=sam-ba -