mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-14 11:29:26 +01:00
[sam] adding atmel variants folder
This commit is contained in:
parent
4265a18f14
commit
3ee8822678
91
hardware/atmel/sam/boards.txt
Normal file
91
hardware/atmel/sam/boards.txt
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
##############################################################
|
||||||
|
|
||||||
|
sam3n_ek.name=Atmel SAM3N-EK
|
||||||
|
sam3n_ek.upload.tool=bossac
|
||||||
|
sam3n_ek.upload.protocol=sam-ba
|
||||||
|
sam3n_ek.upload.maximum_size=49152
|
||||||
|
sam3n_ek.upload.speed=115200
|
||||||
|
sam3n_ek.build.mcu=cortex-m3
|
||||||
|
sam3n_ek.build.f_cpu=48000000L
|
||||||
|
sam3n_ek.build.core=arduino:sam
|
||||||
|
sam3n_ek.build.extra_flags=-D__SAM3N4C__ -mthumb
|
||||||
|
sam3n_ek.build.ldscript=linker_scripts/gcc/flash.ld
|
||||||
|
sam3n_ek.build.variant=sam3n_ek
|
||||||
|
sam3n_ek.build.variant_system_lib=libsam_sam3n4c_gcc_rel.a
|
||||||
|
|
||||||
|
##############################################################
|
||||||
|
|
||||||
|
sam3s_ek.name=Atmel SAM3S-EK
|
||||||
|
sam3s_ek.upload.tool=bossac
|
||||||
|
sam3s_ek.upload.protocol=sam-ba
|
||||||
|
sam3s_ek.upload.maximum_size=49152
|
||||||
|
sam3s_ek.upload.speed=115200
|
||||||
|
sam3s_ek.build.mcu=cortex-m3
|
||||||
|
sam3s_ek.build.f_cpu=64000000L
|
||||||
|
sam3s_ek.build.core=arduino:sam
|
||||||
|
sam3s_ek.build.extra_flags=-D__SAM3S4C__ -mthumb
|
||||||
|
sam3s_ek.build.ldscript=linker_scripts/gcc/flash.ld
|
||||||
|
sam3s_ek.build.variant=sam3s_ek
|
||||||
|
sam3s_ek.build.variant_system_lib=libsam_sam3s4c_gcc_rel.a
|
||||||
|
|
||||||
|
##############################################################
|
||||||
|
|
||||||
|
sam3s_ek2.name=Atmel SAM3S-EK2
|
||||||
|
sam3s_ek2.upload.tool=bossac
|
||||||
|
sam3s_ek2.upload.protocol=sam-ba
|
||||||
|
sam3s_ek2.upload.maximum_size=49152
|
||||||
|
sam3s_ek2.upload.speed=115200
|
||||||
|
sam3s_ek2.build.mcu=cortex-m3
|
||||||
|
sam3s_ek2.build.f_cpu=64000000L
|
||||||
|
sam3s_ek2.build.core=arduino:sam
|
||||||
|
sam3s_ek2.build.extra_flags=-D__SAM3SD8C__ -mthumb
|
||||||
|
sam3s_ek2.build.ldscript=linker_scripts/gcc/flash.ld
|
||||||
|
sam3s_ek2.build.variant=sam3s_ek2
|
||||||
|
sam3s_ek2.build.variant_system_lib=libsam_sam3sd8c_gcc_rel.a
|
||||||
|
|
||||||
|
##############################################################
|
||||||
|
|
||||||
|
sam3u_ek.name=Atmel SAM3U-EK
|
||||||
|
sam3u_ek.upload.tool=bossac
|
||||||
|
sam3u_ek.upload.protocol=sam-ba
|
||||||
|
sam3u_ek.upload.maximum_size=49152
|
||||||
|
sam3u_ek.upload.speed=115200
|
||||||
|
sam3u_ek.build.mcu=cortex-m3
|
||||||
|
sam3u_ek.build.f_cpu=96000000L
|
||||||
|
sam3u_ek.build.core=arduino:sam
|
||||||
|
sam3u_ek.build.extra_flags=-D__SAM3U4E__ -mthumb
|
||||||
|
sam3u_ek.build.ldscript=linker_scripts/gcc/flash.ld
|
||||||
|
sam3u_ek.build.variant=sam3u_ek
|
||||||
|
sam3u_ek.build.variant_system_lib=libsam_sam3u4e_gcc_rel.a
|
||||||
|
|
||||||
|
##############################################################
|
||||||
|
|
||||||
|
sam3x_ek.name=Atmel SAM3X-EK
|
||||||
|
sam3x_ek.upload.tool=bossac
|
||||||
|
sam3x_ek.upload.protocol=sam-ba
|
||||||
|
sam3x_ek.upload.maximum_size=49152
|
||||||
|
sam3x_ek.upload.speed=115200
|
||||||
|
sam3x_ek.build.mcu=cortex-m3
|
||||||
|
sam3x_ek.build.f_cpu=84000000L
|
||||||
|
sam3x_ek.build.core=arduino:sam
|
||||||
|
sam3x_ek.build.extra_flags=-D__SAM3X8H__ -mthumb
|
||||||
|
sam3x_ek.build.ldscript=linker_scripts/gcc/flash.ld
|
||||||
|
sam3x_ek.build.variant=sam3x_ek
|
||||||
|
sam3x_ek.build.variant_system_lib=libsam_sam3x8h_gcc_rel.a
|
||||||
|
|
||||||
|
##############################################################
|
||||||
|
|
||||||
|
sam4s_ek.name=Atmel SAM4S-EK
|
||||||
|
sam4s_ek.upload.tool=bossac
|
||||||
|
sam4s_ek.upload.protocol=sam-ba
|
||||||
|
sam4s_ek.upload.maximum_size=49152
|
||||||
|
sam4s_ek.upload.speed=115200
|
||||||
|
sam4s_ek.build.mcu=cortex-m3
|
||||||
|
sam4s_ek.build.f_cpu=120000000L
|
||||||
|
sam4s_ek.build.core=arduino:sam
|
||||||
|
sam4s_ek.build.extra_flags=-D__SAM4S16C__ -mthumb
|
||||||
|
sam4s_ek.build.ldscript=linker_scripts/gcc/flash.ld
|
||||||
|
sam4s_ek.build.variant=sam4s_ek
|
||||||
|
sam4s_ek.build.variant_system_lib=libsam_sam4s16c_gcc_rel.a
|
||||||
|
|
||||||
|
|
61
hardware/atmel/sam/platform.txt
Normal file
61
hardware/atmel/sam/platform.txt
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
|
||||||
|
# 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 -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 -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.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
|
||||||
|
|
18
hardware/atmel/sam/programmers.txt
Normal file
18
hardware/atmel/sam/programmers.txt
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
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
|
||||||
|
|
9
hardware/atmel/sam/sam.bat
Normal file
9
hardware/atmel/sam/sam.bat
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
set Path=%ARM_GCC_TOOLCHAIN%
|
||||||
|
export Path
|
||||||
|
|
||||||
|
start "libsam" /d"..\..\arduino\sam\system\libsam\build_gcc" /max "cd"
|
||||||
|
start "libarduino" /d"..\..\arduino\sam\cores\sam\build_gcc" /max "cd"
|
||||||
|
start "libvariant sam3s-ek" /d"variants\sam3s_ek\build_gcc" /max "cd"
|
||||||
|
start "libvariant sam3u-ek" /d"variants\sam3u_ek\build_gcc" /max "cd"
|
||||||
|
start "libvariant sam3x-ek" /d"variants\sam3x_ek\build_gcc" /max "cd"
|
||||||
|
start "test" /d"..\..\arduino\sam\cores\sam\validation\build_gcc" /max "cd"
|
Loading…
x
Reference in New Issue
Block a user