diff --git a/.gitignore b/.gitignore index 2ad1d1f84..c75242137 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -*.bz2 - bootloaders/*/build/ +extras/* +!extras/package_Fab_SAM_index.json diff --git a/CHANGELOG b/CHANGELOG index 6b08e544b..07e752f0b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +1.6.18 (August 26, 2021): +* Fix a critical bug with the USB CDC where a packet of exactly 64 bytes gets stuck in a buffer. + Up next: * **Add MicroPython support.** Add Demo sketch with Arduino shell and Python interpreter. * Add QSPI driver with XIP (DDR support only when the MCU runs at 48MHz) for the D51. @@ -187,7 +190,7 @@ Up next: * Bootloader: 32Khz external oscillator is now used, improves USB clock. Thanks @aethaniel * Bootloader: Clean up of makefiles and file organization. Thanks @aethaniel * Small fix to USBHost example "USB_desc.ino". Thanks @bbx10 - * USBHost: USB-Keyboard right shift key was ignored. Thanks @bbx10 + * USBHost: USB-Keyboard right shift key was ignored. Thanks @bbx10 * Wire library now support multiple instances in variant. Thanks @spiderkeys * Ported some SerialUSB API (readBreak(), baud(), stopbits(), paritytype(), numbits(), dtr(), rts()) * Merged in changes from upstream SAMD CORE 1.6.4 2016.02.19: diff --git a/README.md b/README.md index 7dcbd5cea..81c0304be 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,28 @@ -# MattairTech SAM D|L|C Core for Arduino +# Fab SAM D|L|C Core for Arduino + +## Quitck installation guide + +You can find a guide here: +https://gitlab.cba.mit.edu/quentinbolsee/Arduino-SAM-tutorial/ + +## Summary + +This repository is a Fab community fork of the original [MattairTech SAM D|L|C Core](https://github.com/mattairtech/ArduinoCore-samd). + +It offers support for: +- D11C14A / D11C14AM / D11C14AS +- x21E +- x21G +- x21J +- D51G +- D51J + +To install, simply add the following URL to "Additional Boards Manager URLs" in the Arduino IDE: + +https://raw.githubusercontent.com/qbolsee/ArduinoCore-fab-sam/master/json/package_Fab_SAM_index.json + + +# Description The MattairTech SAM D|L|C Core for Arduino is a fork from arduino/ArduinoCore-samd on GitHub, which will be used to maintain Arduino support for MattairTech boards diff --git a/boards.txt b/boards.txt index 9190d5020..21604f676 100644 --- a/boards.txt +++ b/boards.txt @@ -23,1257 +23,32 @@ menu.timer=Timer PWM Frequency menu.float=Floating Point menu.config=Build Options - -# MattairTech Xeno Mini -mattairtech_xeno_mini.name=MattairTech Xeno Mini -mattairtech_xeno_mini.vid.0=0x16D0 -mattairtech_xeno_mini.pid.0=0x0557 -mattairtech_xeno_mini.vid.1=0x16D0 -mattairtech_xeno_mini.pid.1=0x0856 -mattairtech_xeno_mini.vid.2=0x16D0 -mattairtech_xeno_mini.pid.2=0x0B41 -mattairtech_xeno_mini.vid.3=0x16D0 -mattairtech_xeno_mini.pid.3=0x0B40 -mattairtech_xeno_mini.vid.4=0x16D0 -mattairtech_xeno_mini.pid.4=0x0A0C -mattairtech_xeno_mini.vid.5=0x16D0 -mattairtech_xeno_mini.pid.5=0x0856 -mattairtech_xeno_mini.build.usb_manufacturer="MattairTech LLC" -mattairtech_xeno_mini.build.board=SAMD_ZERO -mattairtech_xeno_mini.build.core=arduino -mattairtech_xeno_mini.build.variant=Xeno_Mini -mattairtech_xeno_mini.build.variant_system_lib= -mattairtech_xeno_mini.build.vid=0x16D0 -mattairtech_xeno_mini.upload.protocol=sam-ba -mattairtech_xeno_mini.bootloader.tool=arduino:openocd -mattairtech_xeno_mini.menu.float.default=Print & String use auto-promoted doubles only -mattairtech_xeno_mini.menu.float.default.build.floatconfig=FLOAT_BOTH_DOUBLES_ONLY -mattairtech_xeno_mini.menu.float.print=Print uses separate singles and doubles -mattairtech_xeno_mini.menu.float.print.build.floatconfig=FLOAT_PRINT_SINGLES_DOUBLES -mattairtech_xeno_mini.menu.float.string=String uses separate singles and doubles -mattairtech_xeno_mini.menu.float.string.build.floatconfig=FLOAT_STRING_SINGLES_DOUBLES -mattairtech_xeno_mini.menu.float.both=Print & String use separate singles and doubles -mattairtech_xeno_mini.menu.float.both.build.floatconfig=FLOAT_BOTH_SINGLES_DOUBLES -mattairtech_xeno_mini.menu.config.disabled=config.h disabled -mattairtech_xeno_mini.menu.config.disabled.build.buildconfig=CONFIG_H_DISABLED -mattairtech_xeno_mini.menu.config.enabled=config.h enabled (mostly code size reductions) -mattairtech_xeno_mini.menu.config.enabled.build.buildconfig=CONFIG_H_ENABLED -mattairtech_xeno_mini.menu.clock.crystal_32k=32KHZ_CRYSTAL -mattairtech_xeno_mini.menu.clock.crystal_32k.build.clockconfig=CLOCKCONFIG_32768HZ_CRYSTAL -mattairtech_xeno_mini.menu.clock.crystal_hs=HIGH_SPEED_CRYSTAL -mattairtech_xeno_mini.menu.clock.crystal_hs.build.clockconfig=CLOCKCONFIG_HS_CRYSTAL -mattairtech_xeno_mini.menu.clock.internal=INTERNAL_OSCILLATOR -mattairtech_xeno_mini.menu.clock.internal.build.clockconfig=CLOCKCONFIG_INTERNAL -mattairtech_xeno_mini.menu.clock.internal_usb=INTERNAL_USB_CALIBRATED_OSCILLATOR -mattairtech_xeno_mini.menu.clock.internal_usb.build.clockconfig=CLOCKCONFIG_INTERNAL_USB -mattairtech_xeno_mini.menu.timer.timer_732Hz=732.4Hz (16-bit) -mattairtech_xeno_mini.menu.timer.timer_732Hz.build.timerconfig=TIMER_732Hz -mattairtech_xeno_mini.menu.timer.timer_366Hz=366.2Hz (16-bit) -mattairtech_xeno_mini.menu.timer.timer_366Hz.build.timerconfig=TIMER_366Hz -mattairtech_xeno_mini.menu.timer.timer_244Hz=244.1Hz (16-bit) -mattairtech_xeno_mini.menu.timer.timer_244Hz.build.timerconfig=TIMER_244Hz -mattairtech_xeno_mini.menu.timer.timer_183Hz=183.1Hz (16-bit) -mattairtech_xeno_mini.menu.timer.timer_183Hz.build.timerconfig=TIMER_183Hz -mattairtech_xeno_mini.menu.timer.timer_146Hz=146.5Hz (16-bit) -mattairtech_xeno_mini.menu.timer.timer_146Hz.build.timerconfig=TIMER_146Hz -mattairtech_xeno_mini.menu.timer.timer_122Hz=122.1Hz (16-bit) -mattairtech_xeno_mini.menu.timer.timer_122Hz.build.timerconfig=TIMER_122Hz -mattairtech_xeno_mini.menu.timer.timer_105Hz=104.6Hz (16-bit) -mattairtech_xeno_mini.menu.timer.timer_105Hz.build.timerconfig=TIMER_105Hz -mattairtech_xeno_mini.menu.timer.timer_81Hz=81.38Hz (16-bit) -mattairtech_xeno_mini.menu.timer.timer_81Hz.build.timerconfig=TIMER_81Hz -mattairtech_xeno_mini.menu.timer.timer_61Hz=61.04Hz (16-bit) -mattairtech_xeno_mini.menu.timer.timer_61Hz.build.timerconfig=TIMER_61Hz -mattairtech_xeno_mini.menu.timer.timer_31Hz=30.52Hz (16-bit) -mattairtech_xeno_mini.menu.timer.timer_31Hz.build.timerconfig=TIMER_31Hz -mattairtech_xeno_mini.menu.timer.timer_187500Hz=187500Hz (8-bit) -mattairtech_xeno_mini.menu.timer.timer_187500Hz.build.timerconfig=TIMER_187500Hz -mattairtech_xeno_mini.menu.timer.timer_93750Hz=93750Hz (8-bit) -mattairtech_xeno_mini.menu.timer.timer_93750Hz.build.timerconfig=TIMER_93750Hz -mattairtech_xeno_mini.menu.timer.timer_62500Hz=62500Hz (8-bit) -mattairtech_xeno_mini.menu.timer.timer_62500Hz.build.timerconfig=TIMER_62500Hz -mattairtech_xeno_mini.menu.timer.timer_37500Hz=37500Hz (8-bit) -mattairtech_xeno_mini.menu.timer.timer_37500Hz.build.timerconfig=TIMER_37500Hz -mattairtech_xeno_mini.menu.timer.timer_20833Hz=20833Hz (8-bit) -mattairtech_xeno_mini.menu.timer.timer_20833Hz.build.timerconfig=TIMER_20833Hz -mattairtech_xeno_mini.menu.timer.timer_12500Hz=12500Hz (8-bit) -mattairtech_xeno_mini.menu.timer.timer_12500Hz.build.timerconfig=TIMER_12500Hz -mattairtech_xeno_mini.menu.timer.timer_7500Hz=7500Hz (8-bit) -mattairtech_xeno_mini.menu.timer.timer_7500Hz.build.timerconfig=TIMER_7500Hz -mattairtech_xeno_mini.menu.timer.timer_4166Hz=4166Hz (8-bit) -mattairtech_xeno_mini.menu.timer.timer_4166Hz.build.timerconfig=TIMER_4166Hz -mattairtech_xeno_mini.menu.timer.timer_2930Hz=2930Hz (8-bit) -mattairtech_xeno_mini.menu.timer.timer_2930Hz.build.timerconfig=TIMER_2930Hz -mattairtech_xeno_mini.menu.timer.timer_1465Hz=1465Hz (8-bit, 16-bit for D51) -mattairtech_xeno_mini.menu.timer.timer_1465Hz.build.timerconfig=TIMER_1465Hz -mattairtech_xeno_mini.menu.cpu.samd21g18a=SAMD21G18A -mattairtech_xeno_mini.menu.cpu.samd21g18a.upload.maximum_size=253952 -mattairtech_xeno_mini.menu.cpu.samd21g18a.build.mcu=cortex-m0plus -mattairtech_xeno_mini.menu.cpu.samd21g18a.build.mathlib=arm_cortexM0l_math -mattairtech_xeno_mini.menu.cpu.samd21g18a.build.f_cpu=48000000L -mattairtech_xeno_mini.menu.cpu.samd21g18a.build.usb_product="Xeno Mini D21" -mattairtech_xeno_mini.menu.cpu.samd21g18a.build.extra_flags=-D__SAMD21G18A__ {build.usb_flags} -DARM_MATH_CM0PLUS -mattairtech_xeno_mini.menu.cpu.samd21g18a.build.ldscript=flash_256KB.ld -mattairtech_xeno_mini.menu.cpu.samd21g18a.build.openocdscript=openocd_scripts/SAMD21G18A.cfg -mattairtech_xeno_mini.menu.cpu.samd21g18a.bootloader.file=zero/binaries/sam_ba_Xeno_Mini_SAMD21G18A.bin -mattairtech_xeno_mini.menu.cpu.samd21g17a=SAMD21G17A -mattairtech_xeno_mini.menu.cpu.samd21g17a.upload.maximum_size=122880 -mattairtech_xeno_mini.menu.cpu.samd21g17a.build.mcu=cortex-m0plus -mattairtech_xeno_mini.menu.cpu.samd21g17a.build.mathlib=arm_cortexM0l_math -mattairtech_xeno_mini.menu.cpu.samd21g17a.build.f_cpu=48000000L -mattairtech_xeno_mini.menu.cpu.samd21g17a.build.usb_product="Xeno Mini D21" -mattairtech_xeno_mini.menu.cpu.samd21g17a.build.extra_flags=-D__SAMD21G17A__ {build.usb_flags} -DARM_MATH_CM0PLUS -mattairtech_xeno_mini.menu.cpu.samd21g17a.build.ldscript=flash_128KB.ld -mattairtech_xeno_mini.menu.cpu.samd21g17a.build.openocdscript=openocd_scripts/SAMD21G17A.cfg -mattairtech_xeno_mini.menu.cpu.samd21g17a.bootloader.file=zero/binaries/sam_ba_Xeno_Mini_SAMD21G17A.bin -mattairtech_xeno_mini.menu.cpu.samd21g16a=SAMD21G16A -mattairtech_xeno_mini.menu.cpu.samd21g16a.upload.maximum_size=57344 -mattairtech_xeno_mini.menu.cpu.samd21g16a.build.mcu=cortex-m0plus -mattairtech_xeno_mini.menu.cpu.samd21g16a.build.mathlib=arm_cortexM0l_math -mattairtech_xeno_mini.menu.cpu.samd21g16a.build.f_cpu=48000000L -mattairtech_xeno_mini.menu.cpu.samd21g16a.build.usb_product="Xeno Mini D21" -mattairtech_xeno_mini.menu.cpu.samd21g16a.build.extra_flags=-D__SAMD21G16A__ {build.usb_flags} -DARM_MATH_CM0PLUS -mattairtech_xeno_mini.menu.cpu.samd21g16a.build.ldscript=flash_64KB.ld -mattairtech_xeno_mini.menu.cpu.samd21g16a.build.openocdscript=openocd_scripts/SAMD21G16A.cfg -mattairtech_xeno_mini.menu.cpu.samd21g16a.bootloader.file=zero/binaries/sam_ba_Xeno_Mini_SAMD21G16A.bin -mattairtech_xeno_mini.menu.cpu.samd21g15a=SAMD21G15A -mattairtech_xeno_mini.menu.cpu.samd21g15a.upload.maximum_size=24576 -mattairtech_xeno_mini.menu.cpu.samd21g15a.build.mcu=cortex-m0plus -mattairtech_xeno_mini.menu.cpu.samd21g15a.build.mathlib=arm_cortexM0l_math -mattairtech_xeno_mini.menu.cpu.samd21g15a.build.f_cpu=48000000L -mattairtech_xeno_mini.menu.cpu.samd21g15a.build.usb_product="Xeno Mini D21" -mattairtech_xeno_mini.menu.cpu.samd21g15a.build.extra_flags=-D__SAMD21G15A__ {build.usb_flags} -DARM_MATH_CM0PLUS -mattairtech_xeno_mini.menu.cpu.samd21g15a.build.ldscript=flash_32KB.ld -mattairtech_xeno_mini.menu.cpu.samd21g15a.build.openocdscript=openocd_scripts/SAMD21G15A.cfg -mattairtech_xeno_mini.menu.cpu.samd21g15a.bootloader.file=zero/binaries/sam_ba_Xeno_Mini_SAMD21G15A.bin -mattairtech_xeno_mini.menu.cpu.samd51g19a_120=SAMD51G19A_120MHz -mattairtech_xeno_mini.menu.cpu.samd51g19a_120.upload.maximum_size=516096 -mattairtech_xeno_mini.menu.cpu.samd51g19a_120.build.mcu=cortex-m4 -mattairtech_xeno_mini.menu.cpu.samd51g19a_120.build.mathlib=arm_cortexM4lf_math -mattairtech_xeno_mini.menu.cpu.samd51g19a_120.build.f_cpu=120000000L -mattairtech_xeno_mini.menu.cpu.samd51g19a_120.build.usb_product="Xeno Mini D51" -mattairtech_xeno_mini.menu.cpu.samd51g19a_120.build.extra_flags=-D__SAMD51G19A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 -mattairtech_xeno_mini.menu.cpu.samd51g19a_120.build.ldscript=flash_m4f_512KB.ld -mattairtech_xeno_mini.menu.cpu.samd51g19a_120.build.openocdscript=openocd_scripts/SAMD51G19A.cfg -mattairtech_xeno_mini.menu.cpu.samd51g19a_120.bootloader.file=zero/binaries/sam_ba_Xeno_Mini_SAMD51G19A.bin -mattairtech_xeno_mini.menu.cpu.samd51g19a_48=SAMD51G19A_48MHz -mattairtech_xeno_mini.menu.cpu.samd51g19a_48.upload.maximum_size=516096 -mattairtech_xeno_mini.menu.cpu.samd51g19a_48.build.mcu=cortex-m4 -mattairtech_xeno_mini.menu.cpu.samd51g19a_48.build.mathlib=arm_cortexM4lf_math -mattairtech_xeno_mini.menu.cpu.samd51g19a_48.build.f_cpu=48000000L -mattairtech_xeno_mini.menu.cpu.samd51g19a_48.build.usb_product="Xeno Mini D51" -mattairtech_xeno_mini.menu.cpu.samd51g19a_48.build.extra_flags=-D__SAMD51G19A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 -mattairtech_xeno_mini.menu.cpu.samd51g19a_48.build.ldscript=flash_m4f_512KB.ld -mattairtech_xeno_mini.menu.cpu.samd51g19a_48.build.openocdscript=openocd_scripts/SAMD51G19A.cfg -mattairtech_xeno_mini.menu.cpu.samd51g19a_48.bootloader.file=zero/binaries/sam_ba_Xeno_Mini_SAMD51G19A.bin -mattairtech_xeno_mini.menu.cpu.samd51g18a_120=SAMD51G18A_120MHz -mattairtech_xeno_mini.menu.cpu.samd51g18a_120.upload.maximum_size=253952 -mattairtech_xeno_mini.menu.cpu.samd51g18a_120.build.mcu=cortex-m4 -mattairtech_xeno_mini.menu.cpu.samd51g18a_120.build.mathlib=arm_cortexM4lf_math -mattairtech_xeno_mini.menu.cpu.samd51g18a_120.build.f_cpu=120000000L -mattairtech_xeno_mini.menu.cpu.samd51g18a_120.build.usb_product="Xeno Mini D51" -mattairtech_xeno_mini.menu.cpu.samd51g18a_120.build.extra_flags=-D__SAMD51G18A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 -mattairtech_xeno_mini.menu.cpu.samd51g18a_120.build.ldscript=flash_m4f_256KB.ld -mattairtech_xeno_mini.menu.cpu.samd51g18a_120.build.openocdscript=openocd_scripts/SAMD51G18A.cfg -mattairtech_xeno_mini.menu.cpu.samd51g18a_120.bootloader.file=zero/binaries/sam_ba_Xeno_Mini_SAMD51G18A.bin -mattairtech_xeno_mini.menu.cpu.samd51g18a_48=SAMD51G18A_48MHz -mattairtech_xeno_mini.menu.cpu.samd51g18a_48.upload.maximum_size=253952 -mattairtech_xeno_mini.menu.cpu.samd51g18a_48.build.mcu=cortex-m4 -mattairtech_xeno_mini.menu.cpu.samd51g18a_48.build.mathlib=arm_cortexM4lf_math -mattairtech_xeno_mini.menu.cpu.samd51g18a_48.build.f_cpu=48000000L -mattairtech_xeno_mini.menu.cpu.samd51g18a_48.build.usb_product="Xeno Mini D51" -mattairtech_xeno_mini.menu.cpu.samd51g18a_48.build.extra_flags=-D__SAMD51G18A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 -mattairtech_xeno_mini.menu.cpu.samd51g18a_48.build.ldscript=flash_m4f_256KB.ld -mattairtech_xeno_mini.menu.cpu.samd51g18a_48.build.openocdscript=openocd_scripts/SAMD51G18A.cfg -mattairtech_xeno_mini.menu.cpu.samd51g18a_48.bootloader.file=zero/binaries/sam_ba_Xeno_Mini_SAMD51G18A.bin -mattairtech_xeno_mini.menu.cpu.saml21g18b=SAML21G18B -mattairtech_xeno_mini.menu.cpu.saml21g18b.upload.maximum_size=253952 -mattairtech_xeno_mini.menu.cpu.saml21g18b.build.mcu=cortex-m0plus -mattairtech_xeno_mini.menu.cpu.saml21g18b.build.mathlib=arm_cortexM0l_math -mattairtech_xeno_mini.menu.cpu.saml21g18b.build.f_cpu=48000000L -mattairtech_xeno_mini.menu.cpu.saml21g18b.build.usb_product="Xeno Mini L21" -mattairtech_xeno_mini.menu.cpu.saml21g18b.build.extra_flags=-D__SAML21G18B__ {build.usb_flags} -DARM_MATH_CM0PLUS -mattairtech_xeno_mini.menu.cpu.saml21g18b.build.ldscript=flash_256KB.ld -mattairtech_xeno_mini.menu.cpu.saml21g18b.build.openocdscript=openocd_scripts/SAML21G18B.cfg -mattairtech_xeno_mini.menu.cpu.saml21g18b.bootloader.file=zero/binaries/sam_ba_Xeno_Mini_SAML21G18B.bin -mattairtech_xeno_mini.menu.cpu.saml21g17b=SAML21G17B -mattairtech_xeno_mini.menu.cpu.saml21g17b.upload.maximum_size=122880 -mattairtech_xeno_mini.menu.cpu.saml21g17b.build.mcu=cortex-m0plus -mattairtech_xeno_mini.menu.cpu.saml21g17b.build.mathlib=arm_cortexM0l_math -mattairtech_xeno_mini.menu.cpu.saml21g17b.build.f_cpu=48000000L -mattairtech_xeno_mini.menu.cpu.saml21g17b.build.usb_product="Xeno Mini L21" -mattairtech_xeno_mini.menu.cpu.saml21g17b.build.extra_flags=-D__SAML21G17B__ {build.usb_flags} -DARM_MATH_CM0PLUS -mattairtech_xeno_mini.menu.cpu.saml21g17b.build.ldscript=flash_128KB.ld -mattairtech_xeno_mini.menu.cpu.saml21g17b.build.openocdscript=openocd_scripts/SAML21G17B.cfg -mattairtech_xeno_mini.menu.cpu.saml21g17b.bootloader.file=zero/binaries/sam_ba_Xeno_Mini_SAML21G17B.bin -mattairtech_xeno_mini.menu.cpu.saml21g16b=SAML21G16B -mattairtech_xeno_mini.menu.cpu.saml21g16b.upload.maximum_size=57344 -mattairtech_xeno_mini.menu.cpu.saml21g16b.build.mcu=cortex-m0plus -mattairtech_xeno_mini.menu.cpu.saml21g16b.build.mathlib=arm_cortexM0l_math -mattairtech_xeno_mini.menu.cpu.saml21g16b.build.f_cpu=48000000L -mattairtech_xeno_mini.menu.cpu.saml21g16b.build.usb_product="Xeno Mini L21" -mattairtech_xeno_mini.menu.cpu.saml21g16b.build.extra_flags=-D__SAML21G16B__ {build.usb_flags} -DARM_MATH_CM0PLUS -mattairtech_xeno_mini.menu.cpu.saml21g16b.build.ldscript=flash_64KB.ld -mattairtech_xeno_mini.menu.cpu.saml21g16b.build.openocdscript=openocd_scripts/SAML21G16B.cfg -mattairtech_xeno_mini.menu.cpu.saml21g16b.bootloader.file=zero/binaries/sam_ba_Xeno_Mini_SAML21G16B.bin -mattairtech_xeno_mini.menu.cpu.saml21g15b=SAML21G15B -mattairtech_xeno_mini.menu.cpu.saml21g15b.upload.maximum_size=24576 -mattairtech_xeno_mini.menu.cpu.saml21g15b.build.mcu=cortex-m0plus -mattairtech_xeno_mini.menu.cpu.saml21g15b.build.mathlib=arm_cortexM0l_math -mattairtech_xeno_mini.menu.cpu.saml21g15b.build.f_cpu=48000000L -mattairtech_xeno_mini.menu.cpu.saml21g15b.build.usb_product="Xeno Mini L21" -mattairtech_xeno_mini.menu.cpu.saml21g15b.build.extra_flags=-D__SAML21G15B__ {build.usb_flags} -DARM_MATH_CM0PLUS -mattairtech_xeno_mini.menu.cpu.saml21g15b.build.ldscript=flash_32KB.ld -mattairtech_xeno_mini.menu.cpu.saml21g15b.build.openocdscript=openocd_scripts/SAML21G15B.cfg -mattairtech_xeno_mini.menu.cpu.saml21g15b.bootloader.file=zero/binaries/sam_ba_Xeno_Mini_SAML21G15B.bin -mattairtech_xeno_mini.menu.cpu.samc21g18a=SAMC21G18A -mattairtech_xeno_mini.menu.cpu.samc21g18a.upload.maximum_size=253952 -mattairtech_xeno_mini.menu.cpu.samc21g18a.build.mcu=cortex-m0plus -mattairtech_xeno_mini.menu.cpu.samc21g18a.build.mathlib=arm_cortexM0l_math -mattairtech_xeno_mini.menu.cpu.samc21g18a.build.f_cpu=48000000L -mattairtech_xeno_mini.menu.cpu.samc21g18a.build.usb_product="Xeno Mini C21" -mattairtech_xeno_mini.menu.cpu.samc21g18a.build.extra_flags=-D__SAMC21G18A__ -DARM_MATH_CM0PLUS -mattairtech_xeno_mini.menu.cpu.samc21g18a.build.ldscript=flash_256KB.ld -mattairtech_xeno_mini.menu.cpu.samc21g18a.build.openocdscript=openocd_scripts/SAMC21G18A.cfg -mattairtech_xeno_mini.menu.cpu.samc21g18a.bootloader.file=zero/binaries/sam_ba_Xeno_Mini_SAMC21G18A.bin -mattairtech_xeno_mini.menu.cpu.samc21g17a=SAMC21G17A -mattairtech_xeno_mini.menu.cpu.samc21g17a.upload.maximum_size=122880 -mattairtech_xeno_mini.menu.cpu.samc21g17a.build.mcu=cortex-m0plus -mattairtech_xeno_mini.menu.cpu.samc21g17a.build.mathlib=arm_cortexM0l_math -mattairtech_xeno_mini.menu.cpu.samc21g17a.build.f_cpu=48000000L -mattairtech_xeno_mini.menu.cpu.samc21g17a.build.usb_product="Xeno Mini C21" -mattairtech_xeno_mini.menu.cpu.samc21g17a.build.extra_flags=-D__SAMC21G17A__ -DARM_MATH_CM0PLUS -mattairtech_xeno_mini.menu.cpu.samc21g17a.build.ldscript=flash_128KB.ld -mattairtech_xeno_mini.menu.cpu.samc21g17a.build.openocdscript=openocd_scripts/SAMC21G17A.cfg -mattairtech_xeno_mini.menu.cpu.samc21g17a.bootloader.file=zero/binaries/sam_ba_Xeno_Mini_SAMC21G17A.bin -mattairtech_xeno_mini.menu.cpu.samc21g16a=SAMC21G16A -mattairtech_xeno_mini.menu.cpu.samc21g16a.upload.maximum_size=57344 -mattairtech_xeno_mini.menu.cpu.samc21g16a.build.mcu=cortex-m0plus -mattairtech_xeno_mini.menu.cpu.samc21g16a.build.mathlib=arm_cortexM0l_math -mattairtech_xeno_mini.menu.cpu.samc21g16a.build.f_cpu=48000000L -mattairtech_xeno_mini.menu.cpu.samc21g16a.build.usb_product="Xeno Mini C21" -mattairtech_xeno_mini.menu.cpu.samc21g16a.build.extra_flags=-D__SAMC21G16A__ -DARM_MATH_CM0PLUS -mattairtech_xeno_mini.menu.cpu.samc21g16a.build.ldscript=flash_64KB.ld -mattairtech_xeno_mini.menu.cpu.samc21g16a.build.openocdscript=openocd_scripts/SAMC21G16A.cfg -mattairtech_xeno_mini.menu.cpu.samc21g16a.bootloader.file=zero/binaries/sam_ba_Xeno_Mini_SAMC21G16A.bin -mattairtech_xeno_mini.menu.cpu.samc21g15a=SAMC21G15A -mattairtech_xeno_mini.menu.cpu.samc21g15a.upload.maximum_size=24576 -mattairtech_xeno_mini.menu.cpu.samc21g15a.build.mcu=cortex-m0plus -mattairtech_xeno_mini.menu.cpu.samc21g15a.build.mathlib=arm_cortexM0l_math -mattairtech_xeno_mini.menu.cpu.samc21g15a.build.f_cpu=48000000L -mattairtech_xeno_mini.menu.cpu.samc21g15a.build.usb_product="Xeno Mini C21" -mattairtech_xeno_mini.menu.cpu.samc21g15a.build.extra_flags=-D__SAMC21G15A__ -DARM_MATH_CM0PLUS -mattairtech_xeno_mini.menu.cpu.samc21g15a.build.ldscript=flash_32KB.ld -mattairtech_xeno_mini.menu.cpu.samc21g15a.build.openocdscript=openocd_scripts/SAMC21G15A.cfg -mattairtech_xeno_mini.menu.cpu.samc21g15a.bootloader.file=zero/binaries/sam_ba_Xeno_Mini_SAMC21G15A.bin -mattairtech_xeno_mini.menu.bootloader.8kb=8KB_BOOTLOADER -mattairtech_xeno_mini.menu.bootloader.8kb.build.bootloader_size=__8KB_BOOTLOADER__ -mattairtech_xeno_mini.menu.bootloader.8kb.build.ldscript_path=linker_scripts/gcc/8KB_Bootloader -mattairtech_xeno_mini.menu.bootloader.8kb.upload.tool=MattairTech_Arduino:bossac -mattairtech_xeno_mini.menu.bootloader.8kb.upload.use_1200bps_touch=true -mattairtech_xeno_mini.menu.bootloader.8kb.upload.wait_for_upload_port=true -mattairtech_xeno_mini.menu.bootloader.8kb.upload.native_usb=true -mattairtech_xeno_mini.menu.bootloader.16kb=16KB_BOOTLOADER -mattairtech_xeno_mini.menu.bootloader.16kb.build.bootloader_size=__16KB_BOOTLOADER__ -mattairtech_xeno_mini.menu.bootloader.16kb.build.ldscript_path=linker_scripts/gcc/16KB_Bootloader -mattairtech_xeno_mini.menu.bootloader.16kb.upload.tool=MattairTech_Arduino:bossac -mattairtech_xeno_mini.menu.bootloader.16kb.upload.use_1200bps_touch=true -mattairtech_xeno_mini.menu.bootloader.16kb.upload.wait_for_upload_port=true -mattairtech_xeno_mini.menu.bootloader.16kb.upload.native_usb=true -mattairtech_xeno_mini.menu.bootloader.0kb=NO_BOOTLOADER -mattairtech_xeno_mini.menu.bootloader.0kb.build.bootloader_size=__NO_BOOTLOADER__ -mattairtech_xeno_mini.menu.bootloader.0kb.build.ldscript_path=linker_scripts/gcc/No_Bootloader -mattairtech_xeno_mini.menu.bootloader.0kb.upload.tool=arduino:openocd -mattairtech_xeno_mini.menu.bootloader.0kb.upload.use_1200bps_touch=false -mattairtech_xeno_mini.menu.bootloader.0kb.upload.wait_for_upload_port=false -mattairtech_xeno_mini.menu.bootloader.0kb.upload.native_usb=false -mattairtech_xeno_mini.menu.serial.one_uart=ONE_UART_ONE_WIRE_ONE_SPI -mattairtech_xeno_mini.menu.serial.one_uart.build.serialcom_uart=ONE_UART -mattairtech_xeno_mini.menu.serial.one_uart.build.serialcom_wire=ONE_WIRE -mattairtech_xeno_mini.menu.serial.one_uart.build.serialcom_spi=ONE_SPI -mattairtech_xeno_mini.menu.serial.one_uart_two_spi=ONE_UART_ONE_WIRE_TWO_SPI -mattairtech_xeno_mini.menu.serial.one_uart_two_spi.build.serialcom_uart=ONE_UART -mattairtech_xeno_mini.menu.serial.one_uart_two_spi.build.serialcom_wire=ONE_WIRE -mattairtech_xeno_mini.menu.serial.one_uart_two_spi.build.serialcom_spi=TWO_SPI -mattairtech_xeno_mini.menu.serial.one_uart_two_wire=ONE_UART_TWO_WIRE_ONE_SPI -mattairtech_xeno_mini.menu.serial.one_uart_two_wire.build.serialcom_uart=ONE_UART -mattairtech_xeno_mini.menu.serial.one_uart_two_wire.build.serialcom_wire=TWO_WIRE -mattairtech_xeno_mini.menu.serial.one_uart_two_wire.build.serialcom_spi=ONE_SPI -mattairtech_xeno_mini.menu.serial.two_uart=TWO_UART_ONE_WIRE_ONE_SPI -mattairtech_xeno_mini.menu.serial.two_uart.build.serialcom_uart=TWO_UART -mattairtech_xeno_mini.menu.serial.two_uart.build.serialcom_wire=ONE_WIRE -mattairtech_xeno_mini.menu.serial.two_uart.build.serialcom_spi=ONE_SPI -mattairtech_xeno_mini.menu.serial.two_uart_two_spi=TWO_UART_ONE_WIRE_TWO_SPI -mattairtech_xeno_mini.menu.serial.two_uart_two_spi.build.serialcom_uart=TWO_UART -mattairtech_xeno_mini.menu.serial.two_uart_two_spi.build.serialcom_wire=ONE_WIRE -mattairtech_xeno_mini.menu.serial.two_uart_two_spi.build.serialcom_spi=TWO_SPI -mattairtech_xeno_mini.menu.serial.two_uart_two_wire=TWO_UART_TWO_WIRE_ONE_SPI -mattairtech_xeno_mini.menu.serial.two_uart_two_wire.build.serialcom_uart=TWO_UART -mattairtech_xeno_mini.menu.serial.two_uart_two_wire.build.serialcom_wire=TWO_WIRE -mattairtech_xeno_mini.menu.serial.two_uart_two_wire.build.serialcom_spi=ONE_SPI -mattairtech_xeno_mini.menu.serial.three_uart=THREE_UART_ONE_WIRE_ONE_SPI -mattairtech_xeno_mini.menu.serial.three_uart.build.serialcom_uart=THREE_UART -mattairtech_xeno_mini.menu.serial.three_uart.build.serialcom_wire=ONE_WIRE -mattairtech_xeno_mini.menu.serial.three_uart.build.serialcom_spi=ONE_SPI -mattairtech_xeno_mini.menu.serial.three_uart_two_spi=THREE_UART_ONE_WIRE_TWO_SPI -mattairtech_xeno_mini.menu.serial.three_uart_two_spi.build.serialcom_uart=THREE_UART -mattairtech_xeno_mini.menu.serial.three_uart_two_spi.build.serialcom_wire=ONE_WIRE -mattairtech_xeno_mini.menu.serial.three_uart_two_spi.build.serialcom_spi=TWO_SPI -mattairtech_xeno_mini.menu.serial.three_uart_two_wire=THREE_UART_TWO_WIRE_ONE_SPI -mattairtech_xeno_mini.menu.serial.three_uart_two_wire.build.serialcom_uart=THREE_UART -mattairtech_xeno_mini.menu.serial.three_uart_two_wire.build.serialcom_wire=TWO_WIRE -mattairtech_xeno_mini.menu.serial.three_uart_two_wire.build.serialcom_spi=ONE_SPI -mattairtech_xeno_mini.menu.serial.no_uart=NO_UART_ONE_WIRE_ONE_SPI -mattairtech_xeno_mini.menu.serial.no_uart.build.serialcom_uart=NO_UART -mattairtech_xeno_mini.menu.serial.no_uart.build.serialcom_wire=ONE_WIRE -mattairtech_xeno_mini.menu.serial.no_uart.build.serialcom_spi=ONE_SPI -mattairtech_xeno_mini.menu.usb.cdc=CDC_ONLY -mattairtech_xeno_mini.menu.usb.cdc.build.usbcom=CDC_ONLY -mattairtech_xeno_mini.menu.usb.cdc.build.pid=0x0557 -mattairtech_xeno_mini.menu.usb.cdc_hid=CDC_HID -mattairtech_xeno_mini.menu.usb.cdc_hid.build.usbcom=CDC_HID -mattairtech_xeno_mini.menu.usb.cdc_hid.build.pid=0x0856 -mattairtech_xeno_mini.menu.usb.withcdc=WITH_CDC -mattairtech_xeno_mini.menu.usb.withcdc.build.usbcom=WITH_CDC -mattairtech_xeno_mini.menu.usb.withcdc.build.pid=0x0B41 -mattairtech_xeno_mini.menu.usb.hid=HID_ONLY -mattairtech_xeno_mini.menu.usb.hid.build.usbcom=HID_ONLY -mattairtech_xeno_mini.menu.usb.hid.build.pid=0x0B40 -mattairtech_xeno_mini.menu.usb.nocdc=WITHOUT_CDC -mattairtech_xeno_mini.menu.usb.nocdc.build.usbcom=WITHOUT_CDC -mattairtech_xeno_mini.menu.usb.nocdc.build.pid=0x0A0C -mattairtech_xeno_mini.menu.usb.none=USB_DISABLED -mattairtech_xeno_mini.menu.usb.none.build.usbcom=USB_DISABLED -mattairtech_xeno_mini.menu.usb.none.build.pid=0x0856 - - -# MattairTech Xeno -mattairtech_xeno.name=MattairTech Xeno -mattairtech_xeno.vid.0=0x16D0 -mattairtech_xeno.pid.0=0x0557 -mattairtech_xeno.vid.1=0x16D0 -mattairtech_xeno.pid.1=0x0856 -mattairtech_xeno.vid.2=0x16D0 -mattairtech_xeno.pid.2=0x0B41 -mattairtech_xeno.vid.3=0x16D0 -mattairtech_xeno.pid.3=0x0B40 -mattairtech_xeno.vid.4=0x16D0 -mattairtech_xeno.pid.4=0x0A0C -mattairtech_xeno.vid.5=0x16D0 -mattairtech_xeno.pid.5=0x0856 -mattairtech_xeno.build.usb_manufacturer="MattairTech LLC" -mattairtech_xeno.build.board=SAMD_ZERO -mattairtech_xeno.build.core=arduino -mattairtech_xeno.build.variant=Xeno -mattairtech_xeno.build.variant_system_lib= -mattairtech_xeno.build.vid=0x16D0 -mattairtech_xeno.upload.protocol=sam-ba -mattairtech_xeno.bootloader.tool=arduino:openocd -mattairtech_xeno.menu.float.default=Print & String use auto-promoted doubles only -mattairtech_xeno.menu.float.default.build.floatconfig=FLOAT_BOTH_DOUBLES_ONLY -mattairtech_xeno.menu.float.print=Print uses separate singles and doubles -mattairtech_xeno.menu.float.print.build.floatconfig=FLOAT_PRINT_SINGLES_DOUBLES -mattairtech_xeno.menu.float.string=String uses separate singles and doubles -mattairtech_xeno.menu.float.string.build.floatconfig=FLOAT_STRING_SINGLES_DOUBLES -mattairtech_xeno.menu.float.both=Print & String use separate singles and doubles -mattairtech_xeno.menu.float.both.build.floatconfig=FLOAT_BOTH_SINGLES_DOUBLES -mattairtech_xeno.menu.config.disabled=config.h disabled -mattairtech_xeno.menu.config.disabled.build.buildconfig=CONFIG_H_DISABLED -mattairtech_xeno.menu.config.enabled=config.h enabled (mostly code size reductions) -mattairtech_xeno.menu.config.enabled.build.buildconfig=CONFIG_H_ENABLED -mattairtech_xeno.menu.clock.crystal_32k=32KHZ_CRYSTAL -mattairtech_xeno.menu.clock.crystal_32k.build.clockconfig=CLOCKCONFIG_32768HZ_CRYSTAL -mattairtech_xeno.menu.clock.crystal_hs=HIGH_SPEED_CRYSTAL -mattairtech_xeno.menu.clock.crystal_hs.build.clockconfig=CLOCKCONFIG_HS_CRYSTAL -mattairtech_xeno.menu.clock.internal=INTERNAL_OSCILLATOR -mattairtech_xeno.menu.clock.internal.build.clockconfig=CLOCKCONFIG_INTERNAL -mattairtech_xeno.menu.clock.internal_usb=INTERNAL_USB_CALIBRATED_OSCILLATOR -mattairtech_xeno.menu.clock.internal_usb.build.clockconfig=CLOCKCONFIG_INTERNAL_USB -mattairtech_xeno.menu.timer.timer_732Hz=732.4Hz (16-bit) -mattairtech_xeno.menu.timer.timer_732Hz.build.timerconfig=TIMER_732Hz -mattairtech_xeno.menu.timer.timer_366Hz=366.2Hz (16-bit) -mattairtech_xeno.menu.timer.timer_366Hz.build.timerconfig=TIMER_366Hz -mattairtech_xeno.menu.timer.timer_244Hz=244.1Hz (16-bit) -mattairtech_xeno.menu.timer.timer_244Hz.build.timerconfig=TIMER_244Hz -mattairtech_xeno.menu.timer.timer_183Hz=183.1Hz (16-bit) -mattairtech_xeno.menu.timer.timer_183Hz.build.timerconfig=TIMER_183Hz -mattairtech_xeno.menu.timer.timer_146Hz=146.5Hz (16-bit) -mattairtech_xeno.menu.timer.timer_146Hz.build.timerconfig=TIMER_146Hz -mattairtech_xeno.menu.timer.timer_122Hz=122.1Hz (16-bit) -mattairtech_xeno.menu.timer.timer_122Hz.build.timerconfig=TIMER_122Hz -mattairtech_xeno.menu.timer.timer_105Hz=104.6Hz (16-bit) -mattairtech_xeno.menu.timer.timer_105Hz.build.timerconfig=TIMER_105Hz -mattairtech_xeno.menu.timer.timer_81Hz=81.38Hz (16-bit) -mattairtech_xeno.menu.timer.timer_81Hz.build.timerconfig=TIMER_81Hz -mattairtech_xeno.menu.timer.timer_61Hz=61.04Hz (16-bit) -mattairtech_xeno.menu.timer.timer_61Hz.build.timerconfig=TIMER_61Hz -mattairtech_xeno.menu.timer.timer_31Hz=30.52Hz (16-bit) -mattairtech_xeno.menu.timer.timer_31Hz.build.timerconfig=TIMER_31Hz -mattairtech_xeno.menu.timer.timer_187500Hz=187500Hz (8-bit) -mattairtech_xeno.menu.timer.timer_187500Hz.build.timerconfig=TIMER_187500Hz -mattairtech_xeno.menu.timer.timer_93750Hz=93750Hz (8-bit) -mattairtech_xeno.menu.timer.timer_93750Hz.build.timerconfig=TIMER_93750Hz -mattairtech_xeno.menu.timer.timer_62500Hz=62500Hz (8-bit) -mattairtech_xeno.menu.timer.timer_62500Hz.build.timerconfig=TIMER_62500Hz -mattairtech_xeno.menu.timer.timer_37500Hz=37500Hz (8-bit) -mattairtech_xeno.menu.timer.timer_37500Hz.build.timerconfig=TIMER_37500Hz -mattairtech_xeno.menu.timer.timer_20833Hz=20833Hz (8-bit) -mattairtech_xeno.menu.timer.timer_20833Hz.build.timerconfig=TIMER_20833Hz -mattairtech_xeno.menu.timer.timer_12500Hz=12500Hz (8-bit) -mattairtech_xeno.menu.timer.timer_12500Hz.build.timerconfig=TIMER_12500Hz -mattairtech_xeno.menu.timer.timer_7500Hz=7500Hz (8-bit) -mattairtech_xeno.menu.timer.timer_7500Hz.build.timerconfig=TIMER_7500Hz -mattairtech_xeno.menu.timer.timer_4166Hz=4166Hz (8-bit) -mattairtech_xeno.menu.timer.timer_4166Hz.build.timerconfig=TIMER_4166Hz -mattairtech_xeno.menu.timer.timer_2930Hz=2930Hz (8-bit) -mattairtech_xeno.menu.timer.timer_2930Hz.build.timerconfig=TIMER_2930Hz -mattairtech_xeno.menu.timer.timer_1465Hz=1465Hz (8-bit, 16-bit for D51) -mattairtech_xeno.menu.timer.timer_1465Hz.build.timerconfig=TIMER_1465Hz -mattairtech_xeno.menu.cpu.samd21j18a=SAMD21J18A -mattairtech_xeno.menu.cpu.samd21j18a.upload.maximum_size=253952 -mattairtech_xeno.menu.cpu.samd21j18a.build.mcu=cortex-m0plus -mattairtech_xeno.menu.cpu.samd21j18a.build.mathlib=arm_cortexM0l_math -mattairtech_xeno.menu.cpu.samd21j18a.build.f_cpu=48000000L -mattairtech_xeno.menu.cpu.samd21j18a.build.usb_product="Xeno D21" -mattairtech_xeno.menu.cpu.samd21j18a.build.extra_flags=-D__SAMD21J18A__ {build.usb_flags} -DARM_MATH_CM0PLUS -mattairtech_xeno.menu.cpu.samd21j18a.build.ldscript=flash_256KB.ld -mattairtech_xeno.menu.cpu.samd21j18a.build.openocdscript=openocd_scripts/SAMD21J18A.cfg -mattairtech_xeno.menu.cpu.samd21j18a.bootloader.file=zero/binaries/sam_ba_Xeno_SAMD21J18A.bin -mattairtech_xeno.menu.cpu.samd21j17a=SAMD21J17A -mattairtech_xeno.menu.cpu.samd21j17a.upload.maximum_size=122880 -mattairtech_xeno.menu.cpu.samd21j17a.build.mcu=cortex-m0plus -mattairtech_xeno.menu.cpu.samd21j17a.build.mathlib=arm_cortexM0l_math -mattairtech_xeno.menu.cpu.samd21j17a.build.f_cpu=48000000L -mattairtech_xeno.menu.cpu.samd21j17a.build.usb_product="Xeno D21" -mattairtech_xeno.menu.cpu.samd21j17a.build.extra_flags=-D__SAMD21J17A__ {build.usb_flags} -DARM_MATH_CM0PLUS -mattairtech_xeno.menu.cpu.samd21j17a.build.ldscript=flash_128KB.ld -mattairtech_xeno.menu.cpu.samd21j17a.build.openocdscript=openocd_scripts/SAMD21J17A.cfg -mattairtech_xeno.menu.cpu.samd21j17a.bootloader.file=zero/binaries/sam_ba_Xeno_SAMD21J17A.bin -mattairtech_xeno.menu.cpu.samd21j16a=SAMD21J16A -mattairtech_xeno.menu.cpu.samd21j16a.upload.maximum_size=57344 -mattairtech_xeno.menu.cpu.samd21j16a.build.mcu=cortex-m0plus -mattairtech_xeno.menu.cpu.samd21j16a.build.mathlib=arm_cortexM0l_math -mattairtech_xeno.menu.cpu.samd21j16a.build.f_cpu=48000000L -mattairtech_xeno.menu.cpu.samd21j16a.build.usb_product="Xeno D21" -mattairtech_xeno.menu.cpu.samd21j16a.build.extra_flags=-D__SAMD21J16A__ {build.usb_flags} -DARM_MATH_CM0PLUS -mattairtech_xeno.menu.cpu.samd21j16a.build.ldscript=flash_64KB.ld -mattairtech_xeno.menu.cpu.samd21j16a.build.openocdscript=openocd_scripts/SAMD21J16A.cfg -mattairtech_xeno.menu.cpu.samd21j16a.bootloader.file=zero/binaries/sam_ba_Xeno_SAMD21J16A.bin -mattairtech_xeno.menu.cpu.samd21j15a=SAMD21J15A -mattairtech_xeno.menu.cpu.samd21j15a.upload.maximum_size=24576 -mattairtech_xeno.menu.cpu.samd21j15a.build.mcu=cortex-m0plus -mattairtech_xeno.menu.cpu.samd21j15a.build.mathlib=arm_cortexM0l_math -mattairtech_xeno.menu.cpu.samd21j15a.build.f_cpu=48000000L -mattairtech_xeno.menu.cpu.samd21j15a.build.usb_product="Xeno D21" -mattairtech_xeno.menu.cpu.samd21j15a.build.extra_flags=-D__SAMD21J15A__ {build.usb_flags} -DARM_MATH_CM0PLUS -mattairtech_xeno.menu.cpu.samd21j15a.build.ldscript=flash_32KB.ld -mattairtech_xeno.menu.cpu.samd21j15a.build.openocdscript=openocd_scripts/SAMD21J15A.cfg -mattairtech_xeno.menu.cpu.samd21j15a.bootloader.file=zero/binaries/sam_ba_Xeno_SAMD21J15A.bin -mattairtech_xeno.menu.cpu.samd51j20a_120=SAMD51J20A_120MHz -mattairtech_xeno.menu.cpu.samd51j20a_120.upload.maximum_size=1040384 -mattairtech_xeno.menu.cpu.samd51j20a_120.build.mcu=cortex-m4 -mattairtech_xeno.menu.cpu.samd51j20a_120.build.mathlib=arm_cortexM4lf_math -mattairtech_xeno.menu.cpu.samd51j20a_120.build.f_cpu=120000000L -mattairtech_xeno.menu.cpu.samd51j20a_120.build.usb_product="Xeno D51" -mattairtech_xeno.menu.cpu.samd51j20a_120.build.extra_flags=-D__SAMD51J20A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 -mattairtech_xeno.menu.cpu.samd51j20a_120.build.ldscript=flash_m4f_1MB.ld -mattairtech_xeno.menu.cpu.samd51j20a_120.build.openocdscript=openocd_scripts/SAMD51J20A.cfg -mattairtech_xeno.menu.cpu.samd51j20a_120.bootloader.file=zero/binaries/sam_ba_Xeno_SAMD51J20A.bin -mattairtech_xeno.menu.cpu.samd51j20a_48=SAMD51J20A_48MHz -mattairtech_xeno.menu.cpu.samd51j20a_48.upload.maximum_size=1040384 -mattairtech_xeno.menu.cpu.samd51j20a_48.build.mcu=cortex-m4 -mattairtech_xeno.menu.cpu.samd51j20a_48.build.mathlib=arm_cortexM4lf_math -mattairtech_xeno.menu.cpu.samd51j20a_48.build.f_cpu=48000000L -mattairtech_xeno.menu.cpu.samd51j20a_48.build.usb_product="Xeno D51" -mattairtech_xeno.menu.cpu.samd51j20a_48.build.extra_flags=-D__SAMD51J20A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 -mattairtech_xeno.menu.cpu.samd51j20a_48.build.ldscript=flash_m4f_1MB.ld -mattairtech_xeno.menu.cpu.samd51j20a_48.build.openocdscript=openocd_scripts/SAMD51J20A.cfg -mattairtech_xeno.menu.cpu.samd51j20a_48.bootloader.file=zero/binaries/sam_ba_Xeno_SAMD51J20A.bin -mattairtech_xeno.menu.cpu.samd51j19a_120=SAMD51J19A_120MHz -mattairtech_xeno.menu.cpu.samd51j19a_120.upload.maximum_size=516096 -mattairtech_xeno.menu.cpu.samd51j19a_120.build.mcu=cortex-m4 -mattairtech_xeno.menu.cpu.samd51j19a_120.build.mathlib=arm_cortexM4lf_math -mattairtech_xeno.menu.cpu.samd51j19a_120.build.f_cpu=120000000L -mattairtech_xeno.menu.cpu.samd51j19a_120.build.usb_product="Xeno D51" -mattairtech_xeno.menu.cpu.samd51j19a_120.build.extra_flags=-D__SAMD51J19A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 -mattairtech_xeno.menu.cpu.samd51j19a_120.build.ldscript=flash_m4f_512KB.ld -mattairtech_xeno.menu.cpu.samd51j19a_120.build.openocdscript=openocd_scripts/SAMD51J19A.cfg -mattairtech_xeno.menu.cpu.samd51j19a_120.bootloader.file=zero/binaries/sam_ba_Xeno_SAMD51J19A.bin -mattairtech_xeno.menu.cpu.samd51j19a_48=SAMD51J19A_48MHz -mattairtech_xeno.menu.cpu.samd51j19a_48.upload.maximum_size=516096 -mattairtech_xeno.menu.cpu.samd51j19a_48.build.mcu=cortex-m4 -mattairtech_xeno.menu.cpu.samd51j19a_48.build.mathlib=arm_cortexM4lf_math -mattairtech_xeno.menu.cpu.samd51j19a_48.build.f_cpu=48000000L -mattairtech_xeno.menu.cpu.samd51j19a_48.build.usb_product="Xeno D51" -mattairtech_xeno.menu.cpu.samd51j19a_48.build.extra_flags=-D__SAMD51J19A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 -mattairtech_xeno.menu.cpu.samd51j19a_48.build.ldscript=flash_m4f_512KB.ld -mattairtech_xeno.menu.cpu.samd51j19a_48.build.openocdscript=openocd_scripts/SAMD51J19A.cfg -mattairtech_xeno.menu.cpu.samd51j19a_48.bootloader.file=zero/binaries/sam_ba_Xeno_SAMD51J19A.bin -mattairtech_xeno.menu.cpu.samd51j18a_120=SAMD51J18A_120MHz -mattairtech_xeno.menu.cpu.samd51j18a_120.upload.maximum_size=253952 -mattairtech_xeno.menu.cpu.samd51j18a_120.build.mcu=cortex-m4 -mattairtech_xeno.menu.cpu.samd51j18a_120.build.mathlib=arm_cortexM4lf_math -mattairtech_xeno.menu.cpu.samd51j18a_120.build.f_cpu=120000000L -mattairtech_xeno.menu.cpu.samd51j18a_120.build.usb_product="Xeno D51" -mattairtech_xeno.menu.cpu.samd51j18a_120.build.extra_flags=-D__SAMD51J18A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 -mattairtech_xeno.menu.cpu.samd51j18a_120.build.ldscript=flash_m4f_256KB.ld -mattairtech_xeno.menu.cpu.samd51j18a_120.build.openocdscript=openocd_scripts/SAMD51J18A.cfg -mattairtech_xeno.menu.cpu.samd51j18a_120.bootloader.file=zero/binaries/sam_ba_Xeno_SAMD51J18A.bin -mattairtech_xeno.menu.cpu.samd51j18a_48=SAMD51J18A_48MHz -mattairtech_xeno.menu.cpu.samd51j18a_48.upload.maximum_size=253952 -mattairtech_xeno.menu.cpu.samd51j18a_48.build.mcu=cortex-m4 -mattairtech_xeno.menu.cpu.samd51j18a_48.build.mathlib=arm_cortexM4lf_math -mattairtech_xeno.menu.cpu.samd51j18a_48.build.f_cpu=48000000L -mattairtech_xeno.menu.cpu.samd51j18a_48.build.usb_product="Xeno D51" -mattairtech_xeno.menu.cpu.samd51j18a_48.build.extra_flags=-D__SAMD51J18A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 -mattairtech_xeno.menu.cpu.samd51j18a_48.build.ldscript=flash_m4f_256KB.ld -mattairtech_xeno.menu.cpu.samd51j18a_48.build.openocdscript=openocd_scripts/SAMD51J18A.cfg -mattairtech_xeno.menu.cpu.samd51j18a_48.bootloader.file=zero/binaries/sam_ba_Xeno_SAMD51J18A.bin -mattairtech_xeno.menu.cpu.saml21j18b=SAML21J18B -mattairtech_xeno.menu.cpu.saml21j18b.upload.maximum_size=253952 -mattairtech_xeno.menu.cpu.saml21j18b.build.mcu=cortex-m0plus -mattairtech_xeno.menu.cpu.saml21j18b.build.mathlib=arm_cortexM0l_math -mattairtech_xeno.menu.cpu.saml21j18b.build.f_cpu=48000000L -mattairtech_xeno.menu.cpu.saml21j18b.build.usb_product="Xeno L21" -mattairtech_xeno.menu.cpu.saml21j18b.build.extra_flags=-D__SAML21J18B__ {build.usb_flags} -DARM_MATH_CM0PLUS -mattairtech_xeno.menu.cpu.saml21j18b.build.ldscript=flash_256KB.ld -mattairtech_xeno.menu.cpu.saml21j18b.build.openocdscript=openocd_scripts/SAML21J18B.cfg -mattairtech_xeno.menu.cpu.saml21j18b.bootloader.file=zero/binaries/sam_ba_Xeno_SAML21J18B.bin -mattairtech_xeno.menu.cpu.saml21j17b=SAML21J17B -mattairtech_xeno.menu.cpu.saml21j17b.upload.maximum_size=122880 -mattairtech_xeno.menu.cpu.saml21j17b.build.mcu=cortex-m0plus -mattairtech_xeno.menu.cpu.saml21j17b.build.mathlib=arm_cortexM0l_math -mattairtech_xeno.menu.cpu.saml21j17b.build.f_cpu=48000000L -mattairtech_xeno.menu.cpu.saml21j17b.build.usb_product="Xeno L21" -mattairtech_xeno.menu.cpu.saml21j17b.build.extra_flags=-D__SAML21J17B__ {build.usb_flags} -DARM_MATH_CM0PLUS -mattairtech_xeno.menu.cpu.saml21j17b.build.ldscript=flash_128KB.ld -mattairtech_xeno.menu.cpu.saml21j17b.build.openocdscript=openocd_scripts/SAML21J17B.cfg -mattairtech_xeno.menu.cpu.saml21j17b.bootloader.file=zero/binaries/sam_ba_Xeno_SAML21J17B.bin -mattairtech_xeno.menu.cpu.saml21j16b=SAML21J16B -mattairtech_xeno.menu.cpu.saml21j16b.upload.maximum_size=57344 -mattairtech_xeno.menu.cpu.saml21j16b.build.mcu=cortex-m0plus -mattairtech_xeno.menu.cpu.saml21j16b.build.mathlib=arm_cortexM0l_math -mattairtech_xeno.menu.cpu.saml21j16b.build.f_cpu=48000000L -mattairtech_xeno.menu.cpu.saml21j16b.build.usb_product="Xeno L21" -mattairtech_xeno.menu.cpu.saml21j16b.build.extra_flags=-D__SAML21J16B__ {build.usb_flags} -DARM_MATH_CM0PLUS -mattairtech_xeno.menu.cpu.saml21j16b.build.ldscript=flash_64KB.ld -mattairtech_xeno.menu.cpu.saml21j16b.build.openocdscript=openocd_scripts/SAML21J16B.cfg -mattairtech_xeno.menu.cpu.saml21j16b.bootloader.file=zero/binaries/sam_ba_Xeno_SAML21J16B.bin -mattairtech_xeno.menu.cpu.samc21j18a=SAMC21J18A -mattairtech_xeno.menu.cpu.samc21j18a.upload.maximum_size=253952 -mattairtech_xeno.menu.cpu.samc21j18a.build.mcu=cortex-m0plus -mattairtech_xeno.menu.cpu.samc21j18a.build.mathlib=arm_cortexM0l_math -mattairtech_xeno.menu.cpu.samc21j18a.build.f_cpu=48000000L -mattairtech_xeno.menu.cpu.samc21j18a.build.usb_product="Xeno C21" -mattairtech_xeno.menu.cpu.samc21j18a.build.extra_flags=-D__SAMC21J18A__ -DARM_MATH_CM0PLUS -mattairtech_xeno.menu.cpu.samc21j18a.build.ldscript=flash_256KB.ld -mattairtech_xeno.menu.cpu.samc21j18a.build.openocdscript=openocd_scripts/SAMC21J18A.cfg -mattairtech_xeno.menu.cpu.samc21j18a.bootloader.file=zero/binaries/sam_ba_Xeno_SAMC21J18A.bin -mattairtech_xeno.menu.cpu.samc21j17a=SAMC21J17A -mattairtech_xeno.menu.cpu.samc21j17a.upload.maximum_size=122880 -mattairtech_xeno.menu.cpu.samc21j17a.build.mcu=cortex-m0plus -mattairtech_xeno.menu.cpu.samc21j17a.build.mathlib=arm_cortexM0l_math -mattairtech_xeno.menu.cpu.samc21j17a.build.f_cpu=48000000L -mattairtech_xeno.menu.cpu.samc21j17a.build.usb_product="Xeno C21" -mattairtech_xeno.menu.cpu.samc21j17a.build.extra_flags=-D__SAMC21J17A__ -DARM_MATH_CM0PLUS -mattairtech_xeno.menu.cpu.samc21j17a.build.ldscript=flash_128KB.ld -mattairtech_xeno.menu.cpu.samc21j17a.build.openocdscript=openocd_scripts/SAMC21J17A.cfg -mattairtech_xeno.menu.cpu.samc21j17a.bootloader.file=zero/binaries/sam_ba_Xeno_SAMC21J17A.bin -mattairtech_xeno.menu.cpu.samc21j16a=SAMC21J16A -mattairtech_xeno.menu.cpu.samc21j16a.upload.maximum_size=57344 -mattairtech_xeno.menu.cpu.samc21j16a.build.mcu=cortex-m0plus -mattairtech_xeno.menu.cpu.samc21j16a.build.mathlib=arm_cortexM0l_math -mattairtech_xeno.menu.cpu.samc21j16a.build.f_cpu=48000000L -mattairtech_xeno.menu.cpu.samc21j16a.build.usb_product="Xeno C21" -mattairtech_xeno.menu.cpu.samc21j16a.build.extra_flags=-D__SAMC21J16A__ -DARM_MATH_CM0PLUS -mattairtech_xeno.menu.cpu.samc21j16a.build.ldscript=flash_64KB.ld -mattairtech_xeno.menu.cpu.samc21j16a.build.openocdscript=openocd_scripts/SAMC21J16A.cfg -mattairtech_xeno.menu.cpu.samc21j16a.bootloader.file=zero/binaries/sam_ba_Xeno_SAMC21J16A.bin -mattairtech_xeno.menu.cpu.samc21j15a=SAMC21J15A -mattairtech_xeno.menu.cpu.samc21j15a.upload.maximum_size=24576 -mattairtech_xeno.menu.cpu.samc21j15a.build.mcu=cortex-m0plus -mattairtech_xeno.menu.cpu.samc21j15a.build.mathlib=arm_cortexM0l_math -mattairtech_xeno.menu.cpu.samc21j15a.build.f_cpu=48000000L -mattairtech_xeno.menu.cpu.samc21j15a.build.usb_product="Xeno C21" -mattairtech_xeno.menu.cpu.samc21j15a.build.extra_flags=-D__SAMC21J15A__ -DARM_MATH_CM0PLUS -mattairtech_xeno.menu.cpu.samc21j15a.build.ldscript=flash_32KB.ld -mattairtech_xeno.menu.cpu.samc21j15a.build.openocdscript=openocd_scripts/SAMC21J15A.cfg -mattairtech_xeno.menu.cpu.samc21j15a.bootloader.file=zero/binaries/sam_ba_Xeno_SAMC21J15A.bin -mattairtech_xeno.menu.bootloader.8kb=8KB_BOOTLOADER -mattairtech_xeno.menu.bootloader.8kb.build.bootloader_size=__8KB_BOOTLOADER__ -mattairtech_xeno.menu.bootloader.8kb.build.ldscript_path=linker_scripts/gcc/8KB_Bootloader -mattairtech_xeno.menu.bootloader.8kb.upload.tool=MattairTech_Arduino:bossac -mattairtech_xeno.menu.bootloader.8kb.upload.use_1200bps_touch=true -mattairtech_xeno.menu.bootloader.8kb.upload.wait_for_upload_port=true -mattairtech_xeno.menu.bootloader.8kb.upload.native_usb=true -mattairtech_xeno.menu.bootloader.16kb=16KB_BOOTLOADER -mattairtech_xeno.menu.bootloader.16kb.build.bootloader_size=__16KB_BOOTLOADER__ -mattairtech_xeno.menu.bootloader.16kb.build.ldscript_path=linker_scripts/gcc/16KB_Bootloader -mattairtech_xeno.menu.bootloader.16kb.upload.tool=MattairTech_Arduino:bossac -mattairtech_xeno.menu.bootloader.16kb.upload.use_1200bps_touch=true -mattairtech_xeno.menu.bootloader.16kb.upload.wait_for_upload_port=true -mattairtech_xeno.menu.bootloader.16kb.upload.native_usb=true -mattairtech_xeno.menu.bootloader.0kb=NO_BOOTLOADER -mattairtech_xeno.menu.bootloader.0kb.build.bootloader_size=__NO_BOOTLOADER__ -mattairtech_xeno.menu.bootloader.0kb.build.ldscript_path=linker_scripts/gcc/No_Bootloader -mattairtech_xeno.menu.bootloader.0kb.upload.tool=arduino:openocd -mattairtech_xeno.menu.bootloader.0kb.upload.use_1200bps_touch=false -mattairtech_xeno.menu.bootloader.0kb.upload.wait_for_upload_port=false -mattairtech_xeno.menu.bootloader.0kb.upload.native_usb=false -mattairtech_xeno.menu.serial.one_uart=ONE_UART_ONE_WIRE_ONE_SPI -mattairtech_xeno.menu.serial.one_uart.build.serialcom_uart=ONE_UART -mattairtech_xeno.menu.serial.one_uart.build.serialcom_wire=ONE_WIRE -mattairtech_xeno.menu.serial.one_uart.build.serialcom_spi=ONE_SPI -mattairtech_xeno.menu.serial.one_uart_two_spi=ONE_UART_ONE_WIRE_TWO_SPI -mattairtech_xeno.menu.serial.one_uart_two_spi.build.serialcom_uart=ONE_UART -mattairtech_xeno.menu.serial.one_uart_two_spi.build.serialcom_wire=ONE_WIRE -mattairtech_xeno.menu.serial.one_uart_two_spi.build.serialcom_spi=TWO_SPI -mattairtech_xeno.menu.serial.one_uart_two_wire=ONE_UART_TWO_WIRE_ONE_SPI -mattairtech_xeno.menu.serial.one_uart_two_wire.build.serialcom_uart=ONE_UART -mattairtech_xeno.menu.serial.one_uart_two_wire.build.serialcom_wire=TWO_WIRE -mattairtech_xeno.menu.serial.one_uart_two_wire.build.serialcom_spi=ONE_SPI -mattairtech_xeno.menu.serial.two_uart=TWO_UART_ONE_WIRE_ONE_SPI -mattairtech_xeno.menu.serial.two_uart.build.serialcom_uart=TWO_UART -mattairtech_xeno.menu.serial.two_uart.build.serialcom_wire=ONE_WIRE -mattairtech_xeno.menu.serial.two_uart.build.serialcom_spi=ONE_SPI -mattairtech_xeno.menu.serial.two_uart_two_spi=TWO_UART_ONE_WIRE_TWO_SPI -mattairtech_xeno.menu.serial.two_uart_two_spi.build.serialcom_uart=TWO_UART -mattairtech_xeno.menu.serial.two_uart_two_spi.build.serialcom_wire=ONE_WIRE -mattairtech_xeno.menu.serial.two_uart_two_spi.build.serialcom_spi=TWO_SPI -mattairtech_xeno.menu.serial.two_uart_two_wire=TWO_UART_TWO_WIRE_ONE_SPI -mattairtech_xeno.menu.serial.two_uart_two_wire.build.serialcom_uart=TWO_UART -mattairtech_xeno.menu.serial.two_uart_two_wire.build.serialcom_wire=TWO_WIRE -mattairtech_xeno.menu.serial.two_uart_two_wire.build.serialcom_spi=ONE_SPI -mattairtech_xeno.menu.serial.three_uart=THREE_UART_ONE_WIRE_ONE_SPI -mattairtech_xeno.menu.serial.three_uart.build.serialcom_uart=THREE_UART -mattairtech_xeno.menu.serial.three_uart.build.serialcom_wire=ONE_WIRE -mattairtech_xeno.menu.serial.three_uart.build.serialcom_spi=ONE_SPI -mattairtech_xeno.menu.serial.three_uart_two_spi=THREE_UART_ONE_WIRE_TWO_SPI -mattairtech_xeno.menu.serial.three_uart_two_spi.build.serialcom_uart=THREE_UART -mattairtech_xeno.menu.serial.three_uart_two_spi.build.serialcom_wire=ONE_WIRE -mattairtech_xeno.menu.serial.three_uart_two_spi.build.serialcom_spi=TWO_SPI -mattairtech_xeno.menu.serial.three_uart_two_wire=THREE_UART_TWO_WIRE_ONE_SPI -mattairtech_xeno.menu.serial.three_uart_two_wire.build.serialcom_uart=THREE_UART -mattairtech_xeno.menu.serial.three_uart_two_wire.build.serialcom_wire=TWO_WIRE -mattairtech_xeno.menu.serial.three_uart_two_wire.build.serialcom_spi=ONE_SPI -mattairtech_xeno.menu.serial.no_uart=NO_UART_ONE_WIRE_ONE_SPI -mattairtech_xeno.menu.serial.no_uart.build.serialcom_uart=NO_UART -mattairtech_xeno.menu.serial.no_uart.build.serialcom_wire=ONE_WIRE -mattairtech_xeno.menu.serial.no_uart.build.serialcom_spi=ONE_SPI -mattairtech_xeno.menu.usb.cdc=CDC_ONLY -mattairtech_xeno.menu.usb.cdc.build.usbcom=CDC_ONLY -mattairtech_xeno.menu.usb.cdc.build.pid=0x0557 -mattairtech_xeno.menu.usb.cdc_hid=CDC_HID -mattairtech_xeno.menu.usb.cdc_hid.build.usbcom=CDC_HID -mattairtech_xeno.menu.usb.cdc_hid.build.pid=0x0856 -mattairtech_xeno.menu.usb.withcdc=WITH_CDC -mattairtech_xeno.menu.usb.withcdc.build.usbcom=WITH_CDC -mattairtech_xeno.menu.usb.withcdc.build.pid=0x0B41 -mattairtech_xeno.menu.usb.hid=HID_ONLY -mattairtech_xeno.menu.usb.hid.build.usbcom=HID_ONLY -mattairtech_xeno.menu.usb.hid.build.pid=0x0B40 -mattairtech_xeno.menu.usb.nocdc=WITHOUT_CDC -mattairtech_xeno.menu.usb.nocdc.build.usbcom=WITHOUT_CDC -mattairtech_xeno.menu.usb.nocdc.build.pid=0x0A0C -mattairtech_xeno.menu.usb.none=USB_DISABLED -mattairtech_xeno.menu.usb.none.build.usbcom=USB_DISABLED -mattairtech_xeno.menu.usb.none.build.pid=0x0856 - - -# MattairTech MT-D21E (rev B) -mattairtech_mt_d21e_revb.name=MattairTech MT-D21E (rev B) -mattairtech_mt_d21e_revb.vid.0=0x16D0 -mattairtech_mt_d21e_revb.pid.0=0x0557 -mattairtech_mt_d21e_revb.vid.1=0x16D0 -mattairtech_mt_d21e_revb.pid.1=0x0856 -mattairtech_mt_d21e_revb.vid.2=0x16D0 -mattairtech_mt_d21e_revb.pid.2=0x0B41 -mattairtech_mt_d21e_revb.vid.3=0x16D0 -mattairtech_mt_d21e_revb.pid.3=0x0B40 -mattairtech_mt_d21e_revb.vid.4=0x16D0 -mattairtech_mt_d21e_revb.pid.4=0x0A0C -mattairtech_mt_d21e_revb.vid.5=0x16D0 -mattairtech_mt_d21e_revb.pid.5=0x0856 -mattairtech_mt_d21e_revb.build.mcu=cortex-m0plus -mattairtech_mt_d21e_revb.build.mathlib=arm_cortexM0l_math -mattairtech_mt_d21e_revb.build.f_cpu=48000000L -mattairtech_mt_d21e_revb.build.usb_product="MT-D21E Rev B" -mattairtech_mt_d21e_revb.build.usb_manufacturer="MattairTech LLC" -mattairtech_mt_d21e_revb.build.board=SAMD_ZERO -mattairtech_mt_d21e_revb.build.core=arduino -mattairtech_mt_d21e_revb.build.variant=MT_D21E_revB -mattairtech_mt_d21e_revb.build.variant_system_lib= -mattairtech_mt_d21e_revb.build.vid=0x16D0 -mattairtech_mt_d21e_revb.upload.protocol=sam-ba -mattairtech_mt_d21e_revb.bootloader.tool=arduino:openocd -mattairtech_mt_d21e_revb.menu.float.default=Print & String use auto-promoted doubles only -mattairtech_mt_d21e_revb.menu.float.default.build.floatconfig=FLOAT_BOTH_DOUBLES_ONLY -mattairtech_mt_d21e_revb.menu.float.print=Print uses separate singles and doubles -mattairtech_mt_d21e_revb.menu.float.print.build.floatconfig=FLOAT_PRINT_SINGLES_DOUBLES -mattairtech_mt_d21e_revb.menu.float.string=String uses separate singles and doubles -mattairtech_mt_d21e_revb.menu.float.string.build.floatconfig=FLOAT_STRING_SINGLES_DOUBLES -mattairtech_mt_d21e_revb.menu.float.both=Print & String use separate singles and doubles -mattairtech_mt_d21e_revb.menu.float.both.build.floatconfig=FLOAT_BOTH_SINGLES_DOUBLES -mattairtech_mt_d21e_revb.menu.config.disabled=config.h disabled -mattairtech_mt_d21e_revb.menu.config.disabled.build.buildconfig=CONFIG_H_DISABLED -mattairtech_mt_d21e_revb.menu.config.enabled=config.h enabled (mostly code size reductions) -mattairtech_mt_d21e_revb.menu.config.enabled.build.buildconfig=CONFIG_H_ENABLED -mattairtech_mt_d21e_revb.menu.clock.crystal_32k=32KHZ_CRYSTAL -mattairtech_mt_d21e_revb.menu.clock.crystal_32k.build.clockconfig=CLOCKCONFIG_32768HZ_CRYSTAL -mattairtech_mt_d21e_revb.menu.clock.crystal_hs=HIGH_SPEED_CRYSTAL -mattairtech_mt_d21e_revb.menu.clock.crystal_hs.build.clockconfig=CLOCKCONFIG_HS_CRYSTAL -mattairtech_mt_d21e_revb.menu.clock.internal=INTERNAL_OSCILLATOR -mattairtech_mt_d21e_revb.menu.clock.internal.build.clockconfig=CLOCKCONFIG_INTERNAL -mattairtech_mt_d21e_revb.menu.clock.internal_usb=INTERNAL_USB_CALIBRATED_OSCILLATOR -mattairtech_mt_d21e_revb.menu.clock.internal_usb.build.clockconfig=CLOCKCONFIG_INTERNAL_USB -mattairtech_mt_d21e_revb.menu.timer.timer_732Hz=732.4Hz (16-bit) -mattairtech_mt_d21e_revb.menu.timer.timer_732Hz.build.timerconfig=TIMER_732Hz -mattairtech_mt_d21e_revb.menu.timer.timer_366Hz=366.2Hz (16-bit) -mattairtech_mt_d21e_revb.menu.timer.timer_366Hz.build.timerconfig=TIMER_366Hz -mattairtech_mt_d21e_revb.menu.timer.timer_244Hz=244.1Hz (16-bit) -mattairtech_mt_d21e_revb.menu.timer.timer_244Hz.build.timerconfig=TIMER_244Hz -mattairtech_mt_d21e_revb.menu.timer.timer_183Hz=183.1Hz (16-bit) -mattairtech_mt_d21e_revb.menu.timer.timer_183Hz.build.timerconfig=TIMER_183Hz -mattairtech_mt_d21e_revb.menu.timer.timer_146Hz=146.5Hz (16-bit) -mattairtech_mt_d21e_revb.menu.timer.timer_146Hz.build.timerconfig=TIMER_146Hz -mattairtech_mt_d21e_revb.menu.timer.timer_122Hz=122.1Hz (16-bit) -mattairtech_mt_d21e_revb.menu.timer.timer_122Hz.build.timerconfig=TIMER_122Hz -mattairtech_mt_d21e_revb.menu.timer.timer_105Hz=104.6Hz (16-bit) -mattairtech_mt_d21e_revb.menu.timer.timer_105Hz.build.timerconfig=TIMER_105Hz -mattairtech_mt_d21e_revb.menu.timer.timer_81Hz=81.38Hz (16-bit) -mattairtech_mt_d21e_revb.menu.timer.timer_81Hz.build.timerconfig=TIMER_81Hz -mattairtech_mt_d21e_revb.menu.timer.timer_61Hz=61.04Hz (16-bit) -mattairtech_mt_d21e_revb.menu.timer.timer_61Hz.build.timerconfig=TIMER_61Hz -mattairtech_mt_d21e_revb.menu.timer.timer_31Hz=30.52Hz (16-bit) -mattairtech_mt_d21e_revb.menu.timer.timer_31Hz.build.timerconfig=TIMER_31Hz -mattairtech_mt_d21e_revb.menu.timer.timer_187500Hz=187500Hz (8-bit) -mattairtech_mt_d21e_revb.menu.timer.timer_187500Hz.build.timerconfig=TIMER_187500Hz -mattairtech_mt_d21e_revb.menu.timer.timer_93750Hz=93750Hz (8-bit) -mattairtech_mt_d21e_revb.menu.timer.timer_93750Hz.build.timerconfig=TIMER_93750Hz -mattairtech_mt_d21e_revb.menu.timer.timer_62500Hz=62500Hz (8-bit) -mattairtech_mt_d21e_revb.menu.timer.timer_62500Hz.build.timerconfig=TIMER_62500Hz -mattairtech_mt_d21e_revb.menu.timer.timer_37500Hz=37500Hz (8-bit) -mattairtech_mt_d21e_revb.menu.timer.timer_37500Hz.build.timerconfig=TIMER_37500Hz -mattairtech_mt_d21e_revb.menu.timer.timer_20833Hz=20833Hz (8-bit) -mattairtech_mt_d21e_revb.menu.timer.timer_20833Hz.build.timerconfig=TIMER_20833Hz -mattairtech_mt_d21e_revb.menu.timer.timer_12500Hz=12500Hz (8-bit) -mattairtech_mt_d21e_revb.menu.timer.timer_12500Hz.build.timerconfig=TIMER_12500Hz -mattairtech_mt_d21e_revb.menu.timer.timer_7500Hz=7500Hz (8-bit) -mattairtech_mt_d21e_revb.menu.timer.timer_7500Hz.build.timerconfig=TIMER_7500Hz -mattairtech_mt_d21e_revb.menu.timer.timer_4166Hz=4166Hz (8-bit) -mattairtech_mt_d21e_revb.menu.timer.timer_4166Hz.build.timerconfig=TIMER_4166Hz -mattairtech_mt_d21e_revb.menu.timer.timer_2930Hz=2930Hz (8-bit) -mattairtech_mt_d21e_revb.menu.timer.timer_2930Hz.build.timerconfig=TIMER_2930Hz -mattairtech_mt_d21e_revb.menu.timer.timer_1465Hz=1465Hz (8-bit, 16-bit for D51) -mattairtech_mt_d21e_revb.menu.timer.timer_1465Hz.build.timerconfig=TIMER_1465Hz -mattairtech_mt_d21e_revb.menu.cpu.samd21e18a=SAMD21E18A -mattairtech_mt_d21e_revb.menu.cpu.samd21e18a.upload.maximum_size=253952 -mattairtech_mt_d21e_revb.menu.cpu.samd21e18a.build.extra_flags=-D__SAMD21E18A__ {build.usb_flags} -DARM_MATH_CM0PLUS -mattairtech_mt_d21e_revb.menu.cpu.samd21e18a.build.ldscript=flash_256KB.ld -mattairtech_mt_d21e_revb.menu.cpu.samd21e18a.build.openocdscript=openocd_scripts/SAMD21E18A.cfg -mattairtech_mt_d21e_revb.menu.cpu.samd21e18a.bootloader.file=zero/binaries/sam_ba_MT_D21E_rev_B_SAMD21E18A.bin -mattairtech_mt_d21e_revb.menu.cpu.samd21e17a=SAMD21E17A -mattairtech_mt_d21e_revb.menu.cpu.samd21e17a.upload.maximum_size=122880 -mattairtech_mt_d21e_revb.menu.cpu.samd21e17a.build.extra_flags=-D__SAMD21E17A__ {build.usb_flags} -DARM_MATH_CM0PLUS -mattairtech_mt_d21e_revb.menu.cpu.samd21e17a.build.ldscript=flash_128KB.ld -mattairtech_mt_d21e_revb.menu.cpu.samd21e17a.build.openocdscript=openocd_scripts/SAMD21E17A.cfg -mattairtech_mt_d21e_revb.menu.cpu.samd21e17a.bootloader.file=zero/binaries/sam_ba_MT_D21E_rev_B_SAMD21E17A.bin -mattairtech_mt_d21e_revb.menu.cpu.samd21e16a=SAMD21E16A -mattairtech_mt_d21e_revb.menu.cpu.samd21e16a.upload.maximum_size=57344 -mattairtech_mt_d21e_revb.menu.cpu.samd21e16a.build.extra_flags=-D__SAMD21E16A__ {build.usb_flags} -DARM_MATH_CM0PLUS -mattairtech_mt_d21e_revb.menu.cpu.samd21e16a.build.ldscript=flash_64KB.ld -mattairtech_mt_d21e_revb.menu.cpu.samd21e16a.build.openocdscript=openocd_scripts/SAMD21E16A.cfg -mattairtech_mt_d21e_revb.menu.cpu.samd21e16a.bootloader.file=zero/binaries/sam_ba_MT_D21E_rev_B_SAMD21E16A.bin -mattairtech_mt_d21e_revb.menu.cpu.samd21e15a=SAMD21E15A -mattairtech_mt_d21e_revb.menu.cpu.samd21e15a.upload.maximum_size=24576 -mattairtech_mt_d21e_revb.menu.cpu.samd21e15a.build.extra_flags=-D__SAMD21E15A__ {build.usb_flags} -DARM_MATH_CM0PLUS -mattairtech_mt_d21e_revb.menu.cpu.samd21e15a.build.ldscript=flash_32KB.ld -mattairtech_mt_d21e_revb.menu.cpu.samd21e15a.build.openocdscript=openocd_scripts/SAMD21E15A.cfg -mattairtech_mt_d21e_revb.menu.cpu.samd21e15a.bootloader.file=zero/binaries/sam_ba_MT_D21E_rev_B_SAMD21E15A.bin -mattairtech_mt_d21e_revb.menu.cpu.saml21e18b=SAML21E18B -mattairtech_mt_d21e_revb.menu.cpu.saml21e18b.upload.maximum_size=253952 -mattairtech_mt_d21e_revb.menu.cpu.saml21e18b.build.extra_flags=-D__SAML21E18B__ {build.usb_flags} -DARM_MATH_CM0PLUS -mattairtech_mt_d21e_revb.menu.cpu.saml21e18b.build.ldscript=flash_256KB.ld -mattairtech_mt_d21e_revb.menu.cpu.saml21e18b.build.openocdscript=openocd_scripts/SAML21E18B.cfg -mattairtech_mt_d21e_revb.menu.cpu.saml21e18b.bootloader.file=zero/binaries/sam_ba_MT_D21E_rev_B_SAML21E18B.bin -mattairtech_mt_d21e_revb.menu.cpu.saml21e17b=SAML21E17B -mattairtech_mt_d21e_revb.menu.cpu.saml21e17b.upload.maximum_size=122880 -mattairtech_mt_d21e_revb.menu.cpu.saml21e17b.build.extra_flags=-D__SAML21E17B__ {build.usb_flags} -DARM_MATH_CM0PLUS -mattairtech_mt_d21e_revb.menu.cpu.saml21e17b.build.ldscript=flash_128KB.ld -mattairtech_mt_d21e_revb.menu.cpu.saml21e17b.build.openocdscript=openocd_scripts/SAML21E17B.cfg -mattairtech_mt_d21e_revb.menu.cpu.saml21e17b.bootloader.file=zero/binaries/sam_ba_MT_D21E_rev_B_SAML21E17B.bin -mattairtech_mt_d21e_revb.menu.cpu.saml21e16b=SAML21E16B -mattairtech_mt_d21e_revb.menu.cpu.saml21e16b.upload.maximum_size=57344 -mattairtech_mt_d21e_revb.menu.cpu.saml21e16b.build.extra_flags=-D__SAML21E16B__ {build.usb_flags} -DARM_MATH_CM0PLUS -mattairtech_mt_d21e_revb.menu.cpu.saml21e16b.build.ldscript=flash_64KB.ld -mattairtech_mt_d21e_revb.menu.cpu.saml21e16b.build.openocdscript=openocd_scripts/SAML21E16B.cfg -mattairtech_mt_d21e_revb.menu.cpu.saml21e16b.bootloader.file=zero/binaries/sam_ba_MT_D21E_rev_B_SAML21E16B.bin -mattairtech_mt_d21e_revb.menu.cpu.saml21e15b=SAML21E15B -mattairtech_mt_d21e_revb.menu.cpu.saml21e15b.upload.maximum_size=24576 -mattairtech_mt_d21e_revb.menu.cpu.saml21e15b.build.extra_flags=-D__SAML21E15B__ {build.usb_flags} -DARM_MATH_CM0PLUS -mattairtech_mt_d21e_revb.menu.cpu.saml21e15b.build.ldscript=flash_32KB.ld -mattairtech_mt_d21e_revb.menu.cpu.saml21e15b.build.openocdscript=openocd_scripts/SAML21E15B.cfg -mattairtech_mt_d21e_revb.menu.cpu.saml21e15b.bootloader.file=zero/binaries/sam_ba_MT_D21E_rev_B_SAML21E15B.bin -mattairtech_mt_d21e_revb.menu.cpu.samc21e18a=SAMC21E18A -mattairtech_mt_d21e_revb.menu.cpu.samc21e18a.upload.maximum_size=253952 -mattairtech_mt_d21e_revb.menu.cpu.samc21e18a.build.extra_flags=-D__SAMC21E18A__ -DARM_MATH_CM0PLUS -mattairtech_mt_d21e_revb.menu.cpu.samc21e18a.build.ldscript=flash_256KB.ld -mattairtech_mt_d21e_revb.menu.cpu.samc21e18a.build.openocdscript=openocd_scripts/SAMC21E18A.cfg -mattairtech_mt_d21e_revb.menu.cpu.samc21e18a.bootloader.file=zero/binaries/sam_ba_MT_D21E_rev_B_SAMC21E18A.bin -mattairtech_mt_d21e_revb.menu.cpu.samc21e17a=SAMC21E17A -mattairtech_mt_d21e_revb.menu.cpu.samc21e17a.upload.maximum_size=122880 -mattairtech_mt_d21e_revb.menu.cpu.samc21e17a.build.extra_flags=-D__SAMC21E17A__ -DARM_MATH_CM0PLUS -mattairtech_mt_d21e_revb.menu.cpu.samc21e17a.build.ldscript=flash_128KB.ld -mattairtech_mt_d21e_revb.menu.cpu.samc21e17a.build.openocdscript=openocd_scripts/SAMC21E17A.cfg -mattairtech_mt_d21e_revb.menu.cpu.samc21e17a.bootloader.file=zero/binaries/sam_ba_MT_D21E_rev_B_SAMC21E17A.bin -mattairtech_mt_d21e_revb.menu.cpu.samc21e16a=SAMC21E16A -mattairtech_mt_d21e_revb.menu.cpu.samc21e16a.upload.maximum_size=57344 -mattairtech_mt_d21e_revb.menu.cpu.samc21e16a.build.extra_flags=-D__SAMC21E16A__ -DARM_MATH_CM0PLUS -mattairtech_mt_d21e_revb.menu.cpu.samc21e16a.build.ldscript=flash_64KB.ld -mattairtech_mt_d21e_revb.menu.cpu.samc21e16a.build.openocdscript=openocd_scripts/SAMC21E16A.cfg -mattairtech_mt_d21e_revb.menu.cpu.samc21e16a.bootloader.file=zero/binaries/sam_ba_MT_D21E_rev_B_SAMC21E16A.bin -mattairtech_mt_d21e_revb.menu.cpu.samc21e15a=SAMC21E15A -mattairtech_mt_d21e_revb.menu.cpu.samc21e15a.upload.maximum_size=24576 -mattairtech_mt_d21e_revb.menu.cpu.samc21e15a.build.extra_flags=-D__SAMC21E15A__ -DARM_MATH_CM0PLUS -mattairtech_mt_d21e_revb.menu.cpu.samc21e15a.build.ldscript=flash_32KB.ld -mattairtech_mt_d21e_revb.menu.cpu.samc21e15a.build.openocdscript=openocd_scripts/SAMC21E15A.cfg -mattairtech_mt_d21e_revb.menu.cpu.samc21e15a.bootloader.file=zero/binaries/sam_ba_MT_D21E_rev_B_SAMC21E15A.bin -mattairtech_mt_d21e_revb.menu.bootloader.8kb=8KB_BOOTLOADER -mattairtech_mt_d21e_revb.menu.bootloader.8kb.build.bootloader_size=__8KB_BOOTLOADER__ -mattairtech_mt_d21e_revb.menu.bootloader.8kb.build.ldscript_path=linker_scripts/gcc/8KB_Bootloader -mattairtech_mt_d21e_revb.menu.bootloader.8kb.upload.tool=MattairTech_Arduino:bossac -mattairtech_mt_d21e_revb.menu.bootloader.8kb.upload.use_1200bps_touch=true -mattairtech_mt_d21e_revb.menu.bootloader.8kb.upload.wait_for_upload_port=true -mattairtech_mt_d21e_revb.menu.bootloader.8kb.upload.native_usb=true -mattairtech_mt_d21e_revb.menu.bootloader.16kb=16KB_BOOTLOADER -mattairtech_mt_d21e_revb.menu.bootloader.16kb.build.bootloader_size=__16KB_BOOTLOADER__ -mattairtech_mt_d21e_revb.menu.bootloader.16kb.build.ldscript_path=linker_scripts/gcc/16KB_Bootloader -mattairtech_mt_d21e_revb.menu.bootloader.16kb.upload.tool=MattairTech_Arduino:bossac -mattairtech_mt_d21e_revb.menu.bootloader.16kb.upload.use_1200bps_touch=true -mattairtech_mt_d21e_revb.menu.bootloader.16kb.upload.wait_for_upload_port=true -mattairtech_mt_d21e_revb.menu.bootloader.16kb.upload.native_usb=true -mattairtech_mt_d21e_revb.menu.bootloader.0kb=NO_BOOTLOADER -mattairtech_mt_d21e_revb.menu.bootloader.0kb.build.bootloader_size=__NO_BOOTLOADER__ -mattairtech_mt_d21e_revb.menu.bootloader.0kb.build.ldscript_path=linker_scripts/gcc/No_Bootloader -mattairtech_mt_d21e_revb.menu.bootloader.0kb.upload.tool=arduino:openocd -mattairtech_mt_d21e_revb.menu.bootloader.0kb.upload.use_1200bps_touch=false -mattairtech_mt_d21e_revb.menu.bootloader.0kb.upload.wait_for_upload_port=false -mattairtech_mt_d21e_revb.menu.bootloader.0kb.upload.native_usb=false -mattairtech_mt_d21e_revb.menu.serial.one_uart=ONE_UART_ONE_WIRE_ONE_SPI -mattairtech_mt_d21e_revb.menu.serial.one_uart.build.serialcom_uart=ONE_UART -mattairtech_mt_d21e_revb.menu.serial.one_uart.build.serialcom_wire=ONE_WIRE -mattairtech_mt_d21e_revb.menu.serial.one_uart.build.serialcom_spi=ONE_SPI -mattairtech_mt_d21e_revb.menu.serial.one_uart_one_wire_two_spi=ONE_UART_ONE_WIRE_TWO_SPI -mattairtech_mt_d21e_revb.menu.serial.one_uart_one_wire_two_spi.build.serialcom_uart=ONE_UART -mattairtech_mt_d21e_revb.menu.serial.one_uart_one_wire_two_spi.build.serialcom_wire=ONE_WIRE -mattairtech_mt_d21e_revb.menu.serial.one_uart_one_wire_two_spi.build.serialcom_spi=TWO_SPI -mattairtech_mt_d21e_revb.menu.serial.one_uart_two_wire_one_spi=ONE_UART_TWO_WIRE_ONE_SPI -mattairtech_mt_d21e_revb.menu.serial.one_uart_two_wire_one_spi.build.serialcom_uart=ONE_UART -mattairtech_mt_d21e_revb.menu.serial.one_uart_two_wire_one_spi.build.serialcom_wire=TWO_WIRE -mattairtech_mt_d21e_revb.menu.serial.one_uart_two_wire_one_spi.build.serialcom_spi=ONE_SPI -mattairtech_mt_d21e_revb.menu.serial.two_uart=TWO_UART_ONE_WIRE_ONE_SPI -mattairtech_mt_d21e_revb.menu.serial.two_uart.build.serialcom_uart=TWO_UART -mattairtech_mt_d21e_revb.menu.serial.two_uart.build.serialcom_wire=ONE_WIRE -mattairtech_mt_d21e_revb.menu.serial.two_uart.build.serialcom_spi=ONE_SPI -mattairtech_mt_d21e_revb.menu.serial.three_uart_one_wire_no_spi=THREE_UART_ONE_WIRE_NO_SPI -mattairtech_mt_d21e_revb.menu.serial.three_uart_one_wire_no_spi.build.serialcom_uart=THREE_UART -mattairtech_mt_d21e_revb.menu.serial.three_uart_one_wire_no_spi.build.serialcom_wire=ONE_WIRE -mattairtech_mt_d21e_revb.menu.serial.three_uart_one_wire_no_spi.build.serialcom_spi=NO_SPI -mattairtech_mt_d21e_revb.menu.serial.three_uart_no_wire_one_spi=THREE_UART_NO_WIRE_ONE_SPI -mattairtech_mt_d21e_revb.menu.serial.three_uart_no_wire_one_spi.build.serialcom_uart=THREE_UART -mattairtech_mt_d21e_revb.menu.serial.three_uart_no_wire_one_spi.build.serialcom_wire=NO_WIRE -mattairtech_mt_d21e_revb.menu.serial.three_uart_no_wire_one_spi.build.serialcom_spi=ONE_SPI -mattairtech_mt_d21e_revb.menu.serial.four_uart=FOUR_UART_NO_WIRE_NO_SPI -mattairtech_mt_d21e_revb.menu.serial.four_uart.build.serialcom_uart=FOUR_UART -mattairtech_mt_d21e_revb.menu.serial.four_uart.build.serialcom_wire=NO_WIRE -mattairtech_mt_d21e_revb.menu.serial.four_uart.build.serialcom_spi=NO_SPI -mattairtech_mt_d21e_revb.menu.serial.no_uart_one_wire_two_spi=NO_UART_ONE_WIRE_TWO_SPI -mattairtech_mt_d21e_revb.menu.serial.no_uart_one_wire_two_spi.build.serialcom_uart=NO_UART -mattairtech_mt_d21e_revb.menu.serial.no_uart_one_wire_two_spi.build.serialcom_wire=ONE_WIRE -mattairtech_mt_d21e_revb.menu.serial.no_uart_one_wire_two_spi.build.serialcom_spi=TWO_SPI -mattairtech_mt_d21e_revb.menu.serial.four_uart_one_wire_one_spi=FOUR_UART_ONE_WIRE_ONE_SPI (L21 only) -mattairtech_mt_d21e_revb.menu.serial.four_uart_one_wire_one_spi.build.serialcom_uart=FOUR_UART -mattairtech_mt_d21e_revb.menu.serial.four_uart_one_wire_one_spi.build.serialcom_wire=ONE_WIRE -mattairtech_mt_d21e_revb.menu.serial.four_uart_one_wire_one_spi.build.serialcom_spi=ONE_SPI -mattairtech_mt_d21e_revb.menu.serial.five_uart_no_wire_one_spi=FIVE_UART_NO_WIRE_ONE_SPI (L21 only) -mattairtech_mt_d21e_revb.menu.serial.five_uart_no_wire_one_spi.build.serialcom_uart=FIVE_UART -mattairtech_mt_d21e_revb.menu.serial.five_uart_no_wire_one_spi.build.serialcom_wire=NO_WIRE -mattairtech_mt_d21e_revb.menu.serial.five_uart_no_wire_one_spi.build.serialcom_spi=ONE_SPI -mattairtech_mt_d21e_revb.menu.serial.five_uart_one_wire_no_spi=FIVE_UART_ONE_WIRE_NO_SPI (L21 only) -mattairtech_mt_d21e_revb.menu.serial.five_uart_one_wire_no_spi.build.serialcom_uart=FIVE_UART -mattairtech_mt_d21e_revb.menu.serial.five_uart_one_wire_no_spi.build.serialcom_wire=ONE_WIRE -mattairtech_mt_d21e_revb.menu.serial.five_uart_one_wire_no_spi.build.serialcom_spi=NO_SPI -mattairtech_mt_d21e_revb.menu.serial.six_uart=SIX_UART_NO_WIRE_NO_SPI (L21 only) -mattairtech_mt_d21e_revb.menu.serial.six_uart.build.serialcom_uart=SIX_UART -mattairtech_mt_d21e_revb.menu.serial.six_uart.build.serialcom_wire=NO_WIRE -mattairtech_mt_d21e_revb.menu.serial.six_uart.build.serialcom_spi=NO_SPI -mattairtech_mt_d21e_revb.menu.usb.cdc=CDC_ONLY -mattairtech_mt_d21e_revb.menu.usb.cdc.build.usbcom=CDC_ONLY -mattairtech_mt_d21e_revb.menu.usb.cdc.build.pid=0x0557 -mattairtech_mt_d21e_revb.menu.usb.cdc_hid=CDC_HID -mattairtech_mt_d21e_revb.menu.usb.cdc_hid.build.usbcom=CDC_HID -mattairtech_mt_d21e_revb.menu.usb.cdc_hid.build.pid=0x0856 -mattairtech_mt_d21e_revb.menu.usb.withcdc=WITH_CDC -mattairtech_mt_d21e_revb.menu.usb.withcdc.build.usbcom=WITH_CDC -mattairtech_mt_d21e_revb.menu.usb.withcdc.build.pid=0x0B41 -mattairtech_mt_d21e_revb.menu.usb.hid=HID_ONLY -mattairtech_mt_d21e_revb.menu.usb.hid.build.usbcom=HID_ONLY -mattairtech_mt_d21e_revb.menu.usb.hid.build.pid=0x0B40 -mattairtech_mt_d21e_revb.menu.usb.nocdc=WITHOUT_CDC -mattairtech_mt_d21e_revb.menu.usb.nocdc.build.usbcom=WITHOUT_CDC -mattairtech_mt_d21e_revb.menu.usb.nocdc.build.pid=0x0A0C -mattairtech_mt_d21e_revb.menu.usb.none=USB_DISABLED -mattairtech_mt_d21e_revb.menu.usb.none.build.usbcom=USB_DISABLED -mattairtech_mt_d21e_revb.menu.usb.none.build.pid=0x0856 - - -# MattairTech MT-D21E -mattairtech_mt_d21e.name=MattairTech MT-D21E (rev A) -mattairtech_mt_d21e.vid.0=0x16D0 -mattairtech_mt_d21e.pid.0=0x0557 -mattairtech_mt_d21e.vid.1=0x16D0 -mattairtech_mt_d21e.pid.1=0x0856 -mattairtech_mt_d21e.vid.2=0x16D0 -mattairtech_mt_d21e.pid.2=0x0B41 -mattairtech_mt_d21e.vid.3=0x16D0 -mattairtech_mt_d21e.pid.3=0x0B40 -mattairtech_mt_d21e.vid.4=0x16D0 -mattairtech_mt_d21e.pid.4=0x0A0C -mattairtech_mt_d21e.vid.5=0x16D0 -mattairtech_mt_d21e.pid.5=0x0856 -mattairtech_mt_d21e.build.mcu=cortex-m0plus -mattairtech_mt_d21e.build.mathlib=arm_cortexM0l_math -mattairtech_mt_d21e.build.f_cpu=48000000L -mattairtech_mt_d21e.build.usb_product="MT-D21E Rev A" -mattairtech_mt_d21e.build.usb_manufacturer="MattairTech LLC" -mattairtech_mt_d21e.build.board=SAMD_ZERO -mattairtech_mt_d21e.build.core=arduino -mattairtech_mt_d21e.build.variant=MT_D21E -mattairtech_mt_d21e.build.variant_system_lib= -mattairtech_mt_d21e.build.vid=0x16D0 -mattairtech_mt_d21e.upload.protocol=sam-ba -mattairtech_mt_d21e.bootloader.tool=arduino:openocd -mattairtech_mt_d21e.menu.float.default=Print & String use auto-promoted doubles only -mattairtech_mt_d21e.menu.float.default.build.floatconfig=FLOAT_BOTH_DOUBLES_ONLY -mattairtech_mt_d21e.menu.float.print=Print uses separate singles and doubles -mattairtech_mt_d21e.menu.float.print.build.floatconfig=FLOAT_PRINT_SINGLES_DOUBLES -mattairtech_mt_d21e.menu.float.string=String uses separate singles and doubles -mattairtech_mt_d21e.menu.float.string.build.floatconfig=FLOAT_STRING_SINGLES_DOUBLES -mattairtech_mt_d21e.menu.float.both=Print & String use separate singles and doubles -mattairtech_mt_d21e.menu.float.both.build.floatconfig=FLOAT_BOTH_SINGLES_DOUBLES -mattairtech_mt_d21e.menu.config.disabled=config.h disabled -mattairtech_mt_d21e.menu.config.disabled.build.buildconfig=CONFIG_H_DISABLED -mattairtech_mt_d21e.menu.config.enabled=config.h enabled (mostly code size reductions) -mattairtech_mt_d21e.menu.config.enabled.build.buildconfig=CONFIG_H_ENABLED -mattairtech_mt_d21e.menu.clock.crystal_32k=32KHZ_CRYSTAL -mattairtech_mt_d21e.menu.clock.crystal_32k.build.clockconfig=CLOCKCONFIG_32768HZ_CRYSTAL -mattairtech_mt_d21e.menu.clock.crystal_hs=HIGH_SPEED_CRYSTAL -mattairtech_mt_d21e.menu.clock.crystal_hs.build.clockconfig=CLOCKCONFIG_HS_CRYSTAL -mattairtech_mt_d21e.menu.clock.internal=INTERNAL_OSCILLATOR -mattairtech_mt_d21e.menu.clock.internal.build.clockconfig=CLOCKCONFIG_INTERNAL -mattairtech_mt_d21e.menu.clock.internal_usb=INTERNAL_USB_CALIBRATED_OSCILLATOR -mattairtech_mt_d21e.menu.clock.internal_usb.build.clockconfig=CLOCKCONFIG_INTERNAL_USB -mattairtech_mt_d21e.menu.timer.timer_732Hz=732.4Hz (16-bit) -mattairtech_mt_d21e.menu.timer.timer_732Hz.build.timerconfig=TIMER_732Hz -mattairtech_mt_d21e.menu.timer.timer_366Hz=366.2Hz (16-bit) -mattairtech_mt_d21e.menu.timer.timer_366Hz.build.timerconfig=TIMER_366Hz -mattairtech_mt_d21e.menu.timer.timer_244Hz=244.1Hz (16-bit) -mattairtech_mt_d21e.menu.timer.timer_244Hz.build.timerconfig=TIMER_244Hz -mattairtech_mt_d21e.menu.timer.timer_183Hz=183.1Hz (16-bit) -mattairtech_mt_d21e.menu.timer.timer_183Hz.build.timerconfig=TIMER_183Hz -mattairtech_mt_d21e.menu.timer.timer_146Hz=146.5Hz (16-bit) -mattairtech_mt_d21e.menu.timer.timer_146Hz.build.timerconfig=TIMER_146Hz -mattairtech_mt_d21e.menu.timer.timer_122Hz=122.1Hz (16-bit) -mattairtech_mt_d21e.menu.timer.timer_122Hz.build.timerconfig=TIMER_122Hz -mattairtech_mt_d21e.menu.timer.timer_105Hz=104.6Hz (16-bit) -mattairtech_mt_d21e.menu.timer.timer_105Hz.build.timerconfig=TIMER_105Hz -mattairtech_mt_d21e.menu.timer.timer_81Hz=81.38Hz (16-bit) -mattairtech_mt_d21e.menu.timer.timer_81Hz.build.timerconfig=TIMER_81Hz -mattairtech_mt_d21e.menu.timer.timer_61Hz=61.04Hz (16-bit) -mattairtech_mt_d21e.menu.timer.timer_61Hz.build.timerconfig=TIMER_61Hz -mattairtech_mt_d21e.menu.timer.timer_31Hz=30.52Hz (16-bit) -mattairtech_mt_d21e.menu.timer.timer_31Hz.build.timerconfig=TIMER_31Hz -mattairtech_mt_d21e.menu.timer.timer_187500Hz=187500Hz (8-bit) -mattairtech_mt_d21e.menu.timer.timer_187500Hz.build.timerconfig=TIMER_187500Hz -mattairtech_mt_d21e.menu.timer.timer_93750Hz=93750Hz (8-bit) -mattairtech_mt_d21e.menu.timer.timer_93750Hz.build.timerconfig=TIMER_93750Hz -mattairtech_mt_d21e.menu.timer.timer_62500Hz=62500Hz (8-bit) -mattairtech_mt_d21e.menu.timer.timer_62500Hz.build.timerconfig=TIMER_62500Hz -mattairtech_mt_d21e.menu.timer.timer_37500Hz=37500Hz (8-bit) -mattairtech_mt_d21e.menu.timer.timer_37500Hz.build.timerconfig=TIMER_37500Hz -mattairtech_mt_d21e.menu.timer.timer_20833Hz=20833Hz (8-bit) -mattairtech_mt_d21e.menu.timer.timer_20833Hz.build.timerconfig=TIMER_20833Hz -mattairtech_mt_d21e.menu.timer.timer_12500Hz=12500Hz (8-bit) -mattairtech_mt_d21e.menu.timer.timer_12500Hz.build.timerconfig=TIMER_12500Hz -mattairtech_mt_d21e.menu.timer.timer_7500Hz=7500Hz (8-bit) -mattairtech_mt_d21e.menu.timer.timer_7500Hz.build.timerconfig=TIMER_7500Hz -mattairtech_mt_d21e.menu.timer.timer_4166Hz=4166Hz (8-bit) -mattairtech_mt_d21e.menu.timer.timer_4166Hz.build.timerconfig=TIMER_4166Hz -mattairtech_mt_d21e.menu.timer.timer_2930Hz=2930Hz (8-bit) -mattairtech_mt_d21e.menu.timer.timer_2930Hz.build.timerconfig=TIMER_2930Hz -mattairtech_mt_d21e.menu.timer.timer_1465Hz=1465Hz (8-bit, 16-bit for D51) -mattairtech_mt_d21e.menu.timer.timer_1465Hz.build.timerconfig=TIMER_1465Hz -mattairtech_mt_d21e.menu.cpu.samd21e18a=SAMD21E18A -mattairtech_mt_d21e.menu.cpu.samd21e18a.upload.maximum_size=253952 -mattairtech_mt_d21e.menu.cpu.samd21e18a.build.extra_flags=-D__SAMD21E18A__ {build.usb_flags} -DARM_MATH_CM0PLUS -mattairtech_mt_d21e.menu.cpu.samd21e18a.build.ldscript=flash_256KB.ld -mattairtech_mt_d21e.menu.cpu.samd21e18a.build.openocdscript=openocd_scripts/SAMD21E18A.cfg -mattairtech_mt_d21e.menu.cpu.samd21e18a.bootloader.file=zero/binaries/sam_ba_MT_D21E_rev_A_SAMD21E18A.bin -mattairtech_mt_d21e.menu.cpu.samd21e17a=SAMD21E17A -mattairtech_mt_d21e.menu.cpu.samd21e17a.upload.maximum_size=122880 -mattairtech_mt_d21e.menu.cpu.samd21e17a.build.extra_flags=-D__SAMD21E17A__ {build.usb_flags} -DARM_MATH_CM0PLUS -mattairtech_mt_d21e.menu.cpu.samd21e17a.build.ldscript=flash_128KB.ld -mattairtech_mt_d21e.menu.cpu.samd21e17a.build.openocdscript=openocd_scripts/SAMD21E17A.cfg -mattairtech_mt_d21e.menu.cpu.samd21e17a.bootloader.file=zero/binaries/sam_ba_MT_D21E_rev_A_SAMD21E17A.bin -mattairtech_mt_d21e.menu.cpu.samd21e16a=SAMD21E16A -mattairtech_mt_d21e.menu.cpu.samd21e16a.upload.maximum_size=57344 -mattairtech_mt_d21e.menu.cpu.samd21e16a.build.extra_flags=-D__SAMD21E16A__ {build.usb_flags} -DARM_MATH_CM0PLUS -mattairtech_mt_d21e.menu.cpu.samd21e16a.build.ldscript=flash_64KB.ld -mattairtech_mt_d21e.menu.cpu.samd21e16a.build.openocdscript=openocd_scripts/SAMD21E16A.cfg -mattairtech_mt_d21e.menu.cpu.samd21e16a.bootloader.file=zero/binaries/sam_ba_MT_D21E_rev_A_SAMD21E16A.bin -mattairtech_mt_d21e.menu.cpu.samd21e15a=SAMD21E15A -mattairtech_mt_d21e.menu.cpu.samd21e15a.upload.maximum_size=24576 -mattairtech_mt_d21e.menu.cpu.samd21e15a.build.extra_flags=-D__SAMD21E15A__ {build.usb_flags} -DARM_MATH_CM0PLUS -mattairtech_mt_d21e.menu.cpu.samd21e15a.build.ldscript=flash_32KB.ld -mattairtech_mt_d21e.menu.cpu.samd21e15a.build.openocdscript=openocd_scripts/SAMD21E15A.cfg -mattairtech_mt_d21e.menu.cpu.samd21e15a.bootloader.file=zero/binaries/sam_ba_MT_D21E_rev_A_SAMD21E15A.bin -mattairtech_mt_d21e.menu.bootloader.8kb=8KB_BOOTLOADER -mattairtech_mt_d21e.menu.bootloader.8kb.build.bootloader_size=__8KB_BOOTLOADER__ -mattairtech_mt_d21e.menu.bootloader.8kb.build.ldscript_path=linker_scripts/gcc/8KB_Bootloader -mattairtech_mt_d21e.menu.bootloader.8kb.upload.tool=MattairTech_Arduino:bossac -mattairtech_mt_d21e.menu.bootloader.8kb.upload.use_1200bps_touch=true -mattairtech_mt_d21e.menu.bootloader.8kb.upload.wait_for_upload_port=true -mattairtech_mt_d21e.menu.bootloader.8kb.upload.native_usb=true -mattairtech_mt_d21e.menu.bootloader.16kb=16KB_BOOTLOADER -mattairtech_mt_d21e.menu.bootloader.16kb.build.bootloader_size=__16KB_BOOTLOADER__ -mattairtech_mt_d21e.menu.bootloader.16kb.build.ldscript_path=linker_scripts/gcc/16KB_Bootloader -mattairtech_mt_d21e.menu.bootloader.16kb.upload.tool=MattairTech_Arduino:bossac -mattairtech_mt_d21e.menu.bootloader.16kb.upload.use_1200bps_touch=true -mattairtech_mt_d21e.menu.bootloader.16kb.upload.wait_for_upload_port=true -mattairtech_mt_d21e.menu.bootloader.16kb.upload.native_usb=true -mattairtech_mt_d21e.menu.bootloader.0kb=NO_BOOTLOADER -mattairtech_mt_d21e.menu.bootloader.0kb.build.bootloader_size=__NO_BOOTLOADER__ -mattairtech_mt_d21e.menu.bootloader.0kb.build.ldscript_path=linker_scripts/gcc/No_Bootloader -mattairtech_mt_d21e.menu.bootloader.0kb.upload.tool=arduino:openocd -mattairtech_mt_d21e.menu.bootloader.0kb.upload.use_1200bps_touch=false -mattairtech_mt_d21e.menu.bootloader.0kb.upload.wait_for_upload_port=false -mattairtech_mt_d21e.menu.bootloader.0kb.upload.native_usb=false -mattairtech_mt_d21e.menu.serial.one_uart=ONE_UART_ONE_WIRE_ONE_SPI -mattairtech_mt_d21e.menu.serial.one_uart.build.serialcom_uart=ONE_UART -mattairtech_mt_d21e.menu.serial.one_uart.build.serialcom_wire=ONE_WIRE -mattairtech_mt_d21e.menu.serial.one_uart.build.serialcom_spi=ONE_SPI -mattairtech_mt_d21e.menu.serial.one_uart_one_wire_two_spi=ONE_UART_ONE_WIRE_TWO_SPI -mattairtech_mt_d21e.menu.serial.one_uart_one_wire_two_spi.build.serialcom_uart=ONE_UART -mattairtech_mt_d21e.menu.serial.one_uart_one_wire_two_spi.build.serialcom_wire=ONE_WIRE -mattairtech_mt_d21e.menu.serial.one_uart_one_wire_two_spi.build.serialcom_spi=TWO_SPI -mattairtech_mt_d21e.menu.serial.one_uart_two_wire_one_spi=ONE_UART_TWO_WIRE_ONE_SPI -mattairtech_mt_d21e.menu.serial.one_uart_two_wire_one_spi.build.serialcom_uart=ONE_UART -mattairtech_mt_d21e.menu.serial.one_uart_two_wire_one_spi.build.serialcom_wire=TWO_WIRE -mattairtech_mt_d21e.menu.serial.one_uart_two_wire_one_spi.build.serialcom_spi=ONE_SPI -mattairtech_mt_d21e.menu.serial.two_uart=TWO_UART_ONE_WIRE_ONE_SPI -mattairtech_mt_d21e.menu.serial.two_uart.build.serialcom_uart=TWO_UART -mattairtech_mt_d21e.menu.serial.two_uart.build.serialcom_wire=ONE_WIRE -mattairtech_mt_d21e.menu.serial.two_uart.build.serialcom_spi=ONE_SPI -mattairtech_mt_d21e.menu.serial.three_uart_one_wire_no_spi=THREE_UART_ONE_WIRE_NO_SPI -mattairtech_mt_d21e.menu.serial.three_uart_one_wire_no_spi.build.serialcom_uart=THREE_UART -mattairtech_mt_d21e.menu.serial.three_uart_one_wire_no_spi.build.serialcom_wire=ONE_WIRE -mattairtech_mt_d21e.menu.serial.three_uart_one_wire_no_spi.build.serialcom_spi=NO_SPI -mattairtech_mt_d21e.menu.serial.three_uart_no_wire_one_spi=THREE_UART_NO_WIRE_ONE_SPI -mattairtech_mt_d21e.menu.serial.three_uart_no_wire_one_spi.build.serialcom_uart=THREE_UART -mattairtech_mt_d21e.menu.serial.three_uart_no_wire_one_spi.build.serialcom_wire=NO_WIRE -mattairtech_mt_d21e.menu.serial.three_uart_no_wire_one_spi.build.serialcom_spi=ONE_SPI -mattairtech_mt_d21e.menu.serial.four_uart=FOUR_UART_NO_WIRE_NO_SPI -mattairtech_mt_d21e.menu.serial.four_uart.build.serialcom_uart=FOUR_UART -mattairtech_mt_d21e.menu.serial.four_uart.build.serialcom_wire=NO_WIRE -mattairtech_mt_d21e.menu.serial.four_uart.build.serialcom_spi=NO_SPI -mattairtech_mt_d21e.menu.serial.no_uart_one_wire_two_spi=NO_UART_ONE_WIRE_TWO_SPI -mattairtech_mt_d21e.menu.serial.no_uart_one_wire_two_spi.build.serialcom_uart=NO_UART -mattairtech_mt_d21e.menu.serial.no_uart_one_wire_two_spi.build.serialcom_wire=ONE_WIRE -mattairtech_mt_d21e.menu.serial.no_uart_one_wire_two_spi.build.serialcom_spi=TWO_SPI -mattairtech_mt_d21e.menu.usb.cdc=CDC_ONLY -mattairtech_mt_d21e.menu.usb.cdc.build.usbcom=CDC_ONLY -mattairtech_mt_d21e.menu.usb.cdc.build.pid=0x0557 -mattairtech_mt_d21e.menu.usb.cdc_hid=CDC_HID -mattairtech_mt_d21e.menu.usb.cdc_hid.build.usbcom=CDC_HID -mattairtech_mt_d21e.menu.usb.cdc_hid.build.pid=0x0856 -mattairtech_mt_d21e.menu.usb.withcdc=WITH_CDC -mattairtech_mt_d21e.menu.usb.withcdc.build.usbcom=WITH_CDC -mattairtech_mt_d21e.menu.usb.withcdc.build.pid=0x0B41 -mattairtech_mt_d21e.menu.usb.hid=HID_ONLY -mattairtech_mt_d21e.menu.usb.hid.build.usbcom=HID_ONLY -mattairtech_mt_d21e.menu.usb.hid.build.pid=0x0B40 -mattairtech_mt_d21e.menu.usb.nocdc=WITHOUT_CDC -mattairtech_mt_d21e.menu.usb.nocdc.build.usbcom=WITHOUT_CDC -mattairtech_mt_d21e.menu.usb.nocdc.build.pid=0x0A0C -mattairtech_mt_d21e.menu.usb.none=USB_DISABLED -mattairtech_mt_d21e.menu.usb.none.build.usbcom=USB_DISABLED -mattairtech_mt_d21e.menu.usb.none.build.pid=0x0856 - - -# MattairTech MT-D11 (D11D14AM, QFN-24) -mattairtech_mt_d11.name=MattairTech MT-D11 -mattairtech_mt_d11.vid.0=0x16D0 -mattairtech_mt_d11.pid.0=0x0557 -mattairtech_mt_d11.vid.1=0x16D0 -mattairtech_mt_d11.pid.1=0x0856 -mattairtech_mt_d11.vid.2=0x16D0 -mattairtech_mt_d11.pid.2=0x0B41 -mattairtech_mt_d11.vid.3=0x16D0 -mattairtech_mt_d11.pid.3=0x0B40 -mattairtech_mt_d11.vid.4=0x16D0 -mattairtech_mt_d11.pid.4=0x0A0C -mattairtech_mt_d11.vid.5=0x16D0 -mattairtech_mt_d11.pid.5=0x0856 -mattairtech_mt_d11.build.mcu=cortex-m0plus -mattairtech_mt_d11.build.mathlib=arm_cortexM0l_math -mattairtech_mt_d11.build.f_cpu=48000000L -mattairtech_mt_d11.build.usb_product="MT-D11" -mattairtech_mt_d11.build.usb_manufacturer="MattairTech LLC" -mattairtech_mt_d11.build.board=SAMD_ZERO -mattairtech_mt_d11.build.core=arduino -mattairtech_mt_d11.build.variant=MT_D11 -mattairtech_mt_d11.build.variant_system_lib= -mattairtech_mt_d11.build.vid=0x16D0 -mattairtech_mt_d11.upload.protocol=sam-ba -mattairtech_mt_d11.bootloader.tool=arduino:openocd -mattairtech_mt_d11.menu.float.default=Print & String use auto-promoted doubles only -mattairtech_mt_d11.menu.float.default.build.floatconfig=FLOAT_BOTH_DOUBLES_ONLY -mattairtech_mt_d11.menu.float.print=Print uses separate singles and doubles -mattairtech_mt_d11.menu.float.print.build.floatconfig=FLOAT_PRINT_SINGLES_DOUBLES -mattairtech_mt_d11.menu.float.string=String uses separate singles and doubles -mattairtech_mt_d11.menu.float.string.build.floatconfig=FLOAT_STRING_SINGLES_DOUBLES -mattairtech_mt_d11.menu.float.both=Print & String use separate singles and doubles -mattairtech_mt_d11.menu.float.both.build.floatconfig=FLOAT_BOTH_SINGLES_DOUBLES -mattairtech_mt_d11.menu.config.disabled=config.h disabled -mattairtech_mt_d11.menu.config.disabled.build.buildconfig=CONFIG_H_DISABLED -mattairtech_mt_d11.menu.config.enabled=config.h enabled (mostly code size reductions) -mattairtech_mt_d11.menu.config.enabled.build.buildconfig=CONFIG_H_ENABLED -mattairtech_mt_d11.menu.clock.crystal_32k=32KHZ_CRYSTAL -mattairtech_mt_d11.menu.clock.crystal_32k.build.clockconfig=CLOCKCONFIG_32768HZ_CRYSTAL -mattairtech_mt_d11.menu.clock.crystal_hs=HIGH_SPEED_CRYSTAL -mattairtech_mt_d11.menu.clock.crystal_hs.build.clockconfig=CLOCKCONFIG_HS_CRYSTAL -mattairtech_mt_d11.menu.clock.internal=INTERNAL_OSCILLATOR -mattairtech_mt_d11.menu.clock.internal.build.clockconfig=CLOCKCONFIG_INTERNAL -mattairtech_mt_d11.menu.clock.internal_usb=INTERNAL_USB_CALIBRATED_OSCILLATOR -mattairtech_mt_d11.menu.clock.internal_usb.build.clockconfig=CLOCKCONFIG_INTERNAL_USB -mattairtech_mt_d11.menu.timer.timer_732Hz=732.4Hz (16-bit) -mattairtech_mt_d11.menu.timer.timer_732Hz.build.timerconfig=TIMER_732Hz -mattairtech_mt_d11.menu.timer.timer_366Hz=366.2Hz (16-bit) -mattairtech_mt_d11.menu.timer.timer_366Hz.build.timerconfig=TIMER_366Hz -mattairtech_mt_d11.menu.timer.timer_244Hz=244.1Hz (16-bit) -mattairtech_mt_d11.menu.timer.timer_244Hz.build.timerconfig=TIMER_244Hz -mattairtech_mt_d11.menu.timer.timer_183Hz=183.1Hz (16-bit) -mattairtech_mt_d11.menu.timer.timer_183Hz.build.timerconfig=TIMER_183Hz -mattairtech_mt_d11.menu.timer.timer_146Hz=146.5Hz (16-bit) -mattairtech_mt_d11.menu.timer.timer_146Hz.build.timerconfig=TIMER_146Hz -mattairtech_mt_d11.menu.timer.timer_122Hz=122.1Hz (16-bit) -mattairtech_mt_d11.menu.timer.timer_122Hz.build.timerconfig=TIMER_122Hz -mattairtech_mt_d11.menu.timer.timer_105Hz=104.6Hz (16-bit) -mattairtech_mt_d11.menu.timer.timer_105Hz.build.timerconfig=TIMER_105Hz -mattairtech_mt_d11.menu.timer.timer_81Hz=81.38Hz (16-bit) -mattairtech_mt_d11.menu.timer.timer_81Hz.build.timerconfig=TIMER_81Hz -mattairtech_mt_d11.menu.timer.timer_61Hz=61.04Hz (16-bit) -mattairtech_mt_d11.menu.timer.timer_61Hz.build.timerconfig=TIMER_61Hz -mattairtech_mt_d11.menu.timer.timer_31Hz=30.52Hz (16-bit) -mattairtech_mt_d11.menu.timer.timer_31Hz.build.timerconfig=TIMER_31Hz -mattairtech_mt_d11.menu.timer.timer_187500Hz=187500Hz (8-bit) -mattairtech_mt_d11.menu.timer.timer_187500Hz.build.timerconfig=TIMER_187500Hz -mattairtech_mt_d11.menu.timer.timer_93750Hz=93750Hz (8-bit) -mattairtech_mt_d11.menu.timer.timer_93750Hz.build.timerconfig=TIMER_93750Hz -mattairtech_mt_d11.menu.timer.timer_62500Hz=62500Hz (8-bit) -mattairtech_mt_d11.menu.timer.timer_62500Hz.build.timerconfig=TIMER_62500Hz -mattairtech_mt_d11.menu.timer.timer_37500Hz=37500Hz (8-bit) -mattairtech_mt_d11.menu.timer.timer_37500Hz.build.timerconfig=TIMER_37500Hz -mattairtech_mt_d11.menu.timer.timer_20833Hz=20833Hz (8-bit) -mattairtech_mt_d11.menu.timer.timer_20833Hz.build.timerconfig=TIMER_20833Hz -mattairtech_mt_d11.menu.timer.timer_12500Hz=12500Hz (8-bit) -mattairtech_mt_d11.menu.timer.timer_12500Hz.build.timerconfig=TIMER_12500Hz -mattairtech_mt_d11.menu.timer.timer_7500Hz=7500Hz (8-bit) -mattairtech_mt_d11.menu.timer.timer_7500Hz.build.timerconfig=TIMER_7500Hz -mattairtech_mt_d11.menu.timer.timer_4166Hz=4166Hz (8-bit) -mattairtech_mt_d11.menu.timer.timer_4166Hz.build.timerconfig=TIMER_4166Hz -mattairtech_mt_d11.menu.timer.timer_2930Hz=2930Hz (8-bit) -mattairtech_mt_d11.menu.timer.timer_2930Hz.build.timerconfig=TIMER_2930Hz -mattairtech_mt_d11.menu.timer.timer_1465Hz=1465Hz (8-bit, 16-bit for D51) -mattairtech_mt_d11.menu.timer.timer_1465Hz.build.timerconfig=TIMER_1465Hz -mattairtech_mt_d11.build.extra_flags=-D__SAMD11D14AM__ {build.usb_flags} -DARM_MATH_CM0PLUS -mattairtech_mt_d11.build.ldscript=flash_16KB.ld -mattairtech_mt_d11.build.openocdscript=openocd_scripts/SAMD11D14AM.cfg -mattairtech_mt_d11.bootloader.file=zero/binaries/sam_ba_MT_D11_SAMD11D14AM.bin -mattairtech_mt_d11.menu.bootloader.4kb=4KB_BOOTLOADER -mattairtech_mt_d11.menu.bootloader.4kb.build.bootloader_size=__4KB_BOOTLOADER__ -mattairtech_mt_d11.menu.bootloader.4kb.build.ldscript_path=linker_scripts/gcc/4KB_Bootloader -mattairtech_mt_d11.menu.bootloader.4kb.upload.tool=MattairTech_Arduino:bossac -mattairtech_mt_d11.menu.bootloader.4kb.upload.use_1200bps_touch=true -mattairtech_mt_d11.menu.bootloader.4kb.upload.wait_for_upload_port=true -mattairtech_mt_d11.menu.bootloader.4kb.upload.native_usb=true -mattairtech_mt_d11.menu.bootloader.4kb.upload.maximum_size=12288 -mattairtech_mt_d11.menu.bootloader.0kb=NO_BOOTLOADER -mattairtech_mt_d11.menu.bootloader.0kb.build.bootloader_size=__NO_BOOTLOADER__ -mattairtech_mt_d11.menu.bootloader.0kb.build.ldscript_path=linker_scripts/gcc/No_Bootloader -mattairtech_mt_d11.menu.bootloader.0kb.upload.tool=arduino:openocd -mattairtech_mt_d11.menu.bootloader.0kb.upload.use_1200bps_touch=false -mattairtech_mt_d11.menu.bootloader.0kb.upload.wait_for_upload_port=false -mattairtech_mt_d11.menu.bootloader.0kb.upload.native_usb=false -mattairtech_mt_d11.menu.bootloader.0kb.upload.maximum_size=16384 -mattairtech_mt_d11.menu.serial.one_uart=ONE_UART_ONE_WIRE_ONE_SPI -mattairtech_mt_d11.menu.serial.one_uart.build.serialcom_uart=ONE_UART -mattairtech_mt_d11.menu.serial.one_uart.build.serialcom_wire=ONE_WIRE -mattairtech_mt_d11.menu.serial.one_uart.build.serialcom_spi=ONE_SPI -mattairtech_mt_d11.menu.serial.no_uart=NO_UART_ONE_WIRE_ONE_SPI -mattairtech_mt_d11.menu.serial.no_uart.build.serialcom_uart=NO_UART -mattairtech_mt_d11.menu.serial.no_uart.build.serialcom_wire=ONE_WIRE -mattairtech_mt_d11.menu.serial.no_uart.build.serialcom_spi=ONE_SPI -mattairtech_mt_d11.menu.serial.two_uart=TWO_UART_ONE_WIRE_NO_SPI -mattairtech_mt_d11.menu.serial.two_uart.build.serialcom_uart=TWO_UART -mattairtech_mt_d11.menu.serial.two_uart.build.serialcom_wire=ONE_WIRE -mattairtech_mt_d11.menu.serial.two_uart.build.serialcom_spi=NO_SPI -mattairtech_mt_d11.menu.usb.cdc=CDC_ONLY -mattairtech_mt_d11.menu.usb.cdc.build.usbcom=CDC_ONLY -mattairtech_mt_d11.menu.usb.cdc.build.pid=0x0557 -mattairtech_mt_d11.menu.usb.cdc_hid=CDC_HID -mattairtech_mt_d11.menu.usb.cdc_hid.build.usbcom=CDC_HID -mattairtech_mt_d11.menu.usb.cdc_hid.build.pid=0x0856 -mattairtech_mt_d11.menu.usb.withcdc=WITH_CDC -mattairtech_mt_d11.menu.usb.withcdc.build.usbcom=WITH_CDC -mattairtech_mt_d11.menu.usb.withcdc.build.pid=0x0B41 -mattairtech_mt_d11.menu.usb.hid=HID_ONLY -mattairtech_mt_d11.menu.usb.hid.build.usbcom=HID_ONLY -mattairtech_mt_d11.menu.usb.hid.build.pid=0x0B40 -mattairtech_mt_d11.menu.usb.nocdc=WITHOUT_CDC -mattairtech_mt_d11.menu.usb.nocdc.build.usbcom=WITHOUT_CDC -mattairtech_mt_d11.menu.usb.nocdc.build.pid=0x0A0C -mattairtech_mt_d11.menu.usb.none=USB_DISABLED -mattairtech_mt_d11.menu.usb.none.build.usbcom=USB_DISABLED -mattairtech_mt_d11.menu.usb.none.build.pid=0x0856 - - -# Generic D11C14A (SOIC-14) +# Generic D11C14A d11c14a.name=Generic D11C14A d11c14a.vid.0=0x16D0 -d11c14a.pid.0=0x0557 +d11c14a.pid.0=0x1557 d11c14a.vid.1=0x16D0 -d11c14a.pid.1=0x0856 +d11c14a.pid.1=0x1856 d11c14a.vid.2=0x16D0 -d11c14a.pid.2=0x0B41 +d11c14a.pid.2=0x1B41 d11c14a.vid.3=0x16D0 -d11c14a.pid.3=0x0B40 +d11c14a.pid.3=0x1B40 d11c14a.vid.4=0x16D0 -d11c14a.pid.4=0x0A0C +d11c14a.pid.4=0x1A0C d11c14a.vid.5=0x16D0 -d11c14a.pid.5=0x0856 +d11c14a.pid.5=0x1856 d11c14a.build.mcu=cortex-m0plus d11c14a.build.mathlib=arm_cortexM0l_math d11c14a.build.f_cpu=48000000L d11c14a.build.usb_product="D11C14A" -d11c14a.build.usb_manufacturer="MattairTech LLC" +d11c14a.build.usb_manufacturer="Fab Foundation" d11c14a.build.board=SAMD_ZERO d11c14a.build.core=arduino d11c14a.build.variant=Generic_D11C14A d11c14a.build.variant_system_lib= d11c14a.build.vid=0x16D0 d11c14a.upload.protocol=sam-ba -d11c14a.bootloader.tool=arduino:openocd +d11c14a.bootloader.tool=edbg d11c14a.menu.float.default=Print & String use auto-promoted doubles only d11c14a.menu.float.default.build.floatconfig=FLOAT_BOTH_DOUBLES_ONLY d11c14a.menu.float.print=Print uses separate singles and doubles @@ -1332,28 +107,33 @@ d11c14a.menu.timer.timer_4166Hz=4166Hz (8-bit) d11c14a.menu.timer.timer_4166Hz.build.timerconfig=TIMER_4166Hz d11c14a.menu.timer.timer_2930Hz=2930Hz (8-bit) d11c14a.menu.timer.timer_2930Hz.build.timerconfig=TIMER_2930Hz -d11c14a.menu.timer.timer_1465Hz=1465Hz (8-bit, 16-bit for D51) +d11c14a.menu.timer.timer_1465Hz=1465Hz (8-bit) d11c14a.menu.timer.timer_1465Hz.build.timerconfig=TIMER_1465Hz d11c14a.build.extra_flags=-D__SAMD11C14A__ {build.usb_flags} -DARM_MATH_CM0PLUS d11c14a.build.ldscript=flash_16KB.ld +d11c14a.build.chip=samd11 d11c14a.build.openocdscript=openocd_scripts/SAMD11C14A.cfg -d11c14a.bootloader.file=zero/binaries/sam_ba_Generic_D11C14A_SAMD11C14A.bin +d11c14a.bootloader.file=zero/binaries/sam_ba_SAMD11C14A.bin d11c14a.menu.bootloader.4kb=4KB_BOOTLOADER d11c14a.menu.bootloader.4kb.build.bootloader_size=__4KB_BOOTLOADER__ d11c14a.menu.bootloader.4kb.build.ldscript_path=linker_scripts/gcc/4KB_Bootloader -d11c14a.menu.bootloader.4kb.upload.tool=MattairTech_Arduino:bossac +d11c14a.menu.bootloader.4kb.upload.tool=Fab_SAM_Arduino:bossac d11c14a.menu.bootloader.4kb.upload.use_1200bps_touch=true d11c14a.menu.bootloader.4kb.upload.wait_for_upload_port=true d11c14a.menu.bootloader.4kb.upload.native_usb=true d11c14a.menu.bootloader.4kb.upload.maximum_size=12288 +d11c14a.menu.bootloader.4kb.upload.offset=0x1000 +d11c14a.menu.bootloader.4kb.upload.erase= d11c14a.menu.bootloader.0kb=NO_BOOTLOADER d11c14a.menu.bootloader.0kb.build.bootloader_size=__NO_BOOTLOADER__ d11c14a.menu.bootloader.0kb.build.ldscript_path=linker_scripts/gcc/No_Bootloader -d11c14a.menu.bootloader.0kb.upload.tool=arduino:openocd +d11c14a.menu.bootloader.0kb.upload.tool=edbg d11c14a.menu.bootloader.0kb.upload.use_1200bps_touch=false d11c14a.menu.bootloader.0kb.upload.wait_for_upload_port=false d11c14a.menu.bootloader.0kb.upload.native_usb=false d11c14a.menu.bootloader.0kb.upload.maximum_size=16384 +d11c14a.menu.bootloader.0kb.upload.offset=0x0000 +d11c14a.menu.bootloader.0kb.upload.erase=-e d11c14a.menu.serial.one_uart=ONE_UART_ONE_WIRE_NO_SPI d11c14a.menu.serial.one_uart.build.serialcom_uart=ONE_UART d11c14a.menu.serial.one_uart.build.serialcom_wire=ONE_WIRE @@ -1372,50 +152,49 @@ d11c14a.menu.serial.no_uart.build.serialcom_wire=ONE_WIRE d11c14a.menu.serial.no_uart.build.serialcom_spi=ONE_SPI d11c14a.menu.usb.cdc=CDC_ONLY d11c14a.menu.usb.cdc.build.usbcom=CDC_ONLY -d11c14a.menu.usb.cdc.build.pid=0x0557 +d11c14a.menu.usb.cdc.build.pid=0x1557 d11c14a.menu.usb.cdc_hid=CDC_HID d11c14a.menu.usb.cdc_hid.build.usbcom=CDC_HID -d11c14a.menu.usb.cdc_hid.build.pid=0x0856 +d11c14a.menu.usb.cdc_hid.build.pid=0x1856 d11c14a.menu.usb.withcdc=WITH_CDC d11c14a.menu.usb.withcdc.build.usbcom=WITH_CDC -d11c14a.menu.usb.withcdc.build.pid=0x0B41 +d11c14a.menu.usb.withcdc.build.pid=0x1B41 d11c14a.menu.usb.hid=HID_ONLY d11c14a.menu.usb.hid.build.usbcom=HID_ONLY -d11c14a.menu.usb.hid.build.pid=0x0B40 +d11c14a.menu.usb.hid.build.pid=0x1B40 d11c14a.menu.usb.nocdc=WITHOUT_CDC d11c14a.menu.usb.nocdc.build.usbcom=WITHOUT_CDC -d11c14a.menu.usb.nocdc.build.pid=0x0A0C +d11c14a.menu.usb.nocdc.build.pid=0x1A0C d11c14a.menu.usb.none=USB_DISABLED d11c14a.menu.usb.none.build.usbcom=USB_DISABLED -d11c14a.menu.usb.none.build.pid=0x0856 +d11c14a.menu.usb.none.build.pid=0x1856 - -# Generic D11D14AS (SOIC-20) +# Generic D11D14AS d11d14as.name=Generic D11D14AS d11d14as.vid.0=0x16D0 -d11d14as.pid.0=0x0557 +d11d14as.pid.0=0x2557 d11d14as.vid.1=0x16D0 -d11d14as.pid.1=0x0856 +d11d14as.pid.1=0x2856 d11d14as.vid.2=0x16D0 -d11d14as.pid.2=0x0B41 +d11d14as.pid.2=0x2B41 d11d14as.vid.3=0x16D0 -d11d14as.pid.3=0x0B40 +d11d14as.pid.3=0x2B40 d11d14as.vid.4=0x16D0 -d11d14as.pid.4=0x0A0C +d11d14as.pid.4=0x2A0C d11d14as.vid.5=0x16D0 -d11d14as.pid.5=0x0856 +d11d14as.pid.5=0x2856 d11d14as.build.mcu=cortex-m0plus d11d14as.build.mathlib=arm_cortexM0l_math d11d14as.build.f_cpu=48000000L d11d14as.build.usb_product="D11D14AS" -d11d14as.build.usb_manufacturer="MattairTech LLC" +d11d14as.build.usb_manufacturer="Fab Foundation" d11d14as.build.board=SAMD_ZERO d11d14as.build.core=arduino d11d14as.build.variant=Generic_D11D14AS d11d14as.build.variant_system_lib= d11d14as.build.vid=0x16D0 d11d14as.upload.protocol=sam-ba -d11d14as.bootloader.tool=arduino:openocd +d11d14as.bootloader.tool=edbg d11d14as.menu.float.default=Print & String use auto-promoted doubles only d11d14as.menu.float.default.build.floatconfig=FLOAT_BOTH_DOUBLES_ONLY d11d14as.menu.float.print=Print uses separate singles and doubles @@ -1474,28 +253,33 @@ d11d14as.menu.timer.timer_4166Hz=4166Hz (8-bit) d11d14as.menu.timer.timer_4166Hz.build.timerconfig=TIMER_4166Hz d11d14as.menu.timer.timer_2930Hz=2930Hz (8-bit) d11d14as.menu.timer.timer_2930Hz.build.timerconfig=TIMER_2930Hz -d11d14as.menu.timer.timer_1465Hz=1465Hz (8-bit, 16-bit for D51) +d11d14as.menu.timer.timer_1465Hz=1465Hz (8-bit) d11d14as.menu.timer.timer_1465Hz.build.timerconfig=TIMER_1465Hz d11d14as.build.extra_flags=-D__SAMD11D14AS__ {build.usb_flags} -DARM_MATH_CM0PLUS d11d14as.build.ldscript=flash_16KB.ld +d11d14as.build.chip=samd11 d11d14as.build.openocdscript=openocd_scripts/SAMD11D14AS.cfg -d11d14as.bootloader.file=zero/binaries/sam_ba_Generic_D11D14AS_SAMD11D14AS.bin +d11d14as.bootloader.file=zero/binaries/sam_ba_SAMD11D14AS.bin d11d14as.menu.bootloader.4kb=4KB_BOOTLOADER d11d14as.menu.bootloader.4kb.build.bootloader_size=__4KB_BOOTLOADER__ d11d14as.menu.bootloader.4kb.build.ldscript_path=linker_scripts/gcc/4KB_Bootloader -d11d14as.menu.bootloader.4kb.upload.tool=MattairTech_Arduino:bossac +d11d14as.menu.bootloader.4kb.upload.tool=Fab_SAM_Arduino:bossac d11d14as.menu.bootloader.4kb.upload.use_1200bps_touch=true d11d14as.menu.bootloader.4kb.upload.wait_for_upload_port=true d11d14as.menu.bootloader.4kb.upload.native_usb=true d11d14as.menu.bootloader.4kb.upload.maximum_size=12288 +d11d14as.menu.bootloader.4kb.upload.offset=0x1000 +d11d14as.menu.bootloader.4kb.upload.erase= d11d14as.menu.bootloader.0kb=NO_BOOTLOADER d11d14as.menu.bootloader.0kb.build.bootloader_size=__NO_BOOTLOADER__ d11d14as.menu.bootloader.0kb.build.ldscript_path=linker_scripts/gcc/No_Bootloader -d11d14as.menu.bootloader.0kb.upload.tool=arduino:openocd +d11d14as.menu.bootloader.0kb.upload.tool=edbg d11d14as.menu.bootloader.0kb.upload.use_1200bps_touch=false d11d14as.menu.bootloader.0kb.upload.wait_for_upload_port=false d11d14as.menu.bootloader.0kb.upload.native_usb=false d11d14as.menu.bootloader.0kb.upload.maximum_size=16384 +d11d14as.menu.bootloader.0kb.upload.offset=0x0000 +d11d14as.menu.bootloader.0kb.upload.erase=-e d11d14as.menu.serial.one_uart=ONE_UART_ONE_WIRE_ONE_SPI d11d14as.menu.serial.one_uart.build.serialcom_uart=ONE_UART d11d14as.menu.serial.one_uart.build.serialcom_wire=ONE_WIRE @@ -1510,345 +294,1460 @@ d11d14as.menu.serial.two_uart.build.serialcom_wire=ONE_WIRE d11d14as.menu.serial.two_uart.build.serialcom_spi=NO_SPI d11d14as.menu.usb.cdc=CDC_ONLY d11d14as.menu.usb.cdc.build.usbcom=CDC_ONLY -d11d14as.menu.usb.cdc.build.pid=0x0557 +d11d14as.menu.usb.cdc.build.pid=0x2557 d11d14as.menu.usb.cdc_hid=CDC_HID d11d14as.menu.usb.cdc_hid.build.usbcom=CDC_HID -d11d14as.menu.usb.cdc_hid.build.pid=0x0856 +d11d14as.menu.usb.cdc_hid.build.pid=0x2856 d11d14as.menu.usb.withcdc=WITH_CDC d11d14as.menu.usb.withcdc.build.usbcom=WITH_CDC -d11d14as.menu.usb.withcdc.build.pid=0x0B41 +d11d14as.menu.usb.withcdc.build.pid=0x2B41 d11d14as.menu.usb.hid=HID_ONLY d11d14as.menu.usb.hid.build.usbcom=HID_ONLY -d11d14as.menu.usb.hid.build.pid=0x0B40 +d11d14as.menu.usb.hid.build.pid=0x2B40 d11d14as.menu.usb.nocdc=WITHOUT_CDC d11d14as.menu.usb.nocdc.build.usbcom=WITHOUT_CDC -d11d14as.menu.usb.nocdc.build.pid=0x0A0C +d11d14as.menu.usb.nocdc.build.pid=0x2A0C d11d14as.menu.usb.none=USB_DISABLED d11d14as.menu.usb.none.build.usbcom=USB_DISABLED -d11d14as.menu.usb.none.build.pid=0x0856 +d11d14as.menu.usb.none.build.pid=0x2856 + +# Generic D11D14AM +d11d14am.name=Generic D11D14AM +d11d14am.vid.0=0x16D0 +d11d14am.pid.0=0x3557 +d11d14am.vid.1=0x16D0 +d11d14am.pid.1=0x3856 +d11d14am.vid.2=0x16D0 +d11d14am.pid.2=0x3B41 +d11d14am.vid.3=0x16D0 +d11d14am.pid.3=0x3B40 +d11d14am.vid.4=0x16D0 +d11d14am.pid.4=0x3A0C +d11d14am.vid.5=0x16D0 +d11d14am.pid.5=0x3856 +d11d14am.build.mcu=cortex-m0plus +d11d14am.build.mathlib=arm_cortexM0l_math +d11d14am.build.f_cpu=48000000L +d11d14am.build.usb_product="MT-D11" +d11d14am.build.usb_manufacturer="Fab Foundation" +d11d14am.build.board=SAMD_ZERO +d11d14am.build.core=arduino +d11d14am.build.variant=Generic_D11D14AM +d11d14am.build.variant_system_lib= +d11d14am.build.vid=0x16D0 +d11d14am.upload.protocol=sam-ba +d11d14am.bootloader.tool=edbg +d11d14am.menu.float.default=Print & String use auto-promoted doubles only +d11d14am.menu.float.default.build.floatconfig=FLOAT_BOTH_DOUBLES_ONLY +d11d14am.menu.float.print=Print uses separate singles and doubles +d11d14am.menu.float.print.build.floatconfig=FLOAT_PRINT_SINGLES_DOUBLES +d11d14am.menu.float.string=String uses separate singles and doubles +d11d14am.menu.float.string.build.floatconfig=FLOAT_STRING_SINGLES_DOUBLES +d11d14am.menu.float.both=Print & String use separate singles and doubles +d11d14am.menu.float.both.build.floatconfig=FLOAT_BOTH_SINGLES_DOUBLES +d11d14am.menu.config.disabled=config.h disabled +d11d14am.menu.config.disabled.build.buildconfig=CONFIG_H_DISABLED +d11d14am.menu.config.enabled=config.h enabled (mostly code size reductions) +d11d14am.menu.config.enabled.build.buildconfig=CONFIG_H_ENABLED +d11d14am.menu.clock.crystal_32k=32KHZ_CRYSTAL +d11d14am.menu.clock.crystal_32k.build.clockconfig=CLOCKCONFIG_32768HZ_CRYSTAL +d11d14am.menu.clock.crystal_hs=HIGH_SPEED_CRYSTAL +d11d14am.menu.clock.crystal_hs.build.clockconfig=CLOCKCONFIG_HS_CRYSTAL +d11d14am.menu.clock.internal=INTERNAL_OSCILLATOR +d11d14am.menu.clock.internal.build.clockconfig=CLOCKCONFIG_INTERNAL +d11d14am.menu.clock.internal_usb=INTERNAL_USB_CALIBRATED_OSCILLATOR +d11d14am.menu.clock.internal_usb.build.clockconfig=CLOCKCONFIG_INTERNAL_USB +d11d14am.menu.timer.timer_732Hz=732.4Hz (16-bit) +d11d14am.menu.timer.timer_732Hz.build.timerconfig=TIMER_732Hz +d11d14am.menu.timer.timer_366Hz=366.2Hz (16-bit) +d11d14am.menu.timer.timer_366Hz.build.timerconfig=TIMER_366Hz +d11d14am.menu.timer.timer_244Hz=244.1Hz (16-bit) +d11d14am.menu.timer.timer_244Hz.build.timerconfig=TIMER_244Hz +d11d14am.menu.timer.timer_183Hz=183.1Hz (16-bit) +d11d14am.menu.timer.timer_183Hz.build.timerconfig=TIMER_183Hz +d11d14am.menu.timer.timer_146Hz=146.5Hz (16-bit) +d11d14am.menu.timer.timer_146Hz.build.timerconfig=TIMER_146Hz +d11d14am.menu.timer.timer_122Hz=122.1Hz (16-bit) +d11d14am.menu.timer.timer_122Hz.build.timerconfig=TIMER_122Hz +d11d14am.menu.timer.timer_105Hz=104.6Hz (16-bit) +d11d14am.menu.timer.timer_105Hz.build.timerconfig=TIMER_105Hz +d11d14am.menu.timer.timer_81Hz=81.38Hz (16-bit) +d11d14am.menu.timer.timer_81Hz.build.timerconfig=TIMER_81Hz +d11d14am.menu.timer.timer_61Hz=61.04Hz (16-bit) +d11d14am.menu.timer.timer_61Hz.build.timerconfig=TIMER_61Hz +d11d14am.menu.timer.timer_31Hz=30.52Hz (16-bit) +d11d14am.menu.timer.timer_31Hz.build.timerconfig=TIMER_31Hz +d11d14am.menu.timer.timer_187500Hz=187500Hz (8-bit) +d11d14am.menu.timer.timer_187500Hz.build.timerconfig=TIMER_187500Hz +d11d14am.menu.timer.timer_93750Hz=93750Hz (8-bit) +d11d14am.menu.timer.timer_93750Hz.build.timerconfig=TIMER_93750Hz +d11d14am.menu.timer.timer_62500Hz=62500Hz (8-bit) +d11d14am.menu.timer.timer_62500Hz.build.timerconfig=TIMER_62500Hz +d11d14am.menu.timer.timer_37500Hz=37500Hz (8-bit) +d11d14am.menu.timer.timer_37500Hz.build.timerconfig=TIMER_37500Hz +d11d14am.menu.timer.timer_20833Hz=20833Hz (8-bit) +d11d14am.menu.timer.timer_20833Hz.build.timerconfig=TIMER_20833Hz +d11d14am.menu.timer.timer_12500Hz=12500Hz (8-bit) +d11d14am.menu.timer.timer_12500Hz.build.timerconfig=TIMER_12500Hz +d11d14am.menu.timer.timer_7500Hz=7500Hz (8-bit) +d11d14am.menu.timer.timer_7500Hz.build.timerconfig=TIMER_7500Hz +d11d14am.menu.timer.timer_4166Hz=4166Hz (8-bit) +d11d14am.menu.timer.timer_4166Hz.build.timerconfig=TIMER_4166Hz +d11d14am.menu.timer.timer_2930Hz=2930Hz (8-bit) +d11d14am.menu.timer.timer_2930Hz.build.timerconfig=TIMER_2930Hz +d11d14am.menu.timer.timer_1465Hz=1465Hz (8-bit) +d11d14am.menu.timer.timer_1465Hz.build.timerconfig=TIMER_1465Hz +d11d14am.build.extra_flags=-D__SAMD11D14AM__ {build.usb_flags} -DARM_MATH_CM0PLUS +d11d14am.build.ldscript=flash_16KB.ld +d11d14am.build.chip=samd11 +d11d14am.build.openocdscript=openocd_scripts/SAMD11D14AM.cfg +d11d14am.bootloader.file=zero/binaries/sam_ba_SAMD11D14AM.bin +d11d14am.menu.bootloader.4kb=4KB_BOOTLOADER +d11d14am.menu.bootloader.4kb.build.bootloader_size=__4KB_BOOTLOADER__ +d11d14am.menu.bootloader.4kb.build.ldscript_path=linker_scripts/gcc/4KB_Bootloader +d11d14am.menu.bootloader.4kb.upload.tool=Fab_SAM_Arduino:bossac +d11d14am.menu.bootloader.4kb.upload.use_1200bps_touch=true +d11d14am.menu.bootloader.4kb.upload.wait_for_upload_port=true +d11d14am.menu.bootloader.4kb.upload.native_usb=true +d11d14am.menu.bootloader.4kb.upload.maximum_size=12288 +d11d14am.menu.bootloader.4kb.upload.offset=0x1000 +d11d14am.menu.bootloader.4kb.upload.erase= +d11d14am.menu.bootloader.0kb=NO_BOOTLOADER +d11d14am.menu.bootloader.0kb.build.bootloader_size=__NO_BOOTLOADER__ +d11d14am.menu.bootloader.0kb.build.ldscript_path=linker_scripts/gcc/No_Bootloader +d11d14am.menu.bootloader.0kb.upload.tool=edbg +d11d14am.menu.bootloader.0kb.upload.use_1200bps_touch=false +d11d14am.menu.bootloader.0kb.upload.wait_for_upload_port=false +d11d14am.menu.bootloader.0kb.upload.native_usb=false +d11d14am.menu.bootloader.0kb.upload.maximum_size=16384 +d11d14am.menu.bootloader.0kb.upload.offset=0x0000 +d11d14am.menu.bootloader.0kb.upload.erase=-e +d11d14am.menu.serial.one_uart=ONE_UART_ONE_WIRE_ONE_SPI +d11d14am.menu.serial.one_uart.build.serialcom_uart=ONE_UART +d11d14am.menu.serial.one_uart.build.serialcom_wire=ONE_WIRE +d11d14am.menu.serial.one_uart.build.serialcom_spi=ONE_SPI +d11d14am.menu.serial.no_uart=NO_UART_ONE_WIRE_ONE_SPI +d11d14am.menu.serial.no_uart.build.serialcom_uart=NO_UART +d11d14am.menu.serial.no_uart.build.serialcom_wire=ONE_WIRE +d11d14am.menu.serial.no_uart.build.serialcom_spi=ONE_SPI +d11d14am.menu.serial.two_uart=TWO_UART_ONE_WIRE_NO_SPI +d11d14am.menu.serial.two_uart.build.serialcom_uart=TWO_UART +d11d14am.menu.serial.two_uart.build.serialcom_wire=ONE_WIRE +d11d14am.menu.serial.two_uart.build.serialcom_spi=NO_SPI +d11d14am.menu.usb.cdc=CDC_ONLY +d11d14am.menu.usb.cdc.build.usbcom=CDC_ONLY +d11d14am.menu.usb.cdc.build.pid=0x3557 +d11d14am.menu.usb.cdc_hid=CDC_HID +d11d14am.menu.usb.cdc_hid.build.usbcom=CDC_HID +d11d14am.menu.usb.cdc_hid.build.pid=0x3856 +d11d14am.menu.usb.withcdc=WITH_CDC +d11d14am.menu.usb.withcdc.build.usbcom=WITH_CDC +d11d14am.menu.usb.withcdc.build.pid=0x3B41 +d11d14am.menu.usb.hid=HID_ONLY +d11d14am.menu.usb.hid.build.usbcom=HID_ONLY +d11d14am.menu.usb.hid.build.pid=0x3B40 +d11d14am.menu.usb.nocdc=WITHOUT_CDC +d11d14am.menu.usb.nocdc.build.usbcom=WITHOUT_CDC +d11d14am.menu.usb.nocdc.build.pid=0x3A0C +d11d14am.menu.usb.none=USB_DISABLED +d11d14am.menu.usb.none.build.usbcom=USB_DISABLED +d11d14am.menu.usb.none.build.pid=0x3856 + +# Generic x21E +x21e.name=Generic x21E +x21e.vid.0=0x16D0 +x21e.pid.0=0x4557 +x21e.vid.1=0x16D0 +x21e.pid.1=0x4856 +x21e.vid.2=0x16D0 +x21e.pid.2=0x4B41 +x21e.vid.3=0x16D0 +x21e.pid.3=0x4B40 +x21e.vid.4=0x16D0 +x21e.pid.4=0x4A0C +x21e.vid.5=0x16D0 +x21e.pid.5=0x4856 +x21e.build.mcu=cortex-m0plus +x21e.build.mathlib=arm_cortexM0l_math +x21e.build.f_cpu=48000000L +x21e.build.usb_product="x21E" +x21e.build.usb_manufacturer="Fab Foundation" +x21e.build.board=SAMD_ZERO +x21e.build.core=arduino +x21e.build.variant=Generic_x21E +x21e.build.variant_system_lib= +x21e.build.vid=0x16D0 +x21e.upload.protocol=sam-ba +x21e.bootloader.tool=edbg +x21e.menu.float.default=Print & String use auto-promoted doubles only +x21e.menu.float.default.build.floatconfig=FLOAT_BOTH_DOUBLES_ONLY +x21e.menu.float.print=Print uses separate singles and doubles +x21e.menu.float.print.build.floatconfig=FLOAT_PRINT_SINGLES_DOUBLES +x21e.menu.float.string=String uses separate singles and doubles +x21e.menu.float.string.build.floatconfig=FLOAT_STRING_SINGLES_DOUBLES +x21e.menu.float.both=Print & String use separate singles and doubles +x21e.menu.float.both.build.floatconfig=FLOAT_BOTH_SINGLES_DOUBLES +x21e.menu.config.disabled=config.h disabled +x21e.menu.config.disabled.build.buildconfig=CONFIG_H_DISABLED +x21e.menu.config.enabled=config.h enabled (mostly code size reductions) +x21e.menu.config.enabled.build.buildconfig=CONFIG_H_ENABLED +x21e.menu.clock.internal_usb=INTERNAL_USB_CALIBRATED_OSCILLATOR +x21e.menu.clock.internal_usb.build.clockconfig=CLOCKCONFIG_INTERNAL_USB +x21e.menu.clock.internal=INTERNAL_OSCILLATOR +x21e.menu.clock.internal.build.clockconfig=CLOCKCONFIG_INTERNAL +x21e.menu.clock.crystal_32k=32KHZ_CRYSTAL +x21e.menu.clock.crystal_32k.build.clockconfig=CLOCKCONFIG_32768HZ_CRYSTAL +x21e.menu.clock.crystal_hs=HIGH_SPEED_CRYSTAL +x21e.menu.clock.crystal_hs.build.clockconfig=CLOCKCONFIG_HS_CRYSTAL +x21e.menu.timer.timer_732Hz=732.4Hz (16-bit) +x21e.menu.timer.timer_732Hz.build.timerconfig=TIMER_732Hz +x21e.menu.timer.timer_366Hz=366.2Hz (16-bit) +x21e.menu.timer.timer_366Hz.build.timerconfig=TIMER_366Hz +x21e.menu.timer.timer_244Hz=244.1Hz (16-bit) +x21e.menu.timer.timer_244Hz.build.timerconfig=TIMER_244Hz +x21e.menu.timer.timer_183Hz=183.1Hz (16-bit) +x21e.menu.timer.timer_183Hz.build.timerconfig=TIMER_183Hz +x21e.menu.timer.timer_146Hz=146.5Hz (16-bit) +x21e.menu.timer.timer_146Hz.build.timerconfig=TIMER_146Hz +x21e.menu.timer.timer_122Hz=122.1Hz (16-bit) +x21e.menu.timer.timer_122Hz.build.timerconfig=TIMER_122Hz +x21e.menu.timer.timer_105Hz=104.6Hz (16-bit) +x21e.menu.timer.timer_105Hz.build.timerconfig=TIMER_105Hz +x21e.menu.timer.timer_81Hz=81.38Hz (16-bit) +x21e.menu.timer.timer_81Hz.build.timerconfig=TIMER_81Hz +x21e.menu.timer.timer_61Hz=61.04Hz (16-bit) +x21e.menu.timer.timer_61Hz.build.timerconfig=TIMER_61Hz +x21e.menu.timer.timer_31Hz=30.52Hz (16-bit) +x21e.menu.timer.timer_31Hz.build.timerconfig=TIMER_31Hz +x21e.menu.timer.timer_187500Hz=187500Hz (8-bit) +x21e.menu.timer.timer_187500Hz.build.timerconfig=TIMER_187500Hz +x21e.menu.timer.timer_93750Hz=93750Hz (8-bit) +x21e.menu.timer.timer_93750Hz.build.timerconfig=TIMER_93750Hz +x21e.menu.timer.timer_62500Hz=62500Hz (8-bit) +x21e.menu.timer.timer_62500Hz.build.timerconfig=TIMER_62500Hz +x21e.menu.timer.timer_37500Hz=37500Hz (8-bit) +x21e.menu.timer.timer_37500Hz.build.timerconfig=TIMER_37500Hz +x21e.menu.timer.timer_20833Hz=20833Hz (8-bit) +x21e.menu.timer.timer_20833Hz.build.timerconfig=TIMER_20833Hz +x21e.menu.timer.timer_12500Hz=12500Hz (8-bit) +x21e.menu.timer.timer_12500Hz.build.timerconfig=TIMER_12500Hz +x21e.menu.timer.timer_7500Hz=7500Hz (8-bit) +x21e.menu.timer.timer_7500Hz.build.timerconfig=TIMER_7500Hz +x21e.menu.timer.timer_4166Hz=4166Hz (8-bit) +x21e.menu.timer.timer_4166Hz.build.timerconfig=TIMER_4166Hz +x21e.menu.timer.timer_2930Hz=2930Hz (8-bit) +x21e.menu.timer.timer_2930Hz.build.timerconfig=TIMER_2930Hz +x21e.menu.timer.timer_1465Hz=1465Hz (8-bit) +x21e.menu.timer.timer_1465Hz.build.timerconfig=TIMER_1465Hz +x21e.menu.cpu.samd21e17a=SAMD21E17A +x21e.menu.cpu.samd21e17a.build.chip=samd21 +x21e.menu.cpu.samd21e17a.upload.maximum_size=122880 +x21e.menu.cpu.samd21e17a.build.extra_flags=-D__SAMD21E17A__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21e.menu.cpu.samd21e17a.build.ldscript=flash_128KB.ld +x21e.menu.cpu.samd21e17a.build.openocdscript=openocd_scripts/SAMD21E17A.cfg +x21e.menu.cpu.samd21e17a.bootloader.file=zero/binaries/sam_ba_SAMD21E17A.bin +x21e.menu.cpu.samd21e18a=SAMD21E18A +x21e.menu.cpu.samd21e18a.build.chip=samd21 +x21e.menu.cpu.samd21e18a.upload.maximum_size=253952 +x21e.menu.cpu.samd21e18a.build.extra_flags=-D__SAMD21E18A__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21e.menu.cpu.samd21e18a.build.ldscript=flash_256KB.ld +x21e.menu.cpu.samd21e18a.build.openocdscript=openocd_scripts/SAMD21E18A.cfg +x21e.menu.cpu.samd21e18a.bootloader.file=zero/binaries/sam_ba_SAMD21E18A.bin +x21e.menu.cpu.samd21e15a=SAMD21E15A +x21e.menu.cpu.samd21e15a.build.chip=samd21 +x21e.menu.cpu.samd21e15a.upload.maximum_size=24576 +x21e.menu.cpu.samd21e15a.build.extra_flags=-D__SAMD21E15A__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21e.menu.cpu.samd21e15a.build.ldscript=flash_32KB.ld +x21e.menu.cpu.samd21e15a.build.openocdscript=openocd_scripts/SAMD21E15A.cfg +x21e.menu.cpu.samd21e15a.bootloader.file=zero/binaries/sam_ba_SAMD21E15A.bin +x21e.menu.cpu.samd21e16a=SAMD21E16A +x21e.menu.cpu.samd21e16a.build.chip=samd21 +x21e.menu.cpu.samd21e16a.upload.maximum_size=57344 +x21e.menu.cpu.samd21e16a.build.extra_flags=-D__SAMD21E16A__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21e.menu.cpu.samd21e16a.build.ldscript=flash_64KB.ld +x21e.menu.cpu.samd21e16a.build.openocdscript=openocd_scripts/SAMD21E16A.cfg +x21e.menu.cpu.samd21e16a.bootloader.file=zero/binaries/sam_ba_SAMD21E16A.bin +x21e.menu.cpu.saml21e17b=SAML21E17B +x21e.menu.cpu.saml21e17b.build.chip=saml21 +x21e.menu.cpu.saml21e17b.upload.maximum_size=122880 +x21e.menu.cpu.saml21e17b.build.extra_flags=-D__SAML21E17B__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21e.menu.cpu.saml21e17b.build.ldscript=flash_128KB.ld +x21e.menu.cpu.saml21e17b.build.openocdscript=openocd_scripts/SAML21E17B.cfg +x21e.menu.cpu.saml21e17b.bootloader.file=zero/binaries/sam_ba_SAML21E17B.bin +x21e.menu.cpu.saml21e18b=SAML21E18B +x21e.menu.cpu.saml21e18b.build.chip=saml21 +x21e.menu.cpu.saml21e18b.upload.maximum_size=253952 +x21e.menu.cpu.saml21e18b.build.extra_flags=-D__SAML21E18B__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21e.menu.cpu.saml21e18b.build.ldscript=flash_256KB.ld +x21e.menu.cpu.saml21e18b.build.openocdscript=openocd_scripts/SAML21E18B.cfg +x21e.menu.cpu.saml21e18b.bootloader.file=zero/binaries/sam_ba_SAML21E18B.bin +x21e.menu.cpu.saml21e15b=SAML21E15B +x21e.menu.cpu.saml21e15b.build.chip=saml21 +x21e.menu.cpu.saml21e15b.upload.maximum_size=24576 +x21e.menu.cpu.saml21e15b.build.extra_flags=-D__SAML21E15B__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21e.menu.cpu.saml21e15b.build.ldscript=flash_32KB.ld +x21e.menu.cpu.saml21e15b.build.openocdscript=openocd_scripts/SAML21E15B.cfg +x21e.menu.cpu.saml21e15b.bootloader.file=zero/binaries/sam_ba_SAML21E15B.bin +x21e.menu.cpu.saml21e16b=SAML21E16B +x21e.menu.cpu.saml21e16b.build.chip=saml21 +x21e.menu.cpu.saml21e16b.upload.maximum_size=57344 +x21e.menu.cpu.saml21e16b.build.extra_flags=-D__SAML21E16B__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21e.menu.cpu.saml21e16b.build.ldscript=flash_64KB.ld +x21e.menu.cpu.saml21e16b.build.openocdscript=openocd_scripts/SAML21E16B.cfg +x21e.menu.cpu.saml21e16b.bootloader.file=zero/binaries/sam_ba_SAML21E16B.bin +x21e.menu.cpu.samc21e17a=SAMC21E17A +x21e.menu.cpu.samc21e17a.build.chip=samc21 +x21e.menu.cpu.samc21e17a.upload.maximum_size=122880 +x21e.menu.cpu.samc21e17a.build.extra_flags=-D__SAMC21E17A__ -DARM_MATH_CM0PLUS +x21e.menu.cpu.samc21e17a.build.ldscript=flash_128KB.ld +x21e.menu.cpu.samc21e17a.build.openocdscript=openocd_scripts/SAMC21E17A.cfg +x21e.menu.cpu.samc21e17a.bootloader.file=zero/binaries/sam_ba_SAMC21E17A.bin +x21e.menu.cpu.samc21e18a=SAMC21E18A +x21e.menu.cpu.samc21e18a.build.chip=samc21 +x21e.menu.cpu.samc21e18a.upload.maximum_size=253952 +x21e.menu.cpu.samc21e18a.build.extra_flags=-D__SAMC21E18A__ -DARM_MATH_CM0PLUS +x21e.menu.cpu.samc21e18a.build.ldscript=flash_256KB.ld +x21e.menu.cpu.samc21e18a.build.openocdscript=openocd_scripts/SAMC21E18A.cfg +x21e.menu.cpu.samc21e18a.bootloader.file=zero/binaries/sam_ba_SAMC21E18A.bin +x21e.menu.cpu.samc21e15a=SAMC21E15A +x21e.menu.cpu.samc21e15a.build.chip=samc21 +x21e.menu.cpu.samc21e15a.upload.maximum_size=24576 +x21e.menu.cpu.samc21e15a.build.extra_flags=-D__SAMC21E15A__ -DARM_MATH_CM0PLUS +x21e.menu.cpu.samc21e15a.build.ldscript=flash_32KB.ld +x21e.menu.cpu.samc21e15a.build.openocdscript=openocd_scripts/SAMC21E15A.cfg +x21e.menu.cpu.samc21e15a.bootloader.file=zero/binaries/sam_ba_SAMC21E15A.bin +x21e.menu.cpu.samc21e16a=SAMC21E16A +x21e.menu.cpu.samc21e16a.build.chip=samc21 +x21e.menu.cpu.samc21e16a.upload.maximum_size=57344 +x21e.menu.cpu.samc21e16a.build.extra_flags=-D__SAMC21E16A__ -DARM_MATH_CM0PLUS +x21e.menu.cpu.samc21e16a.build.ldscript=flash_64KB.ld +x21e.menu.cpu.samc21e16a.build.openocdscript=openocd_scripts/SAMC21E16A.cfg +x21e.menu.cpu.samc21e16a.bootloader.file=zero/binaries/sam_ba_SAMC21E16A.bin +x21e.menu.bootloader.8kb=8KB_BOOTLOADER +x21e.menu.bootloader.8kb.build.bootloader_size=__8KB_BOOTLOADER__ +x21e.menu.bootloader.8kb.build.ldscript_path=linker_scripts/gcc/8KB_Bootloader +x21e.menu.bootloader.8kb.upload.tool=Fab_SAM_Arduino:bossac +x21e.menu.bootloader.8kb.upload.use_1200bps_touch=true +x21e.menu.bootloader.8kb.upload.wait_for_upload_port=true +x21e.menu.bootloader.8kb.upload.native_usb=true +x21e.menu.bootloader.8kb.upload.offset=0x2000 +x21e.menu.bootloader.8kb.upload.erase= +x21e.menu.bootloader.16kb=16KB_BOOTLOADER +x21e.menu.bootloader.16kb.build.bootloader_size=__16KB_BOOTLOADER__ +x21e.menu.bootloader.16kb.build.ldscript_path=linker_scripts/gcc/16KB_Bootloader +x21e.menu.bootloader.16kb.upload.tool=Fab_SAM_Arduino:bossac +x21e.menu.bootloader.16kb.upload.use_1200bps_touch=true +x21e.menu.bootloader.16kb.upload.wait_for_upload_port=true +x21e.menu.bootloader.16kb.upload.native_usb=true +x21e.menu.bootloader.16kb.upload.offset=0x4000 +x21e.menu.bootloader.16kb.upload.erase= +x21e.menu.bootloader.0kb=NO_BOOTLOADER +x21e.menu.bootloader.0kb.build.bootloader_size=__NO_BOOTLOADER__ +x21e.menu.bootloader.0kb.build.ldscript_path=linker_scripts/gcc/No_Bootloader +x21e.menu.bootloader.0kb.upload.tool=edbg +x21e.menu.bootloader.0kb.upload.use_1200bps_touch=false +x21e.menu.bootloader.0kb.upload.wait_for_upload_port=false +x21e.menu.bootloader.0kb.upload.native_usb=false +x21e.menu.bootloader.0kb.upload.offset=0x0000 +x21e.menu.bootloader.0kb.upload.erase=-e +x21e.menu.serial.one_uart=ONE_UART_ONE_WIRE_ONE_SPI +x21e.menu.serial.one_uart.build.serialcom_uart=ONE_UART +x21e.menu.serial.one_uart.build.serialcom_wire=ONE_WIRE +x21e.menu.serial.one_uart.build.serialcom_spi=ONE_SPI +x21e.menu.serial.one_uart_one_wire_two_spi=ONE_UART_ONE_WIRE_TWO_SPI +x21e.menu.serial.one_uart_one_wire_two_spi.build.serialcom_uart=ONE_UART +x21e.menu.serial.one_uart_one_wire_two_spi.build.serialcom_wire=ONE_WIRE +x21e.menu.serial.one_uart_one_wire_two_spi.build.serialcom_spi=TWO_SPI +x21e.menu.serial.one_uart_two_wire_one_spi=ONE_UART_TWO_WIRE_ONE_SPI +x21e.menu.serial.one_uart_two_wire_one_spi.build.serialcom_uart=ONE_UART +x21e.menu.serial.one_uart_two_wire_one_spi.build.serialcom_wire=TWO_WIRE +x21e.menu.serial.one_uart_two_wire_one_spi.build.serialcom_spi=ONE_SPI +x21e.menu.serial.two_uart=TWO_UART_ONE_WIRE_ONE_SPI +x21e.menu.serial.two_uart.build.serialcom_uart=TWO_UART +x21e.menu.serial.two_uart.build.serialcom_wire=ONE_WIRE +x21e.menu.serial.two_uart.build.serialcom_spi=ONE_SPI +x21e.menu.serial.three_uart_one_wire_no_spi=THREE_UART_ONE_WIRE_NO_SPI +x21e.menu.serial.three_uart_one_wire_no_spi.build.serialcom_uart=THREE_UART +x21e.menu.serial.three_uart_one_wire_no_spi.build.serialcom_wire=ONE_WIRE +x21e.menu.serial.three_uart_one_wire_no_spi.build.serialcom_spi=NO_SPI +x21e.menu.serial.three_uart_no_wire_one_spi=THREE_UART_NO_WIRE_ONE_SPI +x21e.menu.serial.three_uart_no_wire_one_spi.build.serialcom_uart=THREE_UART +x21e.menu.serial.three_uart_no_wire_one_spi.build.serialcom_wire=NO_WIRE +x21e.menu.serial.three_uart_no_wire_one_spi.build.serialcom_spi=ONE_SPI +x21e.menu.serial.four_uart=FOUR_UART_NO_WIRE_NO_SPI +x21e.menu.serial.four_uart.build.serialcom_uart=FOUR_UART +x21e.menu.serial.four_uart.build.serialcom_wire=NO_WIRE +x21e.menu.serial.four_uart.build.serialcom_spi=NO_SPI +x21e.menu.serial.no_uart_one_wire_two_spi=NO_UART_ONE_WIRE_TWO_SPI +x21e.menu.serial.no_uart_one_wire_two_spi.build.serialcom_uart=NO_UART +x21e.menu.serial.no_uart_one_wire_two_spi.build.serialcom_wire=ONE_WIRE +x21e.menu.serial.no_uart_one_wire_two_spi.build.serialcom_spi=TWO_SPI +x21e.menu.serial.four_uart_one_wire_one_spi=FOUR_UART_ONE_WIRE_ONE_SPI (L21 only) +x21e.menu.serial.four_uart_one_wire_one_spi.build.serialcom_uart=FOUR_UART +x21e.menu.serial.four_uart_one_wire_one_spi.build.serialcom_wire=ONE_WIRE +x21e.menu.serial.four_uart_one_wire_one_spi.build.serialcom_spi=ONE_SPI +x21e.menu.serial.five_uart_no_wire_one_spi=FIVE_UART_NO_WIRE_ONE_SPI (L21 only) +x21e.menu.serial.five_uart_no_wire_one_spi.build.serialcom_uart=FIVE_UART +x21e.menu.serial.five_uart_no_wire_one_spi.build.serialcom_wire=NO_WIRE +x21e.menu.serial.five_uart_no_wire_one_spi.build.serialcom_spi=ONE_SPI +x21e.menu.serial.five_uart_one_wire_no_spi=FIVE_UART_ONE_WIRE_NO_SPI (L21 only) +x21e.menu.serial.five_uart_one_wire_no_spi.build.serialcom_uart=FIVE_UART +x21e.menu.serial.five_uart_one_wire_no_spi.build.serialcom_wire=ONE_WIRE +x21e.menu.serial.five_uart_one_wire_no_spi.build.serialcom_spi=NO_SPI +x21e.menu.serial.six_uart=SIX_UART_NO_WIRE_NO_SPI (L21 only) +x21e.menu.serial.six_uart.build.serialcom_uart=SIX_UART +x21e.menu.serial.six_uart.build.serialcom_wire=NO_WIRE +x21e.menu.serial.six_uart.build.serialcom_spi=NO_SPI +x21e.menu.usb.cdc=CDC_ONLY +x21e.menu.usb.cdc.build.usbcom=CDC_ONLY +x21e.menu.usb.cdc.build.pid=0x4557 +x21e.menu.usb.cdc_hid=CDC_HID +x21e.menu.usb.cdc_hid.build.usbcom=CDC_HID +x21e.menu.usb.cdc_hid.build.pid=0x4856 +x21e.menu.usb.withcdc=WITH_CDC +x21e.menu.usb.withcdc.build.usbcom=WITH_CDC +x21e.menu.usb.withcdc.build.pid=0x4B41 +x21e.menu.usb.hid=HID_ONLY +x21e.menu.usb.hid.build.usbcom=HID_ONLY +x21e.menu.usb.hid.build.pid=0x4B40 +x21e.menu.usb.nocdc=WITHOUT_CDC +x21e.menu.usb.nocdc.build.usbcom=WITHOUT_CDC +x21e.menu.usb.nocdc.build.pid=0x4A0C +x21e.menu.usb.none=USB_DISABLED +x21e.menu.usb.none.build.usbcom=USB_DISABLED +x21e.menu.usb.none.build.pid=0x4856 +# Generic x21G +x21g.name=Generic x21G +x21g.vid.0=0x16D0 +x21g.pid.0=0x5557 +x21g.vid.1=0x16D0 +x21g.pid.1=0x5856 +x21g.vid.2=0x16D0 +x21g.pid.2=0x5B41 +x21g.vid.3=0x16D0 +x21g.pid.3=0x5B40 +x21g.vid.4=0x16D0 +x21g.pid.4=0x5A0C +x21g.vid.5=0x16D0 +x21g.pid.5=0x5856 +x21g.build.usb_manufacturer="Fab Foundation" +x21g.build.board=SAMD_ZERO +x21g.build.core=arduino +x21g.build.variant=Generic_xx1G +x21g.build.variant_system_lib= +x21g.build.vid=0x16D0 +x21g.upload.protocol=sam-ba +x21g.bootloader.tool=edbg +x21g.menu.float.default=Print & String use auto-promoted doubles only +x21g.menu.float.default.build.floatconfig=FLOAT_BOTH_DOUBLES_ONLY +x21g.menu.float.print=Print uses separate singles and doubles +x21g.menu.float.print.build.floatconfig=FLOAT_PRINT_SINGLES_DOUBLES +x21g.menu.float.string=String uses separate singles and doubles +x21g.menu.float.string.build.floatconfig=FLOAT_STRING_SINGLES_DOUBLES +x21g.menu.float.both=Print & String use separate singles and doubles +x21g.menu.float.both.build.floatconfig=FLOAT_BOTH_SINGLES_DOUBLES +x21g.menu.config.disabled=config.h disabled +x21g.menu.config.disabled.build.buildconfig=CONFIG_H_DISABLED +x21g.menu.config.enabled=config.h enabled (mostly code size reductions) +x21g.menu.config.enabled.build.buildconfig=CONFIG_H_ENABLED +x21g.menu.clock.internal_usb=INTERNAL_USB_CALIBRATED_OSCILLATOR +x21g.menu.clock.internal_usb.build.clockconfig=CLOCKCONFIG_INTERNAL_USB +x21g.menu.clock.internal=INTERNAL_OSCILLATOR +x21g.menu.clock.internal.build.clockconfig=CLOCKCONFIG_INTERNAL +x21g.menu.clock.crystal_32k=32KHZ_CRYSTAL +x21g.menu.clock.crystal_32k.build.clockconfig=CLOCKCONFIG_32768HZ_CRYSTAL +x21g.menu.clock.crystal_hs=HIGH_SPEED_CRYSTAL +x21g.menu.clock.crystal_hs.build.clockconfig=CLOCKCONFIG_HS_CRYSTAL +x21g.menu.timer.timer_732Hz=732.4Hz (16-bit) +x21g.menu.timer.timer_732Hz.build.timerconfig=TIMER_732Hz +x21g.menu.timer.timer_366Hz=366.2Hz (16-bit) +x21g.menu.timer.timer_366Hz.build.timerconfig=TIMER_366Hz +x21g.menu.timer.timer_244Hz=244.1Hz (16-bit) +x21g.menu.timer.timer_244Hz.build.timerconfig=TIMER_244Hz +x21g.menu.timer.timer_183Hz=183.1Hz (16-bit) +x21g.menu.timer.timer_183Hz.build.timerconfig=TIMER_183Hz +x21g.menu.timer.timer_146Hz=146.5Hz (16-bit) +x21g.menu.timer.timer_146Hz.build.timerconfig=TIMER_146Hz +x21g.menu.timer.timer_122Hz=122.1Hz (16-bit) +x21g.menu.timer.timer_122Hz.build.timerconfig=TIMER_122Hz +x21g.menu.timer.timer_105Hz=104.6Hz (16-bit) +x21g.menu.timer.timer_105Hz.build.timerconfig=TIMER_105Hz +x21g.menu.timer.timer_81Hz=81.38Hz (16-bit) +x21g.menu.timer.timer_81Hz.build.timerconfig=TIMER_81Hz +x21g.menu.timer.timer_61Hz=61.04Hz (16-bit) +x21g.menu.timer.timer_61Hz.build.timerconfig=TIMER_61Hz +x21g.menu.timer.timer_31Hz=30.52Hz (16-bit) +x21g.menu.timer.timer_31Hz.build.timerconfig=TIMER_31Hz +x21g.menu.timer.timer_187500Hz=187500Hz (8-bit) +x21g.menu.timer.timer_187500Hz.build.timerconfig=TIMER_187500Hz +x21g.menu.timer.timer_93750Hz=93750Hz (8-bit) +x21g.menu.timer.timer_93750Hz.build.timerconfig=TIMER_93750Hz +x21g.menu.timer.timer_62500Hz=62500Hz (8-bit) +x21g.menu.timer.timer_62500Hz.build.timerconfig=TIMER_62500Hz +x21g.menu.timer.timer_37500Hz=37500Hz (8-bit) +x21g.menu.timer.timer_37500Hz.build.timerconfig=TIMER_37500Hz +x21g.menu.timer.timer_20833Hz=20833Hz (8-bit) +x21g.menu.timer.timer_20833Hz.build.timerconfig=TIMER_20833Hz +x21g.menu.timer.timer_12500Hz=12500Hz (8-bit) +x21g.menu.timer.timer_12500Hz.build.timerconfig=TIMER_12500Hz +x21g.menu.timer.timer_7500Hz=7500Hz (8-bit) +x21g.menu.timer.timer_7500Hz.build.timerconfig=TIMER_7500Hz +x21g.menu.timer.timer_4166Hz=4166Hz (8-bit) +x21g.menu.timer.timer_4166Hz.build.timerconfig=TIMER_4166Hz +x21g.menu.timer.timer_2930Hz=2930Hz (8-bit) +x21g.menu.timer.timer_2930Hz.build.timerconfig=TIMER_2930Hz +x21g.menu.timer.timer_1465Hz=1465Hz (8-bit) +x21g.menu.timer.timer_1465Hz.build.timerconfig=TIMER_1465Hz +x21g.menu.cpu.samd21g17a=SAMD21G17A +x21g.menu.cpu.samd21g17a.build.chip=samd21 +x21g.menu.cpu.samd21g17a.upload.maximum_size=122880 +x21g.menu.cpu.samd21g17a.build.mcu=cortex-m0plus +x21g.menu.cpu.samd21g17a.build.mathlib=arm_cortexM0l_math +x21g.menu.cpu.samd21g17a.build.f_cpu=48000000L +x21g.menu.cpu.samd21g17a.build.usb_product="D21" +x21g.menu.cpu.samd21g17a.build.extra_flags=-D__SAMD21G17A__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21g.menu.cpu.samd21g17a.build.ldscript=flash_128KB.ld +x21g.menu.cpu.samd21g17a.build.openocdscript=openocd_scripts/SAMD21G17A.cfg +x21g.menu.cpu.samd21g17a.bootloader.file=zero/binaries/sam_ba_SAMD21G17A.bin +x21g.menu.cpu.samd21g18a=SAMD21G18A +x21g.menu.cpu.samd21g18a.build.chip=samd21 +x21g.menu.cpu.samd21g18a.upload.maximum_size=253952 +x21g.menu.cpu.samd21g18a.build.mcu=cortex-m0plus +x21g.menu.cpu.samd21g18a.build.mathlib=arm_cortexM0l_math +x21g.menu.cpu.samd21g18a.build.f_cpu=48000000L +x21g.menu.cpu.samd21g18a.build.usb_product="D21" +x21g.menu.cpu.samd21g18a.build.extra_flags=-D__SAMD21G18A__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21g.menu.cpu.samd21g18a.build.ldscript=flash_256KB.ld +x21g.menu.cpu.samd21g18a.build.openocdscript=openocd_scripts/SAMD21G18A.cfg +x21g.menu.cpu.samd21g18a.bootloader.file=zero/binaries/sam_ba_SAMD21G18A.bin +x21g.menu.cpu.samd21g15a=SAMD21G15A +x21g.menu.cpu.samd21g15a.build.chip=samd21 +x21g.menu.cpu.samd21g15a.upload.maximum_size=24576 +x21g.menu.cpu.samd21g15a.build.mcu=cortex-m0plus +x21g.menu.cpu.samd21g15a.build.mathlib=arm_cortexM0l_math +x21g.menu.cpu.samd21g15a.build.f_cpu=48000000L +x21g.menu.cpu.samd21g15a.build.usb_product="D21" +x21g.menu.cpu.samd21g15a.build.extra_flags=-D__SAMD21G15A__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21g.menu.cpu.samd21g15a.build.ldscript=flash_32KB.ld +x21g.menu.cpu.samd21g15a.build.openocdscript=openocd_scripts/SAMD21G15A.cfg +x21g.menu.cpu.samd21g15a.bootloader.file=zero/binaries/sam_ba_SAMD21G15A.bin +x21g.menu.cpu.samd21g16a=SAMD21G16A +x21g.menu.cpu.samd21g16a.build.chip=samd21 +x21g.menu.cpu.samd21g16a.upload.maximum_size=57344 +x21g.menu.cpu.samd21g16a.build.mcu=cortex-m0plus +x21g.menu.cpu.samd21g16a.build.mathlib=arm_cortexM0l_math +x21g.menu.cpu.samd21g16a.build.f_cpu=48000000L +x21g.menu.cpu.samd21g16a.build.usb_product="D21" +x21g.menu.cpu.samd21g16a.build.extra_flags=-D__SAMD21G16A__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21g.menu.cpu.samd21g16a.build.ldscript=flash_64KB.ld +x21g.menu.cpu.samd21g16a.build.openocdscript=openocd_scripts/SAMD21G16A.cfg +x21g.menu.cpu.samd21g16a.bootloader.file=zero/binaries/sam_ba_SAMD21G16A.bin +x21g.menu.cpu.saml21g17b=SAML21G17B +x21g.menu.cpu.saml21g17b.build.chip=saml21 +x21g.menu.cpu.saml21g17b.upload.maximum_size=122880 +x21g.menu.cpu.saml21g17b.build.mcu=cortex-m0plus +x21g.menu.cpu.saml21g17b.build.mathlib=arm_cortexM0l_math +x21g.menu.cpu.saml21g17b.build.f_cpu=48000000L +x21g.menu.cpu.saml21g17b.build.usb_product="L21" +x21g.menu.cpu.saml21g17b.build.extra_flags=-D__SAML21G17B__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21g.menu.cpu.saml21g17b.build.ldscript=flash_128KB.ld +x21g.menu.cpu.saml21g17b.build.openocdscript=openocd_scripts/SAML21G17B.cfg +x21g.menu.cpu.saml21g17b.bootloader.file=zero/binaries/sam_ba_SAML21G17B.bin +x21g.menu.cpu.saml21g18b=SAML21G18B +x21g.menu.cpu.saml21g18b.build.chip=saml21 +x21g.menu.cpu.saml21g18b.upload.maximum_size=253952 +x21g.menu.cpu.saml21g18b.build.mcu=cortex-m0plus +x21g.menu.cpu.saml21g18b.build.mathlib=arm_cortexM0l_math +x21g.menu.cpu.saml21g18b.build.f_cpu=48000000L +x21g.menu.cpu.saml21g18b.build.usb_product="L21" +x21g.menu.cpu.saml21g18b.build.extra_flags=-D__SAML21G18B__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21g.menu.cpu.saml21g18b.build.ldscript=flash_256KB.ld +x21g.menu.cpu.saml21g18b.build.openocdscript=openocd_scripts/SAML21G18B.cfg +x21g.menu.cpu.saml21g18b.bootloader.file=zero/binaries/sam_ba_SAML21G18B.bin +x21g.menu.cpu.saml21g15b=SAML21G15B +x21g.menu.cpu.saml21g15b.build.chip=saml21 +x21g.menu.cpu.saml21g15b.upload.maximum_size=24576 +x21g.menu.cpu.saml21g15b.build.mcu=cortex-m0plus +x21g.menu.cpu.saml21g15b.build.mathlib=arm_cortexM0l_math +x21g.menu.cpu.saml21g15b.build.f_cpu=48000000L +x21g.menu.cpu.saml21g15b.build.usb_product="L21" +x21g.menu.cpu.saml21g15b.build.extra_flags=-D__SAML21G15B__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21g.menu.cpu.saml21g15b.build.ldscript=flash_32KB.ld +x21g.menu.cpu.saml21g15b.build.openocdscript=openocd_scripts/SAML21G15B.cfg +x21g.menu.cpu.saml21g15b.bootloader.file=zero/binaries/sam_ba_SAML21G15B.bin +x21g.menu.cpu.saml21g16b=SAML21G16B +x21g.menu.cpu.saml21g16b.build.chip=saml21 +x21g.menu.cpu.saml21g16b.upload.maximum_size=57344 +x21g.menu.cpu.saml21g16b.build.mcu=cortex-m0plus +x21g.menu.cpu.saml21g16b.build.mathlib=arm_cortexM0l_math +x21g.menu.cpu.saml21g16b.build.f_cpu=48000000L +x21g.menu.cpu.saml21g16b.build.usb_product="L21" +x21g.menu.cpu.saml21g16b.build.extra_flags=-D__SAML21G16B__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21g.menu.cpu.saml21g16b.build.ldscript=flash_64KB.ld +x21g.menu.cpu.saml21g16b.build.openocdscript=openocd_scripts/SAML21G16B.cfg +x21g.menu.cpu.saml21g16b.bootloader.file=zero/binaries/sam_ba_SAML21G16B.bin +x21g.menu.cpu.samc21g17a=SAMC21G17A +x21g.menu.cpu.samc21g17a.build.chip=samc21 +x21g.menu.cpu.samc21g17a.upload.maximum_size=122880 +x21g.menu.cpu.samc21g17a.build.mcu=cortex-m0plus +x21g.menu.cpu.samc21g17a.build.mathlib=arm_cortexM0l_math +x21g.menu.cpu.samc21g17a.build.f_cpu=48000000L +x21g.menu.cpu.samc21g17a.build.usb_product="C21" +x21g.menu.cpu.samc21g17a.build.extra_flags=-D__SAMC21G17A__ -DARM_MATH_CM0PLUS +x21g.menu.cpu.samc21g17a.build.ldscript=flash_128KB.ld +x21g.menu.cpu.samc21g17a.build.openocdscript=openocd_scripts/SAMC21G17A.cfg +x21g.menu.cpu.samc21g17a.bootloader.file=zero/binaries/sam_ba_SAMC21G17A.bin +x21g.menu.cpu.samc21g18a=SAMC21G18A +x21g.menu.cpu.samc21g18a.build.chip=samc21 +x21g.menu.cpu.samc21g18a.upload.maximum_size=253952 +x21g.menu.cpu.samc21g18a.build.mcu=cortex-m0plus +x21g.menu.cpu.samc21g18a.build.mathlib=arm_cortexM0l_math +x21g.menu.cpu.samc21g18a.build.f_cpu=48000000L +x21g.menu.cpu.samc21g18a.build.usb_product="C21" +x21g.menu.cpu.samc21g18a.build.extra_flags=-D__SAMC21G18A__ -DARM_MATH_CM0PLUS +x21g.menu.cpu.samc21g18a.build.ldscript=flash_256KB.ld +x21g.menu.cpu.samc21g18a.build.openocdscript=openocd_scripts/SAMC21G18A.cfg +x21g.menu.cpu.samc21g18a.bootloader.file=zero/binaries/sam_ba_SAMC21G18A.bin +x21g.menu.cpu.samc21g15a=SAMC21G15A +x21g.menu.cpu.samc21g15a.build.chip=samc21 +x21g.menu.cpu.samc21g15a.upload.maximum_size=24576 +x21g.menu.cpu.samc21g15a.build.mcu=cortex-m0plus +x21g.menu.cpu.samc21g15a.build.mathlib=arm_cortexM0l_math +x21g.menu.cpu.samc21g15a.build.f_cpu=48000000L +x21g.menu.cpu.samc21g15a.build.usb_product="C21" +x21g.menu.cpu.samc21g15a.build.extra_flags=-D__SAMC21G15A__ -DARM_MATH_CM0PLUS +x21g.menu.cpu.samc21g15a.build.ldscript=flash_32KB.ld +x21g.menu.cpu.samc21g15a.build.openocdscript=openocd_scripts/SAMC21G15A.cfg +x21g.menu.cpu.samc21g15a.bootloader.file=zero/binaries/sam_ba_SAMC21G15A.bin +x21g.menu.cpu.samc21g16a=SAMC21G16A +x21g.menu.cpu.samc21g16a.build.chip=samc21 +x21g.menu.cpu.samc21g16a.upload.maximum_size=57344 +x21g.menu.cpu.samc21g16a.build.mcu=cortex-m0plus +x21g.menu.cpu.samc21g16a.build.mathlib=arm_cortexM0l_math +x21g.menu.cpu.samc21g16a.build.f_cpu=48000000L +x21g.menu.cpu.samc21g16a.build.usb_product="C21" +x21g.menu.cpu.samc21g16a.build.extra_flags=-D__SAMC21G16A__ -DARM_MATH_CM0PLUS +x21g.menu.cpu.samc21g16a.build.ldscript=flash_64KB.ld +x21g.menu.cpu.samc21g16a.build.openocdscript=openocd_scripts/SAMC21G16A.cfg +x21g.menu.cpu.samc21g16a.bootloader.file=zero/binaries/sam_ba_SAMC21G16A.bin +x21g.menu.bootloader.8kb=8KB_BOOTLOADER +x21g.menu.bootloader.8kb.build.bootloader_size=__8KB_BOOTLOADER__ +x21g.menu.bootloader.8kb.build.ldscript_path=linker_scripts/gcc/8KB_Bootloader +x21g.menu.bootloader.8kb.upload.tool=Fab_SAM_Arduino:bossac +x21g.menu.bootloader.8kb.upload.use_1200bps_touch=true +x21g.menu.bootloader.8kb.upload.wait_for_upload_port=true +x21g.menu.bootloader.8kb.upload.native_usb=true +x21g.menu.bootloader.8kb.upload.offset=0x2000 +x21g.menu.bootloader.8kb.upload.erase= +x21g.menu.bootloader.16kb=16KB_BOOTLOADER +x21g.menu.bootloader.16kb.build.bootloader_size=__16KB_BOOTLOADER__ +x21g.menu.bootloader.16kb.build.ldscript_path=linker_scripts/gcc/16KB_Bootloader +x21g.menu.bootloader.16kb.upload.tool=Fab_SAM_Arduino:bossac +x21g.menu.bootloader.16kb.upload.use_1200bps_touch=true +x21g.menu.bootloader.16kb.upload.wait_for_upload_port=true +x21g.menu.bootloader.16kb.upload.native_usb=true +x21g.menu.bootloader.16kb.upload.offset=0x4000 +x21g.menu.bootloader.16kb.upload.erase= +x21g.menu.bootloader.0kb=NO_BOOTLOADER +x21g.menu.bootloader.0kb.build.bootloader_size=__NO_BOOTLOADER__ +x21g.menu.bootloader.0kb.build.ldscript_path=linker_scripts/gcc/No_Bootloader +x21g.menu.bootloader.0kb.upload.tool=edbg +x21g.menu.bootloader.0kb.upload.use_1200bps_touch=false +x21g.menu.bootloader.0kb.upload.wait_for_upload_port=false +x21g.menu.bootloader.0kb.upload.native_usb=false +x21g.menu.bootloader.0kb.upload.offset=0x0000 +x21g.menu.bootloader.0kb.upload.erase=-e +x21g.menu.serial.one_uart=ONE_UART_ONE_WIRE_ONE_SPI +x21g.menu.serial.one_uart.build.serialcom_uart=ONE_UART +x21g.menu.serial.one_uart.build.serialcom_wire=ONE_WIRE +x21g.menu.serial.one_uart.build.serialcom_spi=ONE_SPI +x21g.menu.serial.one_uart_two_spi=ONE_UART_ONE_WIRE_TWO_SPI +x21g.menu.serial.one_uart_two_spi.build.serialcom_uart=ONE_UART +x21g.menu.serial.one_uart_two_spi.build.serialcom_wire=ONE_WIRE +x21g.menu.serial.one_uart_two_spi.build.serialcom_spi=TWO_SPI +x21g.menu.serial.one_uart_two_wire=ONE_UART_TWO_WIRE_ONE_SPI +x21g.menu.serial.one_uart_two_wire.build.serialcom_uart=ONE_UART +x21g.menu.serial.one_uart_two_wire.build.serialcom_wire=TWO_WIRE +x21g.menu.serial.one_uart_two_wire.build.serialcom_spi=ONE_SPI +x21g.menu.serial.two_uart=TWO_UART_ONE_WIRE_ONE_SPI +x21g.menu.serial.two_uart.build.serialcom_uart=TWO_UART +x21g.menu.serial.two_uart.build.serialcom_wire=ONE_WIRE +x21g.menu.serial.two_uart.build.serialcom_spi=ONE_SPI +x21g.menu.serial.two_uart_two_spi=TWO_UART_ONE_WIRE_TWO_SPI +x21g.menu.serial.two_uart_two_spi.build.serialcom_uart=TWO_UART +x21g.menu.serial.two_uart_two_spi.build.serialcom_wire=ONE_WIRE +x21g.menu.serial.two_uart_two_spi.build.serialcom_spi=TWO_SPI +x21g.menu.serial.two_uart_two_wire=TWO_UART_TWO_WIRE_ONE_SPI +x21g.menu.serial.two_uart_two_wire.build.serialcom_uart=TWO_UART +x21g.menu.serial.two_uart_two_wire.build.serialcom_wire=TWO_WIRE +x21g.menu.serial.two_uart_two_wire.build.serialcom_spi=ONE_SPI +x21g.menu.serial.three_uart=THREE_UART_ONE_WIRE_ONE_SPI +x21g.menu.serial.three_uart.build.serialcom_uart=THREE_UART +x21g.menu.serial.three_uart.build.serialcom_wire=ONE_WIRE +x21g.menu.serial.three_uart.build.serialcom_spi=ONE_SPI +x21g.menu.serial.three_uart_two_spi=THREE_UART_ONE_WIRE_TWO_SPI +x21g.menu.serial.three_uart_two_spi.build.serialcom_uart=THREE_UART +x21g.menu.serial.three_uart_two_spi.build.serialcom_wire=ONE_WIRE +x21g.menu.serial.three_uart_two_spi.build.serialcom_spi=TWO_SPI +x21g.menu.serial.three_uart_two_wire=THREE_UART_TWO_WIRE_ONE_SPI +x21g.menu.serial.three_uart_two_wire.build.serialcom_uart=THREE_UART +x21g.menu.serial.three_uart_two_wire.build.serialcom_wire=TWO_WIRE +x21g.menu.serial.three_uart_two_wire.build.serialcom_spi=ONE_SPI +x21g.menu.serial.no_uart=NO_UART_ONE_WIRE_ONE_SPI +x21g.menu.serial.no_uart.build.serialcom_uart=NO_UART +x21g.menu.serial.no_uart.build.serialcom_wire=ONE_WIRE +x21g.menu.serial.no_uart.build.serialcom_spi=ONE_SPI +x21g.menu.usb.cdc=CDC_ONLY +x21g.menu.usb.cdc.build.usbcom=CDC_ONLY +x21g.menu.usb.cdc.build.pid=0x5557 +x21g.menu.usb.cdc_hid=CDC_HID +x21g.menu.usb.cdc_hid.build.usbcom=CDC_HID +x21g.menu.usb.cdc_hid.build.pid=0x5856 +x21g.menu.usb.withcdc=WITH_CDC +x21g.menu.usb.withcdc.build.usbcom=WITH_CDC +x21g.menu.usb.withcdc.build.pid=0x5B41 +x21g.menu.usb.hid=HID_ONLY +x21g.menu.usb.hid.build.usbcom=HID_ONLY +x21g.menu.usb.hid.build.pid=0x5B40 +x21g.menu.usb.nocdc=WITHOUT_CDC +x21g.menu.usb.nocdc.build.usbcom=WITHOUT_CDC +x21g.menu.usb.nocdc.build.pid=0x5A0C +x21g.menu.usb.none=USB_DISABLED +x21g.menu.usb.none.build.usbcom=USB_DISABLED +x21g.menu.usb.none.build.pid=0x5856 -# MattairTech Core for Arduino/Genuino Zero (Autodetect Port) -arduino_zero.name=Arduino/Genuino Zero (Autodetect Port) -arduino_zero.bootloader.file=zero/binaries/sam_ba_arduino_zero_SAMD21G18A.bin -arduino_zero.vid.0=0x2341 -arduino_zero.pid.0=0x804d -arduino_zero.vid.1=0x2341 -arduino_zero.pid.1=0x004d -# If the board is a 2341:824d use 2341:824d for build and set other parameters as well -arduino_zero.vid.2=0x2341 -arduino_zero.pid.2=0x824d -arduino_zero.vid.2.build.vid=0x2341 -arduino_zero.vid.2.build.pid=0x824d -arduino_zero.vid.2.build.usb_product="Genuino Zero" -arduino_zero.vid.2.bootloader.file=zero/binaries/sam_ba_genuino_zero_SAMD21G18A.bin -# If the board is a 2341:024d use 2341:824d for build and set other parameters as well -arduino_zero.vid.3=0x2341 -arduino_zero.pid.3=0x024d -arduino_zero.vid.3.build.vid=0x2341 -arduino_zero.vid.3.build.pid=0x824d -arduino_zero.vid.3.build.usb_product="Genuino Zero" -arduino_zero.vid.3.bootloader.file=zero/binaries/sam_ba_genuino_zero_SAMD21G18A.bin -# Programming port -arduino_zero.vid.4=0x03eb -arduino_zero.pid.4=0x2157 -arduino_zero.vid.4.upload.tool=arduino:openocd -arduino_zero.vid.4.upload.use_1200bps_touch=false -arduino_zero.vid.4.upload.wait_for_upload_port=false -arduino_zero.vid.4.upload.native_usb=false -arduino_zero.upload.tool=MattairTech_Arduino:bossac -arduino_zero.upload.use_1200bps_touch=true -arduino_zero.upload.wait_for_upload_port=true -arduino_zero.upload.native_usb=true -arduino_zero.build.mcu=cortex-m0plus -arduino_zero.build.mathlib=arm_cortexM0l_math -arduino_zero.build.f_cpu=48000000L -arduino_zero.build.usb_product="Arduino Zero" -arduino_zero.build.usb_manufacturer="Arduino LLC" -arduino_zero.build.board=SAMD_ZERO -arduino_zero.build.core=arduino -arduino_zero.build.variant=arduino_zero -arduino_zero.build.variant_system_lib= -arduino_zero.build.vid=0x2341 -arduino_zero.build.pid=0x804d -arduino_zero.upload.protocol=sam-ba -arduino_zero.menu.float.default=Print & String use auto-promoted doubles only -arduino_zero.menu.float.default.build.floatconfig=FLOAT_BOTH_DOUBLES_ONLY -arduino_zero.menu.float.print=Print uses separate singles and doubles -arduino_zero.menu.float.print.build.floatconfig=FLOAT_PRINT_SINGLES_DOUBLES -arduino_zero.menu.float.string=String uses separate singles and doubles -arduino_zero.menu.float.string.build.floatconfig=FLOAT_STRING_SINGLES_DOUBLES -arduino_zero.menu.float.both=Print & String use separate singles and doubles -arduino_zero.menu.float.both.build.floatconfig=FLOAT_BOTH_SINGLES_DOUBLES -arduino_zero.menu.config.disabled=config.h disabled -arduino_zero.menu.config.disabled.build.buildconfig=CONFIG_H_DISABLED -arduino_zero.menu.config.enabled=config.h enabled (mostly code size reductions) -arduino_zero.menu.config.enabled.build.buildconfig=CONFIG_H_ENABLED -arduino_zero.menu.clock.crystal_32k=32KHZ_CRYSTAL -arduino_zero.menu.clock.crystal_32k.build.clockconfig=CLOCKCONFIG_32768HZ_CRYSTAL -arduino_zero.menu.clock.internal=INTERNAL_OSCILLATOR -arduino_zero.menu.clock.internal.build.clockconfig=CLOCKCONFIG_INTERNAL -arduino_zero.menu.clock.internal_usb=INTERNAL_USB_CALIBRATED_OSCILLATOR -arduino_zero.menu.clock.internal_usb.build.clockconfig=CLOCKCONFIG_INTERNAL_USB -arduino_zero.menu.timer.timer_732Hz=732.4Hz (16-bit) -arduino_zero.menu.timer.timer_732Hz.build.timerconfig=TIMER_732Hz -arduino_zero.menu.timer.timer_366Hz=366.2Hz (16-bit) -arduino_zero.menu.timer.timer_366Hz.build.timerconfig=TIMER_366Hz -arduino_zero.menu.timer.timer_244Hz=244.1Hz (16-bit) -arduino_zero.menu.timer.timer_244Hz.build.timerconfig=TIMER_244Hz -arduino_zero.menu.timer.timer_183Hz=183.1Hz (16-bit) -arduino_zero.menu.timer.timer_183Hz.build.timerconfig=TIMER_183Hz -arduino_zero.menu.timer.timer_146Hz=146.5Hz (16-bit) -arduino_zero.menu.timer.timer_146Hz.build.timerconfig=TIMER_146Hz -arduino_zero.menu.timer.timer_122Hz=122.1Hz (16-bit) -arduino_zero.menu.timer.timer_122Hz.build.timerconfig=TIMER_122Hz -arduino_zero.menu.timer.timer_105Hz=104.6Hz (16-bit) -arduino_zero.menu.timer.timer_105Hz.build.timerconfig=TIMER_105Hz -arduino_zero.menu.timer.timer_81Hz=81.38Hz (16-bit) -arduino_zero.menu.timer.timer_81Hz.build.timerconfig=TIMER_81Hz -arduino_zero.menu.timer.timer_61Hz=61.04Hz (16-bit) -arduino_zero.menu.timer.timer_61Hz.build.timerconfig=TIMER_61Hz -arduino_zero.menu.timer.timer_31Hz=30.52Hz (16-bit) -arduino_zero.menu.timer.timer_31Hz.build.timerconfig=TIMER_31Hz -arduino_zero.menu.timer.timer_187500Hz=187500Hz (8-bit) -arduino_zero.menu.timer.timer_187500Hz.build.timerconfig=TIMER_187500Hz -arduino_zero.menu.timer.timer_93750Hz=93750Hz (8-bit) -arduino_zero.menu.timer.timer_93750Hz.build.timerconfig=TIMER_93750Hz -arduino_zero.menu.timer.timer_62500Hz=62500Hz (8-bit) -arduino_zero.menu.timer.timer_62500Hz.build.timerconfig=TIMER_62500Hz -arduino_zero.menu.timer.timer_37500Hz=37500Hz (8-bit) -arduino_zero.menu.timer.timer_37500Hz.build.timerconfig=TIMER_37500Hz -arduino_zero.menu.timer.timer_20833Hz=20833Hz (8-bit) -arduino_zero.menu.timer.timer_20833Hz.build.timerconfig=TIMER_20833Hz -arduino_zero.menu.timer.timer_12500Hz=12500Hz (8-bit) -arduino_zero.menu.timer.timer_12500Hz.build.timerconfig=TIMER_12500Hz -arduino_zero.menu.timer.timer_7500Hz=7500Hz (8-bit) -arduino_zero.menu.timer.timer_7500Hz.build.timerconfig=TIMER_7500Hz -arduino_zero.menu.timer.timer_4166Hz=4166Hz (8-bit) -arduino_zero.menu.timer.timer_4166Hz.build.timerconfig=TIMER_4166Hz -arduino_zero.menu.timer.timer_2930Hz=2930Hz (8-bit) -arduino_zero.menu.timer.timer_2930Hz.build.timerconfig=TIMER_2930Hz -arduino_zero.menu.timer.timer_1465Hz=1465Hz (8-bit, 16-bit for D51) -arduino_zero.menu.timer.timer_1465Hz.build.timerconfig=TIMER_1465Hz -arduino_zero.bootloader.tool=arduino:openocd -arduino_zero.build.extra_flags=-D__SAMD21G18A__ {build.usb_flags} -DARM_MATH_CM0PLUS -arduino_zero.build.ldscript=flash_256KB.ld -arduino_zero.build.openocdscript=openocd_scripts/SAMD21G18A.cfg -arduino_zero.menu.bootloader.8kb=8KB_BOOTLOADER -arduino_zero.menu.bootloader.8kb.build.bootloader_size=__8KB_BOOTLOADER__ -arduino_zero.menu.bootloader.8kb.build.ldscript_path=linker_scripts/gcc/8KB_Bootloader -arduino_zero.menu.bootloader.8kb.upload.maximum_size=253952 -arduino_zero.menu.bootloader.16kb=16KB_BOOTLOADER -arduino_zero.menu.bootloader.16kb.build.bootloader_size=__16KB_BOOTLOADER__ -arduino_zero.menu.bootloader.16kb.build.ldscript_path=linker_scripts/gcc/16KB_Bootloader -arduino_zero.menu.bootloader.16kb.upload.maximum_size=245760 -arduino_zero.menu.bootloader.0kb=NO_BOOTLOADER -arduino_zero.menu.bootloader.0kb.build.bootloader_size=__NO_BOOTLOADER__ -arduino_zero.menu.bootloader.0kb.build.ldscript_path=linker_scripts/gcc/No_Bootloader -arduino_zero.menu.bootloader.0kb.upload.tool=arduino:openocd -arduino_zero.menu.bootloader.0kb.upload.use_1200bps_touch=false -arduino_zero.menu.bootloader.0kb.upload.wait_for_upload_port=false -arduino_zero.menu.bootloader.0kb.upload.native_usb=false -arduino_zero.menu.bootloader.0kb.upload.maximum_size=262144 -arduino_zero.menu.serial.one_uart=ONE_UART_ONE_WIRE_ONE_SPI -arduino_zero.menu.serial.one_uart.build.serialcom_uart=ONE_UART -arduino_zero.menu.serial.one_uart.build.serialcom_wire=ONE_WIRE -arduino_zero.menu.serial.one_uart.build.serialcom_spi=ONE_SPI -arduino_zero.menu.serial.one_uart_two_wire_two_spi=ONE_UART_TWO_WIRE_TWO_SPI -arduino_zero.menu.serial.one_uart_two_wire_two_spi.build.serialcom_uart=ONE_UART -arduino_zero.menu.serial.one_uart_two_wire_two_spi.build.serialcom_wire=TWO_WIRE -arduino_zero.menu.serial.one_uart_two_wire_two_spi.build.serialcom_spi=TWO_SPI -arduino_zero.menu.serial.two_uart=TWO_UART_ONE_WIRE_ONE_SPI -arduino_zero.menu.serial.two_uart.build.serialcom_uart=TWO_UART -arduino_zero.menu.serial.two_uart.build.serialcom_wire=ONE_WIRE -arduino_zero.menu.serial.two_uart.build.serialcom_spi=ONE_SPI -arduino_zero.menu.serial.two_uart_two_wire_two_spi=TWO_UART_TWO_WIRE_TWO_SPI -arduino_zero.menu.serial.two_uart_two_wire_two_spi.build.serialcom_uart=TWO_UART -arduino_zero.menu.serial.two_uart_two_wire_two_spi.build.serialcom_wire=TWO_WIRE -arduino_zero.menu.serial.two_uart_two_wire_two_spi.build.serialcom_spi=TWO_SPI -arduino_zero.menu.serial.no_uart=NO_UART_ONE_WIRE_ONE_SPI -arduino_zero.menu.serial.no_uart.build.serialcom_uart=NO_UART -arduino_zero.menu.serial.no_uart.build.serialcom_wire=ONE_WIRE -arduino_zero.menu.serial.no_uart.build.serialcom_spi=ONE_SPI -arduino_zero.menu.serial.no_uart_two_wire_two_spi=NO_UART_TWO_WIRE_TWO_SPI -arduino_zero.menu.serial.no_uart_two_wire_two_spi.build.serialcom_uart=NO_UART -arduino_zero.menu.serial.no_uart_two_wire_two_spi.build.serialcom_wire=TWO_WIRE -arduino_zero.menu.serial.no_uart_two_wire_two_spi.build.serialcom_spi=TWO_SPI -arduino_zero.menu.usb.cdc=CDC_ONLY -arduino_zero.menu.usb.cdc.build.usbcom=CDC_ONLY -arduino_zero.menu.usb.cdc_hid=CDC_HID -arduino_zero.menu.usb.cdc_hid.build.usbcom=CDC_HID -arduino_zero.menu.usb.withcdc=WITH_CDC -arduino_zero.menu.usb.withcdc.build.usbcom=WITH_CDC -arduino_zero.menu.usb.hid=HID_ONLY -arduino_zero.menu.usb.hid.build.usbcom=HID_ONLY -arduino_zero.menu.usb.nocdc=WITHOUT_CDC -arduino_zero.menu.usb.nocdc.build.usbcom=WITHOUT_CDC -arduino_zero.menu.usb.none=USB_DISABLED -arduino_zero.menu.usb.none.build.usbcom=USB_DISABLED +# Generic x21J +x21j.name=Generic x21J +x21j.vid.0=0x16D0 +x21j.pid.0=0x6557 +x21j.vid.1=0x16D0 +x21j.pid.1=0x6856 +x21j.vid.2=0x16D0 +x21j.pid.2=0x6B41 +x21j.vid.3=0x16D0 +x21j.pid.3=0x6B40 +x21j.vid.4=0x16D0 +x21j.pid.4=0x6A0C +x21j.vid.5=0x16D0 +x21j.pid.5=0x6856 +x21j.build.usb_manufacturer="Fab Foundation" +x21j.build.board=SAMD_ZERO +x21j.build.core=arduino +x21j.build.variant=Generic_xx1J +x21j.build.variant_system_lib= +x21j.build.vid=0x16D0 +x21j.upload.protocol=sam-ba +x21j.bootloader.tool=edbg +x21j.menu.float.default=Print & String use auto-promoted doubles only +x21j.menu.float.default.build.floatconfig=FLOAT_BOTH_DOUBLES_ONLY +x21j.menu.float.print=Print uses separate singles and doubles +x21j.menu.float.print.build.floatconfig=FLOAT_PRINT_SINGLES_DOUBLES +x21j.menu.float.string=String uses separate singles and doubles +x21j.menu.float.string.build.floatconfig=FLOAT_STRING_SINGLES_DOUBLES +x21j.menu.float.both=Print & String use separate singles and doubles +x21j.menu.float.both.build.floatconfig=FLOAT_BOTH_SINGLES_DOUBLES +x21j.menu.config.disabled=config.h disabled +x21j.menu.config.disabled.build.buildconfig=CONFIG_H_DISABLED +x21j.menu.config.enabled=config.h enabled (mostly code size reductions) +x21j.menu.config.enabled.build.buildconfig=CONFIG_H_ENABLED +x21j.menu.clock.internal_usb=INTERNAL_USB_CALIBRATED_OSCILLATOR +x21j.menu.clock.internal_usb.build.clockconfig=CLOCKCONFIG_INTERNAL_USB +x21j.menu.clock.internal=INTERNAL_OSCILLATOR +x21j.menu.clock.internal.build.clockconfig=CLOCKCONFIG_INTERNAL +x21j.menu.clock.crystal_32k=32KHZ_CRYSTAL +x21j.menu.clock.crystal_32k.build.clockconfig=CLOCKCONFIG_32768HZ_CRYSTAL +x21j.menu.clock.crystal_hs=HIGH_SPEED_CRYSTAL +x21j.menu.clock.crystal_hs.build.clockconfig=CLOCKCONFIG_HS_CRYSTAL +x21j.menu.timer.timer_732Hz=732.4Hz (16-bit) +x21j.menu.timer.timer_732Hz.build.timerconfig=TIMER_732Hz +x21j.menu.timer.timer_366Hz=366.2Hz (16-bit) +x21j.menu.timer.timer_366Hz.build.timerconfig=TIMER_366Hz +x21j.menu.timer.timer_244Hz=244.1Hz (16-bit) +x21j.menu.timer.timer_244Hz.build.timerconfig=TIMER_244Hz +x21j.menu.timer.timer_183Hz=183.1Hz (16-bit) +x21j.menu.timer.timer_183Hz.build.timerconfig=TIMER_183Hz +x21j.menu.timer.timer_146Hz=146.5Hz (16-bit) +x21j.menu.timer.timer_146Hz.build.timerconfig=TIMER_146Hz +x21j.menu.timer.timer_122Hz=122.1Hz (16-bit) +x21j.menu.timer.timer_122Hz.build.timerconfig=TIMER_122Hz +x21j.menu.timer.timer_105Hz=104.6Hz (16-bit) +x21j.menu.timer.timer_105Hz.build.timerconfig=TIMER_105Hz +x21j.menu.timer.timer_81Hz=81.38Hz (16-bit) +x21j.menu.timer.timer_81Hz.build.timerconfig=TIMER_81Hz +x21j.menu.timer.timer_61Hz=61.04Hz (16-bit) +x21j.menu.timer.timer_61Hz.build.timerconfig=TIMER_61Hz +x21j.menu.timer.timer_31Hz=30.52Hz (16-bit) +x21j.menu.timer.timer_31Hz.build.timerconfig=TIMER_31Hz +x21j.menu.timer.timer_187500Hz=187500Hz (8-bit) +x21j.menu.timer.timer_187500Hz.build.timerconfig=TIMER_187500Hz +x21j.menu.timer.timer_93750Hz=93750Hz (8-bit) +x21j.menu.timer.timer_93750Hz.build.timerconfig=TIMER_93750Hz +x21j.menu.timer.timer_62500Hz=62500Hz (8-bit) +x21j.menu.timer.timer_62500Hz.build.timerconfig=TIMER_62500Hz +x21j.menu.timer.timer_37500Hz=37500Hz (8-bit) +x21j.menu.timer.timer_37500Hz.build.timerconfig=TIMER_37500Hz +x21j.menu.timer.timer_20833Hz=20833Hz (8-bit) +x21j.menu.timer.timer_20833Hz.build.timerconfig=TIMER_20833Hz +x21j.menu.timer.timer_12500Hz=12500Hz (8-bit) +x21j.menu.timer.timer_12500Hz.build.timerconfig=TIMER_12500Hz +x21j.menu.timer.timer_7500Hz=7500Hz (8-bit) +x21j.menu.timer.timer_7500Hz.build.timerconfig=TIMER_7500Hz +x21j.menu.timer.timer_4166Hz=4166Hz (8-bit) +x21j.menu.timer.timer_4166Hz.build.timerconfig=TIMER_4166Hz +x21j.menu.timer.timer_2930Hz=2930Hz (8-bit) +x21j.menu.timer.timer_2930Hz.build.timerconfig=TIMER_2930Hz +x21j.menu.timer.timer_1465Hz=1465Hz (8-bit) +x21j.menu.timer.timer_1465Hz.build.timerconfig=TIMER_1465Hz +x21j.menu.cpu.samd21j17a=SAMD21J17A +x21j.menu.cpu.samd21j17a.build.chip=samd21 +x21j.menu.cpu.samd21j17a.upload.maximum_size=122880 +x21j.menu.cpu.samd21j17a.build.mcu=cortex-m0plus +x21j.menu.cpu.samd21j17a.build.mathlib=arm_cortexM0l_math +x21j.menu.cpu.samd21j17a.build.f_cpu=48000000L +x21j.menu.cpu.samd21j17a.build.usb_product="Xeno D21" +x21j.menu.cpu.samd21j17a.build.extra_flags=-D__SAMD21J17A__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21j.menu.cpu.samd21j17a.build.ldscript=flash_128KB.ld +x21j.menu.cpu.samd21j17a.build.openocdscript=openocd_scripts/SAMD21J17A.cfg +x21j.menu.cpu.samd21j17a.bootloader.file=zero/binaries/sam_ba_SAMD21J17A.bin +x21j.menu.cpu.samd21j18a=SAMD21J18A +x21j.menu.cpu.samd21j18a.build.chip=samd21 +x21j.menu.cpu.samd21j18a.upload.maximum_size=253952 +x21j.menu.cpu.samd21j18a.build.mcu=cortex-m0plus +x21j.menu.cpu.samd21j18a.build.mathlib=arm_cortexM0l_math +x21j.menu.cpu.samd21j18a.build.f_cpu=48000000L +x21j.menu.cpu.samd21j18a.build.usb_product="Xeno D21" +x21j.menu.cpu.samd21j18a.build.extra_flags=-D__SAMD21J18A__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21j.menu.cpu.samd21j18a.build.ldscript=flash_256KB.ld +x21j.menu.cpu.samd21j18a.build.openocdscript=openocd_scripts/SAMD21J18A.cfg +x21j.menu.cpu.samd21j18a.bootloader.file=zero/binaries/sam_ba_SAMD21J18A.bin +x21j.menu.cpu.samd21j15a=SAMD21J15A +x21j.menu.cpu.samd21j15a.build.chip=samd21 +x21j.menu.cpu.samd21j15a.upload.maximum_size=24576 +x21j.menu.cpu.samd21j15a.build.mcu=cortex-m0plus +x21j.menu.cpu.samd21j15a.build.mathlib=arm_cortexM0l_math +x21j.menu.cpu.samd21j15a.build.f_cpu=48000000L +x21j.menu.cpu.samd21j15a.build.usb_product="Xeno D21" +x21j.menu.cpu.samd21j15a.build.extra_flags=-D__SAMD21J15A__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21j.menu.cpu.samd21j15a.build.ldscript=flash_32KB.ld +x21j.menu.cpu.samd21j15a.build.openocdscript=openocd_scripts/SAMD21J15A.cfg +x21j.menu.cpu.samd21j15a.bootloader.file=zero/binaries/sam_ba_SAMD21J15A.bin +x21j.menu.cpu.samd21j16a=SAMD21J16A +x21j.menu.cpu.samd21j16a.build.chip=samd21 +x21j.menu.cpu.samd21j16a.upload.maximum_size=57344 +x21j.menu.cpu.samd21j16a.build.mcu=cortex-m0plus +x21j.menu.cpu.samd21j16a.build.mathlib=arm_cortexM0l_math +x21j.menu.cpu.samd21j16a.build.f_cpu=48000000L +x21j.menu.cpu.samd21j16a.build.usb_product="Xeno D21" +x21j.menu.cpu.samd21j16a.build.extra_flags=-D__SAMD21J16A__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21j.menu.cpu.samd21j16a.build.ldscript=flash_64KB.ld +x21j.menu.cpu.samd21j16a.build.openocdscript=openocd_scripts/SAMD21J16A.cfg +x21j.menu.cpu.samd21j16a.bootloader.file=zero/binaries/sam_ba_SAMD21J16A.bin +x21j.menu.cpu.saml21j17b=SAML21J17B +x21j.menu.cpu.saml21j17b.build.chip=saml21 +x21j.menu.cpu.saml21j17b.upload.maximum_size=122880 +x21j.menu.cpu.saml21j17b.build.mcu=cortex-m0plus +x21j.menu.cpu.saml21j17b.build.mathlib=arm_cortexM0l_math +x21j.menu.cpu.saml21j17b.build.f_cpu=48000000L +x21j.menu.cpu.saml21j17b.build.usb_product="Xeno L21" +x21j.menu.cpu.saml21j17b.build.extra_flags=-D__SAML21J17B__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21j.menu.cpu.saml21j17b.build.ldscript=flash_128KB.ld +x21j.menu.cpu.saml21j17b.build.openocdscript=openocd_scripts/SAML21J17B.cfg +x21j.menu.cpu.saml21j17b.bootloader.file=zero/binaries/sam_ba_SAML21J17B.bin +x21j.menu.cpu.saml21j18b=SAML21J18B +x21j.menu.cpu.saml21j18b.build.chip=saml21 +x21j.menu.cpu.saml21j18b.upload.maximum_size=253952 +x21j.menu.cpu.saml21j18b.build.mcu=cortex-m0plus +x21j.menu.cpu.saml21j18b.build.mathlib=arm_cortexM0l_math +x21j.menu.cpu.saml21j18b.build.f_cpu=48000000L +x21j.menu.cpu.saml21j18b.build.usb_product="Xeno L21" +x21j.menu.cpu.saml21j18b.build.extra_flags=-D__SAML21J18B__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21j.menu.cpu.saml21j18b.build.ldscript=flash_256KB.ld +x21j.menu.cpu.saml21j18b.build.openocdscript=openocd_scripts/SAML21J18B.cfg +x21j.menu.cpu.saml21j18b.bootloader.file=zero/binaries/sam_ba_SAML21J18B.bin +x21j.menu.cpu.saml21j16b=SAML21J16B +x21j.menu.cpu.saml21j16b.build.chip=saml21 +x21j.menu.cpu.saml21j16b.upload.maximum_size=57344 +x21j.menu.cpu.saml21j16b.build.mcu=cortex-m0plus +x21j.menu.cpu.saml21j16b.build.mathlib=arm_cortexM0l_math +x21j.menu.cpu.saml21j16b.build.f_cpu=48000000L +x21j.menu.cpu.saml21j16b.build.usb_product="Xeno L21" +x21j.menu.cpu.saml21j16b.build.extra_flags=-D__SAML21J16B__ {build.usb_flags} -DARM_MATH_CM0PLUS +x21j.menu.cpu.saml21j16b.build.ldscript=flash_64KB.ld +x21j.menu.cpu.saml21j16b.build.openocdscript=openocd_scripts/SAML21J16B.cfg +x21j.menu.cpu.saml21j16b.bootloader.file=zero/binaries/sam_ba_SAML21J16B.bin +x21j.menu.cpu.samc21j17a=SAMC21J17A +x21j.menu.cpu.samc21j17a.build.chip=samc21 +x21j.menu.cpu.samc21j17a.upload.maximum_size=122880 +x21j.menu.cpu.samc21j17a.build.mcu=cortex-m0plus +x21j.menu.cpu.samc21j17a.build.mathlib=arm_cortexM0l_math +x21j.menu.cpu.samc21j17a.build.f_cpu=48000000L +x21j.menu.cpu.samc21j17a.build.usb_product="Xeno C21" +x21j.menu.cpu.samc21j17a.build.extra_flags=-D__SAMC21J17A__ -DARM_MATH_CM0PLUS +x21j.menu.cpu.samc21j17a.build.ldscript=flash_128KB.ld +x21j.menu.cpu.samc21j17a.build.openocdscript=openocd_scripts/SAMC21J17A.cfg +x21j.menu.cpu.samc21j17a.bootloader.file=zero/binaries/sam_ba_SAMC21J17A.bin +x21j.menu.cpu.samc21j18a=SAMC21J18A +x21j.menu.cpu.samc21j18a.build.chip=samc21 +x21j.menu.cpu.samc21j18a.upload.maximum_size=253952 +x21j.menu.cpu.samc21j18a.build.mcu=cortex-m0plus +x21j.menu.cpu.samc21j18a.build.mathlib=arm_cortexM0l_math +x21j.menu.cpu.samc21j18a.build.f_cpu=48000000L +x21j.menu.cpu.samc21j18a.build.usb_product="Xeno C21" +x21j.menu.cpu.samc21j18a.build.extra_flags=-D__SAMC21J18A__ -DARM_MATH_CM0PLUS +x21j.menu.cpu.samc21j18a.build.ldscript=flash_256KB.ld +x21j.menu.cpu.samc21j18a.build.openocdscript=openocd_scripts/SAMC21J18A.cfg +x21j.menu.cpu.samc21j18a.bootloader.file=zero/binaries/sam_ba_SAMC21J18A.bin +x21j.menu.cpu.samc21j15a=SAMC21J15A +x21j.menu.cpu.samc21j15a.build.chip=samc21 +x21j.menu.cpu.samc21j15a.upload.maximum_size=24576 +x21j.menu.cpu.samc21j15a.build.mcu=cortex-m0plus +x21j.menu.cpu.samc21j15a.build.mathlib=arm_cortexM0l_math +x21j.menu.cpu.samc21j15a.build.f_cpu=48000000L +x21j.menu.cpu.samc21j15a.build.usb_product="Xeno C21" +x21j.menu.cpu.samc21j15a.build.extra_flags=-D__SAMC21J15A__ -DARM_MATH_CM0PLUS +x21j.menu.cpu.samc21j15a.build.ldscript=flash_32KB.ld +x21j.menu.cpu.samc21j15a.build.openocdscript=openocd_scripts/SAMC21J15A.cfg +x21j.menu.cpu.samc21j15a.bootloader.file=zero/binaries/sam_ba_SAMC21J15A.bin +x21j.menu.cpu.samc21j16a=SAMC21J16A +x21j.menu.cpu.samc21j16a.build.chip=samc21 +x21j.menu.cpu.samc21j16a.upload.maximum_size=57344 +x21j.menu.cpu.samc21j16a.build.mcu=cortex-m0plus +x21j.menu.cpu.samc21j16a.build.mathlib=arm_cortexM0l_math +x21j.menu.cpu.samc21j16a.build.f_cpu=48000000L +x21j.menu.cpu.samc21j16a.build.usb_product="Xeno C21" +x21j.menu.cpu.samc21j16a.build.extra_flags=-D__SAMC21J16A__ -DARM_MATH_CM0PLUS +x21j.menu.cpu.samc21j16a.build.ldscript=flash_64KB.ld +x21j.menu.cpu.samc21j16a.build.openocdscript=openocd_scripts/SAMC21J16A.cfg +x21j.menu.cpu.samc21j16a.bootloader.file=zero/binaries/sam_ba_SAMC21J16A.bin +x21j.menu.bootloader.8kb=8KB_BOOTLOADER +x21j.menu.bootloader.8kb.build.bootloader_size=__8KB_BOOTLOADER__ +x21j.menu.bootloader.8kb.build.ldscript_path=linker_scripts/gcc/8KB_Bootloader +x21j.menu.bootloader.8kb.upload.tool=Fab_SAM_Arduino:bossac +x21j.menu.bootloader.8kb.upload.use_1200bps_touch=true +x21j.menu.bootloader.8kb.upload.wait_for_upload_port=true +x21j.menu.bootloader.8kb.upload.native_usb=true +x21j.menu.bootloader.8kb.upload.offset=0x2000 +x21j.menu.bootloader.8kb.upload.erase= +x21j.menu.bootloader.16kb=16KB_BOOTLOADER +x21j.menu.bootloader.16kb.build.bootloader_size=__16KB_BOOTLOADER__ +x21j.menu.bootloader.16kb.build.ldscript_path=linker_scripts/gcc/16KB_Bootloader +x21j.menu.bootloader.16kb.upload.tool=Fab_SAM_Arduino:bossac +x21j.menu.bootloader.16kb.upload.use_1200bps_touch=true +x21j.menu.bootloader.16kb.upload.wait_for_upload_port=true +x21j.menu.bootloader.16kb.upload.native_usb=true +x21j.menu.bootloader.16kb.upload.offset=0x4000 +x21j.menu.bootloader.16kb.upload.erase= +x21j.menu.bootloader.0kb=NO_BOOTLOADER +x21j.menu.bootloader.0kb.build.bootloader_size=__NO_BOOTLOADER__ +x21j.menu.bootloader.0kb.build.ldscript_path=linker_scripts/gcc/No_Bootloader +x21j.menu.bootloader.0kb.upload.tool=edbg +x21j.menu.bootloader.0kb.upload.use_1200bps_touch=false +x21j.menu.bootloader.0kb.upload.wait_for_upload_port=false +x21j.menu.bootloader.0kb.upload.native_usb=false +x21j.menu.bootloader.0kb.upload.offset=0x0000 +x21j.menu.bootloader.0kb.upload.erase=-e +x21j.menu.serial.one_uart=ONE_UART_ONE_WIRE_ONE_SPI +x21j.menu.serial.one_uart.build.serialcom_uart=ONE_UART +x21j.menu.serial.one_uart.build.serialcom_wire=ONE_WIRE +x21j.menu.serial.one_uart.build.serialcom_spi=ONE_SPI +x21j.menu.serial.one_uart_two_spi=ONE_UART_ONE_WIRE_TWO_SPI +x21j.menu.serial.one_uart_two_spi.build.serialcom_uart=ONE_UART +x21j.menu.serial.one_uart_two_spi.build.serialcom_wire=ONE_WIRE +x21j.menu.serial.one_uart_two_spi.build.serialcom_spi=TWO_SPI +x21j.menu.serial.one_uart_two_wire=ONE_UART_TWO_WIRE_ONE_SPI +x21j.menu.serial.one_uart_two_wire.build.serialcom_uart=ONE_UART +x21j.menu.serial.one_uart_two_wire.build.serialcom_wire=TWO_WIRE +x21j.menu.serial.one_uart_two_wire.build.serialcom_spi=ONE_SPI +x21j.menu.serial.two_uart=TWO_UART_ONE_WIRE_ONE_SPI +x21j.menu.serial.two_uart.build.serialcom_uart=TWO_UART +x21j.menu.serial.two_uart.build.serialcom_wire=ONE_WIRE +x21j.menu.serial.two_uart.build.serialcom_spi=ONE_SPI +x21j.menu.serial.two_uart_two_spi=TWO_UART_ONE_WIRE_TWO_SPI +x21j.menu.serial.two_uart_two_spi.build.serialcom_uart=TWO_UART +x21j.menu.serial.two_uart_two_spi.build.serialcom_wire=ONE_WIRE +x21j.menu.serial.two_uart_two_spi.build.serialcom_spi=TWO_SPI +x21j.menu.serial.two_uart_two_wire=TWO_UART_TWO_WIRE_ONE_SPI +x21j.menu.serial.two_uart_two_wire.build.serialcom_uart=TWO_UART +x21j.menu.serial.two_uart_two_wire.build.serialcom_wire=TWO_WIRE +x21j.menu.serial.two_uart_two_wire.build.serialcom_spi=ONE_SPI +x21j.menu.serial.three_uart=THREE_UART_ONE_WIRE_ONE_SPI +x21j.menu.serial.three_uart.build.serialcom_uart=THREE_UART +x21j.menu.serial.three_uart.build.serialcom_wire=ONE_WIRE +x21j.menu.serial.three_uart.build.serialcom_spi=ONE_SPI +x21j.menu.serial.three_uart_two_spi=THREE_UART_ONE_WIRE_TWO_SPI +x21j.menu.serial.three_uart_two_spi.build.serialcom_uart=THREE_UART +x21j.menu.serial.three_uart_two_spi.build.serialcom_wire=ONE_WIRE +x21j.menu.serial.three_uart_two_spi.build.serialcom_spi=TWO_SPI +x21j.menu.serial.three_uart_two_wire=THREE_UART_TWO_WIRE_ONE_SPI +x21j.menu.serial.three_uart_two_wire.build.serialcom_uart=THREE_UART +x21j.menu.serial.three_uart_two_wire.build.serialcom_wire=TWO_WIRE +x21j.menu.serial.three_uart_two_wire.build.serialcom_spi=ONE_SPI +x21j.menu.serial.no_uart=NO_UART_ONE_WIRE_ONE_SPI +x21j.menu.serial.no_uart.build.serialcom_uart=NO_UART +x21j.menu.serial.no_uart.build.serialcom_wire=ONE_WIRE +x21j.menu.serial.no_uart.build.serialcom_spi=ONE_SPI +x21j.menu.usb.cdc=CDC_ONLY +x21j.menu.usb.cdc.build.usbcom=CDC_ONLY +x21j.menu.usb.cdc.build.pid=0x6557 +x21j.menu.usb.cdc_hid=CDC_HID +x21j.menu.usb.cdc_hid.build.usbcom=CDC_HID +x21j.menu.usb.cdc_hid.build.pid=0x6856 +x21j.menu.usb.withcdc=WITH_CDC +x21j.menu.usb.withcdc.build.usbcom=WITH_CDC +x21j.menu.usb.withcdc.build.pid=0x6B41 +x21j.menu.usb.hid=HID_ONLY +x21j.menu.usb.hid.build.usbcom=HID_ONLY +x21j.menu.usb.hid.build.pid=0x6B40 +x21j.menu.usb.nocdc=WITHOUT_CDC +x21j.menu.usb.nocdc.build.usbcom=WITHOUT_CDC +x21j.menu.usb.nocdc.build.pid=0x6A0C +x21j.menu.usb.none=USB_DISABLED +x21j.menu.usb.none.build.usbcom=USB_DISABLED +x21j.menu.usb.none.build.pid=0x6856 +# Generic D51G +d51g.name=Generic D51G +d51g.vid.0=0x16D0 +d51g.pid.0=0x7557 +d51g.vid.1=0x16D0 +d51g.pid.1=0x7856 +d51g.vid.2=0x16D0 +d51g.pid.2=0x7B41 +d51g.vid.3=0x16D0 +d51g.pid.3=0x7B40 +d51g.vid.4=0x16D0 +d51g.pid.4=0x7A0C +d51g.vid.5=0x16D0 +d51g.pid.5=0x7856 +d51g.build.usb_manufacturer="Fab Foundation" +d51g.build.board=SAMD_ZERO +d51g.build.core=arduino +d51g.build.variant=Generic_D51G +d51g.build.variant_system_lib= +d51g.build.vid=0x16D0 +d51g.upload.protocol=sam-ba +d51g.bootloader.tool=edbg +d51g.menu.float.default=Print & String use auto-promoted doubles only +d51g.menu.float.default.build.floatconfig=FLOAT_BOTH_DOUBLES_ONLY +d51g.menu.float.print=Print uses separate singles and doubles +d51g.menu.float.print.build.floatconfig=FLOAT_PRINT_SINGLES_DOUBLES +d51g.menu.float.string=String uses separate singles and doubles +d51g.menu.float.string.build.floatconfig=FLOAT_STRING_SINGLES_DOUBLES +d51g.menu.float.both=Print & String use separate singles and doubles +d51g.menu.float.both.build.floatconfig=FLOAT_BOTH_SINGLES_DOUBLES +d51g.menu.config.disabled=config.h disabled +d51g.menu.config.disabled.build.buildconfig=CONFIG_H_DISABLED +d51g.menu.config.enabled=config.h enabled (mostly code size reductions) +d51g.menu.config.enabled.build.buildconfig=CONFIG_H_ENABLED +d51g.menu.clock.internal_usb=INTERNAL_USB_CALIBRATED_OSCILLATOR +d51g.menu.clock.internal_usb.build.clockconfig=CLOCKCONFIG_INTERNAL_USB +d51g.menu.clock.internal=INTERNAL_OSCILLATOR +d51g.menu.clock.internal.build.clockconfig=CLOCKCONFIG_INTERNAL +d51g.menu.clock.crystal_32k=32KHZ_CRYSTAL +d51g.menu.clock.crystal_32k.build.clockconfig=CLOCKCONFIG_32768HZ_CRYSTAL +d51g.menu.clock.crystal_hs=HIGH_SPEED_CRYSTAL +d51g.menu.clock.crystal_hs.build.clockconfig=CLOCKCONFIG_HS_CRYSTAL +d51g.menu.timer.timer_732Hz=732.4Hz (16-bit) +d51g.menu.timer.timer_732Hz.build.timerconfig=TIMER_732Hz +d51g.menu.timer.timer_366Hz=366.2Hz (16-bit) +d51g.menu.timer.timer_366Hz.build.timerconfig=TIMER_366Hz +d51g.menu.timer.timer_244Hz=244.1Hz (16-bit) +d51g.menu.timer.timer_244Hz.build.timerconfig=TIMER_244Hz +d51g.menu.timer.timer_183Hz=183.1Hz (16-bit) +d51g.menu.timer.timer_183Hz.build.timerconfig=TIMER_183Hz +d51g.menu.timer.timer_146Hz=146.5Hz (16-bit) +d51g.menu.timer.timer_146Hz.build.timerconfig=TIMER_146Hz +d51g.menu.timer.timer_122Hz=122.1Hz (16-bit) +d51g.menu.timer.timer_122Hz.build.timerconfig=TIMER_122Hz +d51g.menu.timer.timer_105Hz=104.6Hz (16-bit) +d51g.menu.timer.timer_105Hz.build.timerconfig=TIMER_105Hz +d51g.menu.timer.timer_81Hz=81.38Hz (16-bit) +d51g.menu.timer.timer_81Hz.build.timerconfig=TIMER_81Hz +d51g.menu.timer.timer_61Hz=61.04Hz (16-bit) +d51g.menu.timer.timer_61Hz.build.timerconfig=TIMER_61Hz +d51g.menu.timer.timer_31Hz=30.52Hz (16-bit) +d51g.menu.timer.timer_31Hz.build.timerconfig=TIMER_31Hz +d51g.menu.timer.timer_187500Hz=187500Hz (8-bit) +d51g.menu.timer.timer_187500Hz.build.timerconfig=TIMER_187500Hz +d51g.menu.timer.timer_93750Hz=93750Hz (8-bit) +d51g.menu.timer.timer_93750Hz.build.timerconfig=TIMER_93750Hz +d51g.menu.timer.timer_62500Hz=62500Hz (8-bit) +d51g.menu.timer.timer_62500Hz.build.timerconfig=TIMER_62500Hz +d51g.menu.timer.timer_37500Hz=37500Hz (8-bit) +d51g.menu.timer.timer_37500Hz.build.timerconfig=TIMER_37500Hz +d51g.menu.timer.timer_20833Hz=20833Hz (8-bit) +d51g.menu.timer.timer_20833Hz.build.timerconfig=TIMER_20833Hz +d51g.menu.timer.timer_12500Hz=12500Hz (8-bit) +d51g.menu.timer.timer_12500Hz.build.timerconfig=TIMER_12500Hz +d51g.menu.timer.timer_7500Hz=7500Hz (8-bit) +d51g.menu.timer.timer_7500Hz.build.timerconfig=TIMER_7500Hz +d51g.menu.timer.timer_4166Hz=4166Hz (8-bit) +d51g.menu.timer.timer_4166Hz.build.timerconfig=TIMER_4166Hz +d51g.menu.timer.timer_2930Hz=2930Hz (8-bit) +d51g.menu.timer.timer_2930Hz.build.timerconfig=TIMER_2930Hz +d51g.menu.timer.timer_1465Hz=1465Hz (16-bit) +d51g.menu.timer.timer_1465Hz.build.timerconfig=TIMER_1465Hz +d51g.menu.cpu.samd51g18a_120=SAMD51G18A_120MHz +d51g.menu.cpu.samd51g18a_120.build.chip=samd51 +d51g.menu.cpu.samd51g18a_120.upload.maximum_size=253952 +d51g.menu.cpu.samd51g18a_120.build.mcu=cortex-m4 +d51g.menu.cpu.samd51g18a_120.build.mathlib=arm_cortexM4lf_math +d51g.menu.cpu.samd51g18a_120.build.f_cpu=120000000L +d51g.menu.cpu.samd51g18a_120.build.usb_product="Xeno Mini D51" +d51g.menu.cpu.samd51g18a_120.build.extra_flags=-D__SAMD51G18A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 +d51g.menu.cpu.samd51g18a_120.build.ldscript=flash_m4f_256KB.ld +d51g.menu.cpu.samd51g18a_120.build.openocdscript=openocd_scripts/SAMD51G18A.cfg +d51g.menu.cpu.samd51g18a_120.bootloader.file=zero/binaries/sam_ba_SAMD51G18A.bin +d51g.menu.cpu.samd51g18a_48=SAMD51G18A_48MHz +d51g.menu.cpu.samd51g18a_48.build.chip=samd51 +d51g.menu.cpu.samd51g18a_48.upload.maximum_size=253952 +d51g.menu.cpu.samd51g18a_48.build.mcu=cortex-m4 +d51g.menu.cpu.samd51g18a_48.build.mathlib=arm_cortexM4lf_math +d51g.menu.cpu.samd51g18a_48.build.f_cpu=48000000L +d51g.menu.cpu.samd51g18a_48.build.usb_product="Xeno Mini D51" +d51g.menu.cpu.samd51g18a_48.build.extra_flags=-D__SAMD51G18A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 +d51g.menu.cpu.samd51g18a_48.build.ldscript=flash_m4f_256KB.ld +d51g.menu.cpu.samd51g18a_48.build.openocdscript=openocd_scripts/SAMD51G18A.cfg +d51g.menu.cpu.samd51g18a_48.bootloader.file=zero/binaries/sam_ba_SAMD51G18A.bin +d51g.menu.cpu.samd51g19a_120=SAMD51G19A_120MHz +d51g.menu.cpu.samd51g19a_120.build.chip=samd51 +d51g.menu.cpu.samd51g19a_120.upload.maximum_size=516096 +d51g.menu.cpu.samd51g19a_120.build.mcu=cortex-m4 +d51g.menu.cpu.samd51g19a_120.build.mathlib=arm_cortexM4lf_math +d51g.menu.cpu.samd51g19a_120.build.f_cpu=120000000L +d51g.menu.cpu.samd51g19a_120.build.usb_product="Xeno Mini D51" +d51g.menu.cpu.samd51g19a_120.build.extra_flags=-D__SAMD51G19A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 +d51g.menu.cpu.samd51g19a_120.build.ldscript=flash_m4f_512KB.ld +d51g.menu.cpu.samd51g19a_120.build.openocdscript=openocd_scripts/SAMD51G19A.cfg +d51g.menu.cpu.samd51g19a_120.bootloader.file=zero/binaries/sam_ba_SAMD51G19A.bin +d51g.menu.cpu.samd51g19a_48=SAMD51G19A_48MHz +d51g.menu.cpu.samd51g19a_48.build.chip=samd51 +d51g.menu.cpu.samd51g19a_48.upload.maximum_size=516096 +d51g.menu.cpu.samd51g19a_48.build.mcu=cortex-m4 +d51g.menu.cpu.samd51g19a_48.build.mathlib=arm_cortexM4lf_math +d51g.menu.cpu.samd51g19a_48.build.f_cpu=48000000L +d51g.menu.cpu.samd51g19a_48.build.usb_product="Xeno Mini D51" +d51g.menu.cpu.samd51g19a_48.build.extra_flags=-D__SAMD51G19A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 +d51g.menu.cpu.samd51g19a_48.build.ldscript=flash_m4f_512KB.ld +d51g.menu.cpu.samd51g19a_48.build.openocdscript=openocd_scripts/SAMD51G19A.cfg +d51g.menu.cpu.samd51g19a_48.bootloader.file=zero/binaries/sam_ba_SAMD51G19A.bin +d51g.menu.bootloader.8kb=8KB_BOOTLOADER +d51g.menu.bootloader.8kb.build.bootloader_size=__8KB_BOOTLOADER__ +d51g.menu.bootloader.8kb.build.ldscript_path=linker_scripts/gcc/8KB_Bootloader +d51g.menu.bootloader.8kb.upload.tool=Fab_SAM_Arduino:bossac +d51g.menu.bootloader.8kb.upload.use_1200bps_touch=true +d51g.menu.bootloader.8kb.upload.wait_for_upload_port=true +d51g.menu.bootloader.8kb.upload.native_usb=true +d51g.menu.bootloader.8kb.upload.offset=0x2000 +d51g.menu.bootloader.8kb.upload.erase= +d51g.menu.bootloader.16kb=16KB_BOOTLOADER +d51g.menu.bootloader.16kb.build.bootloader_size=__16KB_BOOTLOADER__ +d51g.menu.bootloader.16kb.build.ldscript_path=linker_scripts/gcc/16KB_Bootloader +d51g.menu.bootloader.16kb.upload.tool=Fab_SAM_Arduino:bossac +d51g.menu.bootloader.16kb.upload.use_1200bps_touch=true +d51g.menu.bootloader.16kb.upload.wait_for_upload_port=true +d51g.menu.bootloader.16kb.upload.native_usb=true +d51g.menu.bootloader.16kb.upload.offset=0x4000 +d51g.menu.bootloader.16kb.upload.erase= +d51g.menu.bootloader.0kb=NO_BOOTLOADER +d51g.menu.bootloader.0kb.build.bootloader_size=__NO_BOOTLOADER__ +d51g.menu.bootloader.0kb.build.ldscript_path=linker_scripts/gcc/No_Bootloader +d51g.menu.bootloader.0kb.upload.tool=edbg +d51g.menu.bootloader.0kb.upload.use_1200bps_touch=false +d51g.menu.bootloader.0kb.upload.wait_for_upload_port=false +d51g.menu.bootloader.0kb.upload.native_usb=false +d51g.menu.bootloader.0kb.upload.offset=0x0000 +d51g.menu.bootloader.0kb.upload.erase=-e +d51g.menu.serial.one_uart=ONE_UART_ONE_WIRE_ONE_SPI +d51g.menu.serial.one_uart.build.serialcom_uart=ONE_UART +d51g.menu.serial.one_uart.build.serialcom_wire=ONE_WIRE +d51g.menu.serial.one_uart.build.serialcom_spi=ONE_SPI +d51g.menu.serial.one_uart_two_spi=ONE_UART_ONE_WIRE_TWO_SPI +d51g.menu.serial.one_uart_two_spi.build.serialcom_uart=ONE_UART +d51g.menu.serial.one_uart_two_spi.build.serialcom_wire=ONE_WIRE +d51g.menu.serial.one_uart_two_spi.build.serialcom_spi=TWO_SPI +d51g.menu.serial.one_uart_two_wire=ONE_UART_TWO_WIRE_ONE_SPI +d51g.menu.serial.one_uart_two_wire.build.serialcom_uart=ONE_UART +d51g.menu.serial.one_uart_two_wire.build.serialcom_wire=TWO_WIRE +d51g.menu.serial.one_uart_two_wire.build.serialcom_spi=ONE_SPI +d51g.menu.serial.two_uart=TWO_UART_ONE_WIRE_ONE_SPI +d51g.menu.serial.two_uart.build.serialcom_uart=TWO_UART +d51g.menu.serial.two_uart.build.serialcom_wire=ONE_WIRE +d51g.menu.serial.two_uart.build.serialcom_spi=ONE_SPI +d51g.menu.serial.two_uart_two_spi=TWO_UART_ONE_WIRE_TWO_SPI +d51g.menu.serial.two_uart_two_spi.build.serialcom_uart=TWO_UART +d51g.menu.serial.two_uart_two_spi.build.serialcom_wire=ONE_WIRE +d51g.menu.serial.two_uart_two_spi.build.serialcom_spi=TWO_SPI +d51g.menu.serial.two_uart_two_wire=TWO_UART_TWO_WIRE_ONE_SPI +d51g.menu.serial.two_uart_two_wire.build.serialcom_uart=TWO_UART +d51g.menu.serial.two_uart_two_wire.build.serialcom_wire=TWO_WIRE +d51g.menu.serial.two_uart_two_wire.build.serialcom_spi=ONE_SPI +d51g.menu.serial.three_uart=THREE_UART_ONE_WIRE_ONE_SPI +d51g.menu.serial.three_uart.build.serialcom_uart=THREE_UART +d51g.menu.serial.three_uart.build.serialcom_wire=ONE_WIRE +d51g.menu.serial.three_uart.build.serialcom_spi=ONE_SPI +d51g.menu.serial.three_uart_two_spi=THREE_UART_ONE_WIRE_TWO_SPI +d51g.menu.serial.three_uart_two_spi.build.serialcom_uart=THREE_UART +d51g.menu.serial.three_uart_two_spi.build.serialcom_wire=ONE_WIRE +d51g.menu.serial.three_uart_two_spi.build.serialcom_spi=TWO_SPI +d51g.menu.serial.three_uart_two_wire=THREE_UART_TWO_WIRE_ONE_SPI +d51g.menu.serial.three_uart_two_wire.build.serialcom_uart=THREE_UART +d51g.menu.serial.three_uart_two_wire.build.serialcom_wire=TWO_WIRE +d51g.menu.serial.three_uart_two_wire.build.serialcom_spi=ONE_SPI +d51g.menu.serial.no_uart=NO_UART_ONE_WIRE_ONE_SPI +d51g.menu.serial.no_uart.build.serialcom_uart=NO_UART +d51g.menu.serial.no_uart.build.serialcom_wire=ONE_WIRE +d51g.menu.serial.no_uart.build.serialcom_spi=ONE_SPI +d51g.menu.usb.cdc=CDC_ONLY +d51g.menu.usb.cdc.build.usbcom=CDC_ONLY +d51g.menu.usb.cdc.build.pid=0x7557 +d51g.menu.usb.cdc_hid=CDC_HID +d51g.menu.usb.cdc_hid.build.usbcom=CDC_HID +d51g.menu.usb.cdc_hid.build.pid=0x7856 +d51g.menu.usb.withcdc=WITH_CDC +d51g.menu.usb.withcdc.build.usbcom=WITH_CDC +d51g.menu.usb.withcdc.build.pid=0x7B41 +d51g.menu.usb.hid=HID_ONLY +d51g.menu.usb.hid.build.usbcom=HID_ONLY +d51g.menu.usb.hid.build.pid=0x7B40 +d51g.menu.usb.nocdc=WITHOUT_CDC +d51g.menu.usb.nocdc.build.usbcom=WITHOUT_CDC +d51g.menu.usb.nocdc.build.pid=0x7A0C +d51g.menu.usb.none=USB_DISABLED +d51g.menu.usb.none.build.usbcom=USB_DISABLED +d51g.menu.usb.none.build.pid=0x7856 -# MattairTech Core for Arduino M0 / M0 Pro (Autodetect Port) -mzero.name=Arduino M0 / M0 Pro (Autodetect Port) -mzero.bootloader.file=zero/binaries/sam_ba_arduino_m0_pro_SAMD21G18A.bin -# M0 Pro (Programming port) -mzero.vid.0=0x03eb -mzero.pid.0=0x2111 -mzero.vid.0.upload.tool=arduino:openocd -mzero.vid.0.upload.use_1200bps_touch=false -mzero.vid.0.upload.wait_for_upload_port=false -mzero.vid.0.upload.native_usb=false -# M0 Pro (Native Port) -mzero.vid.1=0x2a03 -mzero.pid.1=0x004d -mzero.vid.2=0x2a03 -mzero.pid.2=0x804d -mzero.vid.3=0x2a03 -mzero.pid.3=0x004f -mzero.vid.4=0x2a03 -mzero.pid.4=0x804f -mzero.build.vid=0x2a03 -mzero.build.pid=0x804f -# M0 -mzero.vid.5=0x2a03 -mzero.pid.5=0x004e -mzero.vid.5.build.vid=0x2a03 -mzero.vid.5.build.pid=0x804e -mzero.vid.5.bootloader.file=zero/binaries/sam_ba_arduino_m0_SAMD21G18A.bin -mzero.vid.6=0x2a03 -mzero.pid.6=0x804e -mzero.vid.6.build.vid=0x2a03 -mzero.vid.6.build.pid=0x804e -mzero.vid.6.bootloader.file=zero/binaries/sam_ba_arduino_m0_SAMD21G18A.bin -mzero.upload.tool=MattairTech_Arduino:bossac -mzero.upload.protocol=sam-ba -mzero.upload.use_1200bps_touch=true -mzero.upload.wait_for_upload_port=true -mzero.upload.native_usb=true -mzero.build.mcu=cortex-m0plus -mzero.build.mathlib=arm_cortexM0l_math -mzero.build.f_cpu=48000000L -mzero.build.usb_product="Arduino M0 / M0 Pro" -mzero.build.board=SAM_ZERO -mzero.build.core=arduino -mzero.build.variant=arduino_mzero -mzero.build.variant_system_lib= -mzero.menu.float.default=Print & String use auto-promoted doubles only -mzero.menu.float.default.build.floatconfig=FLOAT_BOTH_DOUBLES_ONLY -mzero.menu.float.print=Print uses separate singles and doubles -mzero.menu.float.print.build.floatconfig=FLOAT_PRINT_SINGLES_DOUBLES -mzero.menu.float.string=String uses separate singles and doubles -mzero.menu.float.string.build.floatconfig=FLOAT_STRING_SINGLES_DOUBLES -mzero.menu.float.both=Print & String use separate singles and doubles -mzero.menu.float.both.build.floatconfig=FLOAT_BOTH_SINGLES_DOUBLES -mzero.menu.config.disabled=config.h disabled -mzero.menu.config.disabled.build.buildconfig=CONFIG_H_DISABLED -mzero.menu.config.enabled=config.h enabled (mostly code size reductions) -mzero.menu.config.enabled.build.buildconfig=CONFIG_H_ENABLED -mzero.menu.clock.crystal_32k=32KHZ_CRYSTAL -mzero.menu.clock.crystal_32k.build.clockconfig=CLOCKCONFIG_32768HZ_CRYSTAL -mzero.menu.clock.internal=INTERNAL_OSCILLATOR -mzero.menu.clock.internal.build.clockconfig=CLOCKCONFIG_INTERNAL -mzero.menu.clock.internal_usb=INTERNAL_USB_CALIBRATED_OSCILLATOR -mzero.menu.clock.internal_usb.build.clockconfig=CLOCKCONFIG_INTERNAL_USB -mzero.menu.timer.timer_732Hz=732.4Hz (16-bit) -mzero.menu.timer.timer_732Hz.build.timerconfig=TIMER_732Hz -mzero.menu.timer.timer_366Hz=366.2Hz (16-bit) -mzero.menu.timer.timer_366Hz.build.timerconfig=TIMER_366Hz -mzero.menu.timer.timer_244Hz=244.1Hz (16-bit) -mzero.menu.timer.timer_244Hz.build.timerconfig=TIMER_244Hz -mzero.menu.timer.timer_183Hz=183.1Hz (16-bit) -mzero.menu.timer.timer_183Hz.build.timerconfig=TIMER_183Hz -mzero.menu.timer.timer_146Hz=146.5Hz (16-bit) -mzero.menu.timer.timer_146Hz.build.timerconfig=TIMER_146Hz -mzero.menu.timer.timer_122Hz=122.1Hz (16-bit) -mzero.menu.timer.timer_122Hz.build.timerconfig=TIMER_122Hz -mzero.menu.timer.timer_105Hz=104.6Hz (16-bit) -mzero.menu.timer.timer_105Hz.build.timerconfig=TIMER_105Hz -mzero.menu.timer.timer_81Hz=81.38Hz (16-bit) -mzero.menu.timer.timer_81Hz.build.timerconfig=TIMER_81Hz -mzero.menu.timer.timer_61Hz=61.04Hz (16-bit) -mzero.menu.timer.timer_61Hz.build.timerconfig=TIMER_61Hz -mzero.menu.timer.timer_31Hz=30.52Hz (16-bit) -mzero.menu.timer.timer_31Hz.build.timerconfig=TIMER_31Hz -mzero.menu.timer.timer_187500Hz=187500Hz (8-bit) -mzero.menu.timer.timer_187500Hz.build.timerconfig=TIMER_187500Hz -mzero.menu.timer.timer_93750Hz=93750Hz (8-bit) -mzero.menu.timer.timer_93750Hz.build.timerconfig=TIMER_93750Hz -mzero.menu.timer.timer_62500Hz=62500Hz (8-bit) -mzero.menu.timer.timer_62500Hz.build.timerconfig=TIMER_62500Hz -mzero.menu.timer.timer_37500Hz=37500Hz (8-bit) -mzero.menu.timer.timer_37500Hz.build.timerconfig=TIMER_37500Hz -mzero.menu.timer.timer_20833Hz=20833Hz (8-bit) -mzero.menu.timer.timer_20833Hz.build.timerconfig=TIMER_20833Hz -mzero.menu.timer.timer_12500Hz=12500Hz (8-bit) -mzero.menu.timer.timer_12500Hz.build.timerconfig=TIMER_12500Hz -mzero.menu.timer.timer_7500Hz=7500Hz (8-bit) -mzero.menu.timer.timer_7500Hz.build.timerconfig=TIMER_7500Hz -mzero.menu.timer.timer_4166Hz=4166Hz (8-bit) -mzero.menu.timer.timer_4166Hz.build.timerconfig=TIMER_4166Hz -mzero.menu.timer.timer_2930Hz=2930Hz (8-bit) -mzero.menu.timer.timer_2930Hz.build.timerconfig=TIMER_2930Hz -mzero.menu.timer.timer_1465Hz=1465Hz (8-bit, 16-bit for D51) -mzero.menu.timer.timer_1465Hz.build.timerconfig=TIMER_1465Hz -mzero.build.extra_flags=-D__SAMD21G18A__ -mthumb {build.usb_flags} -DARM_MATH_CM0PLUS -mzero.build.ldscript=flash_256KB.ld -mzero.build.openocdscript=openocd_scripts/SAMD21G18A.cfg -mzero.bootloader.tool=arduino:openocd -mzero.menu.bootloader.16kb=16KB_BOOTLOADER -mzero.menu.bootloader.16kb.build.bootloader_size=__16KB_BOOTLOADER__ -mzero.menu.bootloader.16kb.build.ldscript_path=linker_scripts/gcc/16KB_Bootloader -mzero.menu.bootloader.16kb.upload.maximum_size=245760 -mzero.menu.bootloader.16kb.upload.tool=arduino:avrdude -mzero.menu.bootloader.16kb.upload.protocol=stk500v2 -mzero.menu.bootloader.16kb.upload.speed=57600 -mzero.menu.bootloader.16kb.build.emu.mcu=atmega2560 -mzero.menu.bootloader.8kb=8KB_BOOTLOADER -mzero.menu.bootloader.8kb.build.bootloader_size=__8KB_BOOTLOADER__ -mzero.menu.bootloader.8kb.build.ldscript_path=linker_scripts/gcc/8KB_Bootloader -mzero.menu.bootloader.8kb.upload.maximum_size=253952 -mzero.menu.bootloader.8kb.upload.tool=MattairTech_Arduino:bossac -mzero.menu.bootloader.0kb=NO_BOOTLOADER -mzero.menu.bootloader.0kb.build.bootloader_size=__NO_BOOTLOADER__ -mzero.menu.bootloader.0kb.build.ldscript_path=linker_scripts/gcc/No_Bootloader -mzero.menu.bootloader.0kb.upload.tool=arduino:openocd -mzero.menu.bootloader.0kb.upload.use_1200bps_touch=false -mzero.menu.bootloader.0kb.upload.wait_for_upload_port=false -mzero.menu.bootloader.0kb.upload.native_usb=false -mzero.menu.bootloader.0kb.upload.maximum_size=262144 -mzero.menu.serial.one_uart=ONE_UART_ONE_WIRE_ONE_SPI -mzero.menu.serial.one_uart.build.serialcom_uart=ONE_UART -mzero.menu.serial.one_uart.build.serialcom_wire=ONE_WIRE -mzero.menu.serial.one_uart.build.serialcom_spi=ONE_SPI -mzero.menu.serial.one_uart_two_wire_two_spi=ONE_UART_TWO_WIRE_TWO_SPI -mzero.menu.serial.one_uart_two_wire_two_spi.build.serialcom_uart=ONE_UART -mzero.menu.serial.one_uart_two_wire_two_spi.build.serialcom_wire=TWO_WIRE -mzero.menu.serial.one_uart_two_wire_two_spi.build.serialcom_spi=TWO_SPI -mzero.menu.serial.two_uart=TWO_UART_ONE_WIRE_ONE_SPI -mzero.menu.serial.two_uart.build.serialcom_uart=TWO_UART -mzero.menu.serial.two_uart.build.serialcom_wire=ONE_WIRE -mzero.menu.serial.two_uart.build.serialcom_spi=ONE_SPI -mzero.menu.serial.two_uart_two_wire_two_spi=TWO_UART_TWO_WIRE_TWO_SPI -mzero.menu.serial.two_uart_two_wire_two_spi.build.serialcom_uart=TWO_UART -mzero.menu.serial.two_uart_two_wire_two_spi.build.serialcom_wire=TWO_WIRE -mzero.menu.serial.two_uart_two_wire_two_spi.build.serialcom_spi=TWO_SPI -mzero.menu.serial.no_uart=NO_UART_ONE_WIRE_ONE_SPI -mzero.menu.serial.no_uart.build.serialcom_uart=NO_UART -mzero.menu.serial.no_uart.build.serialcom_wire=ONE_WIRE -mzero.menu.serial.no_uart.build.serialcom_spi=ONE_SPI -mzero.menu.serial.no_uart_two_wire_two_spi=NO_UART_TWO_WIRE_TWO_SPI -mzero.menu.serial.no_uart_two_wire_two_spi.build.serialcom_uart=NO_UART -mzero.menu.serial.no_uart_two_wire_two_spi.build.serialcom_wire=TWO_WIRE -mzero.menu.serial.no_uart_two_wire_two_spi.build.serialcom_spi=TWO_SPI -mzero.menu.usb.cdc=CDC_ONLY -mzero.menu.usb.cdc.build.usbcom=CDC_ONLY -mzero.menu.usb.cdc_hid=CDC_HID -mzero.menu.usb.cdc_hid.build.usbcom=CDC_HID -mzero.menu.usb.withcdc=WITH_CDC -mzero.menu.usb.withcdc.build.usbcom=WITH_CDC -mzero.menu.usb.hid=HID_ONLY -mzero.menu.usb.hid.build.usbcom=HID_ONLY -mzero.menu.usb.nocdc=WITHOUT_CDC -mzero.menu.usb.nocdc.build.usbcom=WITHOUT_CDC -mzero.menu.usb.none=USB_DISABLED -mzero.menu.usb.none.build.usbcom=USB_DISABLED +# Generic D51J +d51j.name=Generic D51J +d51j.vid.0=0x16D0 +d51j.pid.0=0x8557 +d51j.vid.1=0x16D0 +d51j.pid.1=0x8856 +d51j.vid.2=0x16D0 +d51j.pid.2=0x8B41 +d51j.vid.3=0x16D0 +d51j.pid.3=0x8B40 +d51j.vid.4=0x16D0 +d51j.pid.4=0x8A0C +d51j.vid.5=0x16D0 +d51j.pid.5=0x8856 +d51j.build.usb_manufacturer="Fab Foundation" +d51j.build.board=SAMD_ZERO +d51j.build.core=arduino +d51j.build.variant=Generic_xx1J +d51j.build.variant_system_lib= +d51j.build.vid=0x16D0 +d51j.upload.protocol=sam-ba +d51j.bootloader.tool=edbg +d51j.menu.float.default=Print & String use auto-promoted doubles only +d51j.menu.float.default.build.floatconfig=FLOAT_BOTH_DOUBLES_ONLY +d51j.menu.float.print=Print uses separate singles and doubles +d51j.menu.float.print.build.floatconfig=FLOAT_PRINT_SINGLES_DOUBLES +d51j.menu.float.string=String uses separate singles and doubles +d51j.menu.float.string.build.floatconfig=FLOAT_STRING_SINGLES_DOUBLES +d51j.menu.float.both=Print & String use separate singles and doubles +d51j.menu.float.both.build.floatconfig=FLOAT_BOTH_SINGLES_DOUBLES +d51j.menu.config.disabled=config.h disabled +d51j.menu.config.disabled.build.buildconfig=CONFIG_H_DISABLED +d51j.menu.config.enabled=config.h enabled (mostly code size reductions) +d51j.menu.config.enabled.build.buildconfig=CONFIG_H_ENABLED +d51j.menu.clock.internal_usb=INTERNAL_USB_CALIBRATED_OSCILLATOR +d51j.menu.clock.internal_usb.build.clockconfig=CLOCKCONFIG_INTERNAL_USB +d51j.menu.clock.internal=INTERNAL_OSCILLATOR +d51j.menu.clock.internal.build.clockconfig=CLOCKCONFIG_INTERNAL +d51j.menu.clock.crystal_32k=32KHZ_CRYSTAL +d51j.menu.clock.crystal_32k.build.clockconfig=CLOCKCONFIG_32768HZ_CRYSTAL +d51j.menu.clock.crystal_hs=HIGH_SPEED_CRYSTAL +d51j.menu.clock.crystal_hs.build.clockconfig=CLOCKCONFIG_HS_CRYSTAL +d51j.menu.timer.timer_732Hz=732.4Hz (16-bit) +d51j.menu.timer.timer_732Hz.build.timerconfig=TIMER_732Hz +d51j.menu.timer.timer_366Hz=366.2Hz (16-bit) +d51j.menu.timer.timer_366Hz.build.timerconfig=TIMER_366Hz +d51j.menu.timer.timer_244Hz=244.1Hz (16-bit) +d51j.menu.timer.timer_244Hz.build.timerconfig=TIMER_244Hz +d51j.menu.timer.timer_183Hz=183.1Hz (16-bit) +d51j.menu.timer.timer_183Hz.build.timerconfig=TIMER_183Hz +d51j.menu.timer.timer_146Hz=146.5Hz (16-bit) +d51j.menu.timer.timer_146Hz.build.timerconfig=TIMER_146Hz +d51j.menu.timer.timer_122Hz=122.1Hz (16-bit) +d51j.menu.timer.timer_122Hz.build.timerconfig=TIMER_122Hz +d51j.menu.timer.timer_105Hz=104.6Hz (16-bit) +d51j.menu.timer.timer_105Hz.build.timerconfig=TIMER_105Hz +d51j.menu.timer.timer_81Hz=81.38Hz (16-bit) +d51j.menu.timer.timer_81Hz.build.timerconfig=TIMER_81Hz +d51j.menu.timer.timer_61Hz=61.04Hz (16-bit) +d51j.menu.timer.timer_61Hz.build.timerconfig=TIMER_61Hz +d51j.menu.timer.timer_31Hz=30.52Hz (16-bit) +d51j.menu.timer.timer_31Hz.build.timerconfig=TIMER_31Hz +d51j.menu.timer.timer_187500Hz=187500Hz (8-bit) +d51j.menu.timer.timer_187500Hz.build.timerconfig=TIMER_187500Hz +d51j.menu.timer.timer_93750Hz=93750Hz (8-bit) +d51j.menu.timer.timer_93750Hz.build.timerconfig=TIMER_93750Hz +d51j.menu.timer.timer_62500Hz=62500Hz (8-bit) +d51j.menu.timer.timer_62500Hz.build.timerconfig=TIMER_62500Hz +d51j.menu.timer.timer_37500Hz=37500Hz (8-bit) +d51j.menu.timer.timer_37500Hz.build.timerconfig=TIMER_37500Hz +d51j.menu.timer.timer_20833Hz=20833Hz (8-bit) +d51j.menu.timer.timer_20833Hz.build.timerconfig=TIMER_20833Hz +d51j.menu.timer.timer_12500Hz=12500Hz (8-bit) +d51j.menu.timer.timer_12500Hz.build.timerconfig=TIMER_12500Hz +d51j.menu.timer.timer_7500Hz=7500Hz (8-bit) +d51j.menu.timer.timer_7500Hz.build.timerconfig=TIMER_7500Hz +d51j.menu.timer.timer_4166Hz=4166Hz (8-bit) +d51j.menu.timer.timer_4166Hz.build.timerconfig=TIMER_4166Hz +d51j.menu.timer.timer_2930Hz=2930Hz (8-bit) +d51j.menu.timer.timer_2930Hz.build.timerconfig=TIMER_2930Hz +d51j.menu.timer.timer_1465Hz=1465Hz (16-bit) +d51j.menu.timer.timer_1465Hz.build.timerconfig=TIMER_1465Hz +d51j.menu.cpu.samd51j18a_120=SAMD51J18A_120MHz +d51j.menu.cpu.samd51j18a_120.build.chip=samd51 +d51j.menu.cpu.samd51j18a_120.upload.maximum_size=253952 +d51j.menu.cpu.samd51j18a_120.build.mcu=cortex-m4 +d51j.menu.cpu.samd51j18a_120.build.mathlib=arm_cortexM4lf_math +d51j.menu.cpu.samd51j18a_120.build.f_cpu=120000000L +d51j.menu.cpu.samd51j18a_120.build.usb_product="Xeno D51" +d51j.menu.cpu.samd51j18a_120.build.extra_flags=-D__SAMD51J18A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 +d51j.menu.cpu.samd51j18a_120.build.ldscript=flash_m4f_256KB.ld +d51j.menu.cpu.samd51j18a_120.build.openocdscript=openocd_scripts/SAMD51J18A.cfg +d51j.menu.cpu.samd51j18a_120.bootloader.file=zero/binaries/sam_ba_SAMD51J18A.bin +d51j.menu.cpu.samd51j18a_48=SAMD51J18A_48MHz +d51j.menu.cpu.samd51j18a_48.build.chip=samd51 +d51j.menu.cpu.samd51j18a_48.upload.maximum_size=253952 +d51j.menu.cpu.samd51j18a_48.build.mcu=cortex-m4 +d51j.menu.cpu.samd51j18a_48.build.mathlib=arm_cortexM4lf_math +d51j.menu.cpu.samd51j18a_48.build.f_cpu=48000000L +d51j.menu.cpu.samd51j18a_48.build.usb_product="Xeno D51" +d51j.menu.cpu.samd51j18a_48.build.extra_flags=-D__SAMD51J18A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 +d51j.menu.cpu.samd51j18a_48.build.ldscript=flash_m4f_256KB.ld +d51j.menu.cpu.samd51j18a_48.build.openocdscript=openocd_scripts/SAMD51J18A.cfg +d51j.menu.cpu.samd51j18a_48.bootloader.file=zero/binaries/sam_ba_SAMD51J18A.bin +d51j.menu.cpu.samd51j19a_120=SAMD51J19A_120MHz +d51j.menu.cpu.samd51j19a_120.build.chip=samd51 +d51j.menu.cpu.samd51j19a_120.upload.maximum_size=516096 +d51j.menu.cpu.samd51j19a_120.build.mcu=cortex-m4 +d51j.menu.cpu.samd51j19a_120.build.mathlib=arm_cortexM4lf_math +d51j.menu.cpu.samd51j19a_120.build.f_cpu=120000000L +d51j.menu.cpu.samd51j19a_120.build.usb_product="Xeno D51" +d51j.menu.cpu.samd51j19a_120.build.extra_flags=-D__SAMD51J19A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 +d51j.menu.cpu.samd51j19a_120.build.ldscript=flash_m4f_512KB.ld +d51j.menu.cpu.samd51j19a_120.build.openocdscript=openocd_scripts/SAMD51J19A.cfg +d51j.menu.cpu.samd51j19a_120.bootloader.file=zero/binaries/sam_ba_SAMD51J19A.bin +d51j.menu.cpu.samd51j19a_48=SAMD51J19A_48MHz +d51j.menu.cpu.samd51j19a_48.build.chip=samd51 +d51j.menu.cpu.samd51j19a_48.upload.maximum_size=516096 +d51j.menu.cpu.samd51j19a_48.build.mcu=cortex-m4 +d51j.menu.cpu.samd51j19a_48.build.mathlib=arm_cortexM4lf_math +d51j.menu.cpu.samd51j19a_48.build.f_cpu=48000000L +d51j.menu.cpu.samd51j19a_48.build.usb_product="Xeno D51" +d51j.menu.cpu.samd51j19a_48.build.extra_flags=-D__SAMD51J19A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 +d51j.menu.cpu.samd51j19a_48.build.ldscript=flash_m4f_512KB.ld +d51j.menu.cpu.samd51j19a_48.build.openocdscript=openocd_scripts/SAMD51J19A.cfg +d51j.menu.cpu.samd51j19a_48.bootloader.file=zero/binaries/sam_ba_SAMD51J19A.bin +d51j.menu.cpu.samd51j20a_120=SAMD51J20A_120MHz +d51j.menu.cpu.samd51j20a_120.build.chip=samd51 +d51j.menu.cpu.samd51j20a_120.upload.maximum_size=1040384 +d51j.menu.cpu.samd51j20a_120.build.mcu=cortex-m4 +d51j.menu.cpu.samd51j20a_120.build.mathlib=arm_cortexM4lf_math +d51j.menu.cpu.samd51j20a_120.build.f_cpu=120000000L +d51j.menu.cpu.samd51j20a_120.build.usb_product="Xeno D51" +d51j.menu.cpu.samd51j20a_120.build.extra_flags=-D__SAMD51J20A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 +d51j.menu.cpu.samd51j20a_120.build.ldscript=flash_m4f_1MB.ld +d51j.menu.cpu.samd51j20a_120.build.openocdscript=openocd_scripts/SAMD51J20A.cfg +d51j.menu.cpu.samd51j20a_120.bootloader.file=zero/binaries/sam_ba_SAMD51J20A.bin +d51j.menu.cpu.samd51j20a_48=SAMD51J20A_48MHz +d51j.menu.cpu.samd51j20a_48.build.chip=samd51 +d51j.menu.cpu.samd51j20a_48.upload.maximum_size=1040384 +d51j.menu.cpu.samd51j20a_48.build.mcu=cortex-m4 +d51j.menu.cpu.samd51j20a_48.build.mathlib=arm_cortexM4lf_math +d51j.menu.cpu.samd51j20a_48.build.f_cpu=48000000L +d51j.menu.cpu.samd51j20a_48.build.usb_product="Xeno D51" +d51j.menu.cpu.samd51j20a_48.build.extra_flags=-D__SAMD51J20A__ {build.usb_flags} -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 +d51j.menu.cpu.samd51j20a_48.build.ldscript=flash_m4f_1MB.ld +d51j.menu.cpu.samd51j20a_48.build.openocdscript=openocd_scripts/SAMD51J20A.cfg +d51j.menu.cpu.samd51j20a_48.bootloader.file=zero/binaries/sam_ba_SAMD51J20A.bin +d51j.menu.bootloader.8kb=8KB_BOOTLOADER +d51j.menu.bootloader.8kb.build.bootloader_size=__8KB_BOOTLOADER__ +d51j.menu.bootloader.8kb.build.ldscript_path=linker_scripts/gcc/8KB_Bootloader +d51j.menu.bootloader.8kb.upload.tool=Fab_SAM_Arduino:bossac +d51j.menu.bootloader.8kb.upload.use_1200bps_touch=true +d51j.menu.bootloader.8kb.upload.wait_for_upload_port=true +d51j.menu.bootloader.8kb.upload.native_usb=true +d51j.menu.bootloader.8kb.upload.offset=0x2000 +d51j.menu.bootloader.8kb.upload.erase= +d51j.menu.bootloader.16kb=16KB_BOOTLOADER +d51j.menu.bootloader.16kb.build.bootloader_size=__16KB_BOOTLOADER__ +d51j.menu.bootloader.16kb.build.ldscript_path=linker_scripts/gcc/16KB_Bootloader +d51j.menu.bootloader.16kb.upload.tool=Fab_SAM_Arduino:bossac +d51j.menu.bootloader.16kb.upload.use_1200bps_touch=true +d51j.menu.bootloader.16kb.upload.wait_for_upload_port=true +d51j.menu.bootloader.16kb.upload.native_usb=true +d51j.menu.bootloader.16kb.upload.offset=0x4000 +d51j.menu.bootloader.16kb.upload.erase= +d51j.menu.bootloader.0kb=NO_BOOTLOADER +d51j.menu.bootloader.0kb.build.bootloader_size=__NO_BOOTLOADER__ +d51j.menu.bootloader.0kb.build.ldscript_path=linker_scripts/gcc/No_Bootloader +d51j.menu.bootloader.0kb.upload.tool=edbg +d51j.menu.bootloader.0kb.upload.use_1200bps_touch=false +d51j.menu.bootloader.0kb.upload.wait_for_upload_port=false +d51j.menu.bootloader.0kb.upload.native_usb=false +d51j.menu.bootloader.0kb.upload.offset=0x0000 +d51j.menu.bootloader.0kb.upload.erase=-e +d51j.menu.serial.one_uart=ONE_UART_ONE_WIRE_ONE_SPI +d51j.menu.serial.one_uart.build.serialcom_uart=ONE_UART +d51j.menu.serial.one_uart.build.serialcom_wire=ONE_WIRE +d51j.menu.serial.one_uart.build.serialcom_spi=ONE_SPI +d51j.menu.serial.one_uart_two_spi=ONE_UART_ONE_WIRE_TWO_SPI +d51j.menu.serial.one_uart_two_spi.build.serialcom_uart=ONE_UART +d51j.menu.serial.one_uart_two_spi.build.serialcom_wire=ONE_WIRE +d51j.menu.serial.one_uart_two_spi.build.serialcom_spi=TWO_SPI +d51j.menu.serial.one_uart_two_wire=ONE_UART_TWO_WIRE_ONE_SPI +d51j.menu.serial.one_uart_two_wire.build.serialcom_uart=ONE_UART +d51j.menu.serial.one_uart_two_wire.build.serialcom_wire=TWO_WIRE +d51j.menu.serial.one_uart_two_wire.build.serialcom_spi=ONE_SPI +d51j.menu.serial.two_uart=TWO_UART_ONE_WIRE_ONE_SPI +d51j.menu.serial.two_uart.build.serialcom_uart=TWO_UART +d51j.menu.serial.two_uart.build.serialcom_wire=ONE_WIRE +d51j.menu.serial.two_uart.build.serialcom_spi=ONE_SPI +d51j.menu.serial.two_uart_two_spi=TWO_UART_ONE_WIRE_TWO_SPI +d51j.menu.serial.two_uart_two_spi.build.serialcom_uart=TWO_UART +d51j.menu.serial.two_uart_two_spi.build.serialcom_wire=ONE_WIRE +d51j.menu.serial.two_uart_two_spi.build.serialcom_spi=TWO_SPI +d51j.menu.serial.two_uart_two_wire=TWO_UART_TWO_WIRE_ONE_SPI +d51j.menu.serial.two_uart_two_wire.build.serialcom_uart=TWO_UART +d51j.menu.serial.two_uart_two_wire.build.serialcom_wire=TWO_WIRE +d51j.menu.serial.two_uart_two_wire.build.serialcom_spi=ONE_SPI +d51j.menu.serial.three_uart=THREE_UART_ONE_WIRE_ONE_SPI +d51j.menu.serial.three_uart.build.serialcom_uart=THREE_UART +d51j.menu.serial.three_uart.build.serialcom_wire=ONE_WIRE +d51j.menu.serial.three_uart.build.serialcom_spi=ONE_SPI +d51j.menu.serial.three_uart_two_spi=THREE_UART_ONE_WIRE_TWO_SPI +d51j.menu.serial.three_uart_two_spi.build.serialcom_uart=THREE_UART +d51j.menu.serial.three_uart_two_spi.build.serialcom_wire=ONE_WIRE +d51j.menu.serial.three_uart_two_spi.build.serialcom_spi=TWO_SPI +d51j.menu.serial.three_uart_two_wire=THREE_UART_TWO_WIRE_ONE_SPI +d51j.menu.serial.three_uart_two_wire.build.serialcom_uart=THREE_UART +d51j.menu.serial.three_uart_two_wire.build.serialcom_wire=TWO_WIRE +d51j.menu.serial.three_uart_two_wire.build.serialcom_spi=ONE_SPI +d51j.menu.serial.no_uart=NO_UART_ONE_WIRE_ONE_SPI +d51j.menu.serial.no_uart.build.serialcom_uart=NO_UART +d51j.menu.serial.no_uart.build.serialcom_wire=ONE_WIRE +d51j.menu.serial.no_uart.build.serialcom_spi=ONE_SPI +d51j.menu.usb.cdc=CDC_ONLY +d51j.menu.usb.cdc.build.usbcom=CDC_ONLY +d51j.menu.usb.cdc.build.pid=0x8557 +d51j.menu.usb.cdc_hid=CDC_HID +d51j.menu.usb.cdc_hid.build.usbcom=CDC_HID +d51j.menu.usb.cdc_hid.build.pid=0x8856 +d51j.menu.usb.withcdc=WITH_CDC +d51j.menu.usb.withcdc.build.usbcom=WITH_CDC +d51j.menu.usb.withcdc.build.pid=0x8B41 +d51j.menu.usb.hid=HID_ONLY +d51j.menu.usb.hid.build.usbcom=HID_ONLY +d51j.menu.usb.hid.build.pid=0x8B40 +d51j.menu.usb.nocdc=WITHOUT_CDC +d51j.menu.usb.nocdc.build.usbcom=WITHOUT_CDC +d51j.menu.usb.nocdc.build.pid=0x8A0C +d51j.menu.usb.none=USB_DISABLED +d51j.menu.usb.none.build.usbcom=USB_DISABLED +d51j.menu.usb.none.build.pid=0x8856 diff --git a/bootloaders/zero/Makefile b/bootloaders/zero/Makefile index b3f7e014f..5ae277028 100644 --- a/bootloaders/zero/Makefile +++ b/bootloaders/zero/Makefile @@ -28,7 +28,7 @@ SDCARD?=SDCARD_DISABLED # Xeno, Xeno_Mini, MT_D21E_rev_A, MT_D21E_rev_B, MT_D11 # arduino_zero, arduino_mkrzero, arduino_mkr1000, arduino_mkrfox1200, genuino_mkr1000, genuino_zero, arduino_m0, arduino_m0_pro # Generic_x21E, Generic_x21G, Generic_x21J, Generic_D11D14AM, Generic_D11D14AS, Generic_D11C14A -BOARD_ID?=Xeno_Mini +BOARD_ID?=Generic_x21E # ----------------------------------------------------------------------------- # MCU definitions: @@ -46,7 +46,7 @@ BOARD_ID?=Xeno_Mini # SAMD51J: SAMD51J18A, SAMD51J19A, SAMD51J20A # SAMD51N: SAMD51N19A, SAMD51N20A # SAMD51P: SAMD51P19A, SAMD51P20A -MCU?=SAMD51G19A +MCU?=SAMD21E17A # Note that the makefile can be invoked with values that override the above settings. # For example: BOARD_ID=Generic_D11C14A MCU=SAMD11C14A SDCARD=SDCARD_DISABLED make @@ -54,9 +54,9 @@ MCU?=SAMD51G19A # End Config ############################### ifeq ($(findstring ENABLED,$(SDCARD)),ENABLED) -NAME=sam_ba_sdcard_$(BOARD_ID)_$(MCU) +NAME=sam_ba_sdcard_$(MCU) else -NAME=sam_ba_$(BOARD_ID)_$(MCU) +NAME=sam_ba_$(MCU) endif ifeq ($(findstring 20,$(MCU)),20) @@ -90,7 +90,7 @@ MCPU=cortex-m0plus endif # CORE_VENDOR?=arduino -CORE_VENDOR?=MattairTech_Arduino +CORE_VENDOR?=Fab_SAM_Arduino # ----------------------------------------------------------------------------- # Paths diff --git a/bootloaders/zero/binaries/sam_ba_MT_D11_SAMD11D14AM.bin b/bootloaders/zero/binaries/sam_ba_MT_D11_SAMD11D14AM.bin deleted file mode 100755 index 475e9fcb1..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_MT_D11_SAMD11D14AM.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_MT_D21E_rev_A_SAMD21E17A.bin b/bootloaders/zero/binaries/sam_ba_MT_D21E_rev_A_SAMD21E17A.bin deleted file mode 100755 index 5cccdd80a..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_MT_D21E_rev_A_SAMD21E17A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_MT_D21E_rev_A_SAMD21E18A.bin b/bootloaders/zero/binaries/sam_ba_MT_D21E_rev_A_SAMD21E18A.bin deleted file mode 100755 index 6b13fe359..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_MT_D21E_rev_A_SAMD21E18A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_MT_D21E_rev_B_SAMC21E18A.bin b/bootloaders/zero/binaries/sam_ba_MT_D21E_rev_B_SAMC21E18A.bin deleted file mode 100755 index 84dc9a8c4..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_MT_D21E_rev_B_SAMC21E18A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_MT_D21E_rev_B_SAMD21E17A.bin b/bootloaders/zero/binaries/sam_ba_MT_D21E_rev_B_SAMD21E17A.bin deleted file mode 100755 index 0512e9375..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_MT_D21E_rev_B_SAMD21E17A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_MT_D21E_rev_B_SAMD21E18A.bin b/bootloaders/zero/binaries/sam_ba_MT_D21E_rev_B_SAMD21E18A.bin deleted file mode 100755 index 858eca6f1..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_MT_D21E_rev_B_SAMD21E18A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_MT_D21E_rev_B_SAML21E18B.bin b/bootloaders/zero/binaries/sam_ba_MT_D21E_rev_B_SAML21E18B.bin deleted file mode 100755 index 4ecf17ebe..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_MT_D21E_rev_B_SAML21E18B.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21G_SAMC21G15A.bin b/bootloaders/zero/binaries/sam_ba_SAMC21E15A.bin old mode 100755 new mode 100644 similarity index 69% rename from bootloaders/zero/binaries/sam_ba_Generic_x21G_SAMC21G15A.bin rename to bootloaders/zero/binaries/sam_ba_SAMC21E15A.bin index 05d4c1f91..2708da5b7 Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21G_SAMC21G15A.bin and b/bootloaders/zero/binaries/sam_ba_SAMC21E15A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21E_SAMC21E16A.bin b/bootloaders/zero/binaries/sam_ba_SAMC21E16A.bin old mode 100755 new mode 100644 similarity index 69% rename from bootloaders/zero/binaries/sam_ba_Generic_x21E_SAMC21E16A.bin rename to bootloaders/zero/binaries/sam_ba_SAMC21E16A.bin index 5bed8ee1b..d4f0f46a1 Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21E_SAMC21E16A.bin and b/bootloaders/zero/binaries/sam_ba_SAMC21E16A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21G_SAMC21G17A.bin b/bootloaders/zero/binaries/sam_ba_SAMC21E17A.bin old mode 100755 new mode 100644 similarity index 69% rename from bootloaders/zero/binaries/sam_ba_Generic_x21G_SAMC21G17A.bin rename to bootloaders/zero/binaries/sam_ba_SAMC21E17A.bin index 47c7b5b28..773e3080d Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21G_SAMC21G17A.bin and b/bootloaders/zero/binaries/sam_ba_SAMC21E17A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21G_SAMC21G18A.bin b/bootloaders/zero/binaries/sam_ba_SAMC21E18A.bin old mode 100755 new mode 100644 similarity index 69% rename from bootloaders/zero/binaries/sam_ba_Generic_x21G_SAMC21G18A.bin rename to bootloaders/zero/binaries/sam_ba_SAMC21E18A.bin index 0b3d9611e..575e84cfb Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21G_SAMC21G18A.bin and b/bootloaders/zero/binaries/sam_ba_SAMC21E18A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21J_SAMC21J15A.bin b/bootloaders/zero/binaries/sam_ba_SAMC21G15A.bin old mode 100755 new mode 100644 similarity index 69% rename from bootloaders/zero/binaries/sam_ba_Generic_x21J_SAMC21J15A.bin rename to bootloaders/zero/binaries/sam_ba_SAMC21G15A.bin index fc5405788..d90369a8c Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21J_SAMC21J15A.bin and b/bootloaders/zero/binaries/sam_ba_SAMC21G15A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21G_SAMC21G16A.bin b/bootloaders/zero/binaries/sam_ba_SAMC21G16A.bin old mode 100755 new mode 100644 similarity index 69% rename from bootloaders/zero/binaries/sam_ba_Generic_x21G_SAMC21G16A.bin rename to bootloaders/zero/binaries/sam_ba_SAMC21G16A.bin index 04cf5ec86..4bcba8f02 Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21G_SAMC21G16A.bin and b/bootloaders/zero/binaries/sam_ba_SAMC21G16A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21E_SAMC21E17A.bin b/bootloaders/zero/binaries/sam_ba_SAMC21G17A.bin old mode 100755 new mode 100644 similarity index 69% rename from bootloaders/zero/binaries/sam_ba_Generic_x21E_SAMC21E17A.bin rename to bootloaders/zero/binaries/sam_ba_SAMC21G17A.bin index 88f11ffab..d6ba2f77b Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21E_SAMC21E17A.bin and b/bootloaders/zero/binaries/sam_ba_SAMC21G17A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21J_SAMC21J18A.bin b/bootloaders/zero/binaries/sam_ba_SAMC21G18A.bin old mode 100755 new mode 100644 similarity index 69% rename from bootloaders/zero/binaries/sam_ba_Generic_x21J_SAMC21J18A.bin rename to bootloaders/zero/binaries/sam_ba_SAMC21G18A.bin index 1a7462e02..fd27b9b7c Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21J_SAMC21J18A.bin and b/bootloaders/zero/binaries/sam_ba_SAMC21G18A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21E_SAMC21E15A.bin b/bootloaders/zero/binaries/sam_ba_SAMC21J15A.bin old mode 100755 new mode 100644 similarity index 69% rename from bootloaders/zero/binaries/sam_ba_Generic_x21E_SAMC21E15A.bin rename to bootloaders/zero/binaries/sam_ba_SAMC21J15A.bin index 9bf03fdb0..154750bb5 Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21E_SAMC21E15A.bin and b/bootloaders/zero/binaries/sam_ba_SAMC21J15A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21J_SAMC21J16A.bin b/bootloaders/zero/binaries/sam_ba_SAMC21J16A.bin old mode 100755 new mode 100644 similarity index 69% rename from bootloaders/zero/binaries/sam_ba_Generic_x21J_SAMC21J16A.bin rename to bootloaders/zero/binaries/sam_ba_SAMC21J16A.bin index e70f2ab88..f89b5ed2d Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21J_SAMC21J16A.bin and b/bootloaders/zero/binaries/sam_ba_SAMC21J16A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21J_SAMC21J17A.bin b/bootloaders/zero/binaries/sam_ba_SAMC21J17A.bin old mode 100755 new mode 100644 similarity index 69% rename from bootloaders/zero/binaries/sam_ba_Generic_x21J_SAMC21J17A.bin rename to bootloaders/zero/binaries/sam_ba_SAMC21J17A.bin index a754ffcd9..d889791fa Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21J_SAMC21J17A.bin and b/bootloaders/zero/binaries/sam_ba_SAMC21J17A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21E_SAMC21E18A.bin b/bootloaders/zero/binaries/sam_ba_SAMC21J18A.bin old mode 100755 new mode 100644 similarity index 69% rename from bootloaders/zero/binaries/sam_ba_Generic_x21E_SAMC21E18A.bin rename to bootloaders/zero/binaries/sam_ba_SAMC21J18A.bin index e4c5c2402..7ba7772a6 Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21E_SAMC21E18A.bin and b/bootloaders/zero/binaries/sam_ba_SAMC21J18A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_D11C14A_SAMD11C14A.bin b/bootloaders/zero/binaries/sam_ba_SAMD11C14A.bin old mode 100755 new mode 100644 similarity index 58% rename from bootloaders/zero/binaries/sam_ba_Generic_D11C14A_SAMD11C14A.bin rename to bootloaders/zero/binaries/sam_ba_SAMD11C14A.bin index 4dd4ef78f..97613acc6 Binary files a/bootloaders/zero/binaries/sam_ba_Generic_D11C14A_SAMD11C14A.bin and b/bootloaders/zero/binaries/sam_ba_SAMD11C14A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_D11D14AM_SAMD11D14AM.bin b/bootloaders/zero/binaries/sam_ba_SAMD11D14AM.bin old mode 100755 new mode 100644 similarity index 58% rename from bootloaders/zero/binaries/sam_ba_Generic_D11D14AM_SAMD11D14AM.bin rename to bootloaders/zero/binaries/sam_ba_SAMD11D14AM.bin index c0d4c4b5f..039cddb4a Binary files a/bootloaders/zero/binaries/sam_ba_Generic_D11D14AM_SAMD11D14AM.bin and b/bootloaders/zero/binaries/sam_ba_SAMD11D14AM.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_D11D14AS_SAMD11D14AS.bin b/bootloaders/zero/binaries/sam_ba_SAMD11D14AS.bin old mode 100755 new mode 100644 similarity index 58% rename from bootloaders/zero/binaries/sam_ba_Generic_D11D14AS_SAMD11D14AS.bin rename to bootloaders/zero/binaries/sam_ba_SAMD11D14AS.bin index f7984a8e6..2dde66dcf Binary files a/bootloaders/zero/binaries/sam_ba_Generic_D11D14AS_SAMD11D14AS.bin and b/bootloaders/zero/binaries/sam_ba_SAMD11D14AS.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21E_SAMD21E15A.bin b/bootloaders/zero/binaries/sam_ba_SAMD21E15A.bin old mode 100755 new mode 100644 similarity index 64% rename from bootloaders/zero/binaries/sam_ba_Generic_x21E_SAMD21E15A.bin rename to bootloaders/zero/binaries/sam_ba_SAMD21E15A.bin index e4bd73233..0632f0ff6 Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21E_SAMD21E15A.bin and b/bootloaders/zero/binaries/sam_ba_SAMD21E15A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21E_SAMD21E16A.bin b/bootloaders/zero/binaries/sam_ba_SAMD21E16A.bin old mode 100755 new mode 100644 similarity index 64% rename from bootloaders/zero/binaries/sam_ba_Generic_x21E_SAMD21E16A.bin rename to bootloaders/zero/binaries/sam_ba_SAMD21E16A.bin index a285e7016..555afe25f Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21E_SAMD21E16A.bin and b/bootloaders/zero/binaries/sam_ba_SAMD21E16A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21E_SAMD21E17A.bin b/bootloaders/zero/binaries/sam_ba_SAMD21E17A.bin old mode 100755 new mode 100644 similarity index 64% rename from bootloaders/zero/binaries/sam_ba_Generic_x21E_SAMD21E17A.bin rename to bootloaders/zero/binaries/sam_ba_SAMD21E17A.bin index 255f91e11..4d0e7006d Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21E_SAMD21E17A.bin and b/bootloaders/zero/binaries/sam_ba_SAMD21E17A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21E_SAMD21E18A.bin b/bootloaders/zero/binaries/sam_ba_SAMD21E18A.bin old mode 100755 new mode 100644 similarity index 64% rename from bootloaders/zero/binaries/sam_ba_Generic_x21E_SAMD21E18A.bin rename to bootloaders/zero/binaries/sam_ba_SAMD21E18A.bin index 122d5caf7..5d6d5b504 Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21E_SAMD21E18A.bin and b/bootloaders/zero/binaries/sam_ba_SAMD21E18A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21G_SAMD21G15A.bin b/bootloaders/zero/binaries/sam_ba_SAMD21G15A.bin old mode 100755 new mode 100644 similarity index 64% rename from bootloaders/zero/binaries/sam_ba_Generic_x21G_SAMD21G15A.bin rename to bootloaders/zero/binaries/sam_ba_SAMD21G15A.bin index 49706aefe..80dc15f57 Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21G_SAMD21G15A.bin and b/bootloaders/zero/binaries/sam_ba_SAMD21G15A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21G_SAMD21G16A.bin b/bootloaders/zero/binaries/sam_ba_SAMD21G16A.bin old mode 100755 new mode 100644 similarity index 64% rename from bootloaders/zero/binaries/sam_ba_Generic_x21G_SAMD21G16A.bin rename to bootloaders/zero/binaries/sam_ba_SAMD21G16A.bin index d59f6a7e5..6625899cd Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21G_SAMD21G16A.bin and b/bootloaders/zero/binaries/sam_ba_SAMD21G16A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21G_SAMD21G17A.bin b/bootloaders/zero/binaries/sam_ba_SAMD21G17A.bin old mode 100755 new mode 100644 similarity index 64% rename from bootloaders/zero/binaries/sam_ba_Generic_x21G_SAMD21G17A.bin rename to bootloaders/zero/binaries/sam_ba_SAMD21G17A.bin index 1ba4cbc2e..067a1d2bb Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21G_SAMD21G17A.bin and b/bootloaders/zero/binaries/sam_ba_SAMD21G17A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21G_SAMD21G18A.bin b/bootloaders/zero/binaries/sam_ba_SAMD21G18A.bin old mode 100755 new mode 100644 similarity index 64% rename from bootloaders/zero/binaries/sam_ba_Generic_x21G_SAMD21G18A.bin rename to bootloaders/zero/binaries/sam_ba_SAMD21G18A.bin index 460450df5..8e38dee2c Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21G_SAMD21G18A.bin and b/bootloaders/zero/binaries/sam_ba_SAMD21G18A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21J_SAMD21J15A.bin b/bootloaders/zero/binaries/sam_ba_SAMD21J15A.bin old mode 100755 new mode 100644 similarity index 64% rename from bootloaders/zero/binaries/sam_ba_Generic_x21J_SAMD21J15A.bin rename to bootloaders/zero/binaries/sam_ba_SAMD21J15A.bin index 026b7e1ec..919a60bcd Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21J_SAMD21J15A.bin and b/bootloaders/zero/binaries/sam_ba_SAMD21J15A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21J_SAMD21J16A.bin b/bootloaders/zero/binaries/sam_ba_SAMD21J16A.bin old mode 100755 new mode 100644 similarity index 64% rename from bootloaders/zero/binaries/sam_ba_Generic_x21J_SAMD21J16A.bin rename to bootloaders/zero/binaries/sam_ba_SAMD21J16A.bin index 289b4c25a..f82feaa86 Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21J_SAMD21J16A.bin and b/bootloaders/zero/binaries/sam_ba_SAMD21J16A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21J_SAMD21J17A.bin b/bootloaders/zero/binaries/sam_ba_SAMD21J17A.bin old mode 100755 new mode 100644 similarity index 64% rename from bootloaders/zero/binaries/sam_ba_Generic_x21J_SAMD21J17A.bin rename to bootloaders/zero/binaries/sam_ba_SAMD21J17A.bin index f5f08b10c..92e8b9a7e Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21J_SAMD21J17A.bin and b/bootloaders/zero/binaries/sam_ba_SAMD21J17A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21J_SAMD21J18A.bin b/bootloaders/zero/binaries/sam_ba_SAMD21J18A.bin old mode 100755 new mode 100644 similarity index 64% rename from bootloaders/zero/binaries/sam_ba_Generic_x21J_SAMD21J18A.bin rename to bootloaders/zero/binaries/sam_ba_SAMD21J18A.bin index 633884c95..146ad9851 Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21J_SAMD21J18A.bin and b/bootloaders/zero/binaries/sam_ba_SAMD21J18A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_SAMD51G18A.bin b/bootloaders/zero/binaries/sam_ba_SAMD51G18A.bin new file mode 100644 index 000000000..0e97b0063 Binary files /dev/null and b/bootloaders/zero/binaries/sam_ba_SAMD51G18A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_SAMD51G19A.bin b/bootloaders/zero/binaries/sam_ba_SAMD51G19A.bin new file mode 100644 index 000000000..f1be3da87 Binary files /dev/null and b/bootloaders/zero/binaries/sam_ba_SAMD51G19A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_SAMD51J18A.bin b/bootloaders/zero/binaries/sam_ba_SAMD51J18A.bin new file mode 100644 index 000000000..6ef7a949c Binary files /dev/null and b/bootloaders/zero/binaries/sam_ba_SAMD51J18A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_SAMD51J19A.bin b/bootloaders/zero/binaries/sam_ba_SAMD51J19A.bin new file mode 100644 index 000000000..e576065b1 Binary files /dev/null and b/bootloaders/zero/binaries/sam_ba_SAMD51J19A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_SAMD51J20A.bin b/bootloaders/zero/binaries/sam_ba_SAMD51J20A.bin new file mode 100644 index 000000000..eb8c6f533 Binary files /dev/null and b/bootloaders/zero/binaries/sam_ba_SAMD51J20A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_SAMD51N19A.bin b/bootloaders/zero/binaries/sam_ba_SAMD51N19A.bin new file mode 100644 index 000000000..a8f306d47 Binary files /dev/null and b/bootloaders/zero/binaries/sam_ba_SAMD51N19A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_SAMD51N20A.bin b/bootloaders/zero/binaries/sam_ba_SAMD51N20A.bin new file mode 100644 index 000000000..692018b36 Binary files /dev/null and b/bootloaders/zero/binaries/sam_ba_SAMD51N20A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_SAMD51P19A.bin b/bootloaders/zero/binaries/sam_ba_SAMD51P19A.bin new file mode 100644 index 000000000..eccccfbc1 Binary files /dev/null and b/bootloaders/zero/binaries/sam_ba_SAMD51P19A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_SAMD51P20A.bin b/bootloaders/zero/binaries/sam_ba_SAMD51P20A.bin new file mode 100644 index 000000000..ad04d17d4 Binary files /dev/null and b/bootloaders/zero/binaries/sam_ba_SAMD51P20A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21E_SAML21E15B.bin b/bootloaders/zero/binaries/sam_ba_SAML21E15B.bin old mode 100755 new mode 100644 similarity index 76% rename from bootloaders/zero/binaries/sam_ba_Generic_x21E_SAML21E15B.bin rename to bootloaders/zero/binaries/sam_ba_SAML21E15B.bin index 4ebf8235b..7dcdab5d0 Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21E_SAML21E15B.bin and b/bootloaders/zero/binaries/sam_ba_SAML21E15B.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21G_SAML21G16B.bin b/bootloaders/zero/binaries/sam_ba_SAML21E16B.bin old mode 100755 new mode 100644 similarity index 76% rename from bootloaders/zero/binaries/sam_ba_Generic_x21G_SAML21G16B.bin rename to bootloaders/zero/binaries/sam_ba_SAML21E16B.bin index 5ef547df0..caea5f886 Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21G_SAML21G16B.bin and b/bootloaders/zero/binaries/sam_ba_SAML21E16B.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21G_SAML21G17B.bin b/bootloaders/zero/binaries/sam_ba_SAML21E17B.bin old mode 100755 new mode 100644 similarity index 76% rename from bootloaders/zero/binaries/sam_ba_Generic_x21G_SAML21G17B.bin rename to bootloaders/zero/binaries/sam_ba_SAML21E17B.bin index 520cbe521..1bbeffe2a Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21G_SAML21G17B.bin and b/bootloaders/zero/binaries/sam_ba_SAML21E17B.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21G_SAML21G18B.bin b/bootloaders/zero/binaries/sam_ba_SAML21E18B.bin old mode 100755 new mode 100644 similarity index 76% rename from bootloaders/zero/binaries/sam_ba_Generic_x21G_SAML21G18B.bin rename to bootloaders/zero/binaries/sam_ba_SAML21E18B.bin index 250925e3f..9a98db4ce Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21G_SAML21G18B.bin and b/bootloaders/zero/binaries/sam_ba_SAML21E18B.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21E_SAML21E16B.bin b/bootloaders/zero/binaries/sam_ba_SAML21G16B.bin old mode 100755 new mode 100644 similarity index 76% rename from bootloaders/zero/binaries/sam_ba_Generic_x21E_SAML21E16B.bin rename to bootloaders/zero/binaries/sam_ba_SAML21G16B.bin index bee695d67..a67096a72 Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21E_SAML21E16B.bin and b/bootloaders/zero/binaries/sam_ba_SAML21G16B.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21E_SAML21E17B.bin b/bootloaders/zero/binaries/sam_ba_SAML21G17B.bin old mode 100755 new mode 100644 similarity index 76% rename from bootloaders/zero/binaries/sam_ba_Generic_x21E_SAML21E17B.bin rename to bootloaders/zero/binaries/sam_ba_SAML21G17B.bin index c1bc533aa..d938686c9 Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21E_SAML21E17B.bin and b/bootloaders/zero/binaries/sam_ba_SAML21G17B.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21E_SAML21E18B.bin b/bootloaders/zero/binaries/sam_ba_SAML21G18B.bin old mode 100755 new mode 100644 similarity index 76% rename from bootloaders/zero/binaries/sam_ba_Generic_x21E_SAML21E18B.bin rename to bootloaders/zero/binaries/sam_ba_SAML21G18B.bin index 50ab886fe..12f72f741 Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21E_SAML21E18B.bin and b/bootloaders/zero/binaries/sam_ba_SAML21G18B.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21J_SAML21J16B.bin b/bootloaders/zero/binaries/sam_ba_SAML21J16B.bin old mode 100755 new mode 100644 similarity index 76% rename from bootloaders/zero/binaries/sam_ba_Generic_x21J_SAML21J16B.bin rename to bootloaders/zero/binaries/sam_ba_SAML21J16B.bin index c0bb0da37..6577cf054 Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21J_SAML21J16B.bin and b/bootloaders/zero/binaries/sam_ba_SAML21J16B.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21J_SAML21J17B.bin b/bootloaders/zero/binaries/sam_ba_SAML21J17B.bin old mode 100755 new mode 100644 similarity index 76% rename from bootloaders/zero/binaries/sam_ba_Generic_x21J_SAML21J17B.bin rename to bootloaders/zero/binaries/sam_ba_SAML21J17B.bin index 8d811daa2..6b0cf17dd Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21J_SAML21J17B.bin and b/bootloaders/zero/binaries/sam_ba_SAML21J17B.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Generic_x21J_SAML21J18B.bin b/bootloaders/zero/binaries/sam_ba_SAML21J18B.bin old mode 100755 new mode 100644 similarity index 76% rename from bootloaders/zero/binaries/sam_ba_Generic_x21J_SAML21J18B.bin rename to bootloaders/zero/binaries/sam_ba_SAML21J18B.bin index 18e90500c..1a0b1178b Binary files a/bootloaders/zero/binaries/sam_ba_Generic_x21J_SAML21J18B.bin and b/bootloaders/zero/binaries/sam_ba_SAML21J18B.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_Xeno_Mini_SAMC21G18A.bin b/bootloaders/zero/binaries/sam_ba_Xeno_Mini_SAMC21G18A.bin deleted file mode 100755 index 312982fe3..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_Xeno_Mini_SAMC21G18A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_Xeno_Mini_SAMD21G18A.bin b/bootloaders/zero/binaries/sam_ba_Xeno_Mini_SAMD21G18A.bin deleted file mode 100755 index 09a24d6ea..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_Xeno_Mini_SAMD21G18A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_Xeno_Mini_SAMD51G19A.bin b/bootloaders/zero/binaries/sam_ba_Xeno_Mini_SAMD51G19A.bin deleted file mode 100755 index 9f312e5a9..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_Xeno_Mini_SAMD51G19A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_Xeno_Mini_SAML21G18B.bin b/bootloaders/zero/binaries/sam_ba_Xeno_Mini_SAML21G18B.bin deleted file mode 100755 index 853202c25..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_Xeno_Mini_SAML21G18B.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_Xeno_SAMC21J18A.bin b/bootloaders/zero/binaries/sam_ba_Xeno_SAMC21J18A.bin deleted file mode 100755 index e2703b97f..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_Xeno_SAMC21J18A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_Xeno_SAMD21J18A.bin b/bootloaders/zero/binaries/sam_ba_Xeno_SAMD21J18A.bin deleted file mode 100755 index b3ec264fa..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_Xeno_SAMD21J18A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_Xeno_SAMD51J20A.bin b/bootloaders/zero/binaries/sam_ba_Xeno_SAMD51J20A.bin deleted file mode 100755 index 99ac30b77..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_Xeno_SAMD51J20A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_Xeno_SAML21J18B.bin b/bootloaders/zero/binaries/sam_ba_Xeno_SAML21J18B.bin deleted file mode 100755 index 71feed895..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_Xeno_SAML21J18B.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_arduino_m0_SAMD21G18A.bin b/bootloaders/zero/binaries/sam_ba_arduino_m0_SAMD21G18A.bin deleted file mode 100755 index 7e5a6d6f7..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_arduino_m0_SAMD21G18A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_arduino_m0_pro_SAMD21G18A.bin b/bootloaders/zero/binaries/sam_ba_arduino_m0_pro_SAMD21G18A.bin deleted file mode 100755 index 69114a5b6..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_arduino_m0_pro_SAMD21G18A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_arduino_mkr1000_SAMD21G18A.bin b/bootloaders/zero/binaries/sam_ba_arduino_mkr1000_SAMD21G18A.bin deleted file mode 100755 index e202db262..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_arduino_mkr1000_SAMD21G18A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_arduino_mkrfox1200_SAMD21G18A.bin b/bootloaders/zero/binaries/sam_ba_arduino_mkrfox1200_SAMD21G18A.bin deleted file mode 100755 index bf54b8ae9..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_arduino_mkrfox1200_SAMD21G18A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_arduino_mkrzero_SAMD21G18A.bin b/bootloaders/zero/binaries/sam_ba_arduino_mkrzero_SAMD21G18A.bin deleted file mode 100755 index eb92c57dc..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_arduino_mkrzero_SAMD21G18A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_arduino_zero_SAMD21G18A.bin b/bootloaders/zero/binaries/sam_ba_arduino_zero_SAMD21G18A.bin deleted file mode 100755 index b8d663f03..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_arduino_zero_SAMD21G18A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_genuino_mkr1000_SAMD21G18A.bin b/bootloaders/zero/binaries/sam_ba_genuino_mkr1000_SAMD21G18A.bin deleted file mode 100755 index 75bcc442f..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_genuino_mkr1000_SAMD21G18A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_genuino_zero_SAMD21G18A.bin b/bootloaders/zero/binaries/sam_ba_genuino_zero_SAMD21G18A.bin deleted file mode 100755 index e5fabf9d6..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_genuino_zero_SAMD21G18A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAMC21E18A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAMC21E18A.bin deleted file mode 100755 index 3e03b061d..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAMC21E18A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAML21E18B.bin b/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAML21E18B.bin deleted file mode 100755 index 308f2717e..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAML21E18B.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_MT_D11_SAMD11D14AM.bin b/bootloaders/zero/binaries/sam_ba_sdcard_MT_D11_SAMD11D14AM.bin deleted file mode 100755 index 8cefe0b89..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_MT_D11_SAMD11D14AM.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_MT_D21E_rev_A_SAMD21E17A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_MT_D21E_rev_A_SAMD21E17A.bin deleted file mode 100755 index a9d7ac6a9..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_MT_D21E_rev_A_SAMD21E17A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_MT_D21E_rev_A_SAMD21E18A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_MT_D21E_rev_A_SAMD21E18A.bin deleted file mode 100755 index b522e98a1..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_MT_D21E_rev_A_SAMD21E18A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_MT_D21E_rev_B_SAMD21E17A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_MT_D21E_rev_B_SAMD21E17A.bin deleted file mode 100755 index d0f393e79..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_MT_D21E_rev_B_SAMD21E17A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_MT_D21E_rev_B_SAMD21E18A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_MT_D21E_rev_B_SAMD21E18A.bin deleted file mode 100755 index 70a6bf3f5..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_MT_D21E_rev_B_SAMD21E18A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAMC21E15A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMC21E15A.bin old mode 100755 new mode 100644 similarity index 64% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAMC21E15A.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAMC21E15A.bin index 58f3a4052..9ea73f24c Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAMC21E15A.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMC21E15A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAMC21G16A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMC21E16A.bin old mode 100755 new mode 100644 similarity index 64% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAMC21G16A.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAMC21E16A.bin index 32207320a..6c857054c Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAMC21G16A.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMC21E16A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAMC21G17A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMC21E17A.bin old mode 100755 new mode 100644 similarity index 64% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAMC21G17A.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAMC21E17A.bin index dfee15a75..33c527d03 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAMC21G17A.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMC21E17A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAMC21G18A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMC21E18A.bin old mode 100755 new mode 100644 similarity index 64% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAMC21G18A.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAMC21E18A.bin index 69f457e72..143141092 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAMC21G18A.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMC21E18A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAMC21G15A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMC21G15A.bin old mode 100755 new mode 100644 similarity index 64% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAMC21G15A.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAMC21G15A.bin index 7984f6ffd..cd2d41479 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAMC21G15A.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMC21G15A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAMC21E16A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMC21G16A.bin old mode 100755 new mode 100644 similarity index 64% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAMC21E16A.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAMC21G16A.bin index a718a1d03..dabb15f0f Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAMC21E16A.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMC21G16A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAMC21J17A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMC21G17A.bin old mode 100755 new mode 100644 similarity index 64% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAMC21J17A.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAMC21G17A.bin index 8916dd16e..8b59c03b2 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAMC21J17A.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMC21G17A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAMC21J18A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMC21G18A.bin old mode 100755 new mode 100644 similarity index 64% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAMC21J18A.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAMC21G18A.bin index c76d7026c..6caa86030 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAMC21J18A.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMC21G18A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAMC21J15A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMC21J15A.bin old mode 100755 new mode 100644 similarity index 64% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAMC21J15A.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAMC21J15A.bin index c6797f965..772a84d35 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAMC21J15A.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMC21J15A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAMC21J16A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMC21J16A.bin old mode 100755 new mode 100644 similarity index 64% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAMC21J16A.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAMC21J16A.bin index fd76e5612..224717caa Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAMC21J16A.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMC21J16A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAMC21E17A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMC21J17A.bin old mode 100755 new mode 100644 similarity index 64% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAMC21E17A.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAMC21J17A.bin index bd8bf2d1a..8fac66f10 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAMC21E17A.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMC21J17A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_MT_D21E_rev_B_SAMC21E18A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMC21J18A.bin old mode 100755 new mode 100644 similarity index 64% rename from bootloaders/zero/binaries/sam_ba_sdcard_MT_D21E_rev_B_SAMC21E18A.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAMC21J18A.bin index 4a452f0fc..5aa3fc78e Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_MT_D21E_rev_B_SAMC21E18A.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMC21J18A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_D11C14A_SAMD11C14A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD11C14A.bin old mode 100755 new mode 100644 similarity index 79% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_D11C14A_SAMD11C14A.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAMD11C14A.bin index 26611fa36..06ef3c332 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_D11C14A_SAMD11C14A.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD11C14A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_D11D14AM_SAMD11D14AM.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD11D14AM.bin old mode 100755 new mode 100644 similarity index 79% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_D11D14AM_SAMD11D14AM.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAMD11D14AM.bin index 8cefe0b89..48a63731d Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_D11D14AM_SAMD11D14AM.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD11D14AM.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_D11D14AS_SAMD11D14AS.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD11D14AS.bin old mode 100755 new mode 100644 similarity index 79% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_D11D14AS_SAMD11D14AS.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAMD11D14AS.bin index 26611fa36..06ef3c332 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_D11D14AS_SAMD11D14AS.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD11D14AS.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAMD21E15A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD21E15A.bin old mode 100755 new mode 100644 similarity index 77% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAMD21E15A.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAMD21E15A.bin index 11c1fb564..16b6f95cd Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAMD21E15A.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD21E15A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAMD21E16A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD21E16A.bin old mode 100755 new mode 100644 similarity index 77% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAMD21E16A.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAMD21E16A.bin index a92826833..f7fe2d573 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAMD21E16A.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD21E16A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAMD21E17A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD21E17A.bin old mode 100755 new mode 100644 similarity index 77% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAMD21E17A.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAMD21E17A.bin index 2766d947c..da4667d3d Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAMD21E17A.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD21E17A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAMD21E18A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD21E18A.bin old mode 100755 new mode 100644 similarity index 77% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAMD21E18A.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAMD21E18A.bin index c5d8cfe67..e770a39c0 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAMD21E18A.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD21E18A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAMD21G15A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD21G15A.bin old mode 100755 new mode 100644 similarity index 77% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAMD21G15A.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAMD21G15A.bin index 7d6bbc2b1..08fd34a9c Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAMD21G15A.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD21G15A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAMD21G16A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD21G16A.bin old mode 100755 new mode 100644 similarity index 77% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAMD21G16A.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAMD21G16A.bin index cfe30b910..166a93584 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAMD21G16A.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD21G16A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAMD21G17A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD21G17A.bin old mode 100755 new mode 100644 similarity index 77% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAMD21G17A.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAMD21G17A.bin index dabdf123f..2af978d13 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAMD21G17A.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD21G17A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAMD21G18A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD21G18A.bin old mode 100755 new mode 100644 similarity index 77% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAMD21G18A.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAMD21G18A.bin index f0b405f9a..4b1b155f1 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAMD21G18A.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD21G18A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAMD21J15A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD21J15A.bin old mode 100755 new mode 100644 similarity index 77% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAMD21J15A.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAMD21J15A.bin index 394979922..c92b38fbd Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAMD21J15A.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD21J15A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAMD21J16A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD21J16A.bin old mode 100755 new mode 100644 similarity index 77% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAMD21J16A.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAMD21J16A.bin index 112f23a97..86090726e Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAMD21J16A.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD21J16A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAMD21J17A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD21J17A.bin old mode 100755 new mode 100644 similarity index 77% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAMD21J17A.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAMD21J17A.bin index 8a86c85ba..6d81c1155 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAMD21J17A.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD21J17A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAMD21J18A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD21J18A.bin old mode 100755 new mode 100644 similarity index 77% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAMD21J18A.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAMD21J18A.bin index fc69c2bc4..c3f3a122c Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAMD21J18A.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD21J18A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_SAMD51G18A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD51G18A.bin new file mode 100644 index 000000000..46d51773c Binary files /dev/null and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD51G18A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_SAMD51G19A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD51G19A.bin new file mode 100644 index 000000000..e084a8196 Binary files /dev/null and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD51G19A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_SAMD51J18A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD51J18A.bin new file mode 100644 index 000000000..daf004376 Binary files /dev/null and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD51J18A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_SAMD51J19A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD51J19A.bin new file mode 100644 index 000000000..1ede9790d Binary files /dev/null and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD51J19A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_SAMD51J20A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD51J20A.bin new file mode 100644 index 000000000..ee50b3417 Binary files /dev/null and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD51J20A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_SAMD51N19A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD51N19A.bin new file mode 100644 index 000000000..bf72e88f4 Binary files /dev/null and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD51N19A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_SAMD51N20A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD51N20A.bin new file mode 100644 index 000000000..0d944f634 Binary files /dev/null and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD51N20A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_SAMD51P19A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD51P19A.bin new file mode 100644 index 000000000..f10b370db Binary files /dev/null and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD51P19A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_SAMD51P20A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD51P20A.bin new file mode 100644 index 000000000..328872ef5 Binary files /dev/null and b/bootloaders/zero/binaries/sam_ba_sdcard_SAMD51P20A.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAML21E15B.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAML21E15B.bin old mode 100755 new mode 100644 similarity index 63% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAML21E15B.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAML21E15B.bin index a7440b128..008809e6c Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAML21E15B.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAML21E15B.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAML21G16B.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAML21E16B.bin old mode 100755 new mode 100644 similarity index 63% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAML21G16B.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAML21E16B.bin index a26ab27df..3a857ee6e Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAML21G16B.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAML21E16B.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAML21G17B.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAML21E17B.bin old mode 100755 new mode 100644 similarity index 63% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAML21G17B.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAML21E17B.bin index fe3cce90c..54bf26acf Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAML21G17B.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAML21E17B.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_MT_D21E_rev_B_SAML21E18B.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAML21E18B.bin old mode 100755 new mode 100644 similarity index 63% rename from bootloaders/zero/binaries/sam_ba_sdcard_MT_D21E_rev_B_SAML21E18B.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAML21E18B.bin index ee5a7a9c2..5ffa1cc93 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_MT_D21E_rev_B_SAML21E18B.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAML21E18B.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAML21E16B.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAML21G16B.bin old mode 100755 new mode 100644 similarity index 63% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAML21E16B.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAML21G16B.bin index 5194a2e5a..cf7a0fb28 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAML21E16B.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAML21G16B.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAML21E17B.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAML21G17B.bin old mode 100755 new mode 100644 similarity index 63% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAML21E17B.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAML21G17B.bin index bc6bbaea6..b0c81d9ef Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21E_SAML21E17B.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAML21G17B.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAML21G18B.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAML21G18B.bin old mode 100755 new mode 100644 similarity index 63% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAML21G18B.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAML21G18B.bin index fce3b5b33..c60914834 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21G_SAML21G18B.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAML21G18B.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAML21J16B.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAML21J16B.bin old mode 100755 new mode 100644 similarity index 63% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAML21J16B.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAML21J16B.bin index 9d9e77619..564950f7c Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAML21J16B.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAML21J16B.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAML21J17B.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAML21J17B.bin old mode 100755 new mode 100644 similarity index 63% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAML21J17B.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAML21J17B.bin index b11c060dc..4af9fe15d Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAML21J17B.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAML21J17B.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAML21J18B.bin b/bootloaders/zero/binaries/sam_ba_sdcard_SAML21J18B.bin old mode 100755 new mode 100644 similarity index 63% rename from bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAML21J18B.bin rename to bootloaders/zero/binaries/sam_ba_sdcard_SAML21J18B.bin index cb6a83989..c1709a803 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Generic_x21J_SAML21J18B.bin and b/bootloaders/zero/binaries/sam_ba_sdcard_SAML21J18B.bin differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Xeno_Mini_SAMC21G18A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_Xeno_Mini_SAMC21G18A.bin deleted file mode 100755 index cae8d5671..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Xeno_Mini_SAMC21G18A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Xeno_Mini_SAMD21G18A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_Xeno_Mini_SAMD21G18A.bin deleted file mode 100755 index e5478d524..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Xeno_Mini_SAMD21G18A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Xeno_Mini_SAMD51G19A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_Xeno_Mini_SAMD51G19A.bin deleted file mode 100755 index 1d93f815e..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Xeno_Mini_SAMD51G19A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Xeno_Mini_SAML21G18B.bin b/bootloaders/zero/binaries/sam_ba_sdcard_Xeno_Mini_SAML21G18B.bin deleted file mode 100755 index b78a310af..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Xeno_Mini_SAML21G18B.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Xeno_SAMC21J18A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_Xeno_SAMC21J18A.bin deleted file mode 100755 index 59e5e3e4b..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Xeno_SAMC21J18A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Xeno_SAMD21J18A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_Xeno_SAMD21J18A.bin deleted file mode 100755 index 37d9dacc7..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Xeno_SAMD21J18A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Xeno_SAMD51J20A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_Xeno_SAMD51J20A.bin deleted file mode 100755 index a95951f7e..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Xeno_SAMD51J20A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_Xeno_SAML21J18B.bin b/bootloaders/zero/binaries/sam_ba_sdcard_Xeno_SAML21J18B.bin deleted file mode 100755 index eff2d627a..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_Xeno_SAML21J18B.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_arduino_m0_SAMD21G18A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_arduino_m0_SAMD21G18A.bin deleted file mode 100755 index 9f8ec856d..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_arduino_m0_SAMD21G18A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_arduino_m0_pro_SAMD21G18A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_arduino_m0_pro_SAMD21G18A.bin deleted file mode 100755 index 57ea57743..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_arduino_m0_pro_SAMD21G18A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_arduino_mkr1000_SAMD21G18A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_arduino_mkr1000_SAMD21G18A.bin deleted file mode 100755 index 9388e0837..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_arduino_mkr1000_SAMD21G18A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_arduino_mkrfox1200_SAMD21G18A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_arduino_mkrfox1200_SAMD21G18A.bin deleted file mode 100755 index 304f8f8ea..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_arduino_mkrfox1200_SAMD21G18A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_arduino_mkrzero_SAMD21G18A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_arduino_mkrzero_SAMD21G18A.bin deleted file mode 100755 index 3af556369..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_arduino_mkrzero_SAMD21G18A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_arduino_zero_SAMD21G18A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_arduino_zero_SAMD21G18A.bin deleted file mode 100755 index eeef76fcb..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_arduino_zero_SAMD21G18A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_genuino_mkr1000_SAMD21G18A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_genuino_mkr1000_SAMD21G18A.bin deleted file mode 100755 index 5e8afe21a..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_genuino_mkr1000_SAMD21G18A.bin and /dev/null differ diff --git a/bootloaders/zero/binaries/sam_ba_sdcard_genuino_zero_SAMD21G18A.bin b/bootloaders/zero/binaries/sam_ba_sdcard_genuino_zero_SAMD21G18A.bin deleted file mode 100755 index 2f0388eca..000000000 Binary files a/bootloaders/zero/binaries/sam_ba_sdcard_genuino_zero_SAMD21G18A.bin and /dev/null differ diff --git a/bootloaders/zero/board_definitions.h b/bootloaders/zero/board_definitions.h index 3840496bd..80bb50668 100644 --- a/bootloaders/zero/board_definitions.h +++ b/bootloaders/zero/board_definitions.h @@ -2,6 +2,7 @@ Copyright (c) 2015 Arduino LLC. All right reserved. Copyright (c) 2015 Atmel Corporation/Thibaut VIARD. All right reserved. Copyright (c) 2017 MattairTech LLC. All right reserved. + Copyright (c) 2020 Fab Foundation All right reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -20,44 +21,26 @@ #include -#if defined(BOARD_ID_arduino_zero) - #include "board_definitions/board_definitions_arduino_zero.h" -#elif defined(BOARD_ID_genuino_zero) - #include "board_definitions/board_definitions_genuino_zero.h" -#elif defined(BOARD_ID_arduino_mkr1000) - #include "board_definitions/board_definitions_arduino_mkr1000.h" -#elif defined(BOARD_ID_genuino_mkr1000) - #include "board_definitions/board_definitions_genuino_mkr1000.h" -#elif defined(BOARD_ID_arduino_mkrzero) - #include "board_definitions/board_definitions_arduino_mkrzero.h" -#elif defined(BOARD_ID_arduino_mkrfox1200) - #include "board_definitions/board_definitions_arduino_mkrfox1200.h" -#elif defined(BOARD_ID_Xeno) - #include "board_definitions/board_definitions_Xeno.h" -#elif defined(BOARD_ID_Xeno_Mini) - #include "board_definitions/board_definitions_Xeno_Mini.h" -#elif defined(BOARD_ID_MT_D21E_rev_A) - #include "board_definitions/board_definitions_MT_D21E_rev_A.h" -#elif defined(BOARD_ID_MT_D21E_rev_B) - #include "board_definitions/board_definitions_MT_D21E_rev_B.h" -#elif defined(BOARD_ID_MT_D11) - #include "board_definitions/board_definitions_MT_D11.h" -#elif defined(BOARD_ID_Generic_x21E) +#if defined(BOARD_ID_Generic_x21E) #include "board_definitions/board_definitions_Generic_x21E.h" #elif defined(BOARD_ID_Generic_x21G) #include "board_definitions/board_definitions_Generic_x21G.h" #elif defined(BOARD_ID_Generic_x21J) #include "board_definitions/board_definitions_Generic_x21J.h" +#elif defined(BOARD_ID_Generic_D51G) + #include "board_definitions/board_definitions_Generic_D51G.h" +#elif defined(BOARD_ID_Generic_D51J) + #include "board_definitions/board_definitions_Generic_D51J.h" +#elif defined(BOARD_ID_Generic_D51N) + #include "board_definitions/board_definitions_Generic_D51N.h" +#elif defined(BOARD_ID_Generic_D51P) + #include "board_definitions/board_definitions_Generic_D51P.h" #elif defined(BOARD_ID_Generic_D11D14AM) #include "board_definitions/board_definitions_Generic_D11D14AM.h" #elif defined(BOARD_ID_Generic_D11D14AS) #include "board_definitions/board_definitions_Generic_D11D14AS.h" #elif defined(BOARD_ID_Generic_D11C14A) #include "board_definitions/board_definitions_Generic_D11C14A.h" -#elif defined(BOARD_ID_arduino_m0) - #include "board_definitions/board_definitions_arduino_m0.h" -#elif defined(BOARD_ID_arduino_m0_pro) - #include "board_definitions/board_definitions_arduino_m0_pro.h" #else #error You must define a BOARD_ID and add the corresponding definitions in board_definitions.h #endif @@ -125,7 +108,7 @@ #elif (SAML21 || SAMC21 || SAMD51) #define BOOT_DOUBLE_TAP_ADDRESS (HSRAM_ADDR + HSRAM_SIZE - 4) #else - #error "board_definitions.h: Missing dependency or unsupported chip. Please install CMSIS-Atmel from MattairTech (see Prerequisites for Building in README.md)." + #error "board_definitions.h: Missing dependency or unsupported chip. Please install CMSIS-Atmel (see Prerequisites for Building in README.md)." #endif #define BOOT_DOUBLE_TAP_DATA (*((volatile uint32_t *) BOOT_DOUBLE_TAP_ADDRESS)) diff --git a/bootloaders/zero/board_definitions/board_definitions_Generic_D11C14A.h b/bootloaders/zero/board_definitions/board_definitions_Generic_D11C14A.h index 2129c2f3c..325c8c7aa 100644 --- a/bootloaders/zero/board_definitions/board_definitions_Generic_D11C14A.h +++ b/bootloaders/zero/board_definitions/board_definitions_Generic_D11C14A.h @@ -197,13 +197,13 @@ * Size: ~228B. By default, USB_VENDOR_STRINGS_ENABLED is defined (including 4KB). */ #define USB_VENDOR_STRINGS_ENABLED -#define STRING_MANUFACTURER "MattairTech LLC" +#define STRING_MANUFACTURER "Fab Foundation" #define STRING_PRODUCT "Generic SAMD11C14A" /* If USB CDC is used, then the USB vendor ID (VID) and product ID (PID) must be set. */ #define USB_VID_HIGH 0x16 #define USB_VID_LOW 0xD0 -#define USB_PID_HIGH 0x05 +#define USB_PID_HIGH 0x15 #define USB_PID_LOW 0x57 /* BOOT_USART_SERCOM_INSTANCE must be a single digit representing the SERCOM number. diff --git a/bootloaders/zero/board_definitions/board_definitions_Generic_D11D14AM.h b/bootloaders/zero/board_definitions/board_definitions_Generic_D11D14AM.h index fd4c52615..579bc5ce8 100644 --- a/bootloaders/zero/board_definitions/board_definitions_Generic_D11D14AM.h +++ b/bootloaders/zero/board_definitions/board_definitions_Generic_D11D14AM.h @@ -197,13 +197,13 @@ * Size: ~228B. By default, USB_VENDOR_STRINGS_ENABLED is defined (including 4KB). */ #define USB_VENDOR_STRINGS_ENABLED -#define STRING_MANUFACTURER "MattairTech LLC" +#define STRING_MANUFACTURER "Fab Foundation" #define STRING_PRODUCT "Generic SAMD11D14AM" /* If USB CDC is used, then the USB vendor ID (VID) and product ID (PID) must be set. */ #define USB_VID_HIGH 0x16 #define USB_VID_LOW 0xD0 -#define USB_PID_HIGH 0x05 +#define USB_PID_HIGH 0x35 #define USB_PID_LOW 0x57 /* BOOT_USART_SERCOM_INSTANCE must be a single digit representing the SERCOM number. diff --git a/bootloaders/zero/board_definitions/board_definitions_Generic_D11D14AS.h b/bootloaders/zero/board_definitions/board_definitions_Generic_D11D14AS.h index 7bc6334ae..463b78889 100644 --- a/bootloaders/zero/board_definitions/board_definitions_Generic_D11D14AS.h +++ b/bootloaders/zero/board_definitions/board_definitions_Generic_D11D14AS.h @@ -197,13 +197,13 @@ * Size: ~228B. By default, USB_VENDOR_STRINGS_ENABLED is defined (including 4KB). */ #define USB_VENDOR_STRINGS_ENABLED -#define STRING_MANUFACTURER "MattairTech LLC" +#define STRING_MANUFACTURER "Fab Foundation" #define STRING_PRODUCT "Generic SAMD11D14AS" /* If USB CDC is used, then the USB vendor ID (VID) and product ID (PID) must be set. */ #define USB_VID_HIGH 0x16 #define USB_VID_LOW 0xD0 -#define USB_PID_HIGH 0x05 +#define USB_PID_HIGH 0x25 #define USB_PID_LOW 0x57 /* BOOT_USART_SERCOM_INSTANCE must be a single digit representing the SERCOM number. diff --git a/bootloaders/zero/board_definitions/board_definitions_MT_D21E_rev_B.h b/bootloaders/zero/board_definitions/board_definitions_Generic_D51G.h similarity index 92% rename from bootloaders/zero/board_definitions/board_definitions_MT_D21E_rev_B.h rename to bootloaders/zero/board_definitions/board_definitions_Generic_D51G.h index 34d70752f..c6ceb7f6d 100644 --- a/bootloaders/zero/board_definitions/board_definitions_MT_D21E_rev_B.h +++ b/bootloaders/zero/board_definitions/board_definitions_Generic_D51G.h @@ -50,12 +50,13 @@ * When using SDCARD_USE_PIN1 or SDCARD_USE_PIN2, the SPI peripheral and * associated pins are only initialized if either pin is active. */ -#define SDCARD_SPI_SERCOM_INSTANCE 3 +#define SDCARD_SPI_SERCOM_INSTANCE 1 #define SDCARD_SPI_PAD_SETTINGS SPI_RX_PAD0_TX_PAD2_SCK_PAD3 -#define SDCARD_SPI_PAD0 PINMUX_PA22C_SERCOM3_PAD0 +#define SDCARD_SPI_PAD0 PINMUX_PA16C_SERCOM1_PAD0 #define SDCARD_SPI_PAD1 PINMUX_UNUSED -#define SDCARD_SPI_PAD2 PINMUX_PA18D_SERCOM3_PAD2 -#define SDCARD_SPI_PAD3 PINMUX_PA19D_SERCOM3_PAD3 +#define SDCARD_SPI_PAD2 PINMUX_PA18C_SERCOM1_PAD2 +#define SDCARD_SPI_PAD3 PINMUX_PA19C_SERCOM1_PAD3 + /* If SDCARD_ENABLED is defined, then SDCARD_SPI_CS_PORT and SDCARD_SPI_CS_PIN * must also be defined. PORT can be 0 (Port A) or 1 (Port B). @@ -115,11 +116,7 @@ * lacks USB, so set to SAM_BA_UART_ONLY in this case. By default, * SAM_BA_USBCDC_ONLY is set (SAM_BA_UART_ONLY with the C21). */ -#if (SAMC21) - #define SAM_BA_INTERFACE SAM_BA_UART_ONLY -#else - #define SAM_BA_INTERFACE SAM_BA_USBCDC_ONLY -#endif +#define SAM_BA_INTERFACE SAM_BA_USBCDC_ONLY /* If SAM_BA_INTERFACE_USE_PIN is defined, then the associated pin controls which * SAM-BA interface is used (if SAM_BA_BOTH_INTERFACES is defined). If only one @@ -150,7 +147,7 @@ * IDE or the bossac tool standalone. Set to 0 with 4KB bootloaders. * Size: ~904B. This is defined and set to 1 by default (except with 4KB). */ -#define ARDUINO_EXTENDED_CAPABILITIES 1 +#define ARDUINO_EXTENDED_CAPABILITIES 1 /* The clock source must be chosen by setting CLOCKCONFIG_CLOCK_SOURCE to * CLOCKCONFIG_32768HZ_CRYSTAL, CLOCKCONFIG_HS_CRYSTAL, CLOCKCONFIG_INTERNAL, @@ -165,11 +162,7 @@ * not suspended), where it will calibrate against the USB SOF signal. */ #ifndef CLOCKCONFIG_CLOCK_SOURCE - #if (SAMC21) - #define CLOCKCONFIG_CLOCK_SOURCE CLOCKCONFIG_INTERNAL - #else - #define CLOCKCONFIG_CLOCK_SOURCE CLOCKCONFIG_INTERNAL_USB - #endif + #define CLOCKCONFIG_CLOCK_SOURCE CLOCKCONFIG_INTERNAL_USB #endif /* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ @@ -195,7 +188,8 @@ /* Master clock frequency (also Fcpu frequency). With the D51, * this can be either 120000000ul or 48000000ul. See README.md. */ -#define VARIANT_MCK (48000000ul) +#define VARIANT_MCK (120000000ul) +//#define VARIANT_MCK (48000000ul) /* The fine calibration value for DFLL open-loop mode is defined here. * The coarse calibration value is loaded from NVM OTP (factory calibration values). @@ -207,19 +201,13 @@ * Size: ~228B. By default, USB_VENDOR_STRINGS_ENABLED is defined (including 4KB). */ #define USB_VENDOR_STRINGS_ENABLED -#define STRING_MANUFACTURER "MattairTech LLC" -#if (SAMD21) - #define STRING_PRODUCT "MT-D21E Rev B D21" -#elif (SAML21) - #define STRING_PRODUCT "MT-D21E Rev B L21" -#elif (SAMC21) - #define STRING_PRODUCT "MT-D21E Rev B C21" -#endif +#define STRING_MANUFACTURER "Fab Foundation" +#define STRING_PRODUCT "Generic SAMD51G" /* If USB CDC is used, then the USB vendor ID (VID) and product ID (PID) must be set. */ #define USB_VID_HIGH 0x16 #define USB_VID_LOW 0xD0 -#define USB_PID_HIGH 0x05 +#define USB_PID_HIGH 0x75 #define USB_PID_LOW 0x57 /* BOOT_USART_SERCOM_INSTANCE must be a single digit representing the SERCOM number. @@ -270,9 +258,15 @@ * Polarity can be either LED_POLARITY_HIGH_ON or LED_POLARITY_LOW_ON. * By default, only BOARD_LED is enabled. */ -#define BOARD_LED_PORT (0) -#define BOARD_LED_PIN (6) -#define BOARD_LED_POLARITY LED_POLARITY_HIGH_ON +#if defined(SDCARD_ENABLED) + #define BOARD_LED_PORT (0) + #define BOARD_LED_PIN (6) + #define BOARD_LED_POLARITY LED_POLARITY_HIGH_ON +#else + //#define BOARD_LED_PORT (0) + //#define BOARD_LED_PIN (6) + //#define BOARD_LED_POLARITY LED_POLARITY_HIGH_ON +#endif //#define BOARD_LEDRX_PORT (0) //#define BOARD_LEDRX_PIN (6) diff --git a/bootloaders/zero/board_definitions/board_definitions_MT_D21E_rev_A.h b/bootloaders/zero/board_definitions/board_definitions_Generic_D51J.h similarity index 91% rename from bootloaders/zero/board_definitions/board_definitions_MT_D21E_rev_A.h rename to bootloaders/zero/board_definitions/board_definitions_Generic_D51J.h index 15034bf9a..1dd8f1bf4 100644 --- a/bootloaders/zero/board_definitions/board_definitions_MT_D21E_rev_A.h +++ b/bootloaders/zero/board_definitions/board_definitions_Generic_D51J.h @@ -50,12 +50,12 @@ * When using SDCARD_USE_PIN1 or SDCARD_USE_PIN2, the SPI peripheral and * associated pins are only initialized if either pin is active. */ -#define SDCARD_SPI_SERCOM_INSTANCE 3 +#define SDCARD_SPI_SERCOM_INSTANCE 1 #define SDCARD_SPI_PAD_SETTINGS SPI_RX_PAD0_TX_PAD2_SCK_PAD3 -#define SDCARD_SPI_PAD0 PINMUX_PA22C_SERCOM3_PAD0 +#define SDCARD_SPI_PAD0 PINMUX_PA16C_SERCOM1_PAD0 #define SDCARD_SPI_PAD1 PINMUX_UNUSED -#define SDCARD_SPI_PAD2 PINMUX_PA18D_SERCOM3_PAD2 -#define SDCARD_SPI_PAD3 PINMUX_PA19D_SERCOM3_PAD3 +#define SDCARD_SPI_PAD2 PINMUX_PA18C_SERCOM1_PAD2 +#define SDCARD_SPI_PAD3 PINMUX_PA19C_SERCOM1_PAD3 /* If SDCARD_ENABLED is defined, then SDCARD_SPI_CS_PORT and SDCARD_SPI_CS_PIN * must also be defined. PORT can be 0 (Port A) or 1 (Port B). @@ -115,7 +115,7 @@ * lacks USB, so set to SAM_BA_UART_ONLY in this case. By default, * SAM_BA_USBCDC_ONLY is set (SAM_BA_UART_ONLY with the C21). */ -#define SAM_BA_INTERFACE SAM_BA_USBCDC_ONLY +#define SAM_BA_INTERFACE SAM_BA_USBCDC_ONLY /* If SAM_BA_INTERFACE_USE_PIN is defined, then the associated pin controls which * SAM-BA interface is used (if SAM_BA_BOTH_INTERFACES is defined). If only one @@ -146,7 +146,7 @@ * IDE or the bossac tool standalone. Set to 0 with 4KB bootloaders. * Size: ~904B. This is defined and set to 1 by default (except with 4KB). */ -#define ARDUINO_EXTENDED_CAPABILITIES 1 +#define ARDUINO_EXTENDED_CAPABILITIES 1 /* The clock source must be chosen by setting CLOCKCONFIG_CLOCK_SOURCE to * CLOCKCONFIG_32768HZ_CRYSTAL, CLOCKCONFIG_HS_CRYSTAL, CLOCKCONFIG_INTERNAL, @@ -161,7 +161,7 @@ * not suspended), where it will calibrate against the USB SOF signal. */ #ifndef CLOCKCONFIG_CLOCK_SOURCE -#define CLOCKCONFIG_CLOCK_SOURCE CLOCKCONFIG_INTERNAL_USB + #define CLOCKCONFIG_CLOCK_SOURCE CLOCKCONFIG_INTERNAL_USB #endif /* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ @@ -187,7 +187,8 @@ /* Master clock frequency (also Fcpu frequency). With the D51, * this can be either 120000000ul or 48000000ul. See README.md. */ -#define VARIANT_MCK (48000000ul) +#define VARIANT_MCK (120000000ul) +//#define VARIANT_MCK (48000000ul) /* The fine calibration value for DFLL open-loop mode is defined here. * The coarse calibration value is loaded from NVM OTP (factory calibration values). @@ -199,13 +200,13 @@ * Size: ~228B. By default, USB_VENDOR_STRINGS_ENABLED is defined (including 4KB). */ #define USB_VENDOR_STRINGS_ENABLED -#define STRING_MANUFACTURER "MattairTech LLC" -#define STRING_PRODUCT "MT-D21E Rev A" +#define STRING_MANUFACTURER "Fab Foundation" +#define STRING_PRODUCT "Generic SAMD51J" /* If USB CDC is used, then the USB vendor ID (VID) and product ID (PID) must be set. */ #define USB_VID_HIGH 0x16 #define USB_VID_LOW 0xD0 -#define USB_PID_HIGH 0x05 +#define USB_PID_HIGH 0x85 #define USB_PID_LOW 0x57 /* BOOT_USART_SERCOM_INSTANCE must be a single digit representing the SERCOM number. @@ -256,16 +257,22 @@ * Polarity can be either LED_POLARITY_HIGH_ON or LED_POLARITY_LOW_ON. * By default, only BOARD_LED is enabled. */ -#define BOARD_LED_PORT (0) -#define BOARD_LED_PIN (28) -#define BOARD_LED_POLARITY LED_POLARITY_HIGH_ON +#if defined(SDCARD_ENABLED) + #define BOARD_LED_PORT (0) + #define BOARD_LED_PIN (6) + #define BOARD_LED_POLARITY LED_POLARITY_HIGH_ON +#else + //#define BOARD_LED_PORT (0) + //#define BOARD_LED_PIN (6) + //#define BOARD_LED_POLARITY LED_POLARITY_HIGH_ON +#endif -//#define BOARD_LEDRX_PORT (0) -//#define BOARD_LEDRX_PIN (28) +//#define BOARD_LEDRX_PORT (1) +//#define BOARD_LEDRX_PIN (2) //#define BOARD_LEDRX_POLARITY LED_POLARITY_HIGH_ON -//#define BOARD_LEDTX_PORT (0) -//#define BOARD_LEDTX_PIN (28) +//#define BOARD_LEDTX_PORT (1) +//#define BOARD_LEDTX_PIN (2) //#define BOARD_LEDTX_POLARITY LED_POLARITY_HIGH_ON #endif // _BOARD_DEFINITIONS_H_ diff --git a/bootloaders/zero/board_definitions/board_definitions_Generic_D51N.h b/bootloaders/zero/board_definitions/board_definitions_Generic_D51N.h index 8b2a105b6..d65a99fa3 100644 --- a/bootloaders/zero/board_definitions/board_definitions_Generic_D51N.h +++ b/bootloaders/zero/board_definitions/board_definitions_Generic_D51N.h @@ -115,11 +115,7 @@ * lacks USB, so set to SAM_BA_UART_ONLY in this case. By default, * SAM_BA_USBCDC_ONLY is set (SAM_BA_UART_ONLY with the C21). */ -#if (SAMC21) - #define SAM_BA_INTERFACE SAM_BA_UART_ONLY -#else - #define SAM_BA_INTERFACE SAM_BA_USBCDC_ONLY -#endif +#define SAM_BA_INTERFACE SAM_BA_USBCDC_ONLY /* If SAM_BA_INTERFACE_USE_PIN is defined, then the associated pin controls which * SAM-BA interface is used (if SAM_BA_BOTH_INTERFACES is defined). If only one @@ -165,11 +161,7 @@ * not suspended), where it will calibrate against the USB SOF signal. */ #ifndef CLOCKCONFIG_CLOCK_SOURCE - #if (SAMC21) - #define CLOCKCONFIG_CLOCK_SOURCE CLOCKCONFIG_INTERNAL - #else - #define CLOCKCONFIG_CLOCK_SOURCE CLOCKCONFIG_INTERNAL_USB - #endif + #define CLOCKCONFIG_CLOCK_SOURCE CLOCKCONFIG_INTERNAL_USB #endif /* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ @@ -208,13 +200,13 @@ * Size: ~228B. By default, USB_VENDOR_STRINGS_ENABLED is defined (including 4KB). */ #define USB_VENDOR_STRINGS_ENABLED -#define STRING_MANUFACTURER "MattairTech LLC" +#define STRING_MANUFACTURER "Fab Foundation" #define STRING_PRODUCT "Generic SAMD51N" /* If USB CDC is used, then the USB vendor ID (VID) and product ID (PID) must be set. */ #define USB_VID_HIGH 0x16 #define USB_VID_LOW 0xD0 -#define USB_PID_HIGH 0x05 +#define USB_PID_HIGH 0x95 #define USB_PID_LOW 0x57 /* BOOT_USART_SERCOM_INSTANCE must be a single digit representing the SERCOM number. diff --git a/bootloaders/zero/board_definitions/board_definitions_Generic_D51P.h b/bootloaders/zero/board_definitions/board_definitions_Generic_D51P.h index b7c0ff9d7..3b5150fed 100644 --- a/bootloaders/zero/board_definitions/board_definitions_Generic_D51P.h +++ b/bootloaders/zero/board_definitions/board_definitions_Generic_D51P.h @@ -115,11 +115,7 @@ * lacks USB, so set to SAM_BA_UART_ONLY in this case. By default, * SAM_BA_USBCDC_ONLY is set (SAM_BA_UART_ONLY with the C21). */ -#if (SAMC21) - #define SAM_BA_INTERFACE SAM_BA_UART_ONLY -#else - #define SAM_BA_INTERFACE SAM_BA_USBCDC_ONLY -#endif +#define SAM_BA_INTERFACE SAM_BA_USBCDC_ONLY /* If SAM_BA_INTERFACE_USE_PIN is defined, then the associated pin controls which * SAM-BA interface is used (if SAM_BA_BOTH_INTERFACES is defined). If only one @@ -165,11 +161,7 @@ * not suspended), where it will calibrate against the USB SOF signal. */ #ifndef CLOCKCONFIG_CLOCK_SOURCE - #if (SAMC21) - #define CLOCKCONFIG_CLOCK_SOURCE CLOCKCONFIG_INTERNAL - #else - #define CLOCKCONFIG_CLOCK_SOURCE CLOCKCONFIG_INTERNAL_USB - #endif + #define CLOCKCONFIG_CLOCK_SOURCE CLOCKCONFIG_INTERNAL_USB #endif /* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ @@ -208,13 +200,13 @@ * Size: ~228B. By default, USB_VENDOR_STRINGS_ENABLED is defined (including 4KB). */ #define USB_VENDOR_STRINGS_ENABLED -#define STRING_MANUFACTURER "MattairTech LLC" +#define STRING_MANUFACTURER "Fab Foundation" #define STRING_PRODUCT "Generic SAMD51P" /* If USB CDC is used, then the USB vendor ID (VID) and product ID (PID) must be set. */ #define USB_VID_HIGH 0x16 #define USB_VID_LOW 0xD0 -#define USB_PID_HIGH 0x05 +#define USB_PID_HIGH 0xA5 #define USB_PID_LOW 0x57 /* BOOT_USART_SERCOM_INSTANCE must be a single digit representing the SERCOM number. diff --git a/bootloaders/zero/board_definitions/board_definitions_Generic_x21E.h b/bootloaders/zero/board_definitions/board_definitions_Generic_x21E.h index d6f5d62f2..c957a209b 100644 --- a/bootloaders/zero/board_definitions/board_definitions_Generic_x21E.h +++ b/bootloaders/zero/board_definitions/board_definitions_Generic_x21E.h @@ -207,13 +207,13 @@ * Size: ~228B. By default, USB_VENDOR_STRINGS_ENABLED is defined (including 4KB). */ #define USB_VENDOR_STRINGS_ENABLED -#define STRING_MANUFACTURER "MattairTech LLC" +#define STRING_MANUFACTURER "Fab Foundation" #define STRING_PRODUCT "Generic SAMx21E" /* If USB CDC is used, then the USB vendor ID (VID) and product ID (PID) must be set. */ #define USB_VID_HIGH 0x16 #define USB_VID_LOW 0xD0 -#define USB_PID_HIGH 0x05 +#define USB_PID_HIGH 0x45 #define USB_PID_LOW 0x57 /* BOOT_USART_SERCOM_INSTANCE must be a single digit representing the SERCOM number. diff --git a/bootloaders/zero/board_definitions/board_definitions_Generic_xx1G.h b/bootloaders/zero/board_definitions/board_definitions_Generic_x21G.h similarity index 97% rename from bootloaders/zero/board_definitions/board_definitions_Generic_xx1G.h rename to bootloaders/zero/board_definitions/board_definitions_Generic_x21G.h index a93d61769..38acf7c90 100644 --- a/bootloaders/zero/board_definitions/board_definitions_Generic_xx1G.h +++ b/bootloaders/zero/board_definitions/board_definitions_Generic_x21G.h @@ -221,21 +221,13 @@ * Size: ~228B. By default, USB_VENDOR_STRINGS_ENABLED is defined (including 4KB). */ #define USB_VENDOR_STRINGS_ENABLED -#define STRING_MANUFACTURER "MattairTech LLC" -#if (SAMD21) - #define STRING_PRODUCT "Generic SAMxx1G D21" -#elif (SAML21) - #define STRING_PRODUCT "Generic SAMxx1G L21" -#elif (SAMC21) - #define STRING_PRODUCT "Generic SAMxx1G C21" -#elif (SAMD51) - #define STRING_PRODUCT "Generic SAMxx1G D51" -#endif +#define STRING_MANUFACTURER "Fab Foundation" +#define STRING_PRODUCT "Generic SAMx21G" /* If USB CDC is used, then the USB vendor ID (VID) and product ID (PID) must be set. */ #define USB_VID_HIGH 0x16 #define USB_VID_LOW 0xD0 -#define USB_PID_HIGH 0x05 +#define USB_PID_HIGH 0x55 #define USB_PID_LOW 0x57 /* BOOT_USART_SERCOM_INSTANCE must be a single digit representing the SERCOM number. diff --git a/bootloaders/zero/board_definitions/board_definitions_Generic_xx1J.h b/bootloaders/zero/board_definitions/board_definitions_Generic_x21J.h similarity index 97% rename from bootloaders/zero/board_definitions/board_definitions_Generic_xx1J.h rename to bootloaders/zero/board_definitions/board_definitions_Generic_x21J.h index bed520199..2b2ea7143 100644 --- a/bootloaders/zero/board_definitions/board_definitions_Generic_xx1J.h +++ b/bootloaders/zero/board_definitions/board_definitions_Generic_x21J.h @@ -221,21 +221,13 @@ * Size: ~228B. By default, USB_VENDOR_STRINGS_ENABLED is defined (including 4KB). */ #define USB_VENDOR_STRINGS_ENABLED -#define STRING_MANUFACTURER "MattairTech LLC" -#if (SAMD21) - #define STRING_PRODUCT "Generic SAMxx1J D21" -#elif (SAML21) - #define STRING_PRODUCT "Generic SAMxx1J L21" -#elif (SAMC21) - #define STRING_PRODUCT "Generic SAMxx1J C21" -#elif (SAMD51) - #define STRING_PRODUCT "Generic SAMxx1J D51" -#endif +#define STRING_MANUFACTURER "Fab Foundation" +#define STRING_PRODUCT "Generic SAMx21J" /* If USB CDC is used, then the USB vendor ID (VID) and product ID (PID) must be set. */ #define USB_VID_HIGH 0x16 #define USB_VID_LOW 0xD0 -#define USB_PID_HIGH 0x05 +#define USB_PID_HIGH 0x65 #define USB_PID_LOW 0x57 /* BOOT_USART_SERCOM_INSTANCE must be a single digit representing the SERCOM number. diff --git a/bootloaders/zero/board_definitions/board_definitions_MT_D11.h b/bootloaders/zero/board_definitions/board_definitions_MT_D11.h deleted file mode 100644 index c90ee5b83..000000000 --- a/bootloaders/zero/board_definitions/board_definitions_MT_D11.h +++ /dev/null @@ -1,269 +0,0 @@ -/* - Copyright (c) 2017 MattairTech LLC. All right reserved. - Copyright (c) 2015 Arduino LLC. All right reserved. - Copyright (c) 2015 Atmel Corporation/Thibaut VIARD. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#ifndef _BOARD_DEFINITIONS_H_ -#define _BOARD_DEFINITIONS_H_ - -#include - -/* The SAM-BA interface, which is used with both USB CDC and UART (TTL - * serial), can operate in either binary (default) or terminal mode. If - * TERMINAL_MODE_ENABLED is defined, additional terminal handling code - * (add prompt, add \n\r to EOL, number formatting, etc.) will be compiled - * in. To switch to terminal mode, type 'T#' (you should then see a prompt). - * Then, type 'V#' to show version information. See README.md for more commands. - * Size: ~228B. Enabled by default. Disable with 4KB bootloader. - */ -//#define TERMINAL_MODE_ENABLED - -/* If SDCARD_ENABLED is defined, SD card bootloader support is compiled in. - * See "SD Card Bootloader" section. This define can also be set from the - * makefile (so it can be used with the build_all_bootloaders.sh script). - * Size: ~2788B. Disabled by default. Available with 4KB bootloader. - */ -#ifndef SDCARD_ENABLED -//#define SDCARD_ENABLED -#endif - -/* If SDCARD_ENABLED is defined, then all SDCARD_SPI_* defines must also be set. - * When setting SDCARD_SPI_PADx defines, consult the appropriate header file - * from CMSIS-Atmel (ie: ~/arduino15/packages/MattairTech_Arduino/tools/CMSIS- - * Atmel/1.0.0-mattairtech-2/CMSIS/Device/ATMEL/sam/include/ - * .h). SDCARD_SPI_PAD_SETTINGS values are in SDCard/diskio.h. - * When using SDCARD_USE_PIN1 or SDCARD_USE_PIN2, the SPI peripheral and - * associated pins are only initialized if either pin is active. - */ -#define SDCARD_SPI_SERCOM_INSTANCE 0 -#define SDCARD_SPI_PAD_SETTINGS SPI_RX_PAD0_TX_PAD2_SCK_PAD3 -#define SDCARD_SPI_PAD0 PINMUX_PA14C_SERCOM0_PAD0 -#define SDCARD_SPI_PAD1 PINMUX_UNUSED -#define SDCARD_SPI_PAD2 PINMUX_PA10C_SERCOM0_PAD2 -#define SDCARD_SPI_PAD3 PINMUX_PA11C_SERCOM0_PAD3 - -/* If SDCARD_ENABLED is defined, then SDCARD_SPI_CS_PORT and SDCARD_SPI_CS_PIN - * must also be defined. PORT can be 0 (Port A) or 1 (Port B). - */ -#define SDCARD_SPI_CS_PORT (0) -#define SDCARD_SPI_CS_PIN (15) - -/* If SDCARD_ENABLED is defined, then SDCARD_USE_PIN1 and SDCARD_USE_PIN2 can - * optionally be defined. When SDCARD_USE_PIN2 is defined, SDCARD_USE_PIN1 must - * also be defined. See "SD Card External Pins" section for more information. PORT - * can be 0 (Port A) or 1 (Port B). Polarity can be PIN_POLARITY_ACTIVE_LOW or - * PIN_POLARITY_ACTIVE_HIGH. Config can be INPUT, INPUT_PULLUP, or INPUT_PULLDOWN. - * Size: ~60B for SDCARD_USE_PIN1, ~92B for both pins. By default, only pin1 used. - */ -//#define SDCARD_USE_PIN1 -#define SDCARD_PIN1_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SDCARD_PIN1_PORT (0) -#define SDCARD_PIN1_PIN (3) -#define SDCARD_PIN1_CONFIG INPUT_PULLUP - -//#define SDCARD_USE_PIN2 -#define SDCARD_PIN2_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SDCARD_PIN2_PORT (0) -#define SDCARD_PIN2_PIN (4) -#define SDCARD_PIN2_CONFIG INPUT_PULLUP - -/* If SDCARD_VERIFICATION_DISABLED is defined, then verification of the FLASH - * after programming will not occur, nor will the initial check to see if the - * FLASH contents are already the same as the file. - * Size: ~284B. By default, this is not defined, so verification will be enabled. - */ -//#define SDCARD_VERIFICATION_DISABLED - -/* If SDCARD_AUTORUN_DISABLED is defined, then the SD card bootloader will not - * automatically run the firmware that was just installed. Instead, the LED will - * blink with status code LED_STATUS_SUCCESS. This option also applies when the - * binary file on the SD card already matches the installed firmware. In this - * case, the LED will blink with status code LED_STATUS_FILE_ALREADY_MATCHES. - * By default, SDCARD_AUTORUN_DISABLED is defined. - */ -#define SDCARD_AUTORUN_DISABLED - -/* Two different binary files can be loaded, depending on external pin settings. - * By default, the filenames are UPDATE.BIN and UPDATE2.BIN, but these can be - * overridden by defining SDCARD_FILENAME_PRIMARY and SDCARD_FILENAME_SECONDARY. - * If both pins are configured, SDCARD_FILENAME_PRIMARY (UPDATE.BIN) will be - * loaded when PIN1 is enabled, and SDCARD_FILENAME_PRIMARY (UPDATE2.BIN) is - * loaded when PIN2 is enabled. If only one pin or no pin is configured, only - * SDCARD_FILENAME_PRIMARY is loaded. - */ -//#define SDCARD_FILENAME_PRIMARY "UPDATE.BIN" -//#define SDCARD_FILENAME_SECONDARY "UPDATE2.BIN" - -/* Set SAM_BA_INTERFACE to SAM_BA_USBCDC_ONLY, SAM_BA_UART_ONLY, SAM_BA_NONE, or - * SAM_BA_BOTH_INTERFACES. With 4KB bootloaders, select only one interface (except - * when using SDCARD_ENABLED, then set SAM_BA_INTERFACE to SAM_BA_NONE). The C21 - * lacks USB, so set to SAM_BA_UART_ONLY in this case. By default, - * SAM_BA_USBCDC_ONLY is set (SAM_BA_UART_ONLY with the C21). - */ -#if defined(SDCARD_ENABLED) - #define SAM_BA_INTERFACE SAM_BA_NONE -#else - #define SAM_BA_INTERFACE SAM_BA_USBCDC_ONLY -#endif - -/* If SAM_BA_INTERFACE_USE_PIN is defined, then the associated pin controls which - * SAM-BA interface is used (if SAM_BA_BOTH_INTERFACES is defined). If only one - * interface is used, then the pin acts as an enable. In both cases, the value of - * SAM_BA_INTERFACE_PIN_POLARITY controls the polarity, with values of - * PIN_POLARITY_ACTIVE_LOW or PIN_POLARITY_ACTIVE_HIGH for a single interface, and - * PIN_POLARITY_USBCDC_LOW or PIN_POLARITY_USBCDC_HIGH when both interfaces are - * enabled. PORT can be 0 (Port A) or 1 (Port B). Config can be INPUT, INPUT_PULLUP, - * or INPUT_PULLDOWN.The USB/UART peripheral and pins will not be setup if the - * device is not selected/enabled. If no interface is selected by the pin, the LED - * will blink with status code LED_STATUS_NO_SAM_BA_INTERFACE. - * Size: ~100B. By default, SAM_BA_INTERFACE_USE_PIN is not defined. - */ -//#define SAM_BA_INTERFACE_USE_PIN -#define SAM_BA_INTERFACE_PIN_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SAM_BA_INTERFACE_PIN_PORT (0) -#define SAM_BA_INTERFACE_PIN_PIN (5) -#define SAM_BA_INTERFACE_PIN_CONFIG INPUT_PULLUP - -/* If ARDUINO_EXTENDED_CAPABILITIES is defined and set to 1, 3 additional commands - * will become available which will speed up programming when using the Arduino - * IDE or the bossac tool standalone. Set to 0 with 4KB bootloaders. - * Size: ~904B. This is defined and set to 1 by default (except with 4KB). - */ -#define ARDUINO_EXTENDED_CAPABILITIES 0 - -/* The clock source must be chosen by setting CLOCKCONFIG_CLOCK_SOURCE to - * CLOCKCONFIG_32768HZ_CRYSTAL, CLOCKCONFIG_HS_CRYSTAL, CLOCKCONFIG_INTERNAL, - * or CLOCKCONFIG_INTERNAL_USB. If CLOCKCONFIG_32768HZ_CRYSTAL or - * CLOCKCONFIG_HS_CRYSTAL is defined, then the PLL will be used. If - * CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ must - * also be defined with the crystal frequency in Hertz. CLOCKCONFIG_INTERNAL - * uses the DFLL in open-loop mode, except with the C21 which lacks a DFLL, so - * the internal 48MHz RC oscillator is used instead. CLOCKCONFIG_INTERNAL_USB - * can be defined for the D21, D11, L21, or D51. It will also use the DFLL in - * open-loop mode, except when connected to a USB port with data lines (and - * not suspended), where it will calibrate against the USB SOF signal. - */ -#ifndef CLOCKCONFIG_CLOCK_SOURCE -#define CLOCKCONFIG_CLOCK_SOURCE CLOCKCONFIG_INTERNAL_USB -#endif - -/* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ - * must also be defined with the external crystal frequency in Hertz. - */ -#define HS_CRYSTAL_FREQUENCY_HERTZ 16000000UL - -/* If the PLL is used (CLOCKCONFIG_32768HZ_CRYSTAL, or CLOCKCONFIG_HS_CRYSTAL - * defined), then PLL_FRACTIONAL_ENABLED can be defined, which will result in - * a more accurate 48MHz output frequency at the expense of increased jitter. - */ -//#define PLL_FRACTIONAL_ENABLED - -/* If both PLL_FAST_STARTUP and CLOCKCONFIG_HS_CRYSTAL are defined, the crystal - * will be divided down to 1MHz - 2MHz, rather than 32KHz - 64KHz, before being - * multiplied by the PLL. This will result in a faster lock time for the PLL, - * however, it will also result in a less accurate PLL output frequency if the - * crystal is not divisible (without remainder) by 1MHz. In this case, define - * PLL_FRACTIONAL_ENABLED as well. - */ -//#define PLL_FAST_STARTUP - -/* Master clock frequency (also Fcpu frequency). With the D51, - * this can be either 120000000ul or 48000000ul. See README.md. - */ -#define VARIANT_MCK (48000000ul) - -/* The fine calibration value for DFLL open-loop mode is defined here. - * The coarse calibration value is loaded from NVM OTP (factory calibration values). - */ -#define NVM_SW_CALIB_DFLL48M_FINE_VAL (512) - -/* If USB_VENDOR_STRINGS_ENABLED is defined, then STRING_MANUFACTURER and - * STRING_PRODUCT will be sent to the host. - * Size: ~228B. By default, USB_VENDOR_STRINGS_ENABLED is defined (including 4KB). - */ -#define USB_VENDOR_STRINGS_ENABLED -#define STRING_MANUFACTURER "MattairTech LLC" -#define STRING_PRODUCT "MT-D11" - -/* If USB CDC is used, then the USB vendor ID (VID) and product ID (PID) must be set. */ -#define USB_VID_HIGH 0x16 -#define USB_VID_LOW 0xD0 -#define USB_PID_HIGH 0x05 -#define USB_PID_LOW 0x57 - -/* BOOT_USART_SERCOM_INSTANCE must be a single digit representing the SERCOM number. - * See board_driver_serial.h for BOOT_USART_PAD_SETTINGS values. When setting - * BOOT_USART_PADx defines, consult the appropriate header file from CMSIS-Atmel (ie: - * ~/arduino15/packages/MattairTech_Arduino/tools/CMSIS-Atmel/1.0.0-mattairtech-2/ - * CMSIS/Device/ATMEL/sam/include/.h). Use PINMUX_UNUSED - * if not used. By default, this interface is not enabled (except with the C21). - */ -#define BOOT_USART_SERCOM_INSTANCE 0 -#define BOOT_USART_PAD_SETTINGS UART_RX_PAD3_TX_PAD2 -#define BOOT_USART_PAD3 PINMUX_PA05C_SERCOM0_PAD3 -#define BOOT_USART_PAD2 PINMUX_PA04C_SERCOM0_PAD2 -#define BOOT_USART_PAD1 PINMUX_UNUSED -#define BOOT_USART_PAD0 PINMUX_UNUSED - -/* - * If BOOT_DOUBLE_TAP_ENABLED is defined the bootloader is started by quickly - * tapping two times on the reset button (within 1/2 second). - * Size: ~96B. Enabled by default. - */ -#define BOOT_DOUBLE_TAP_ENABLED - -/* - * If BOOT_LOAD_PIN_ENABLED is defined, the bootloader is started if the selected - * pin is active after reset. There is a 10ms delay before testing the pin to - * allow time for debouncing capacitors to charge (ie: button use). PORT can be 0 - * (Port A) or 1 (Port B). Polarity can be PIN_POLARITY_ACTIVE_LOW or - * PIN_POLARITY_ACTIVE_HIGH. Config can be INPUT, INPUT_PULLUP, or INPUT_PULLDOWN. - * Size: ~84B. Disabled by default. - */ -//#define BOOT_LOAD_PIN_ENABLED -#define BOOT_LOAD_PIN_POLARITY PIN_POLARITY_ACTIVE_LOW -#define BOOT_LOAD_PIN_PORT (0) -#define BOOT_LOAD_PIN (15) -#define BOOT_LOAD_PIN_CONFIG INPUT_PULLUP - -/* - * If BOARD_LED_FADE_ENABLED is defined, then the main LED produces a PWM fade in an - * "M-wave" pattern, otherwise, it simply turns on (if enabled). When the SD bootloader - * is running, the fading will be twice as fast as the SAM-BA interface (USB CDC or UART). - * Size: ~160B. Enabled by default. - */ -#define BOARD_LED_FADE_ENABLED - -/* - * If the LED PORT is defined, then the LED on the associated pin is enabled. - * Polarity can be either LED_POLARITY_HIGH_ON or LED_POLARITY_LOW_ON. - * By default, only BOARD_LED is enabled. - */ -#define BOARD_LED_PORT (0) -#define BOARD_LED_PIN (16) -#define BOARD_LED_POLARITY LED_POLARITY_HIGH_ON - -//#define BOARD_LEDRX_PORT (0) -//#define BOARD_LEDRX_PIN (16) -//#define BOARD_LEDRX_POLARITY LED_POLARITY_HIGH_ON - -//#define BOARD_LEDTX_PORT (0) -//#define BOARD_LEDTX_PIN (16) -//#define BOARD_LEDTX_POLARITY LED_POLARITY_HIGH_ON - -#endif // _BOARD_DEFINITIONS_H_ diff --git a/bootloaders/zero/board_definitions/board_definitions_Xeno.h b/bootloaders/zero/board_definitions/board_definitions_Xeno.h deleted file mode 100644 index 7fba80255..000000000 --- a/bootloaders/zero/board_definitions/board_definitions_Xeno.h +++ /dev/null @@ -1,300 +0,0 @@ -/* - Copyright (c) 2017 MattairTech LLC. All right reserved. - Copyright (c) 2015 Arduino LLC. All right reserved. - Copyright (c) 2015 Atmel Corporation/Thibaut VIARD. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#ifndef _BOARD_DEFINITIONS_H_ -#define _BOARD_DEFINITIONS_H_ - -#include - -/* The SAM-BA interface, which is used with both USB CDC and UART (TTL - * serial), can operate in either binary (default) or terminal mode. If - * TERMINAL_MODE_ENABLED is defined, additional terminal handling code - * (add prompt, add \n\r to EOL, number formatting, etc.) will be compiled - * in. To switch to terminal mode, type 'T#' (you should then see a prompt). - * Then, type 'V#' to show version information. See README.md for more commands. - * Size: ~228B. Enabled by default. Disable with 4KB bootloader. - */ -#define TERMINAL_MODE_ENABLED - -/* If SDCARD_ENABLED is defined, SD card bootloader support is compiled in. - * See "SD Card Bootloader" section. This define can also be set from the - * makefile (so it can be used with the build_all_bootloaders.sh script). - * Size: ~2788B. Disabled by default. Available with 4KB bootloader. - */ -#ifndef SDCARD_ENABLED -//#define SDCARD_ENABLED -#endif - -/* If SDCARD_ENABLED is defined, then all SDCARD_SPI_* defines must also be set. - * When setting SDCARD_SPI_PADx defines, consult the appropriate header file - * from CMSIS-Atmel (ie: ~/arduino15/packages/MattairTech_Arduino/tools/CMSIS- - * Atmel/1.0.0-mattairtech-2/CMSIS/Device/ATMEL/sam/include/ - * .h). SDCARD_SPI_PAD_SETTINGS values are in SDCard/diskio.h. - * When using SDCARD_USE_PIN1 or SDCARD_USE_PIN2, the SPI peripheral and - * associated pins are only initialized if either pin is active. - */ -#define SDCARD_SPI_SERCOM_INSTANCE 5 -#if (SAMD51) - #define SDCARD_SPI_PAD_SETTINGS SPI_RX_PAD3_TX_PAD0_SCK_PAD1 - #define SDCARD_SPI_PAD0 PINMUX_PA23D_SERCOM5_PAD0 - #define SDCARD_SPI_PAD1 PINMUX_PA22D_SERCOM5_PAD1 - #define SDCARD_SPI_PAD2 PINMUX_UNUSED - #define SDCARD_SPI_PAD3 PINMUX_PA21C_SERCOM5_PAD3 -#else - #define SDCARD_SPI_PAD_SETTINGS SPI_RX_PAD0_TX_PAD2_SCK_PAD3 - #define SDCARD_SPI_PAD0 PINMUX_PB30D_SERCOM5_PAD0 - #define SDCARD_SPI_PAD1 PINMUX_UNUSED - #define SDCARD_SPI_PAD2 PINMUX_PB22D_SERCOM5_PAD2 - #define SDCARD_SPI_PAD3 PINMUX_PB23D_SERCOM5_PAD3 -#endif - -/* If SDCARD_ENABLED is defined, then SDCARD_SPI_CS_PORT and SDCARD_SPI_CS_PIN - * must also be defined. PORT can be 0 (Port A) or 1 (Port B). - */ -#define SDCARD_SPI_CS_PORT (1) -#define SDCARD_SPI_CS_PIN (31) - -/* If SDCARD_ENABLED is defined, then SDCARD_USE_PIN1 and SDCARD_USE_PIN2 can - * optionally be defined. When SDCARD_USE_PIN2 is defined, SDCARD_USE_PIN1 must - * also be defined. See "SD Card External Pins" section for more information. PORT - * can be 0 (Port A) or 1 (Port B). Polarity can be PIN_POLARITY_ACTIVE_LOW or - * PIN_POLARITY_ACTIVE_HIGH. Config can be INPUT, INPUT_PULLUP, or INPUT_PULLDOWN. - * Size: ~60B for SDCARD_USE_PIN1, ~92B for both pins. By default, only pin1 used. - */ -#define SDCARD_USE_PIN1 -#define SDCARD_PIN1_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SDCARD_PIN1_PORT (0) -#define SDCARD_PIN1_PIN (3) -#define SDCARD_PIN1_CONFIG INPUT_PULLUP - -//#define SDCARD_USE_PIN2 -#define SDCARD_PIN2_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SDCARD_PIN2_PORT (0) -#define SDCARD_PIN2_PIN (4) -#define SDCARD_PIN2_CONFIG INPUT_PULLUP - -/* If SDCARD_VERIFICATION_DISABLED is defined, then verification of the FLASH - * after programming will not occur, nor will the initial check to see if the - * FLASH contents are already the same as the file. - * Size: ~284B. By default, this is not defined, so verification will be enabled. - */ -//#define SDCARD_VERIFICATION_DISABLED - -/* If SDCARD_AUTORUN_DISABLED is defined, then the SD card bootloader will not - * automatically run the firmware that was just installed. Instead, the LED will - * blink with status code LED_STATUS_SUCCESS. This option also applies when the - * binary file on the SD card already matches the installed firmware. In this - * case, the LED will blink with status code LED_STATUS_FILE_ALREADY_MATCHES. - * By default, SDCARD_AUTORUN_DISABLED is defined. -*/ -#define SDCARD_AUTORUN_DISABLED - -/* Two different binary files can be loaded, depending on external pin settings. - * By default, the filenames are UPDATE.BIN and UPDATE2.BIN, but these can be - * overridden by defining SDCARD_FILENAME_PRIMARY and SDCARD_FILENAME_SECONDARY. - * If both pins are configured, SDCARD_FILENAME_PRIMARY (UPDATE.BIN) will be - * loaded when PIN1 is enabled, and SDCARD_FILENAME_PRIMARY (UPDATE2.BIN) is - * loaded when PIN2 is enabled. If only one pin or no pin is configured, only - * SDCARD_FILENAME_PRIMARY is loaded. - */ -//#define SDCARD_FILENAME_PRIMARY "UPDATE.BIN" -//#define SDCARD_FILENAME_SECONDARY "UPDATE2.BIN" - -/* Set SAM_BA_INTERFACE to SAM_BA_USBCDC_ONLY, SAM_BA_UART_ONLY, SAM_BA_NONE, or - * SAM_BA_BOTH_INTERFACES. With 4KB bootloaders, select only one interface (except - * when using SDCARD_ENABLED, then set SAM_BA_INTERFACE to SAM_BA_NONE). The C21 - * lacks USB, so set to SAM_BA_UART_ONLY in this case. By default, - * SAM_BA_USBCDC_ONLY is set (SAM_BA_UART_ONLY with the C21). - */ -#if (SAMC21) - #define SAM_BA_INTERFACE SAM_BA_UART_ONLY -#else - #define SAM_BA_INTERFACE SAM_BA_USBCDC_ONLY -#endif - -/* If SAM_BA_INTERFACE_USE_PIN is defined, then the associated pin controls which - * SAM-BA interface is used (if SAM_BA_BOTH_INTERFACES is defined). If only one - * interface is used, then the pin acts as an enable. In both cases, the value of - * SAM_BA_INTERFACE_PIN_POLARITY controls the polarity, with values of - * PIN_POLARITY_ACTIVE_LOW or PIN_POLARITY_ACTIVE_HIGH for a single interface, and - * PIN_POLARITY_USBCDC_LOW or PIN_POLARITY_USBCDC_HIGH when both interfaces are - * enabled. PORT can be 0 (Port A) or 1 (Port B). Config can be INPUT, INPUT_PULLUP, - * or INPUT_PULLDOWN.The USB/UART peripheral and pins will not be setup if the - * device is not selected/enabled. If no interface is selected by the pin, the LED - * will blink with status code LED_STATUS_NO_SAM_BA_INTERFACE. - * Size: ~100B. By default, SAM_BA_INTERFACE_USE_PIN is not defined. - */ -//#define SAM_BA_INTERFACE_USE_PIN -#if (SAM_BA_INTERFACE == SAM_BA_BOTH_INTERFACES) - // The pin functions as a toggle between the two interfaces - #define SAM_BA_INTERFACE_PIN_POLARITY PIN_POLARITY_USBCDC_LOW -#else - // The pin functions as an enable for the compiled interface - #define SAM_BA_INTERFACE_PIN_POLARITY PIN_POLARITY_ACTIVE_LOW -#endif -#define SAM_BA_INTERFACE_PIN_PORT (0) -#define SAM_BA_INTERFACE_PIN_PIN (5) -#define SAM_BA_INTERFACE_PIN_CONFIG INPUT_PULLUP - -/* If ARDUINO_EXTENDED_CAPABILITIES is defined and set to 1, 3 additional commands - * will become available which will speed up programming when using the Arduino - * IDE or the bossac tool standalone. Set to 0 with 4KB bootloaders. - * Size: ~904B. This is defined and set to 1 by default (except with 4KB). - */ -#define ARDUINO_EXTENDED_CAPABILITIES 1 - -/* The clock source must be chosen by setting CLOCKCONFIG_CLOCK_SOURCE to - * CLOCKCONFIG_32768HZ_CRYSTAL, CLOCKCONFIG_HS_CRYSTAL, CLOCKCONFIG_INTERNAL, - * or CLOCKCONFIG_INTERNAL_USB. If CLOCKCONFIG_32768HZ_CRYSTAL or - * CLOCKCONFIG_HS_CRYSTAL is defined, then the PLL will be used. If - * CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ must - * also be defined with the crystal frequency in Hertz. CLOCKCONFIG_INTERNAL - * uses the DFLL in open-loop mode, except with the C21 which lacks a DFLL, so - * the internal 48MHz RC oscillator is used instead. CLOCKCONFIG_INTERNAL_USB - * can be defined for the D21, D11, L21, or D51. It will also use the DFLL in - * open-loop mode, except when connected to a USB port with data lines (and - * not suspended), where it will calibrate against the USB SOF signal. - */ -#ifndef CLOCKCONFIG_CLOCK_SOURCE - #if (SAMC21) - #define CLOCKCONFIG_CLOCK_SOURCE CLOCKCONFIG_INTERNAL - #else - #define CLOCKCONFIG_CLOCK_SOURCE CLOCKCONFIG_INTERNAL_USB - #endif -#endif - -/* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ - * must also be defined with the external crystal frequency in Hertz. - */ -#define HS_CRYSTAL_FREQUENCY_HERTZ 16000000UL - -/* If the PLL is used (CLOCKCONFIG_32768HZ_CRYSTAL, or CLOCKCONFIG_HS_CRYSTAL - * defined), then PLL_FRACTIONAL_ENABLED can be defined, which will result in - * a more accurate output frequency at the expense of increased jitter. - */ -//#define PLL_FRACTIONAL_ENABLED - -/* If both PLL_FAST_STARTUP and CLOCKCONFIG_HS_CRYSTAL are defined, the crystal - * will be divided down to 1MHz - 2MHz, rather than 32KHz - 64KHz, before being - * multiplied by the PLL. This will result in a faster lock time for the PLL, - * however, it will also result in a less accurate PLL output frequency if the - * crystal is not divisible (without remainder) by 1MHz. In this case, define - * PLL_FRACTIONAL_ENABLED as well. - */ -//#define PLL_FAST_STARTUP - -/* Master clock frequency (also Fcpu frequency). With the D51, - * this can be either 120000000ul or 48000000ul. See README.md. - */ -#if (SAMD51) -#define VARIANT_MCK (120000000ul) -//#define VARIANT_MCK (48000000ul) -#else -#define VARIANT_MCK (48000000ul) -#endif - -/* The fine calibration value for DFLL open-loop mode is defined here. - * The coarse calibration value is loaded from NVM OTP (factory calibration values). - */ -#define NVM_SW_CALIB_DFLL48M_FINE_VAL (512) - -/* If USB_VENDOR_STRINGS_ENABLED is defined, then STRING_MANUFACTURER and - * STRING_PRODUCT will be sent to the host. - * Size: ~228B. By default, USB_VENDOR_STRINGS_ENABLED is defined (including 4KB). - */ -#define USB_VENDOR_STRINGS_ENABLED -#define STRING_MANUFACTURER "MattairTech LLC" -#if (SAMD21) - #define STRING_PRODUCT "Xeno D21" -#elif (SAML21) - #define STRING_PRODUCT "Xeno L21" -#elif (SAMC21) - #define STRING_PRODUCT "Xeno C21" -#elif (SAMD51) - #define STRING_PRODUCT "Xeno D51" -#endif - -/* If USB CDC is used, then the USB vendor ID (VID) and product ID (PID) must be set. */ -#define USB_VID_HIGH 0x16 -#define USB_VID_LOW 0xD0 -#define USB_PID_HIGH 0x05 -#define USB_PID_LOW 0x57 - -/* BOOT_USART_SERCOM_INSTANCE must be a single digit representing the SERCOM number. - * See board_driver_serial.h for BOOT_USART_PAD_SETTINGS values. When setting - * BOOT_USART_PADx defines, consult the appropriate header file from CMSIS-Atmel (ie: - * ~/arduino15/packages/MattairTech_Arduino/tools/CMSIS-Atmel/1.0.0-mattairtech-2/ - * CMSIS/Device/ATMEL/sam/include/.h). Use PINMUX_UNUSED - * if not used. By default, this interface is not enabled (except with the C21). - */ -#define BOOT_USART_SERCOM_INSTANCE 4 -#define BOOT_USART_PAD_SETTINGS UART_RX_PAD1_TX_PAD0 -#define BOOT_USART_PAD3 PINMUX_UNUSED -#define BOOT_USART_PAD2 PINMUX_UNUSED -#define BOOT_USART_PAD1 PINMUX_PB09D_SERCOM4_PAD1 -#define BOOT_USART_PAD0 PINMUX_PB08D_SERCOM4_PAD0 - -/* - * If BOOT_DOUBLE_TAP_ENABLED is defined the bootloader is started by quickly - * tapping two times on the reset button (within 1/2 second). - * Size: ~96B. Enabled by default. - */ -#define BOOT_DOUBLE_TAP_ENABLED - -/* - * If BOOT_LOAD_PIN_ENABLED is defined, the bootloader is started if the selected - * pin is active after reset. There is a 10ms delay before testing the pin to - * allow time for debouncing capacitors to charge (ie: button use). PORT can be 0 - * (Port A) or 1 (Port B). Polarity can be PIN_POLARITY_ACTIVE_LOW or - * PIN_POLARITY_ACTIVE_HIGH. Config can be INPUT, INPUT_PULLUP, or INPUT_PULLDOWN. - * Size: ~84B. Disabled by default. - */ -//#define BOOT_LOAD_PIN_ENABLED -#define BOOT_LOAD_PIN_POLARITY PIN_POLARITY_ACTIVE_LOW -#define BOOT_LOAD_PIN_PORT (1) -#define BOOT_LOAD_PIN (16) -#define BOOT_LOAD_PIN_CONFIG INPUT_PULLUP - -/* - * If BOARD_LED_FADE_ENABLED is defined, then the main LED produces a PWM fade in an - * "M-wave" pattern, otherwise, it simply turns on (if enabled). When the SD bootloader - * is running, the fading will be twice as fast as the SAM-BA interface (USB CDC or UART). - * Size: ~160B. Enabled by default. - */ -#define BOARD_LED_FADE_ENABLED - -/* - * If the LED PORT is defined, then the LED on the associated pin is enabled. - * Polarity can be either LED_POLARITY_HIGH_ON or LED_POLARITY_LOW_ON. - * By default, only BOARD_LED is enabled. - */ -#define BOARD_LED_PORT (1) -#define BOARD_LED_PIN (2) -#define BOARD_LED_POLARITY LED_POLARITY_HIGH_ON - -//#define BOARD_LEDRX_PORT (0) -//#define BOARD_LEDRX_PIN (22) -//#define BOARD_LEDRX_POLARITY LED_POLARITY_HIGH_ON - -//#define BOARD_LEDTX_PORT (0) -//#define BOARD_LEDTX_PIN (23) -//#define BOARD_LEDTX_POLARITY LED_POLARITY_HIGH_ON - -#endif // _BOARD_DEFINITIONS_H_ diff --git a/bootloaders/zero/board_definitions/board_definitions_Xeno_Mini.h b/bootloaders/zero/board_definitions/board_definitions_Xeno_Mini.h deleted file mode 100644 index e9ec70491..000000000 --- a/bootloaders/zero/board_definitions/board_definitions_Xeno_Mini.h +++ /dev/null @@ -1,299 +0,0 @@ -/* - Copyright (c) 2017 MattairTech LLC. All right reserved. - Copyright (c) 2015 Arduino LLC. All right reserved. - Copyright (c) 2015 Atmel Corporation/Thibaut VIARD. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#ifndef _BOARD_DEFINITIONS_H_ -#define _BOARD_DEFINITIONS_H_ - -#include - -/* The SAM-BA interface, which is used with both USB CDC and UART (TTL - * serial), can operate in either binary (default) or terminal mode. If - * TERMINAL_MODE_ENABLED is defined, additional terminal handling code - * (add prompt, add \n\r to EOL, number formatting, etc.) will be compiled - * in. To switch to terminal mode, type 'T#' (you should then see a prompt). - * Then, type 'V#' to show version information. See README.md for more commands. - * Size: ~228B. Enabled by default. Disable with 4KB bootloader. - */ -#define TERMINAL_MODE_ENABLED - -/* If SDCARD_ENABLED is defined, SD card bootloader support is compiled in. - * See "SD Card Bootloader" section. This define can also be set from the - * makefile (so it can be used with the build_all_bootloaders.sh script). - * Size: ~2788B. Disabled by default. Available with 4KB bootloader. - */ -#ifndef SDCARD_ENABLED -//#define SDCARD_ENABLED -#endif - -/* If SDCARD_ENABLED is defined, then all SDCARD_SPI_* defines must also be set. - * When setting SDCARD_SPI_PADx defines, consult the appropriate header file - * from CMSIS-Atmel (ie: ~/arduino15/packages/MattairTech_Arduino/tools/CMSIS- - * Atmel/1.0.0-mattairtech-2/CMSIS/Device/ATMEL/sam/include/ - * .h). SDCARD_SPI_PAD_SETTINGS values are in SDCard/diskio.h. - * When using SDCARD_USE_PIN1 or SDCARD_USE_PIN2, the SPI peripheral and - * associated pins are only initialized if either pin is active. - */ -#define SDCARD_SPI_SERCOM_INSTANCE 5 -#define SDCARD_SPI_PAD_SETTINGS SPI_RX_PAD3_TX_PAD0_SCK_PAD1 -#if (SAMD51) - #define SDCARD_SPI_PAD0 PINMUX_PA23D_SERCOM5_PAD0 - #define SDCARD_SPI_PAD1 PINMUX_PA22D_SERCOM5_PAD1 - #define SDCARD_SPI_PAD2 PINMUX_UNUSED - #define SDCARD_SPI_PAD3 PINMUX_PA21C_SERCOM5_PAD3 -#else - #define SDCARD_SPI_PAD0 PINMUX_PA22D_SERCOM5_PAD0 - #define SDCARD_SPI_PAD1 PINMUX_PA23D_SERCOM5_PAD1 - #define SDCARD_SPI_PAD2 PINMUX_UNUSED - #define SDCARD_SPI_PAD3 PINMUX_PA21C_SERCOM5_PAD3 -#endif - -/* If SDCARD_ENABLED is defined, then SDCARD_SPI_CS_PORT and SDCARD_SPI_CS_PIN - * must also be defined. PORT can be 0 (Port A) or 1 (Port B). - */ -#define SDCARD_SPI_CS_PORT (0) -#define SDCARD_SPI_CS_PIN (20) - -/* If SDCARD_ENABLED is defined, then SDCARD_USE_PIN1 and SDCARD_USE_PIN2 can - * optionally be defined. When SDCARD_USE_PIN2 is defined, SDCARD_USE_PIN1 must - * also be defined. See "SD Card External Pins" section for more information. PORT - * can be 0 (Port A) or 1 (Port B). Polarity can be PIN_POLARITY_ACTIVE_LOW or - * PIN_POLARITY_ACTIVE_HIGH. Config can be INPUT, INPUT_PULLUP, or INPUT_PULLDOWN. - * Size: ~60B for SDCARD_USE_PIN1, ~92B for both pins. By default, only pin1 used. - */ -#define SDCARD_USE_PIN1 -#define SDCARD_PIN1_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SDCARD_PIN1_PORT (0) -#define SDCARD_PIN1_PIN (4) -#define SDCARD_PIN1_CONFIG INPUT_PULLUP - -//#define SDCARD_USE_PIN2 -#define SDCARD_PIN2_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SDCARD_PIN2_PORT (0) -#define SDCARD_PIN2_PIN (5) -#define SDCARD_PIN2_CONFIG INPUT_PULLUP - -/* If SDCARD_VERIFICATION_DISABLED is defined, then verification of the FLASH - * after programming will not occur, nor will the initial check to see if the - * FLASH contents are already the same as the file. - * Size: ~284B. By default, this is not defined, so verification will be enabled. - */ -//#define SDCARD_VERIFICATION_DISABLED - -/* If SDCARD_AUTORUN_DISABLED is defined, then the SD card bootloader will not - * automatically run the firmware that was just installed. Instead, the LED will - * blink with status code LED_STATUS_SUCCESS. This option also applies when the - * binary file on the SD card already matches the installed firmware. In this - * case, the LED will blink with status code LED_STATUS_FILE_ALREADY_MATCHES. - * By default, SDCARD_AUTORUN_DISABLED is defined. -*/ -#define SDCARD_AUTORUN_DISABLED - -/* Two different binary files can be loaded, depending on external pin settings. - * By default, the filenames are UPDATE.BIN and UPDATE2.BIN, but these can be - * overridden by defining SDCARD_FILENAME_PRIMARY and SDCARD_FILENAME_SECONDARY. - * If both pins are configured, SDCARD_FILENAME_PRIMARY (UPDATE.BIN) will be - * loaded when PIN1 is enabled, and SDCARD_FILENAME_PRIMARY (UPDATE2.BIN) is - * loaded when PIN2 is enabled. If only one pin or no pin is configured, only - * SDCARD_FILENAME_PRIMARY is loaded. - */ -//#define SDCARD_FILENAME_PRIMARY "UPDATE.BIN" -//#define SDCARD_FILENAME_SECONDARY "UPDATE2.BIN" - -/* Set SAM_BA_INTERFACE to SAM_BA_USBCDC_ONLY, SAM_BA_UART_ONLY, SAM_BA_NONE, or - * SAM_BA_BOTH_INTERFACES. With 4KB bootloaders, select only one interface (except - * when using SDCARD_ENABLED, then set SAM_BA_INTERFACE to SAM_BA_NONE). The C21 - * lacks USB, so set to SAM_BA_UART_ONLY in this case. By default, - * SAM_BA_USBCDC_ONLY is set (SAM_BA_UART_ONLY with the C21). - */ -#if (SAMC21) - #define SAM_BA_INTERFACE SAM_BA_UART_ONLY -#else - #define SAM_BA_INTERFACE SAM_BA_USBCDC_ONLY -#endif - -/* If SAM_BA_INTERFACE_USE_PIN is defined, then the associated pin controls which - * SAM-BA interface is used (if SAM_BA_BOTH_INTERFACES is defined). If only one - * interface is used, then the pin acts as an enable. In both cases, the value of - * SAM_BA_INTERFACE_PIN_POLARITY controls the polarity, with values of - * PIN_POLARITY_ACTIVE_LOW or PIN_POLARITY_ACTIVE_HIGH for a single interface, and - * PIN_POLARITY_USBCDC_LOW or PIN_POLARITY_USBCDC_HIGH when both interfaces are - * enabled. PORT can be 0 (Port A) or 1 (Port B). Config can be INPUT, INPUT_PULLUP, - * or INPUT_PULLDOWN.The USB/UART peripheral and pins will not be setup if the - * device is not selected/enabled. If no interface is selected by the pin, the LED - * will blink with status code LED_STATUS_NO_SAM_BA_INTERFACE. - * Size: ~100B. By default, SAM_BA_INTERFACE_USE_PIN is not defined. - */ -//#define SAM_BA_INTERFACE_USE_PIN -#if (SAM_BA_INTERFACE == SAM_BA_BOTH_INTERFACES) - // The pin functions as a toggle between the two interfaces - #define SAM_BA_INTERFACE_PIN_POLARITY PIN_POLARITY_USBCDC_LOW -#else - // The pin functions as an enable for the compiled interface - #define SAM_BA_INTERFACE_PIN_POLARITY PIN_POLARITY_ACTIVE_LOW -#endif -#define SAM_BA_INTERFACE_PIN_PORT (0) -#define SAM_BA_INTERFACE_PIN_PIN (6) -#define SAM_BA_INTERFACE_PIN_CONFIG INPUT_PULLUP - -/* If ARDUINO_EXTENDED_CAPABILITIES is defined and set to 1, 3 additional commands - * will become available which will speed up programming when using the Arduino - * IDE or the bossac tool standalone. Set to 0 with 4KB bootloaders. - * Size: ~904B. This is defined and set to 1 by default (except with 4KB). - */ -#define ARDUINO_EXTENDED_CAPABILITIES 1 - -/* The clock source must be chosen by setting CLOCKCONFIG_CLOCK_SOURCE to - * CLOCKCONFIG_32768HZ_CRYSTAL, CLOCKCONFIG_HS_CRYSTAL, CLOCKCONFIG_INTERNAL, - * or CLOCKCONFIG_INTERNAL_USB. If CLOCKCONFIG_32768HZ_CRYSTAL or - * CLOCKCONFIG_HS_CRYSTAL is defined, then the PLL will be used. If - * CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ must - * also be defined with the crystal frequency in Hertz. CLOCKCONFIG_INTERNAL - * uses the DFLL in open-loop mode, except with the C21 which lacks a DFLL, so - * the internal 48MHz RC oscillator is used instead. CLOCKCONFIG_INTERNAL_USB - * can be defined for the D21, D11, L21, or D51. It will also use the DFLL in - * open-loop mode, except when connected to a USB port with data lines (and - * not suspended), where it will calibrate against the USB SOF signal. - */ -#ifndef CLOCKCONFIG_CLOCK_SOURCE - #if (SAMC21) - #define CLOCKCONFIG_CLOCK_SOURCE CLOCKCONFIG_INTERNAL - #else - #define CLOCKCONFIG_CLOCK_SOURCE CLOCKCONFIG_INTERNAL_USB - #endif -#endif - -/* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ - * must also be defined with the external crystal frequency in Hertz. - */ -#define HS_CRYSTAL_FREQUENCY_HERTZ 24000000UL - -/* If the PLL is used (CLOCKCONFIG_32768HZ_CRYSTAL, or CLOCKCONFIG_HS_CRYSTAL - * defined), then PLL_FRACTIONAL_ENABLED can be defined, which will result in - * a more accurate output frequency at the expense of increased jitter. - */ -//#define PLL_FRACTIONAL_ENABLED - -/* If both PLL_FAST_STARTUP and CLOCKCONFIG_HS_CRYSTAL are defined, the crystal - * will be divided down to 1MHz - 2MHz, rather than 32KHz - 64KHz, before being - * multiplied by the PLL. This will result in a faster lock time for the PLL, - * however, it will also result in a less accurate PLL output frequency if the - * crystal is not divisible (without remainder) by 1MHz. In this case, define - * PLL_FRACTIONAL_ENABLED as well. - */ -//#define PLL_FAST_STARTUP - -/* Master clock frequency (also Fcpu frequency). With the D51, - * this can be either 120000000ul or 48000000ul. See README.md. - */ -#if (SAMD51) -#define VARIANT_MCK (120000000ul) -//#define VARIANT_MCK (48000000ul) -#else -#define VARIANT_MCK (48000000ul) -#endif - -/* The fine calibration value for DFLL open-loop mode is defined here. - * The coarse calibration value is loaded from NVM OTP (factory calibration values). - */ -#define NVM_SW_CALIB_DFLL48M_FINE_VAL (512) - -/* If USB_VENDOR_STRINGS_ENABLED is defined, then STRING_MANUFACTURER and - * STRING_PRODUCT will be sent to the host. - * Size: ~228B. By default, USB_VENDOR_STRINGS_ENABLED is defined (including 4KB). - */ -#define USB_VENDOR_STRINGS_ENABLED -#define STRING_MANUFACTURER "MattairTech LLC" -#if (SAMD21) - #define STRING_PRODUCT "Xeno Mini D21" -#elif (SAML21) - #define STRING_PRODUCT "Xeno Mini L21" -#elif (SAMC21) - #define STRING_PRODUCT "Xeno Mini C21" -#elif (SAMD51) - #define STRING_PRODUCT "Xeno Mini D51" -#endif - -/* If USB CDC is used, then the USB vendor ID (VID) and product ID (PID) must be set. */ -#define USB_VID_HIGH 0x16 -#define USB_VID_LOW 0xD0 -#define USB_PID_HIGH 0x05 -#define USB_PID_LOW 0x57 - -/* BOOT_USART_SERCOM_INSTANCE must be a single digit representing the SERCOM number. - * See board_driver_serial.h for BOOT_USART_PAD_SETTINGS values. When setting - * BOOT_USART_PADx defines, consult the appropriate header file from CMSIS-Atmel (ie: - * ~/arduino15/packages/MattairTech_Arduino/tools/CMSIS-Atmel/1.0.0-mattairtech-2/ - * CMSIS/Device/ATMEL/sam/include/.h). Use PINMUX_UNUSED - * if not used. By default, this interface is not enabled (except with the C21). - */ -#define BOOT_USART_SERCOM_INSTANCE 4 -#define BOOT_USART_PAD_SETTINGS UART_RX_PAD1_TX_PAD0 -#define BOOT_USART_PAD0 PINMUX_PB08D_SERCOM4_PAD0 -#define BOOT_USART_PAD1 PINMUX_PB09D_SERCOM4_PAD1 -#define BOOT_USART_PAD2 PINMUX_UNUSED -#define BOOT_USART_PAD3 PINMUX_UNUSED - -/* - * If BOOT_DOUBLE_TAP_ENABLED is defined the bootloader is started by quickly - * tapping two times on the reset button (within 1/2 second). - * Size: ~96B. Enabled by default. - */ -#define BOOT_DOUBLE_TAP_ENABLED - -/* - * If BOOT_LOAD_PIN_ENABLED is defined, the bootloader is started if the selected - * pin is active after reset. There is a 10ms delay before testing the pin to - * allow time for debouncing capacitors to charge (ie: button use). PORT can be 0 - * (Port A) or 1 (Port B). Polarity can be PIN_POLARITY_ACTIVE_LOW or - * PIN_POLARITY_ACTIVE_HIGH. Config can be INPUT, INPUT_PULLUP, or INPUT_PULLDOWN. - * Size: ~84B. Disabled by default. - */ -//#define BOOT_LOAD_PIN_ENABLED -#define BOOT_LOAD_PIN_POLARITY PIN_POLARITY_ACTIVE_LOW -#define BOOT_LOAD_PIN_PORT (0) -#define BOOT_LOAD_PIN (19) -#define BOOT_LOAD_PIN_CONFIG INPUT_PULLUP - -/* - * If BOARD_LED_FADE_ENABLED is defined, then the main LED produces a PWM fade in an - * "M-wave" pattern, otherwise, it simply turns on (if enabled). When the SD bootloader - * is running, the fading will be twice as fast as the SAM-BA interface (USB CDC or UART). - * Size: ~160B. Enabled by default. - */ -#define BOARD_LED_FADE_ENABLED - -/* - * If the LED PORT is defined, then the LED on the associated pin is enabled. - * Polarity can be either LED_POLARITY_HIGH_ON or LED_POLARITY_LOW_ON. - * By default, only BOARD_LED is enabled. - */ -#define BOARD_LED_PORT (1) -#define BOARD_LED_PIN (2) -#define BOARD_LED_POLARITY LED_POLARITY_HIGH_ON - -//#define BOARD_LEDRX_PORT (0) -//#define BOARD_LEDRX_PIN (20) -//#define BOARD_LEDRX_POLARITY LED_POLARITY_HIGH_ON - -//#define BOARD_LEDTX_PORT (0) -//#define BOARD_LEDTX_PIN (21) -//#define BOARD_LEDTX_POLARITY LED_POLARITY_HIGH_ON - -#endif // _BOARD_DEFINITIONS_H_ diff --git a/bootloaders/zero/board_definitions/board_definitions_arduino_m0.h b/bootloaders/zero/board_definitions/board_definitions_arduino_m0.h deleted file mode 100644 index 38fab2992..000000000 --- a/bootloaders/zero/board_definitions/board_definitions_arduino_m0.h +++ /dev/null @@ -1,264 +0,0 @@ -/* - Copyright (c) 2017 MattairTech LLC. All right reserved. - Copyright (c) 2015 Arduino LLC. All right reserved. - Copyright (c) 2015 Atmel Corporation/Thibaut VIARD. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#ifndef _BOARD_DEFINITIONS_H_ -#define _BOARD_DEFINITIONS_H_ - -#include - -/* The SAM-BA interface, which is used with both USB CDC and UART (TTL - * serial), can operate in either binary (default) or terminal mode. If - * TERMINAL_MODE_ENABLED is defined, additional terminal handling code - * (add prompt, add \n\r to EOL, number formatting, etc.) will be compiled - * in. To switch to terminal mode, type 'T#' (you should then see a prompt). - * Then, type 'V#' to show version information. See README.md for more commands. - * Size: ~228B. Enabled by default. Disable with 4KB bootloader. - */ -#define TERMINAL_MODE_ENABLED - -/* If SDCARD_ENABLED is defined, SD card bootloader support is compiled in. - * See "SD Card Bootloader" section. This define can also be set from the - * makefile (so it can be used with the build_all_bootloaders.sh script). - * Size: ~2788B. Disabled by default. Available with 4KB bootloader. - */ -#ifndef SDCARD_ENABLED -//#define SDCARD_ENABLED -#endif - -/* If SDCARD_ENABLED is defined, then all SDCARD_SPI_* defines must also be set. - * When setting SDCARD_SPI_PADx defines, consult the appropriate header file - * from CMSIS-Atmel (ie: ~/arduino15/packages/MattairTech_Arduino/tools/CMSIS- - * Atmel/1.0.0-mattairtech-2/CMSIS/Device/ATMEL/sam/include/ - * .h). SDCARD_SPI_PAD_SETTINGS values are in SDCard/diskio.h. - * When using SDCARD_USE_PIN1 or SDCARD_USE_PIN2, the SPI peripheral and - * associated pins are only initialized if either pin is active. - */ -#define SDCARD_SPI_SERCOM_INSTANCE 4 -#define SDCARD_SPI_PAD_SETTINGS SPI_RX_PAD0_TX_PAD2_SCK_PAD3 -#define SDCARD_SPI_PAD0 PINMUX_PA12D_SERCOM4_PAD0 -#define SDCARD_SPI_PAD1 PINMUX_UNUSED -#define SDCARD_SPI_PAD2 PINMUX_PB10D_SERCOM4_PAD2 -#define SDCARD_SPI_PAD3 PINMUX_PB11D_SERCOM4_PAD3 - -/* If SDCARD_ENABLED is defined, then SDCARD_SPI_CS_PORT and SDCARD_SPI_CS_PIN - * must also be defined. PORT can be 0 (Port A) or 1 (Port B). - */ -#define SDCARD_SPI_CS_PORT (0) -#define SDCARD_SPI_CS_PIN (18) - -/* If SDCARD_ENABLED is defined, then SDCARD_USE_PIN1 and SDCARD_USE_PIN2 can - * optionally be defined. When SDCARD_USE_PIN2 is defined, SDCARD_USE_PIN1 must - * also be defined. See "SD Card External Pins" section for more information. PORT - * can be 0 (Port A) or 1 (Port B). Polarity can be PIN_POLARITY_ACTIVE_LOW or - * PIN_POLARITY_ACTIVE_HIGH. Config can be INPUT, INPUT_PULLUP, or INPUT_PULLDOWN. - * Size: ~60B for SDCARD_USE_PIN1, ~92B for both pins. By default, only pin1 used. - */ -#define SDCARD_USE_PIN1 -#define SDCARD_PIN1_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SDCARD_PIN1_PORT (0) -#define SDCARD_PIN1_PIN (6) -#define SDCARD_PIN1_CONFIG INPUT_PULLUP - -//#define SDCARD_USE_PIN2 -#define SDCARD_PIN2_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SDCARD_PIN2_PORT (0) -#define SDCARD_PIN2_PIN (7) -#define SDCARD_PIN2_CONFIG INPUT_PULLUP - -/* If SDCARD_VERIFICATION_DISABLED is defined, then verification of the FLASH - * after programming will not occur, nor will the initial check to see if the - * FLASH contents are already the same as the file. - * Size: ~284B. By default, this is not defined, so verification will be enabled. - */ -//#define SDCARD_VERIFICATION_DISABLED - -/* If SDCARD_AUTORUN_DISABLED is defined, then the SD card bootloader will not - * automatically run the firmware that was just installed. Instead, the LED will - * blink with status code LED_STATUS_SUCCESS. This option also applies when the - * binary file on the SD card already matches the installed firmware. In this - * case, the LED will blink with status code LED_STATUS_FILE_ALREADY_MATCHES. - * By default, SDCARD_AUTORUN_DISABLED is defined. - */ -#define SDCARD_AUTORUN_DISABLED - -/* Two different binary files can be loaded, depending on external pin settings. - * By default, the filenames are UPDATE.BIN and UPDATE2.BIN, but these can be - * overridden by defining SDCARD_FILENAME_PRIMARY and SDCARD_FILENAME_SECONDARY. - * If both pins are configured, SDCARD_FILENAME_PRIMARY (UPDATE.BIN) will be - * loaded when PIN1 is enabled, and SDCARD_FILENAME_PRIMARY (UPDATE2.BIN) is - * loaded when PIN2 is enabled. If only one pin or no pin is configured, only - * SDCARD_FILENAME_PRIMARY is loaded. - */ -//#define SDCARD_FILENAME_PRIMARY "UPDATE.BIN" -//#define SDCARD_FILENAME_SECONDARY "UPDATE2.BIN" - -/* Set SAM_BA_INTERFACE to SAM_BA_USBCDC_ONLY, SAM_BA_UART_ONLY, SAM_BA_NONE, or - * SAM_BA_BOTH_INTERFACES. With 4KB bootloaders, select only one interface (except - * when using SDCARD_ENABLED, then set SAM_BA_INTERFACE to SAM_BA_NONE). The C21 - * lacks USB, so set to SAM_BA_UART_ONLY in this case. By default, - * SAM_BA_USBCDC_ONLY is set (SAM_BA_UART_ONLY with the C21). - */ -#define SAM_BA_INTERFACE SAM_BA_USBCDC_ONLY - -/* If SAM_BA_INTERFACE_USE_PIN is defined, then the associated pin controls which - * SAM-BA interface is used (if SAM_BA_BOTH_INTERFACES is defined). If only one - * interface is used, then the pin acts as an enable. In both cases, the value of - * SAM_BA_INTERFACE_PIN_POLARITY controls the polarity, with values of - * PIN_POLARITY_ACTIVE_LOW or PIN_POLARITY_ACTIVE_HIGH for a single interface, and - * PIN_POLARITY_USBCDC_LOW or PIN_POLARITY_USBCDC_HIGH when both interfaces are - * enabled. PORT can be 0 (Port A) or 1 (Port B). Config can be INPUT, INPUT_PULLUP, - * or INPUT_PULLDOWN.The USB/UART peripheral and pins will not be setup if the - * device is not selected/enabled. If no interface is selected by the pin, the LED - * will blink with status code LED_STATUS_NO_SAM_BA_INTERFACE. - * Size: ~100B. By default, SAM_BA_INTERFACE_USE_PIN is not defined. - */ -//#define SAM_BA_INTERFACE_USE_PIN -#define SAM_BA_INTERFACE_PIN_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SAM_BA_INTERFACE_PIN_PORT (0) -#define SAM_BA_INTERFACE_PIN_PIN (21) -#define SAM_BA_INTERFACE_PIN_CONFIG INPUT_PULLUP - -/* If ARDUINO_EXTENDED_CAPABILITIES is defined and set to 1, 3 additional commands - * will become available which will speed up programming when using the Arduino - * IDE or the bossac tool standalone. Set to 0 with 4KB bootloaders. - * Size: ~904B. This is defined and set to 1 by default (except with 4KB). - */ -#define ARDUINO_EXTENDED_CAPABILITIES 1 - -/* The clock source must be chosen by setting CLOCKCONFIG_CLOCK_SOURCE to - * CLOCKCONFIG_32768HZ_CRYSTAL, CLOCKCONFIG_HS_CRYSTAL, CLOCKCONFIG_INTERNAL, - * or CLOCKCONFIG_INTERNAL_USB. If CLOCKCONFIG_32768HZ_CRYSTAL or - * CLOCKCONFIG_HS_CRYSTAL is defined, then the PLL will be used. If - * CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ must - * also be defined with the crystal frequency in Hertz. CLOCKCONFIG_INTERNAL - * uses the DFLL in open-loop mode, except with the C21 which lacks a DFLL, so - * the internal 48MHz RC oscillator is used instead. CLOCKCONFIG_INTERNAL_USB - * can be defined for the D21, D11, L21, or D51. It will also use the DFLL in - * open-loop mode, except when connected to a USB port with data lines (and - * not suspended), where it will calibrate against the USB SOF signal. - */ -#ifndef CLOCKCONFIG_CLOCK_SOURCE -#define CLOCKCONFIG_CLOCK_SOURCE CLOCKCONFIG_INTERNAL_USB -#endif - -/* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ - * must also be defined with the external crystal frequency in Hertz. - */ -//#define HS_CRYSTAL_FREQUENCY_HERTZ 16000000UL - -/* If the PLL is used (CLOCKCONFIG_32768HZ_CRYSTAL, or CLOCKCONFIG_HS_CRYSTAL - * defined), then PLL_FRACTIONAL_ENABLED can be defined, which will result in - * a more accurate 48MHz output frequency at the expense of increased jitter. - */ -//#define PLL_FRACTIONAL_ENABLED - -/* If both PLL_FAST_STARTUP and CLOCKCONFIG_HS_CRYSTAL are defined, the crystal - * will be divided down to 1MHz - 2MHz, rather than 32KHz - 64KHz, before being - * multiplied by the PLL. This will result in a faster lock time for the PLL, - * however, it will also result in a less accurate PLL output frequency if the - * crystal is not divisible (without remainder) by 1MHz. In this case, define - * PLL_FRACTIONAL_ENABLED as well. - */ -//#define PLL_FAST_STARTUP - -/* Master clock frequency (also Fcpu frequency). With the D51, - * this can be either 120000000ul or 48000000ul. See README.md. - */ -#define VARIANT_MCK (48000000ul) - -/* The fine calibration value for DFLL open-loop mode is defined here. - * The coarse calibration value is loaded from NVM OTP (factory calibration values). - */ -#define NVM_SW_CALIB_DFLL48M_FINE_VAL (512) - -/* If USB_VENDOR_STRINGS_ENABLED is defined, then STRING_MANUFACTURER and - * STRING_PRODUCT will be sent to the host. - * Size: ~228B. By default, USB_VENDOR_STRINGS_ENABLED is defined (including 4KB). - */ -#define USB_VENDOR_STRINGS_ENABLED -#define STRING_PRODUCT "Arduino m0" - -/* If USB CDC is used, then the USB vendor ID (VID) and product ID (PID) must be set. */ -#define USB_VID_HIGH 0x2A -#define USB_VID_LOW 0x03 -#define USB_PID_HIGH 0x00 -#define USB_PID_LOW 0x4E - -/* BOOT_USART_SERCOM_INSTANCE must be a single digit representing the SERCOM number. - * See board_driver_serial.h for BOOT_USART_PAD_SETTINGS values. When setting - * BOOT_USART_PADx defines, consult the appropriate header file from CMSIS-Atmel (ie: - * ~/arduino15/packages/MattairTech_Arduino/tools/CMSIS-Atmel/1.0.0-mattairtech-2/ - * CMSIS/Device/ATMEL/sam/include/.h). Use PINMUX_UNUSED - * if not used. By default, this interface is not enabled (except with the C21). - */ -#define BOOT_USART_SERCOM_INSTANCE 5 -#define BOOT_USART_PAD_SETTINGS UART_RX_PAD3_TX_PAD2 -#define BOOT_USART_PAD3 PINMUX_PB23D_SERCOM5_PAD3 -#define BOOT_USART_PAD2 PINMUX_PB22D_SERCOM5_PAD2 -#define BOOT_USART_PAD1 PINMUX_UNUSED -#define BOOT_USART_PAD0 PINMUX_UNUSED - -/* - * If BOOT_DOUBLE_TAP_ENABLED is defined the bootloader is started by quickly - * tapping two times on the reset button (within 1/2 second). - * Size: ~96B. Enabled by default. - */ -#define BOOT_DOUBLE_TAP_ENABLED - -/* - * If BOOT_LOAD_PIN_ENABLED is defined, the bootloader is started if the selected - * pin is active after reset. There is a 10ms delay before testing the pin to - * allow time for debouncing capacitors to charge (ie: button use). PORT can be 0 - * (Port A) or 1 (Port B). Polarity can be PIN_POLARITY_ACTIVE_LOW or - * PIN_POLARITY_ACTIVE_HIGH. Config can be INPUT, INPUT_PULLUP, or INPUT_PULLDOWN. - * Size: ~84B. Disabled by default. - */ -//#define BOOT_LOAD_PIN_ENABLED -#define BOOT_LOAD_PIN_POLARITY PIN_POLARITY_ACTIVE_LOW -#define BOOT_LOAD_PIN_PORT (0) -#define BOOT_LOAD_PIN (21) -#define BOOT_LOAD_PIN_CONFIG INPUT_PULLUP - -/* - * If BOARD_LED_FADE_ENABLED is defined, then the main LED produces a PWM fade in an - * "M-wave" pattern, otherwise, it simply turns on (if enabled). When the SD bootloader - * is running, the fading will be twice as fast as the SAM-BA interface (USB CDC or UART). - * Size: ~160B. Enabled by default. - */ -#define BOARD_LED_FADE_ENABLED - -/* - * If the LED PORT is defined, then the LED on the associated pin is enabled. - * Polarity can be either LED_POLARITY_HIGH_ON or LED_POLARITY_LOW_ON. - * By default, only BOARD_LED is enabled. - */ -#define BOARD_LED_PORT (0) -#define BOARD_LED_PIN (17) -#define BOARD_LED_POLARITY LED_POLARITY_HIGH_ON - -//#define BOARD_LEDRX_PORT (1) -//#define BOARD_LEDRX_PIN (3) -//#define BOARD_LEDRX_POLARITY LED_POLARITY_LOW_ON - -//#define BOARD_LEDTX_PORT (0) -//#define BOARD_LEDTX_PIN (27) -//#define BOARD_LEDTX_POLARITY LED_POLARITY_LOW_ON - -#endif // _BOARD_DEFINITIONS_H_ diff --git a/bootloaders/zero/board_definitions/board_definitions_arduino_m0_pro.h b/bootloaders/zero/board_definitions/board_definitions_arduino_m0_pro.h deleted file mode 100644 index 3141dcbb3..000000000 --- a/bootloaders/zero/board_definitions/board_definitions_arduino_m0_pro.h +++ /dev/null @@ -1,268 +0,0 @@ -/* - Copyright (c) 2017 MattairTech LLC. All right reserved. - Copyright (c) 2015 Arduino LLC. All right reserved. - Copyright (c) 2015 Atmel Corporation/Thibaut VIARD. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#ifndef _BOARD_DEFINITIONS_H_ -#define _BOARD_DEFINITIONS_H_ - -#include - -/* The SAM-BA interface, which is used with both USB CDC and UART (TTL - * serial), can operate in either binary (default) or terminal mode. If - * TERMINAL_MODE_ENABLED is defined, additional terminal handling code - * (add prompt, add \n\r to EOL, number formatting, etc.) will be compiled - * in. To switch to terminal mode, type 'T#' (you should then see a prompt). - * Then, type 'V#' to show version information. See README.md for more commands. - * Size: ~228B. Enabled by default. Disable with 4KB bootloader. - */ -#define TERMINAL_MODE_ENABLED - -/* If SDCARD_ENABLED is defined, SD card bootloader support is compiled in. - * See "SD Card Bootloader" section. This define can also be set from the - * makefile (so it can be used with the build_all_bootloaders.sh script). - * Size: ~2788B. Disabled by default. Available with 4KB bootloader. - */ -#ifndef SDCARD_ENABLED -//#define SDCARD_ENABLED -#endif - -/* If SDCARD_ENABLED is defined, then all SDCARD_SPI_* defines must also be set. - * When setting SDCARD_SPI_PADx defines, consult the appropriate header file - * from CMSIS-Atmel (ie: ~/arduino15/packages/MattairTech_Arduino/tools/CMSIS- - * Atmel/1.0.0-mattairtech-2/CMSIS/Device/ATMEL/sam/include/ - * .h). SDCARD_SPI_PAD_SETTINGS values are in SDCard/diskio.h. - * When using SDCARD_USE_PIN1 or SDCARD_USE_PIN2, the SPI peripheral and - * associated pins are only initialized if either pin is active. - */ -#define SDCARD_SPI_SERCOM_INSTANCE 4 -#define SDCARD_SPI_PAD_SETTINGS SPI_RX_PAD0_TX_PAD2_SCK_PAD3 -#define SDCARD_SPI_PAD0 PINMUX_PA12D_SERCOM4_PAD0 -#define SDCARD_SPI_PAD1 PINMUX_UNUSED -#define SDCARD_SPI_PAD2 PINMUX_PB10D_SERCOM4_PAD2 -#define SDCARD_SPI_PAD3 PINMUX_PB11D_SERCOM4_PAD3 - -/* If SDCARD_ENABLED is defined, then SDCARD_SPI_CS_PORT and SDCARD_SPI_CS_PIN - * must also be defined. PORT can be 0 (Port A) or 1 (Port B). - */ -#define SDCARD_SPI_CS_PORT (0) -#define SDCARD_SPI_CS_PIN (18) - -/* If SDCARD_ENABLED is defined, then SDCARD_USE_PIN1 and SDCARD_USE_PIN2 can - * optionally be defined. When SDCARD_USE_PIN2 is defined, SDCARD_USE_PIN1 must - * also be defined. See "SD Card External Pins" section for more information. PORT - * can be 0 (Port A) or 1 (Port B). Polarity can be PIN_POLARITY_ACTIVE_LOW or - * PIN_POLARITY_ACTIVE_HIGH. Config can be INPUT, INPUT_PULLUP, or INPUT_PULLDOWN. - * Size: ~60B for SDCARD_USE_PIN1, ~92B for both pins. By default, only pin1 used. - */ -#define SDCARD_USE_PIN1 -#define SDCARD_PIN1_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SDCARD_PIN1_PORT (0) -#define SDCARD_PIN1_PIN (6) -#define SDCARD_PIN1_CONFIG INPUT_PULLUP - -//#define SDCARD_USE_PIN2 -#define SDCARD_PIN2_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SDCARD_PIN2_PORT (0) -#define SDCARD_PIN2_PIN (7) -#define SDCARD_PIN2_CONFIG INPUT_PULLUP - -/* If SDCARD_VERIFICATION_DISABLED is defined, then verification of the FLASH - * after programming will not occur, nor will the initial check to see if the - * FLASH contents are already the same as the file. - * Size: ~284B. By default, this is not defined, so verification will be enabled. - */ -//#define SDCARD_VERIFICATION_DISABLED - -/* If SDCARD_AUTORUN_DISABLED is defined, then the SD card bootloader will not - * automatically run the firmware that was just installed. Instead, the LED will - * blink with status code LED_STATUS_SUCCESS. This option also applies when the - * binary file on the SD card already matches the installed firmware. In this - * case, the LED will blink with status code LED_STATUS_FILE_ALREADY_MATCHES. - * By default, SDCARD_AUTORUN_DISABLED is defined. - */ -#define SDCARD_AUTORUN_DISABLED - -/* Two different binary files can be loaded, depending on external pin settings. - * By default, the filenames are UPDATE.BIN and UPDATE2.BIN, but these can be - * overridden by defining SDCARD_FILENAME_PRIMARY and SDCARD_FILENAME_SECONDARY. - * If both pins are configured, SDCARD_FILENAME_PRIMARY (UPDATE.BIN) will be - * loaded when PIN1 is enabled, and SDCARD_FILENAME_PRIMARY (UPDATE2.BIN) is - * loaded when PIN2 is enabled. If only one pin or no pin is configured, only - * SDCARD_FILENAME_PRIMARY is loaded. - */ -//#define SDCARD_FILENAME_PRIMARY "UPDATE.BIN" -//#define SDCARD_FILENAME_SECONDARY "UPDATE2.BIN" - -/* Set SAM_BA_INTERFACE to SAM_BA_USBCDC_ONLY, SAM_BA_UART_ONLY, SAM_BA_NONE, or - * SAM_BA_BOTH_INTERFACES. With 4KB bootloaders, select only one interface (except - * when using SDCARD_ENABLED, then set SAM_BA_INTERFACE to SAM_BA_NONE). The C21 - * lacks USB, so set to SAM_BA_UART_ONLY in this case. By default, - * SAM_BA_USBCDC_ONLY is set (SAM_BA_UART_ONLY with the C21). - */ -#if defined(SDCARD_ENABLED) - #define SAM_BA_INTERFACE SAM_BA_USBCDC_ONLY -#else - #define SAM_BA_INTERFACE SAM_BA_BOTH_INTERFACES -#endif - -/* If SAM_BA_INTERFACE_USE_PIN is defined, then the associated pin controls which - * SAM-BA interface is used (if SAM_BA_BOTH_INTERFACES is defined). If only one - * interface is used, then the pin acts as an enable. In both cases, the value of - * SAM_BA_INTERFACE_PIN_POLARITY controls the polarity, with values of - * PIN_POLARITY_ACTIVE_LOW or PIN_POLARITY_ACTIVE_HIGH for a single interface, and - * PIN_POLARITY_USBCDC_LOW or PIN_POLARITY_USBCDC_HIGH when both interfaces are - * enabled. PORT can be 0 (Port A) or 1 (Port B). Config can be INPUT, INPUT_PULLUP, - * or INPUT_PULLDOWN.The USB/UART peripheral and pins will not be setup if the - * device is not selected/enabled. If no interface is selected by the pin, the LED - * will blink with status code LED_STATUS_NO_SAM_BA_INTERFACE. - * Size: ~100B. By default, SAM_BA_INTERFACE_USE_PIN is not defined. - */ -//#define SAM_BA_INTERFACE_USE_PIN -#define SAM_BA_INTERFACE_PIN_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SAM_BA_INTERFACE_PIN_PORT (0) -#define SAM_BA_INTERFACE_PIN_PIN (21) -#define SAM_BA_INTERFACE_PIN_CONFIG INPUT_PULLUP - -/* If ARDUINO_EXTENDED_CAPABILITIES is defined and set to 1, 3 additional commands - * will become available which will speed up programming when using the Arduino - * IDE or the bossac tool standalone. Set to 0 with 4KB bootloaders. - * Size: ~904B. This is defined and set to 1 by default (except with 4KB). - */ -#define ARDUINO_EXTENDED_CAPABILITIES 1 - -/* The clock source must be chosen by setting CLOCKCONFIG_CLOCK_SOURCE to - * CLOCKCONFIG_32768HZ_CRYSTAL, CLOCKCONFIG_HS_CRYSTAL, CLOCKCONFIG_INTERNAL, - * or CLOCKCONFIG_INTERNAL_USB. If CLOCKCONFIG_32768HZ_CRYSTAL or - * CLOCKCONFIG_HS_CRYSTAL is defined, then the PLL will be used. If - * CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ must - * also be defined with the crystal frequency in Hertz. CLOCKCONFIG_INTERNAL - * uses the DFLL in open-loop mode, except with the C21 which lacks a DFLL, so - * the internal 48MHz RC oscillator is used instead. CLOCKCONFIG_INTERNAL_USB - * can be defined for the D21, D11, L21, or D51. It will also use the DFLL in - * open-loop mode, except when connected to a USB port with data lines (and - * not suspended), where it will calibrate against the USB SOF signal. - */ -#ifndef CLOCKCONFIG_CLOCK_SOURCE -#define CLOCKCONFIG_CLOCK_SOURCE CLOCKCONFIG_INTERNAL_USB -#endif - -/* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ - * must also be defined with the external crystal frequency in Hertz. - */ -//#define HS_CRYSTAL_FREQUENCY_HERTZ 16000000UL - -/* If the PLL is used (CLOCKCONFIG_32768HZ_CRYSTAL, or CLOCKCONFIG_HS_CRYSTAL - * defined), then PLL_FRACTIONAL_ENABLED can be defined, which will result in - * a more accurate 48MHz output frequency at the expense of increased jitter. - */ -//#define PLL_FRACTIONAL_ENABLED - -/* If both PLL_FAST_STARTUP and CLOCKCONFIG_HS_CRYSTAL are defined, the crystal - * will be divided down to 1MHz - 2MHz, rather than 32KHz - 64KHz, before being - * multiplied by the PLL. This will result in a faster lock time for the PLL, - * however, it will also result in a less accurate PLL output frequency if the - * crystal is not divisible (without remainder) by 1MHz. In this case, define - * PLL_FRACTIONAL_ENABLED as well. - */ -//#define PLL_FAST_STARTUP - -/* Master clock frequency (also Fcpu frequency). With the D51, - * this can be either 120000000ul or 48000000ul. See README.md. - */ -#define VARIANT_MCK (48000000ul) - -/* The fine calibration value for DFLL open-loop mode is defined here. - * The coarse calibration value is loaded from NVM OTP (factory calibration values). - */ -#define NVM_SW_CALIB_DFLL48M_FINE_VAL (512) - -/* If USB_VENDOR_STRINGS_ENABLED is defined, then STRING_MANUFACTURER and - * STRING_PRODUCT will be sent to the host. - * Size: ~228B. By default, USB_VENDOR_STRINGS_ENABLED is defined (including 4KB). - */ -#define USB_VENDOR_STRINGS_ENABLED -#define STRING_PRODUCT "Arduino m0 pro" - -/* If USB CDC is used, then the USB vendor ID (VID) and product ID (PID) must be set. */ -#define USB_VID_HIGH 0x2A -#define USB_VID_LOW 0x03 -#define USB_PID_HIGH 0x00 -#define USB_PID_LOW 0x4D - -/* BOOT_USART_SERCOM_INSTANCE must be a single digit representing the SERCOM number. - * See board_driver_serial.h for BOOT_USART_PAD_SETTINGS values. When setting - * BOOT_USART_PADx defines, consult the appropriate header file from CMSIS-Atmel (ie: - * ~/arduino15/packages/MattairTech_Arduino/tools/CMSIS-Atmel/1.0.0-mattairtech-2/ - * CMSIS/Device/ATMEL/sam/include/.h). Use PINMUX_UNUSED - * if not used. By default, this interface is not enabled (except with the C21). - */ -#define BOOT_USART_SERCOM_INSTANCE 5 -#define BOOT_USART_PAD_SETTINGS UART_RX_PAD3_TX_PAD2 -#define BOOT_USART_PAD3 PINMUX_PB23D_SERCOM5_PAD3 -#define BOOT_USART_PAD2 PINMUX_PB22D_SERCOM5_PAD2 -#define BOOT_USART_PAD1 PINMUX_UNUSED -#define BOOT_USART_PAD0 PINMUX_UNUSED - -/* - * If BOOT_DOUBLE_TAP_ENABLED is defined the bootloader is started by quickly - * tapping two times on the reset button (within 1/2 second). - * Size: ~96B. Enabled by default. - */ -#define BOOT_DOUBLE_TAP_ENABLED - -/* - * If BOOT_LOAD_PIN_ENABLED is defined, the bootloader is started if the selected - * pin is active after reset. There is a 10ms delay before testing the pin to - * allow time for debouncing capacitors to charge (ie: button use). PORT can be 0 - * (Port A) or 1 (Port B). Polarity can be PIN_POLARITY_ACTIVE_LOW or - * PIN_POLARITY_ACTIVE_HIGH. Config can be INPUT, INPUT_PULLUP, or INPUT_PULLDOWN. - * Size: ~84B. Disabled by default. - */ -//#define BOOT_LOAD_PIN_ENABLED -#define BOOT_LOAD_PIN_POLARITY PIN_POLARITY_ACTIVE_LOW -#define BOOT_LOAD_PIN_PORT (0) -#define BOOT_LOAD_PIN (21) -#define BOOT_LOAD_PIN_CONFIG INPUT_PULLUP - -/* - * If BOARD_LED_FADE_ENABLED is defined, then the main LED produces a PWM fade in an - * "M-wave" pattern, otherwise, it simply turns on (if enabled). When the SD bootloader - * is running, the fading will be twice as fast as the SAM-BA interface (USB CDC or UART). - * Size: ~160B. Enabled by default. - */ -#define BOARD_LED_FADE_ENABLED - -/* - * If the LED PORT is defined, then the LED on the associated pin is enabled. - * Polarity can be either LED_POLARITY_HIGH_ON or LED_POLARITY_LOW_ON. - * By default, only BOARD_LED is enabled. - */ -#define BOARD_LED_PORT (0) -#define BOARD_LED_PIN (17) -#define BOARD_LED_POLARITY LED_POLARITY_HIGH_ON - -//#define BOARD_LEDRX_PORT (1) -//#define BOARD_LEDRX_PIN (3) -//#define BOARD_LEDRX_POLARITY LED_POLARITY_LOW_ON - -//#define BOARD_LEDTX_PORT (0) -//#define BOARD_LEDTX_PIN (27) -//#define BOARD_LEDTX_POLARITY LED_POLARITY_LOW_ON - -#endif // _BOARD_DEFINITIONS_H_ diff --git a/bootloaders/zero/board_definitions/board_definitions_arduino_mkr1000.h b/bootloaders/zero/board_definitions/board_definitions_arduino_mkr1000.h deleted file mode 100644 index 3e73b56c5..000000000 --- a/bootloaders/zero/board_definitions/board_definitions_arduino_mkr1000.h +++ /dev/null @@ -1,270 +0,0 @@ -/* - Copyright (c) 2017 MattairTech LLC. All right reserved. - Copyright (c) 2015 Arduino LLC. All right reserved. - Copyright (c) 2015 Atmel Corporation/Thibaut VIARD. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#ifndef _BOARD_DEFINITIONS_H_ -#define _BOARD_DEFINITIONS_H_ - -#include - -/* The SAM-BA interface, which is used with both USB CDC and UART (TTL - * serial), can operate in either binary (default) or terminal mode. If - * TERMINAL_MODE_ENABLED is defined, additional terminal handling code - * (add prompt, add \n\r to EOL, number formatting, etc.) will be compiled - * in. To switch to terminal mode, type 'T#' (you should then see a prompt). - * Then, type 'V#' to show version information. See README.md for more commands. - * Size: ~228B. Enabled by default. Disable with 4KB bootloader. - */ -#define TERMINAL_MODE_ENABLED - -/* If SDCARD_ENABLED is defined, SD card bootloader support is compiled in. - * See "SD Card Bootloader" section. This define can also be set from the - * makefile (so it can be used with the build_all_bootloaders.sh script). - * Size: ~2788B. Disabled by default. Available with 4KB bootloader. - */ -#ifndef SDCARD_ENABLED -//#define SDCARD_ENABLED -#endif - -/* If SDCARD_ENABLED is defined, then all SDCARD_SPI_* defines must also be set. - * When setting SDCARD_SPI_PADx defines, consult the appropriate header file - * from CMSIS-Atmel (ie: ~/arduino15/packages/MattairTech_Arduino/tools/CMSIS- - * Atmel/1.0.0-mattairtech-2/CMSIS/Device/ATMEL/sam/include/ - * .h). SDCARD_SPI_PAD_SETTINGS values are in SDCard/diskio.h. - * When using SDCARD_USE_PIN1 or SDCARD_USE_PIN2, the SPI peripheral and - * associated pins are only initialized if either pin is active. - */ -#define SDCARD_SPI_SERCOM_INSTANCE 4 -#define SDCARD_SPI_PAD_SETTINGS SPI_RX_PAD0_TX_PAD2_SCK_PAD3 -#define SDCARD_SPI_PAD0 PINMUX_PA12D_SERCOM4_PAD0 -#define SDCARD_SPI_PAD1 PINMUX_UNUSED -#define SDCARD_SPI_PAD2 PINMUX_PB10D_SERCOM4_PAD2 -#define SDCARD_SPI_PAD3 PINMUX_PB11D_SERCOM4_PAD3 - -/* If SDCARD_ENABLED is defined, then SDCARD_SPI_CS_PORT and SDCARD_SPI_CS_PIN - * must also be defined. PORT can be 0 (Port A) or 1 (Port B). - */ -#define SDCARD_SPI_CS_PORT (0) -#define SDCARD_SPI_CS_PIN (18) - -/* If SDCARD_ENABLED is defined, then SDCARD_USE_PIN1 and SDCARD_USE_PIN2 can - * optionally be defined. When SDCARD_USE_PIN2 is defined, SDCARD_USE_PIN1 must - * also be defined. See "SD Card External Pins" section for more information. PORT - * can be 0 (Port A) or 1 (Port B). Polarity can be PIN_POLARITY_ACTIVE_LOW or - * PIN_POLARITY_ACTIVE_HIGH. Config can be INPUT, INPUT_PULLUP, or INPUT_PULLDOWN. - * Size: ~60B for SDCARD_USE_PIN1, ~92B for both pins. By default, only pin1 used. - */ -#define SDCARD_USE_PIN1 -#define SDCARD_PIN1_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SDCARD_PIN1_PORT (0) -#define SDCARD_PIN1_PIN (6) -#define SDCARD_PIN1_CONFIG INPUT_PULLUP - -//#define SDCARD_USE_PIN2 -#define SDCARD_PIN2_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SDCARD_PIN2_PORT (0) -#define SDCARD_PIN2_PIN (7) -#define SDCARD_PIN2_CONFIG INPUT_PULLUP - -/* If SDCARD_VERIFICATION_DISABLED is defined, then verification of the FLASH - * after programming will not occur, nor will the initial check to see if the - * FLASH contents are already the same as the file. - * Size: ~284B. By default, this is not defined, so verification will be enabled. - */ -//#define SDCARD_VERIFICATION_DISABLED - -/* If SDCARD_AUTORUN_DISABLED is defined, then the SD card bootloader will not - * automatically run the firmware that was just installed. Instead, the LED will - * blink with status code LED_STATUS_SUCCESS. This option also applies when the - * binary file on the SD card already matches the installed firmware. In this - * case, the LED will blink with status code LED_STATUS_FILE_ALREADY_MATCHES. - * By default, SDCARD_AUTORUN_DISABLED is defined. - */ -#define SDCARD_AUTORUN_DISABLED - -/* Two different binary files can be loaded, depending on external pin settings. - * By default, the filenames are UPDATE.BIN and UPDATE2.BIN, but these can be - * overridden by defining SDCARD_FILENAME_PRIMARY and SDCARD_FILENAME_SECONDARY. - * If both pins are configured, SDCARD_FILENAME_PRIMARY (UPDATE.BIN) will be - * loaded when PIN1 is enabled, and SDCARD_FILENAME_PRIMARY (UPDATE2.BIN) is - * loaded when PIN2 is enabled. If only one pin or no pin is configured, only - * SDCARD_FILENAME_PRIMARY is loaded. - */ -//#define SDCARD_FILENAME_PRIMARY "UPDATE.BIN" -//#define SDCARD_FILENAME_SECONDARY "UPDATE2.BIN" - -/* Set SAM_BA_INTERFACE to SAM_BA_USBCDC_ONLY, SAM_BA_UART_ONLY, SAM_BA_NONE, or - * SAM_BA_BOTH_INTERFACES. With 4KB bootloaders, select only one interface (except - * when using SDCARD_ENABLED, then set SAM_BA_INTERFACE to SAM_BA_NONE). The C21 - * lacks USB, so set to SAM_BA_UART_ONLY in this case. By default, - * SAM_BA_USBCDC_ONLY is set (SAM_BA_UART_ONLY with the C21). - */ -#if defined(SDCARD_ENABLED) - #define SAM_BA_INTERFACE SAM_BA_USBCDC_ONLY -#else - #define SAM_BA_INTERFACE SAM_BA_BOTH_INTERFACES -#endif - -/* If SAM_BA_INTERFACE_USE_PIN is defined, then the associated pin controls which - * SAM-BA interface is used (if SAM_BA_BOTH_INTERFACES is defined). If only one - * interface is used, then the pin acts as an enable. In both cases, the value of - * SAM_BA_INTERFACE_PIN_POLARITY controls the polarity, with values of - * PIN_POLARITY_ACTIVE_LOW or PIN_POLARITY_ACTIVE_HIGH for a single interface, and - * PIN_POLARITY_USBCDC_LOW or PIN_POLARITY_USBCDC_HIGH when both interfaces are - * enabled. PORT can be 0 (Port A) or 1 (Port B). Config can be INPUT, INPUT_PULLUP, - * or INPUT_PULLDOWN.The USB/UART peripheral and pins will not be setup if the - * device is not selected/enabled. If no interface is selected by the pin, the LED - * will blink with status code LED_STATUS_NO_SAM_BA_INTERFACE. - * Size: ~100B. By default, SAM_BA_INTERFACE_USE_PIN is not defined. - */ -//#define SAM_BA_INTERFACE_USE_PIN -#define SAM_BA_INTERFACE_PIN_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SAM_BA_INTERFACE_PIN_PORT (0) -#define SAM_BA_INTERFACE_PIN_PIN (21) -#define SAM_BA_INTERFACE_PIN_CONFIG INPUT_PULLUP - -/* If ARDUINO_EXTENDED_CAPABILITIES is defined and set to 1, 3 additional commands - * will become available which will speed up programming when using the Arduino - * IDE or the bossac tool standalone. Set to 0 with 4KB bootloaders. - * Size: ~904B. This is defined and set to 1 by default (except with 4KB). - */ -#define ARDUINO_EXTENDED_CAPABILITIES 1 - -/* The clock source must be chosen by setting CLOCKCONFIG_CLOCK_SOURCE to - * CLOCKCONFIG_32768HZ_CRYSTAL, CLOCKCONFIG_HS_CRYSTAL, CLOCKCONFIG_INTERNAL, - * or CLOCKCONFIG_INTERNAL_USB. If CLOCKCONFIG_32768HZ_CRYSTAL or - * CLOCKCONFIG_HS_CRYSTAL is defined, then the PLL will be used. If - * CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ must - * also be defined with the crystal frequency in Hertz. CLOCKCONFIG_INTERNAL - * uses the DFLL in open-loop mode, except with the C21 which lacks a DFLL, so - * the internal 48MHz RC oscillator is used instead. CLOCKCONFIG_INTERNAL_USB - * can be defined for the D21, D11, L21, or D51. It will also use the DFLL in - * open-loop mode, except when connected to a USB port with data lines (and - * not suspended), where it will calibrate against the USB SOF signal. - */ -#ifndef CLOCKCONFIG_CLOCK_SOURCE -#define CLOCKCONFIG_CLOCK_SOURCE CLOCKCONFIG_32768HZ_CRYSTAL -#endif - -/* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ - * must also be defined with the external crystal frequency in Hertz. - */ -//#define HS_CRYSTAL_FREQUENCY_HERTZ 16000000UL - -/* If the PLL is used (CLOCKCONFIG_32768HZ_CRYSTAL, or CLOCKCONFIG_HS_CRYSTAL - * defined), then PLL_FRACTIONAL_ENABLED can be defined, which will result in - * a more accurate 48MHz output frequency at the expense of increased jitter. - */ -//#define PLL_FRACTIONAL_ENABLED - -/* If both PLL_FAST_STARTUP and CLOCKCONFIG_HS_CRYSTAL are defined, the crystal - * will be divided down to 1MHz - 2MHz, rather than 32KHz - 64KHz, before being - * multiplied by the PLL. This will result in a faster lock time for the PLL, - * however, it will also result in a less accurate PLL output frequency if the - * crystal is not divisible (without remainder) by 1MHz. In this case, define - * PLL_FRACTIONAL_ENABLED as well. - */ -//#define PLL_FAST_STARTUP - -/* Master clock frequency (also Fcpu frequency). With the D51, - * this can be either 120000000ul or 48000000ul. See README.md. - */ -#define VARIANT_MCK (48000000ul) - -/* The fine calibration value for DFLL open-loop mode is defined here. - * The coarse calibration value is loaded from NVM OTP (factory calibration values). - */ -#define NVM_SW_CALIB_DFLL48M_FINE_VAL (512) - -/* If USB_VENDOR_STRINGS_ENABLED is defined, then STRING_MANUFACTURER and - * STRING_PRODUCT will be sent to the host. - * Size: ~228B. By default, USB_VENDOR_STRINGS_ENABLED is defined (including 4KB). - */ -#define USB_VENDOR_STRINGS_ENABLED -#define STRING_PRODUCT "Arduino MKR1000" - -/* If USB CDC is used, then the USB vendor ID (VID) and product ID (PID) must be set. */ -#define USB_VID_HIGH 0x23 -#define USB_VID_LOW 0x41 -#define USB_PID_HIGH 0x00 -#define USB_PID_LOW 0x4E - -/* BOOT_USART_SERCOM_INSTANCE must be a single digit representing the SERCOM number. - * See board_driver_serial.h for BOOT_USART_PAD_SETTINGS values. When setting - * BOOT_USART_PADx defines, consult the appropriate header file from CMSIS-Atmel (ie: - * ~/arduino15/packages/MattairTech_Arduino/tools/CMSIS-Atmel/1.0.0-mattairtech-2/ - * CMSIS/Device/ATMEL/sam/include/.h). Use PINMUX_UNUSED - * if not used. By default, this interface is not enabled (except with the C21). - */ -#define BOOT_USART_SERCOM_INSTANCE 0 -#define BOOT_USART_PAD_SETTINGS UART_RX_PAD3_TX_PAD2 -#define BOOT_USART_PAD3 PINMUX_PA11C_SERCOM0_PAD3 -#define BOOT_USART_PAD2 PINMUX_PA10C_SERCOM0_PAD2 -#define BOOT_USART_PAD1 PINMUX_UNUSED -#define BOOT_USART_PAD0 PINMUX_UNUSED - -/* - * If BOOT_DOUBLE_TAP_ENABLED is defined the bootloader is started by quickly - * tapping two times on the reset button (within 1/2 second). - * Size: ~96B. Enabled by default. - */ -#define BOOT_DOUBLE_TAP_ENABLED - -/* - * If BOOT_LOAD_PIN_ENABLED is defined, the bootloader is started if the selected - * pin is active after reset. There is a 10ms delay before testing the pin to - * allow time for debouncing capacitors to charge (ie: button use). PORT can be 0 - * (Port A) or 1 (Port B). Polarity can be PIN_POLARITY_ACTIVE_LOW or - * PIN_POLARITY_ACTIVE_HIGH. Config can be INPUT, INPUT_PULLUP, or INPUT_PULLDOWN. - * Size: ~84B. Disabled by default. - */ -//#define BOOT_LOAD_PIN_ENABLED -#define BOOT_LOAD_PIN_POLARITY PIN_POLARITY_ACTIVE_LOW -#define BOOT_LOAD_PIN_PORT (0) -#define BOOT_LOAD_PIN (21) -#define BOOT_LOAD_PIN_CONFIG INPUT_PULLUP - -/* - * If BOARD_LED_FADE_ENABLED is defined, then the main LED produces a PWM fade in an - * "M-wave" pattern, otherwise, it simply turns on (if enabled). When the SD bootloader - * is running, the fading will be twice as fast as the SAM-BA interface (USB CDC or UART). - * Size: ~160B. Enabled by default. - */ -#define BOARD_LED_FADE_ENABLED - -/* - * If the LED PORT is defined, then the LED on the associated pin is enabled. - * Polarity can be either LED_POLARITY_HIGH_ON or LED_POLARITY_LOW_ON. - * By default, only BOARD_LED is enabled. - */ -// PA20 (digital pin 6) -#define BOARD_LED_PORT (0) -#define BOARD_LED_PIN (20) -#define BOARD_LED_POLARITY LED_POLARITY_HIGH_ON - -// No RX/TX led -//#define BOARD_LEDRX_PORT -//#define BOARD_LEDRX_PIN -//#define BOARD_LEDRX_POLARITY LED_POLARITY_LOW_ON - -//#define BOARD_LEDTX_PORT -//#define BOARD_LEDTX_PIN -//#define BOARD_LEDTX_POLARITY LED_POLARITY_LOW_ON - -#endif // _BOARD_DEFINITIONS_H_ diff --git a/bootloaders/zero/board_definitions/board_definitions_arduino_mkrfox1200.h b/bootloaders/zero/board_definitions/board_definitions_arduino_mkrfox1200.h deleted file mode 100644 index 28eea9bc7..000000000 --- a/bootloaders/zero/board_definitions/board_definitions_arduino_mkrfox1200.h +++ /dev/null @@ -1,268 +0,0 @@ -/* - Copyright (c) 2016 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#ifndef _BOARD_DEFINITIONS_H_ -#define _BOARD_DEFINITIONS_H_ - -#include - -/* The SAM-BA interface, which is used with both USB CDC and UART (TTL - * serial), can operate in either binary (default) or terminal mode. If - * TERMINAL_MODE_ENABLED is defined, additional terminal handling code - * (add prompt, add \n\r to EOL, number formatting, etc.) will be compiled - * in. To switch to terminal mode, type 'T#' (you should then see a prompt). - * Then, type 'V#' to show version information. See README.md for more commands. - * Size: ~228B. Enabled by default. Disable with 4KB bootloader. - */ -#define TERMINAL_MODE_ENABLED - -/* If SDCARD_ENABLED is defined, SD card bootloader support is compiled in. - * See "SD Card Bootloader" section. This define can also be set from the - * makefile (so it can be used with the build_all_bootloaders.sh script). - * Size: ~2788B. Disabled by default. Available with 4KB bootloader. - */ -#ifndef SDCARD_ENABLED -//#define SDCARD_ENABLED -#endif - -/* If SDCARD_ENABLED is defined, then all SDCARD_SPI_* defines must also be set. - * When setting SDCARD_SPI_PADx defines, consult the appropriate header file - * from CMSIS-Atmel (ie: ~/arduino15/packages/MattairTech_Arduino/tools/CMSIS- - * Atmel/1.0.0-mattairtech-2/CMSIS/Device/ATMEL/sam/include/ - * .h). SDCARD_SPI_PAD_SETTINGS values are in SDCard/diskio.h. - * When using SDCARD_USE_PIN1 or SDCARD_USE_PIN2, the SPI peripheral and - * associated pins are only initialized if either pin is active. - */ -#define SDCARD_SPI_SERCOM_INSTANCE 4 -#define SDCARD_SPI_PAD_SETTINGS SPI_RX_PAD0_TX_PAD2_SCK_PAD3 -#define SDCARD_SPI_PAD0 PINMUX_PA12D_SERCOM4_PAD0 -#define SDCARD_SPI_PAD1 PINMUX_UNUSED -#define SDCARD_SPI_PAD2 PINMUX_PB10D_SERCOM4_PAD2 -#define SDCARD_SPI_PAD3 PINMUX_PB11D_SERCOM4_PAD3 - -/* If SDCARD_ENABLED is defined, then SDCARD_SPI_CS_PORT and SDCARD_SPI_CS_PIN - * must also be defined. PORT can be 0 (Port A) or 1 (Port B). - */ -#define SDCARD_SPI_CS_PORT (0) -#define SDCARD_SPI_CS_PIN (18) - -/* If SDCARD_ENABLED is defined, then SDCARD_USE_PIN1 and SDCARD_USE_PIN2 can - * optionally be defined. When SDCARD_USE_PIN2 is defined, SDCARD_USE_PIN1 must - * also be defined. See "SD Card External Pins" section for more information. PORT - * can be 0 (Port A) or 1 (Port B). Polarity can be PIN_POLARITY_ACTIVE_LOW or - * PIN_POLARITY_ACTIVE_HIGH. Config can be INPUT, INPUT_PULLUP, or INPUT_PULLDOWN. - * Size: ~60B for SDCARD_USE_PIN1, ~92B for both pins. By default, only pin1 used. - */ -#define SDCARD_USE_PIN1 -#define SDCARD_PIN1_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SDCARD_PIN1_PORT (0) -#define SDCARD_PIN1_PIN (6) -#define SDCARD_PIN1_CONFIG INPUT_PULLUP - -//#define SDCARD_USE_PIN2 -#define SDCARD_PIN2_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SDCARD_PIN2_PORT (0) -#define SDCARD_PIN2_PIN (7) -#define SDCARD_PIN2_CONFIG INPUT_PULLUP - -/* If SDCARD_VERIFICATION_DISABLED is defined, then verification of the FLASH - * after programming will not occur, nor will the initial check to see if the - * FLASH contents are already the same as the file. - * Size: ~284B. By default, this is not defined, so verification will be enabled. - */ -//#define SDCARD_VERIFICATION_DISABLED - -/* If SDCARD_AUTORUN_DISABLED is defined, then the SD card bootloader will not - * automatically run the firmware that was just installed. Instead, the LED will - * blink with status code LED_STATUS_SUCCESS. This option also applies when the - * binary file on the SD card already matches the installed firmware. In this - * case, the LED will blink with status code LED_STATUS_FILE_ALREADY_MATCHES. - * By default, SDCARD_AUTORUN_DISABLED is defined. - */ -#define SDCARD_AUTORUN_DISABLED - -/* Two different binary files can be loaded, depending on external pin settings. - * By default, the filenames are UPDATE.BIN and UPDATE2.BIN, but these can be - * overridden by defining SDCARD_FILENAME_PRIMARY and SDCARD_FILENAME_SECONDARY. - * If both pins are configured, SDCARD_FILENAME_PRIMARY (UPDATE.BIN) will be - * loaded when PIN1 is enabled, and SDCARD_FILENAME_PRIMARY (UPDATE2.BIN) is - * loaded when PIN2 is enabled. If only one pin or no pin is configured, only - * SDCARD_FILENAME_PRIMARY is loaded. - */ -//#define SDCARD_FILENAME_PRIMARY "UPDATE.BIN" -//#define SDCARD_FILENAME_SECONDARY "UPDATE2.BIN" - -/* Set SAM_BA_INTERFACE to SAM_BA_USBCDC_ONLY, SAM_BA_UART_ONLY, SAM_BA_NONE, or - * SAM_BA_BOTH_INTERFACES. With 4KB bootloaders, select only one interface (except - * when using SDCARD_ENABLED, then set SAM_BA_INTERFACE to SAM_BA_NONE). The C21 - * lacks USB, so set to SAM_BA_UART_ONLY in this case. By default, - * SAM_BA_USBCDC_ONLY is set (SAM_BA_UART_ONLY with the C21). - */ -#if defined(SDCARD_ENABLED) - #define SAM_BA_INTERFACE SAM_BA_USBCDC_ONLY -#else - #define SAM_BA_INTERFACE SAM_BA_BOTH_INTERFACES -#endif - -/* If SAM_BA_INTERFACE_USE_PIN is defined, then the associated pin controls which - * SAM-BA interface is used (if SAM_BA_BOTH_INTERFACES is defined). If only one - * interface is used, then the pin acts as an enable. In both cases, the value of - * SAM_BA_INTERFACE_PIN_POLARITY controls the polarity, with values of - * PIN_POLARITY_ACTIVE_LOW or PIN_POLARITY_ACTIVE_HIGH for a single interface, and - * PIN_POLARITY_USBCDC_LOW or PIN_POLARITY_USBCDC_HIGH when both interfaces are - * enabled. PORT can be 0 (Port A) or 1 (Port B). Config can be INPUT, INPUT_PULLUP, - * or INPUT_PULLDOWN.The USB/UART peripheral and pins will not be setup if the - * device is not selected/enabled. If no interface is selected by the pin, the LED - * will blink with status code LED_STATUS_NO_SAM_BA_INTERFACE. - * Size: ~100B. By default, SAM_BA_INTERFACE_USE_PIN is not defined. - */ -//#define SAM_BA_INTERFACE_USE_PIN -#define SAM_BA_INTERFACE_PIN_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SAM_BA_INTERFACE_PIN_PORT (0) -#define SAM_BA_INTERFACE_PIN_PIN (21) -#define SAM_BA_INTERFACE_PIN_CONFIG INPUT_PULLUP - -/* If ARDUINO_EXTENDED_CAPABILITIES is defined and set to 1, 3 additional commands - * will become available which will speed up programming when using the Arduino - * IDE or the bossac tool standalone. Set to 0 with 4KB bootloaders. - * Size: ~904B. This is defined and set to 1 by default (except with 4KB). - */ -#define ARDUINO_EXTENDED_CAPABILITIES 1 - -/* The clock source must be chosen by setting CLOCKCONFIG_CLOCK_SOURCE to - * CLOCKCONFIG_32768HZ_CRYSTAL, CLOCKCONFIG_HS_CRYSTAL, CLOCKCONFIG_INTERNAL, - * or CLOCKCONFIG_INTERNAL_USB. If CLOCKCONFIG_32768HZ_CRYSTAL or - * CLOCKCONFIG_HS_CRYSTAL is defined, then the PLL will be used. If - * CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ must - * also be defined with the crystal frequency in Hertz. CLOCKCONFIG_INTERNAL - * uses the DFLL in open-loop mode, except with the C21 which lacks a DFLL, so - * the internal 48MHz RC oscillator is used instead. CLOCKCONFIG_INTERNAL_USB - * can be defined for the D21, D11, L21, or D51. It will also use the DFLL in - * open-loop mode, except when connected to a USB port with data lines (and - * not suspended), where it will calibrate against the USB SOF signal. - */ -#ifndef CLOCKCONFIG_CLOCK_SOURCE -#define CLOCKCONFIG_CLOCK_SOURCE CLOCKCONFIG_32768HZ_CRYSTAL -#endif - -/* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ - * must also be defined with the external crystal frequency in Hertz. - */ -//#define HS_CRYSTAL_FREQUENCY_HERTZ 16000000UL - -/* If the PLL is used (CLOCKCONFIG_32768HZ_CRYSTAL, or CLOCKCONFIG_HS_CRYSTAL - * defined), then PLL_FRACTIONAL_ENABLED can be defined, which will result in - * a more accurate 48MHz output frequency at the expense of increased jitter. - */ -//#define PLL_FRACTIONAL_ENABLED - -/* If both PLL_FAST_STARTUP and CLOCKCONFIG_HS_CRYSTAL are defined, the crystal - * will be divided down to 1MHz - 2MHz, rather than 32KHz - 64KHz, before being - * multiplied by the PLL. This will result in a faster lock time for the PLL, - * however, it will also result in a less accurate PLL output frequency if the - * crystal is not divisible (without remainder) by 1MHz. In this case, define - * PLL_FRACTIONAL_ENABLED as well. - */ -//#define PLL_FAST_STARTUP - -/* Master clock frequency (also Fcpu frequency). With the D51, - * this can be either 120000000ul or 48000000ul. See README.md. - */ -#define VARIANT_MCK (48000000ul) - -/* The fine calibration value for DFLL open-loop mode is defined here. - * The coarse calibration value is loaded from NVM OTP (factory calibration values). - */ -#define NVM_SW_CALIB_DFLL48M_FINE_VAL (512) - -/* If USB_VENDOR_STRINGS_ENABLED is defined, then STRING_MANUFACTURER and - * STRING_PRODUCT will be sent to the host. - * Size: ~228B. By default, USB_VENDOR_STRINGS_ENABLED is defined (including 4KB). - */ -#define USB_VENDOR_STRINGS_ENABLED -#define STRING_PRODUCT "Arduino MKRFox1200" - -/* If USB CDC is used, then the USB vendor ID (VID) and product ID (PID) must be set. */ -#define USB_VID_HIGH 0x23 -#define USB_VID_LOW 0x41 -#define USB_PID_HIGH 0x00 -#define USB_PID_LOW 0x50 - -/* BOOT_USART_SERCOM_INSTANCE must be a single digit representing the SERCOM number. - * See board_driver_serial.h for BOOT_USART_PAD_SETTINGS values. When setting - * BOOT_USART_PADx defines, consult the appropriate header file from CMSIS-Atmel (ie: - * ~/arduino15/packages/MattairTech_Arduino/tools/CMSIS-Atmel/1.0.0-mattairtech-2/ - * CMSIS/Device/ATMEL/sam/include/.h). Use PINMUX_UNUSED - * if not used. By default, this interface is not enabled (except with the C21). - */ -#define BOOT_USART_SERCOM_INSTANCE 5 -#define BOOT_USART_PAD_SETTINGS UART_RX_PAD3_TX_PAD2 -#define BOOT_USART_PAD3 PINMUX_PB23D_SERCOM5_PAD3 -#define BOOT_USART_PAD2 PINMUX_PB22D_SERCOM5_PAD2 -#define BOOT_USART_PAD1 PINMUX_UNUSED -#define BOOT_USART_PAD0 PINMUX_UNUSED - -/* - * If BOOT_DOUBLE_TAP_ENABLED is defined the bootloader is started by quickly - * tapping two times on the reset button (within 1/2 second). - * Size: ~96B. Enabled by default. - */ -#define BOOT_DOUBLE_TAP_ENABLED - -/* - * If BOOT_LOAD_PIN_ENABLED is defined, the bootloader is started if the selected - * pin is active after reset. There is a 10ms delay before testing the pin to - * allow time for debouncing capacitors to charge (ie: button use). PORT can be 0 - * (Port A) or 1 (Port B). Polarity can be PIN_POLARITY_ACTIVE_LOW or - * PIN_POLARITY_ACTIVE_HIGH. Config can be INPUT, INPUT_PULLUP, or INPUT_PULLDOWN. - * Size: ~84B. Disabled by default. - */ -//#define BOOT_LOAD_PIN_ENABLED -#define BOOT_LOAD_PIN_POLARITY PIN_POLARITY_ACTIVE_LOW -#define BOOT_LOAD_PIN_PORT (0) -#define BOOT_LOAD_PIN (21) -#define BOOT_LOAD_PIN_CONFIG INPUT_PULLUP - -/* - * If BOARD_LED_FADE_ENABLED is defined, then the main LED produces a PWM fade in an - * "M-wave" pattern, otherwise, it simply turns on (if enabled). When the SD bootloader - * is running, the fading will be twice as fast as the SAM-BA interface (USB CDC or UART). - * Size: ~160B. Enabled by default. - */ -#define BOARD_LED_FADE_ENABLED - -/* - * If the LED PORT is defined, then the LED on the associated pin is enabled. - * Polarity can be either LED_POLARITY_HIGH_ON or LED_POLARITY_LOW_ON. - * By default, only BOARD_LED is enabled. - */ -// PA20 (digital pin 6) -#define BOARD_LED_PORT (0) -#define BOARD_LED_PIN (20) -#define BOARD_LED_POLARITY LED_POLARITY_HIGH_ON - -// No RX/TX led -//#define BOARD_LEDRX_PORT -//#define BOARD_LEDRX_PIN -//#define BOARD_LEDRX_POLARITY LED_POLARITY_LOW_ON - -//#define BOARD_LEDTX_PORT -//#define BOARD_LEDTX_PIN -//#define BOARD_LEDRX_POLARITY LED_POLARITY_LOW_ON - -#endif // _BOARD_DEFINITIONS_H_ diff --git a/bootloaders/zero/board_definitions/board_definitions_arduino_mkrzero.h b/bootloaders/zero/board_definitions/board_definitions_arduino_mkrzero.h deleted file mode 100644 index 88c9e98cb..000000000 --- a/bootloaders/zero/board_definitions/board_definitions_arduino_mkrzero.h +++ /dev/null @@ -1,269 +0,0 @@ -/* - Copyright (c) 2017 MattairTech LLC. All right reserved. - Copyright (c) 2015 Arduino LLC. All right reserved. - Copyright (c) 2015 Atmel Corporation/Thibaut VIARD. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#ifndef _BOARD_DEFINITIONS_H_ -#define _BOARD_DEFINITIONS_H_ - -#include - -/* The SAM-BA interface, which is used with both USB CDC and UART (TTL - * serial), can operate in either binary (default) or terminal mode. If - * TERMINAL_MODE_ENABLED is defined, additional terminal handling code - * (add prompt, add \n\r to EOL, number formatting, etc.) will be compiled - * in. To switch to terminal mode, type 'T#' (you should then see a prompt). - * Then, type 'V#' to show version information. See README.md for more commands. - * Size: ~228B. Enabled by default. Disable with 4KB bootloader. - */ -#define TERMINAL_MODE_ENABLED - -/* If SDCARD_ENABLED is defined, SD card bootloader support is compiled in. - * See "SD Card Bootloader" section. This define can also be set from the - * makefile (so it can be used with the build_all_bootloaders.sh script). - * Size: ~2788B. Disabled by default. Available with 4KB bootloader. - */ -#ifndef SDCARD_ENABLED -//#define SDCARD_ENABLED -#endif - -/* If SDCARD_ENABLED is defined, then all SDCARD_SPI_* defines must also be set. - * When setting SDCARD_SPI_PADx defines, consult the appropriate header file - * from CMSIS-Atmel (ie: ~/arduino15/packages/MattairTech_Arduino/tools/CMSIS- - * Atmel/1.0.0-mattairtech-2/CMSIS/Device/ATMEL/sam/include/ - * .h). SDCARD_SPI_PAD_SETTINGS values are in SDCard/diskio.h. - * When using SDCARD_USE_PIN1 or SDCARD_USE_PIN2, the SPI peripheral and - * associated pins are only initialized if either pin is active. - */ -#define SDCARD_SPI_SERCOM_INSTANCE 4 -#define SDCARD_SPI_PAD_SETTINGS SPI_RX_PAD0_TX_PAD2_SCK_PAD3 -#define SDCARD_SPI_PAD0 PINMUX_PA12D_SERCOM4_PAD0 -#define SDCARD_SPI_PAD1 PINMUX_UNUSED -#define SDCARD_SPI_PAD2 PINMUX_PB10D_SERCOM4_PAD2 -#define SDCARD_SPI_PAD3 PINMUX_PB11D_SERCOM4_PAD3 - -/* If SDCARD_ENABLED is defined, then SDCARD_SPI_CS_PORT and SDCARD_SPI_CS_PIN - * must also be defined. PORT can be 0 (Port A) or 1 (Port B). - */ -#define SDCARD_SPI_CS_PORT (0) -#define SDCARD_SPI_CS_PIN (18) - -/* If SDCARD_ENABLED is defined, then SDCARD_USE_PIN1 and SDCARD_USE_PIN2 can - * optionally be defined. When SDCARD_USE_PIN2 is defined, SDCARD_USE_PIN1 must - * also be defined. See "SD Card External Pins" section for more information. PORT - * can be 0 (Port A) or 1 (Port B). Polarity can be PIN_POLARITY_ACTIVE_LOW or - * PIN_POLARITY_ACTIVE_HIGH. Config can be INPUT, INPUT_PULLUP, or INPUT_PULLDOWN. - * Size: ~60B for SDCARD_USE_PIN1, ~92B for both pins. By default, only pin1 used. - */ -#define SDCARD_USE_PIN1 -#define SDCARD_PIN1_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SDCARD_PIN1_PORT (0) -#define SDCARD_PIN1_PIN (6) -#define SDCARD_PIN1_CONFIG INPUT_PULLUP - -//#define SDCARD_USE_PIN2 -#define SDCARD_PIN2_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SDCARD_PIN2_PORT (0) -#define SDCARD_PIN2_PIN (7) -#define SDCARD_PIN2_CONFIG INPUT_PULLUP - -/* If SDCARD_VERIFICATION_DISABLED is defined, then verification of the FLASH - * after programming will not occur, nor will the initial check to see if the - * FLASH contents are already the same as the file. - * Size: ~284B. By default, this is not defined, so verification will be enabled. - */ -//#define SDCARD_VERIFICATION_DISABLED - -/* If SDCARD_AUTORUN_DISABLED is defined, then the SD card bootloader will not - * automatically run the firmware that was just installed. Instead, the LED will - * blink with status code LED_STATUS_SUCCESS. This option also applies when the - * binary file on the SD card already matches the installed firmware. In this - * case, the LED will blink with status code LED_STATUS_FILE_ALREADY_MATCHES. - * By default, SDCARD_AUTORUN_DISABLED is defined. - */ -#define SDCARD_AUTORUN_DISABLED - -/* Two different binary files can be loaded, depending on external pin settings. - * By default, the filenames are UPDATE.BIN and UPDATE2.BIN, but these can be - * overridden by defining SDCARD_FILENAME_PRIMARY and SDCARD_FILENAME_SECONDARY. - * If both pins are configured, SDCARD_FILENAME_PRIMARY (UPDATE.BIN) will be - * loaded when PIN1 is enabled, and SDCARD_FILENAME_PRIMARY (UPDATE2.BIN) is - * loaded when PIN2 is enabled. If only one pin or no pin is configured, only - * SDCARD_FILENAME_PRIMARY is loaded. - */ -//#define SDCARD_FILENAME_PRIMARY "UPDATE.BIN" -//#define SDCARD_FILENAME_SECONDARY "UPDATE2.BIN" - -/* Set SAM_BA_INTERFACE to SAM_BA_USBCDC_ONLY, SAM_BA_UART_ONLY, SAM_BA_NONE, or - * SAM_BA_BOTH_INTERFACES. With 4KB bootloaders, select only one interface (except - * when using SDCARD_ENABLED, then set SAM_BA_INTERFACE to SAM_BA_NONE). The C21 - * lacks USB, so set to SAM_BA_UART_ONLY in this case. By default, - * SAM_BA_USBCDC_ONLY is set (SAM_BA_UART_ONLY with the C21). - */ -#if defined(SDCARD_ENABLED) - #define SAM_BA_INTERFACE SAM_BA_USBCDC_ONLY -#else - #define SAM_BA_INTERFACE SAM_BA_BOTH_INTERFACES -#endif - -/* If SAM_BA_INTERFACE_USE_PIN is defined, then the associated pin controls which - * SAM-BA interface is used (if SAM_BA_BOTH_INTERFACES is defined). If only one - * interface is used, then the pin acts as an enable. In both cases, the value of - * SAM_BA_INTERFACE_PIN_POLARITY controls the polarity, with values of - * PIN_POLARITY_ACTIVE_LOW or PIN_POLARITY_ACTIVE_HIGH for a single interface, and - * PIN_POLARITY_USBCDC_LOW or PIN_POLARITY_USBCDC_HIGH when both interfaces are - * enabled. PORT can be 0 (Port A) or 1 (Port B). Config can be INPUT, INPUT_PULLUP, - * or INPUT_PULLDOWN.The USB/UART peripheral and pins will not be setup if the - * device is not selected/enabled. If no interface is selected by the pin, the LED - * will blink with status code LED_STATUS_NO_SAM_BA_INTERFACE. - * Size: ~100B. By default, SAM_BA_INTERFACE_USE_PIN is not defined. - */ -//#define SAM_BA_INTERFACE_USE_PIN -#define SAM_BA_INTERFACE_PIN_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SAM_BA_INTERFACE_PIN_PORT (0) -#define SAM_BA_INTERFACE_PIN_PIN (21) -#define SAM_BA_INTERFACE_PIN_CONFIG INPUT_PULLUP - -/* If ARDUINO_EXTENDED_CAPABILITIES is defined and set to 1, 3 additional commands - * will become available which will speed up programming when using the Arduino - * IDE or the bossac tool standalone. Set to 0 with 4KB bootloaders. - * Size: ~904B. This is defined and set to 1 by default (except with 4KB). - */ -#define ARDUINO_EXTENDED_CAPABILITIES 1 - -/* The clock source must be chosen by setting CLOCKCONFIG_CLOCK_SOURCE to - * CLOCKCONFIG_32768HZ_CRYSTAL, CLOCKCONFIG_HS_CRYSTAL, CLOCKCONFIG_INTERNAL, - * or CLOCKCONFIG_INTERNAL_USB. If CLOCKCONFIG_32768HZ_CRYSTAL or - * CLOCKCONFIG_HS_CRYSTAL is defined, then the PLL will be used. If - * CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ must - * also be defined with the crystal frequency in Hertz. CLOCKCONFIG_INTERNAL - * uses the DFLL in open-loop mode, except with the C21 which lacks a DFLL, so - * the internal 48MHz RC oscillator is used instead. CLOCKCONFIG_INTERNAL_USB - * can be defined for the D21, D11, L21, or D51. It will also use the DFLL in - * open-loop mode, except when connected to a USB port with data lines (and - * not suspended), where it will calibrate against the USB SOF signal. - */ -#ifndef CLOCKCONFIG_CLOCK_SOURCE -#define CLOCKCONFIG_CLOCK_SOURCE CLOCKCONFIG_32768HZ_CRYSTAL -#endif - -/* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ - * must also be defined with the external crystal frequency in Hertz. - */ -//#define HS_CRYSTAL_FREQUENCY_HERTZ 16000000UL - -/* If the PLL is used (CLOCKCONFIG_32768HZ_CRYSTAL, or CLOCKCONFIG_HS_CRYSTAL - * defined), then PLL_FRACTIONAL_ENABLED can be defined, which will result in - * a more accurate 48MHz output frequency at the expense of increased jitter. - */ -//#define PLL_FRACTIONAL_ENABLED - -/* If both PLL_FAST_STARTUP and CLOCKCONFIG_HS_CRYSTAL are defined, the crystal - * will be divided down to 1MHz - 2MHz, rather than 32KHz - 64KHz, before being - * multiplied by the PLL. This will result in a faster lock time for the PLL, - * however, it will also result in a less accurate PLL output frequency if the - * crystal is not divisible (without remainder) by 1MHz. In this case, define - * PLL_FRACTIONAL_ENABLED as well. - */ -//#define PLL_FAST_STARTUP - -/* Master clock frequency (also Fcpu frequency). With the D51, - * this can be either 120000000ul or 48000000ul. See README.md. - */ -#define VARIANT_MCK (48000000ul) - -/* The fine calibration value for DFLL open-loop mode is defined here. - * The coarse calibration value is loaded from NVM OTP (factory calibration values). - */ -#define NVM_SW_CALIB_DFLL48M_FINE_VAL (512) - -/* If USB_VENDOR_STRINGS_ENABLED is defined, then STRING_MANUFACTURER and - * STRING_PRODUCT will be sent to the host. - * Size: ~228B. By default, USB_VENDOR_STRINGS_ENABLED is defined (including 4KB). - */ -#define USB_VENDOR_STRINGS_ENABLED -#define STRING_PRODUCT "Arduino MKRZero" - -/* If USB CDC is used, then the USB vendor ID (VID) and product ID (PID) must be set. */ -#define USB_VID_HIGH 0x23 -#define USB_VID_LOW 0x41 -#define USB_PID_HIGH 0x00 -#define USB_PID_LOW 0x4F - -/* BOOT_USART_SERCOM_INSTANCE must be a single digit representing the SERCOM number. - * See board_driver_serial.h for BOOT_USART_PAD_SETTINGS values. When setting - * BOOT_USART_PADx defines, consult the appropriate header file from CMSIS-Atmel (ie: - * ~/arduino15/packages/MattairTech_Arduino/tools/CMSIS-Atmel/1.0.0-mattairtech-2/ - * CMSIS/Device/ATMEL/sam/include/.h). Use PINMUX_UNUSED - * if not used. By default, this interface is not enabled (except with the C21). - */ -#define BOOT_USART_SERCOM_INSTANCE 5 -#define BOOT_USART_PAD_SETTINGS UART_RX_PAD3_TX_PAD2 -#define BOOT_USART_PAD3 PINMUX_PB23D_SERCOM5_PAD3 -#define BOOT_USART_PAD2 PINMUX_PB22D_SERCOM5_PAD2 -#define BOOT_USART_PAD1 PINMUX_UNUSED -#define BOOT_USART_PAD0 PINMUX_UNUSED - -/* - * If BOOT_DOUBLE_TAP_ENABLED is defined the bootloader is started by quickly - * tapping two times on the reset button (within 1/2 second). - * Size: ~96B. Enabled by default. - */ -#define BOOT_DOUBLE_TAP_ENABLED - -/* - * If BOOT_LOAD_PIN_ENABLED is defined, the bootloader is started if the selected - * pin is active after reset. There is a 10ms delay before testing the pin to - * allow time for debouncing capacitors to charge (ie: button use). PORT can be 0 - * (Port A) or 1 (Port B). Polarity can be PIN_POLARITY_ACTIVE_LOW or - * PIN_POLARITY_ACTIVE_HIGH. Config can be INPUT, INPUT_PULLUP, or INPUT_PULLDOWN. - * Size: ~84B. Disabled by default. - */ -//#define BOOT_LOAD_PIN_ENABLED -#define BOOT_LOAD_PIN_POLARITY PIN_POLARITY_ACTIVE_LOW -#define BOOT_LOAD_PIN_PORT (0) -#define BOOT_LOAD_PIN (21) -#define BOOT_LOAD_PIN_CONFIG INPUT_PULLUP - -/* - * If BOARD_LED_FADE_ENABLED is defined, then the main LED produces a PWM fade in an - * "M-wave" pattern, otherwise, it simply turns on (if enabled). When the SD bootloader - * is running, the fading will be twice as fast as the SAM-BA interface (USB CDC or UART). - * Size: ~160B. Enabled by default. - */ -#define BOARD_LED_FADE_ENABLED - -/* - * If the LED PORT is defined, then the LED on the associated pin is enabled. - * Polarity can be either LED_POLARITY_HIGH_ON or LED_POLARITY_LOW_ON. - * By default, only BOARD_LED is enabled. - */ -#define BOARD_LED_PORT (1) -#define BOARD_LED_PIN (8) -#define BOARD_LED_POLARITY LED_POLARITY_HIGH_ON - -// No RX/TX led -//#define BOARD_LEDRX_PORT -//#define BOARD_LEDRX_PIN -//#define BOARD_LEDRX_POLARITY LED_POLARITY_LOW_ON - -//#define BOARD_LEDTX_PORT -//#define BOARD_LEDTX_PIN -//#define BOARD_LEDTX_POLARITY LED_POLARITY_LOW_ON - -#endif // _BOARD_DEFINITIONS_H_ diff --git a/bootloaders/zero/board_definitions/board_definitions_arduino_zero.h b/bootloaders/zero/board_definitions/board_definitions_arduino_zero.h deleted file mode 100644 index 85dd431d3..000000000 --- a/bootloaders/zero/board_definitions/board_definitions_arduino_zero.h +++ /dev/null @@ -1,268 +0,0 @@ -/* - Copyright (c) 2017 MattairTech LLC. All right reserved. - Copyright (c) 2015 Arduino LLC. All right reserved. - Copyright (c) 2015 Atmel Corporation/Thibaut VIARD. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#ifndef _BOARD_DEFINITIONS_H_ -#define _BOARD_DEFINITIONS_H_ - -#include - -/* The SAM-BA interface, which is used with both USB CDC and UART (TTL - * serial), can operate in either binary (default) or terminal mode. If - * TERMINAL_MODE_ENABLED is defined, additional terminal handling code - * (add prompt, add \n\r to EOL, number formatting, etc.) will be compiled - * in. To switch to terminal mode, type 'T#' (you should then see a prompt). - * Then, type 'V#' to show version information. See README.md for more commands. - * Size: ~228B. Enabled by default. Disable with 4KB bootloader. - */ -#define TERMINAL_MODE_ENABLED - -/* If SDCARD_ENABLED is defined, SD card bootloader support is compiled in. - * See "SD Card Bootloader" section. This define can also be set from the - * makefile (so it can be used with the build_all_bootloaders.sh script). - * Size: ~2788B. Disabled by default. Available with 4KB bootloader. - */ -#ifndef SDCARD_ENABLED -//#define SDCARD_ENABLED -#endif - -/* If SDCARD_ENABLED is defined, then all SDCARD_SPI_* defines must also be set. - * When setting SDCARD_SPI_PADx defines, consult the appropriate header file - * from CMSIS-Atmel (ie: ~/arduino15/packages/MattairTech_Arduino/tools/CMSIS- - * Atmel/1.0.0-mattairtech-2/CMSIS/Device/ATMEL/sam/include/ - * .h). SDCARD_SPI_PAD_SETTINGS values are in SDCard/diskio.h. - * When using SDCARD_USE_PIN1 or SDCARD_USE_PIN2, the SPI peripheral and - * associated pins are only initialized if either pin is active. - */ -#define SDCARD_SPI_SERCOM_INSTANCE 4 -#define SDCARD_SPI_PAD_SETTINGS SPI_RX_PAD0_TX_PAD2_SCK_PAD3 -#define SDCARD_SPI_PAD0 PINMUX_PA12D_SERCOM4_PAD0 -#define SDCARD_SPI_PAD1 PINMUX_UNUSED -#define SDCARD_SPI_PAD2 PINMUX_PB10D_SERCOM4_PAD2 -#define SDCARD_SPI_PAD3 PINMUX_PB11D_SERCOM4_PAD3 - -/* If SDCARD_ENABLED is defined, then SDCARD_SPI_CS_PORT and SDCARD_SPI_CS_PIN - * must also be defined. PORT can be 0 (Port A) or 1 (Port B). - */ -#define SDCARD_SPI_CS_PORT (0) -#define SDCARD_SPI_CS_PIN (18) - -/* If SDCARD_ENABLED is defined, then SDCARD_USE_PIN1 and SDCARD_USE_PIN2 can - * optionally be defined. When SDCARD_USE_PIN2 is defined, SDCARD_USE_PIN1 must - * also be defined. See "SD Card External Pins" section for more information. PORT - * can be 0 (Port A) or 1 (Port B). Polarity can be PIN_POLARITY_ACTIVE_LOW or - * PIN_POLARITY_ACTIVE_HIGH. Config can be INPUT, INPUT_PULLUP, or INPUT_PULLDOWN. - * Size: ~60B for SDCARD_USE_PIN1, ~92B for both pins. By default, only pin1 used. - */ -#define SDCARD_USE_PIN1 -#define SDCARD_PIN1_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SDCARD_PIN1_PORT (0) -#define SDCARD_PIN1_PIN (6) -#define SDCARD_PIN1_CONFIG INPUT_PULLUP - -//#define SDCARD_USE_PIN2 -#define SDCARD_PIN2_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SDCARD_PIN2_PORT (0) -#define SDCARD_PIN2_PIN (7) -#define SDCARD_PIN2_CONFIG INPUT_PULLUP - -/* If SDCARD_VERIFICATION_DISABLED is defined, then verification of the FLASH - * after programming will not occur, nor will the initial check to see if the - * FLASH contents are already the same as the file. - * Size: ~284B. By default, this is not defined, so verification will be enabled. - */ -//#define SDCARD_VERIFICATION_DISABLED - -/* If SDCARD_AUTORUN_DISABLED is defined, then the SD card bootloader will not - * automatically run the firmware that was just installed. Instead, the LED will - * blink with status code LED_STATUS_SUCCESS. This option also applies when the - * binary file on the SD card already matches the installed firmware. In this - * case, the LED will blink with status code LED_STATUS_FILE_ALREADY_MATCHES. - * By default, SDCARD_AUTORUN_DISABLED is defined. - */ -#define SDCARD_AUTORUN_DISABLED - -/* Two different binary files can be loaded, depending on external pin settings. - * By default, the filenames are UPDATE.BIN and UPDATE2.BIN, but these can be - * overridden by defining SDCARD_FILENAME_PRIMARY and SDCARD_FILENAME_SECONDARY. - * If both pins are configured, SDCARD_FILENAME_PRIMARY (UPDATE.BIN) will be - * loaded when PIN1 is enabled, and SDCARD_FILENAME_PRIMARY (UPDATE2.BIN) is - * loaded when PIN2 is enabled. If only one pin or no pin is configured, only - * SDCARD_FILENAME_PRIMARY is loaded. - */ -//#define SDCARD_FILENAME_PRIMARY "UPDATE.BIN" -//#define SDCARD_FILENAME_SECONDARY "UPDATE2.BIN" - -/* Set SAM_BA_INTERFACE to SAM_BA_USBCDC_ONLY, SAM_BA_UART_ONLY, SAM_BA_NONE, or - * SAM_BA_BOTH_INTERFACES. With 4KB bootloaders, select only one interface (except - * when using SDCARD_ENABLED, then set SAM_BA_INTERFACE to SAM_BA_NONE). The C21 - * lacks USB, so set to SAM_BA_UART_ONLY in this case. By default, - * SAM_BA_USBCDC_ONLY is set (SAM_BA_UART_ONLY with the C21). - */ -#if defined(SDCARD_ENABLED) - #define SAM_BA_INTERFACE SAM_BA_USBCDC_ONLY -#else - #define SAM_BA_INTERFACE SAM_BA_BOTH_INTERFACES -#endif - -/* If SAM_BA_INTERFACE_USE_PIN is defined, then the associated pin controls which - * SAM-BA interface is used (if SAM_BA_BOTH_INTERFACES is defined). If only one - * interface is used, then the pin acts as an enable. In both cases, the value of - * SAM_BA_INTERFACE_PIN_POLARITY controls the polarity, with values of - * PIN_POLARITY_ACTIVE_LOW or PIN_POLARITY_ACTIVE_HIGH for a single interface, and - * PIN_POLARITY_USBCDC_LOW or PIN_POLARITY_USBCDC_HIGH when both interfaces are - * enabled. PORT can be 0 (Port A) or 1 (Port B). Config can be INPUT, INPUT_PULLUP, - * or INPUT_PULLDOWN.The USB/UART peripheral and pins will not be setup if the - * device is not selected/enabled. If no interface is selected by the pin, the LED - * will blink with status code LED_STATUS_NO_SAM_BA_INTERFACE. - * Size: ~100B. By default, SAM_BA_INTERFACE_USE_PIN is not defined. - */ -//#define SAM_BA_INTERFACE_USE_PIN -#define SAM_BA_INTERFACE_PIN_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SAM_BA_INTERFACE_PIN_PORT (0) -#define SAM_BA_INTERFACE_PIN_PIN (21) -#define SAM_BA_INTERFACE_PIN_CONFIG INPUT_PULLUP - -/* If ARDUINO_EXTENDED_CAPABILITIES is defined and set to 1, 3 additional commands - * will become available which will speed up programming when using the Arduino - * IDE or the bossac tool standalone. Set to 0 with 4KB bootloaders. - * Size: ~904B. This is defined and set to 1 by default (except with 4KB). - */ -#define ARDUINO_EXTENDED_CAPABILITIES 1 - -/* The clock source must be chosen by setting CLOCKCONFIG_CLOCK_SOURCE to - * CLOCKCONFIG_32768HZ_CRYSTAL, CLOCKCONFIG_HS_CRYSTAL, CLOCKCONFIG_INTERNAL, - * or CLOCKCONFIG_INTERNAL_USB. If CLOCKCONFIG_32768HZ_CRYSTAL or - * CLOCKCONFIG_HS_CRYSTAL is defined, then the PLL will be used. If - * CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ must - * also be defined with the crystal frequency in Hertz. CLOCKCONFIG_INTERNAL - * uses the DFLL in open-loop mode, except with the C21 which lacks a DFLL, so - * the internal 48MHz RC oscillator is used instead. CLOCKCONFIG_INTERNAL_USB - * can be defined for the D21, D11, L21, or D51. It will also use the DFLL in - * open-loop mode, except when connected to a USB port with data lines (and - * not suspended), where it will calibrate against the USB SOF signal. - */ -#ifndef CLOCKCONFIG_CLOCK_SOURCE -#define CLOCKCONFIG_CLOCK_SOURCE CLOCKCONFIG_32768HZ_CRYSTAL -#endif - -/* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ - * must also be defined with the external crystal frequency in Hertz. - */ -//#define HS_CRYSTAL_FREQUENCY_HERTZ 16000000UL - -/* If the PLL is used (CLOCKCONFIG_32768HZ_CRYSTAL, or CLOCKCONFIG_HS_CRYSTAL - * defined), then PLL_FRACTIONAL_ENABLED can be defined, which will result in - * a more accurate 48MHz output frequency at the expense of increased jitter. - */ -//#define PLL_FRACTIONAL_ENABLED - -/* If both PLL_FAST_STARTUP and CLOCKCONFIG_HS_CRYSTAL are defined, the crystal - * will be divided down to 1MHz - 2MHz, rather than 32KHz - 64KHz, before being - * multiplied by the PLL. This will result in a faster lock time for the PLL, - * however, it will also result in a less accurate PLL output frequency if the - * crystal is not divisible (without remainder) by 1MHz. In this case, define - * PLL_FRACTIONAL_ENABLED as well. - */ -//#define PLL_FAST_STARTUP - -/* Master clock frequency (also Fcpu frequency). With the D51, - * this can be either 120000000ul or 48000000ul. See README.md. - */ -#define VARIANT_MCK (48000000ul) - -/* The fine calibration value for DFLL open-loop mode is defined here. - * The coarse calibration value is loaded from NVM OTP (factory calibration values). - */ -#define NVM_SW_CALIB_DFLL48M_FINE_VAL (512) - -/* If USB_VENDOR_STRINGS_ENABLED is defined, then STRING_MANUFACTURER and - * STRING_PRODUCT will be sent to the host. - * Size: ~228B. By default, USB_VENDOR_STRINGS_ENABLED is defined (including 4KB). - */ -#define USB_VENDOR_STRINGS_ENABLED -#define STRING_PRODUCT "Arduino Zero" - -/* If USB CDC is used, then the USB vendor ID (VID) and product ID (PID) must be set. */ -#define USB_VID_HIGH 0x23 -#define USB_VID_LOW 0x41 -#define USB_PID_HIGH 0x00 -#define USB_PID_LOW 0x4D - -/* BOOT_USART_SERCOM_INSTANCE must be a single digit representing the SERCOM number. - * See board_driver_serial.h for BOOT_USART_PAD_SETTINGS values. When setting - * BOOT_USART_PADx defines, consult the appropriate header file from CMSIS-Atmel (ie: - * ~/arduino15/packages/MattairTech_Arduino/tools/CMSIS-Atmel/1.0.0-mattairtech-2/ - * CMSIS/Device/ATMEL/sam/include/.h). Use PINMUX_UNUSED - * if not used. By default, this interface is not enabled (except with the C21). - */ -#define BOOT_USART_SERCOM_INSTANCE 0 -#define BOOT_USART_PAD_SETTINGS UART_RX_PAD3_TX_PAD2 -#define BOOT_USART_PAD3 PINMUX_PA11C_SERCOM0_PAD3 -#define BOOT_USART_PAD2 PINMUX_PA10C_SERCOM0_PAD2 -#define BOOT_USART_PAD1 PINMUX_UNUSED -#define BOOT_USART_PAD0 PINMUX_UNUSED - -/* - * If BOOT_DOUBLE_TAP_ENABLED is defined the bootloader is started by quickly - * tapping two times on the reset button (within 1/2 second). - * Size: ~96B. Enabled by default. - */ -#define BOOT_DOUBLE_TAP_ENABLED - -/* - * If BOOT_LOAD_PIN_ENABLED is defined, the bootloader is started if the selected - * pin is active after reset. There is a 10ms delay before testing the pin to - * allow time for debouncing capacitors to charge (ie: button use). PORT can be 0 - * (Port A) or 1 (Port B). Polarity can be PIN_POLARITY_ACTIVE_LOW or - * PIN_POLARITY_ACTIVE_HIGH. Config can be INPUT, INPUT_PULLUP, or INPUT_PULLDOWN. - * Size: ~84B. Disabled by default. - */ -//#define BOOT_LOAD_PIN_ENABLED -#define BOOT_LOAD_PIN_POLARITY PIN_POLARITY_ACTIVE_LOW -#define BOOT_LOAD_PIN_PORT (0) -#define BOOT_LOAD_PIN (21) -#define BOOT_LOAD_PIN_CONFIG INPUT_PULLUP - -/* - * If BOARD_LED_FADE_ENABLED is defined, then the main LED produces a PWM fade in an - * "M-wave" pattern, otherwise, it simply turns on (if enabled). When the SD bootloader - * is running, the fading will be twice as fast as the SAM-BA interface (USB CDC or UART). - * Size: ~160B. Enabled by default. - */ -#define BOARD_LED_FADE_ENABLED - -/* - * If the LED PORT is defined, then the LED on the associated pin is enabled. - * Polarity can be either LED_POLARITY_HIGH_ON or LED_POLARITY_LOW_ON. - * By default, only BOARD_LED is enabled. - */ -#define BOARD_LED_PORT (0) -#define BOARD_LED_PIN (17) -#define BOARD_LED_POLARITY LED_POLARITY_HIGH_ON - -//#define BOARD_LEDRX_PORT (1) -//#define BOARD_LEDRX_PIN (3) -//#define BOARD_LEDRX_POLARITY LED_POLARITY_LOW_ON - -//#define BOARD_LEDTX_PORT (0) -//#define BOARD_LEDTX_PIN (27) -//#define BOARD_LEDTX_POLARITY LED_POLARITY_LOW_ON - -#endif // _BOARD_DEFINITIONS_H_ diff --git a/bootloaders/zero/board_definitions/board_definitions_genuino_mkr1000.h b/bootloaders/zero/board_definitions/board_definitions_genuino_mkr1000.h deleted file mode 100644 index 5c9991f24..000000000 --- a/bootloaders/zero/board_definitions/board_definitions_genuino_mkr1000.h +++ /dev/null @@ -1,268 +0,0 @@ -/* - Copyright (c) 2017 MattairTech LLC. All right reserved. - Copyright (c) 2015 Arduino LLC. All right reserved. - Copyright (c) 2015 Atmel Corporation/Thibaut VIARD. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#ifndef _BOARD_DEFINITIONS_H_ -#define _BOARD_DEFINITIONS_H_ - -#include - -/* The SAM-BA interface, which is used with both USB CDC and UART (TTL - * serial), can operate in either binary (default) or terminal mode. If - * TERMINAL_MODE_ENABLED is defined, additional terminal handling code - * (add prompt, add \n\r to EOL, number formatting, etc.) will be compiled - * in. To switch to terminal mode, type 'T#' (you should then see a prompt). - * Then, type 'V#' to show version information. See README.md for more commands. - * Size: ~228B. Enabled by default. Disable with 4KB bootloader. - */ -#define TERMINAL_MODE_ENABLED - -/* If SDCARD_ENABLED is defined, SD card bootloader support is compiled in. - * See "SD Card Bootloader" section. This define can also be set from the - * makefile (so it can be used with the build_all_bootloaders.sh script). - * Size: ~2788B. Disabled by default. Available with 4KB bootloader. - */ -#ifndef SDCARD_ENABLED -//#define SDCARD_ENABLED -#endif - -/* If SDCARD_ENABLED is defined, then all SDCARD_SPI_* defines must also be set. - * When setting SDCARD_SPI_PADx defines, consult the appropriate header file - * from CMSIS-Atmel (ie: ~/arduino15/packages/MattairTech_Arduino/tools/CMSIS- - * Atmel/1.0.0-mattairtech-2/CMSIS/Device/ATMEL/sam/include/ - * .h). SDCARD_SPI_PAD_SETTINGS values are in SDCard/diskio.h. - * When using SDCARD_USE_PIN1 or SDCARD_USE_PIN2, the SPI peripheral and - * associated pins are only initialized if either pin is active. - */ -#define SDCARD_SPI_SERCOM_INSTANCE 4 -#define SDCARD_SPI_PAD_SETTINGS SPI_RX_PAD0_TX_PAD2_SCK_PAD3 -#define SDCARD_SPI_PAD0 PINMUX_PA12D_SERCOM4_PAD0 -#define SDCARD_SPI_PAD1 PINMUX_UNUSED -#define SDCARD_SPI_PAD2 PINMUX_PB10D_SERCOM4_PAD2 -#define SDCARD_SPI_PAD3 PINMUX_PB11D_SERCOM4_PAD3 - -/* If SDCARD_ENABLED is defined, then SDCARD_SPI_CS_PORT and SDCARD_SPI_CS_PIN - * must also be defined. PORT can be 0 (Port A) or 1 (Port B). - */ -#define SDCARD_SPI_CS_PORT (0) -#define SDCARD_SPI_CS_PIN (18) - -/* If SDCARD_ENABLED is defined, then SDCARD_USE_PIN1 and SDCARD_USE_PIN2 can - * optionally be defined. When SDCARD_USE_PIN2 is defined, SDCARD_USE_PIN1 must - * also be defined. See "SD Card External Pins" section for more information. PORT - * can be 0 (Port A) or 1 (Port B). Polarity can be PIN_POLARITY_ACTIVE_LOW or - * PIN_POLARITY_ACTIVE_HIGH. Config can be INPUT, INPUT_PULLUP, or INPUT_PULLDOWN. - * Size: ~60B for SDCARD_USE_PIN1, ~92B for both pins. By default, only pin1 used. - */ -#define SDCARD_USE_PIN1 -#define SDCARD_PIN1_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SDCARD_PIN1_PORT (0) -#define SDCARD_PIN1_PIN (6) -#define SDCARD_PIN1_CONFIG INPUT_PULLUP - -//#define SDCARD_USE_PIN2 -#define SDCARD_PIN2_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SDCARD_PIN2_PORT (0) -#define SDCARD_PIN2_PIN (7) -#define SDCARD_PIN2_CONFIG INPUT_PULLUP - -/* If SDCARD_VERIFICATION_DISABLED is defined, then verification of the FLASH - * after programming will not occur, nor will the initial check to see if the - * FLASH contents are already the same as the file. - * Size: ~284B. By default, this is not defined, so verification will be enabled. - */ -//#define SDCARD_VERIFICATION_DISABLED - -/* If SDCARD_AUTORUN_DISABLED is defined, then the SD card bootloader will not - * automatically run the firmware that was just installed. Instead, the LED will - * blink with status code LED_STATUS_SUCCESS. This option also applies when the - * binary file on the SD card already matches the installed firmware. In this - * case, the LED will blink with status code LED_STATUS_FILE_ALREADY_MATCHES. - * By default, SDCARD_AUTORUN_DISABLED is defined. - */ -#define SDCARD_AUTORUN_DISABLED - -/* Two different binary files can be loaded, depending on external pin settings. - * By default, the filenames are UPDATE.BIN and UPDATE2.BIN, but these can be - * overridden by defining SDCARD_FILENAME_PRIMARY and SDCARD_FILENAME_SECONDARY. - * If both pins are configured, SDCARD_FILENAME_PRIMARY (UPDATE.BIN) will be - * loaded when PIN1 is enabled, and SDCARD_FILENAME_PRIMARY (UPDATE2.BIN) is - * loaded when PIN2 is enabled. If only one pin or no pin is configured, only - * SDCARD_FILENAME_PRIMARY is loaded. - */ -//#define SDCARD_FILENAME_PRIMARY "UPDATE.BIN" -//#define SDCARD_FILENAME_SECONDARY "UPDATE2.BIN" - -/* Set SAM_BA_INTERFACE to SAM_BA_USBCDC_ONLY, SAM_BA_UART_ONLY, SAM_BA_NONE, or - * SAM_BA_BOTH_INTERFACES. With 4KB bootloaders, select only one interface (except - * when using SDCARD_ENABLED, then set SAM_BA_INTERFACE to SAM_BA_NONE). The C21 - * lacks USB, so set to SAM_BA_UART_ONLY in this case. By default, - * SAM_BA_USBCDC_ONLY is set (SAM_BA_UART_ONLY with the C21). - */ -#if defined(SDCARD_ENABLED) - #define SAM_BA_INTERFACE SAM_BA_USBCDC_ONLY -#else - #define SAM_BA_INTERFACE SAM_BA_BOTH_INTERFACES -#endif - -/* If SAM_BA_INTERFACE_USE_PIN is defined, then the associated pin controls which - * SAM-BA interface is used (if SAM_BA_BOTH_INTERFACES is defined). If only one - * interface is used, then the pin acts as an enable. In both cases, the value of - * SAM_BA_INTERFACE_PIN_POLARITY controls the polarity, with values of - * PIN_POLARITY_ACTIVE_LOW or PIN_POLARITY_ACTIVE_HIGH for a single interface, and - * PIN_POLARITY_USBCDC_LOW or PIN_POLARITY_USBCDC_HIGH when both interfaces are - * enabled. PORT can be 0 (Port A) or 1 (Port B). Config can be INPUT, INPUT_PULLUP, - * or INPUT_PULLDOWN.The USB/UART peripheral and pins will not be setup if the - * device is not selected/enabled. If no interface is selected by the pin, the LED - * will blink with status code LED_STATUS_NO_SAM_BA_INTERFACE. - * Size: ~100B. By default, SAM_BA_INTERFACE_USE_PIN is not defined. - */ -//#define SAM_BA_INTERFACE_USE_PIN -#define SAM_BA_INTERFACE_PIN_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SAM_BA_INTERFACE_PIN_PORT (0) -#define SAM_BA_INTERFACE_PIN_PIN (21) -#define SAM_BA_INTERFACE_PIN_CONFIG INPUT_PULLUP - -/* If ARDUINO_EXTENDED_CAPABILITIES is defined and set to 1, 3 additional commands - * will become available which will speed up programming when using the Arduino - * IDE or the bossac tool standalone. Set to 0 with 4KB bootloaders. - * Size: ~904B. This is defined and set to 1 by default (except with 4KB). - */ -#define ARDUINO_EXTENDED_CAPABILITIES 1 - -/* The clock source must be chosen by setting CLOCKCONFIG_CLOCK_SOURCE to - * CLOCKCONFIG_32768HZ_CRYSTAL, CLOCKCONFIG_HS_CRYSTAL, CLOCKCONFIG_INTERNAL, - * or CLOCKCONFIG_INTERNAL_USB. If CLOCKCONFIG_32768HZ_CRYSTAL or - * CLOCKCONFIG_HS_CRYSTAL is defined, then the PLL will be used. If - * CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ must - * also be defined with the crystal frequency in Hertz. CLOCKCONFIG_INTERNAL - * uses the DFLL in open-loop mode, except with the C21 which lacks a DFLL, so - * the internal 48MHz RC oscillator is used instead. CLOCKCONFIG_INTERNAL_USB - * can be defined for the D21, D11, L21, or D51. It will also use the DFLL in - * open-loop mode, except when connected to a USB port with data lines (and - * not suspended), where it will calibrate against the USB SOF signal. - */ -#ifndef CLOCKCONFIG_CLOCK_SOURCE -#define CLOCKCONFIG_CLOCK_SOURCE CLOCKCONFIG_32768HZ_CRYSTAL -#endif - -/* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ - * must also be defined with the external crystal frequency in Hertz. - */ -//#define HS_CRYSTAL_FREQUENCY_HERTZ 16000000UL - -/* If the PLL is used (CLOCKCONFIG_32768HZ_CRYSTAL, or CLOCKCONFIG_HS_CRYSTAL - * defined), then PLL_FRACTIONAL_ENABLED can be defined, which will result in - * a more accurate 48MHz output frequency at the expense of increased jitter. - */ -//#define PLL_FRACTIONAL_ENABLED - -/* If both PLL_FAST_STARTUP and CLOCKCONFIG_HS_CRYSTAL are defined, the crystal - * will be divided down to 1MHz - 2MHz, rather than 32KHz - 64KHz, before being - * multiplied by the PLL. This will result in a faster lock time for the PLL, - * however, it will also result in a less accurate PLL output frequency if the - * crystal is not divisible (without remainder) by 1MHz. In this case, define - * PLL_FRACTIONAL_ENABLED as well. - */ -//#define PLL_FAST_STARTUP - -/* Master clock frequency (also Fcpu frequency). With the D51, - * this can be either 120000000ul or 48000000ul. See README.md. - */ -#define VARIANT_MCK (48000000ul) - -/* The fine calibration value for DFLL open-loop mode is defined here. - * The coarse calibration value is loaded from NVM OTP (factory calibration values). - */ -#define NVM_SW_CALIB_DFLL48M_FINE_VAL (512) - -/* If USB_VENDOR_STRINGS_ENABLED is defined, then STRING_MANUFACTURER and - * STRING_PRODUCT will be sent to the host. - * Size: ~228B. By default, USB_VENDOR_STRINGS_ENABLED is defined (including 4KB). - */ -#define USB_VENDOR_STRINGS_ENABLED -#define STRING_PRODUCT "Genuino MKR1000" - -/* If USB CDC is used, then the USB vendor ID (VID) and product ID (PID) must be set. */ -#define USB_VID_HIGH 0x23 -#define USB_VID_LOW 0x41 -#define USB_PID_HIGH 0x02 -#define USB_PID_LOW 0x4E - -/* BOOT_USART_SERCOM_INSTANCE must be a single digit representing the SERCOM number. - * See board_driver_serial.h for BOOT_USART_PAD_SETTINGS values. When setting - * BOOT_USART_PADx defines, consult the appropriate header file from CMSIS-Atmel (ie: - * ~/arduino15/packages/MattairTech_Arduino/tools/CMSIS-Atmel/1.0.0-mattairtech-2/ - * CMSIS/Device/ATMEL/sam/include/.h). Use PINMUX_UNUSED - * if not used. By default, this interface is not enabled (except with the C21). - */ -#define BOOT_USART_SERCOM_INSTANCE 0 -#define BOOT_USART_PAD_SETTINGS UART_RX_PAD3_TX_PAD2 -#define BOOT_USART_PAD3 PINMUX_PA11C_SERCOM0_PAD3 -#define BOOT_USART_PAD2 PINMUX_PA10C_SERCOM0_PAD2 -#define BOOT_USART_PAD1 PINMUX_UNUSED -#define BOOT_USART_PAD0 PINMUX_UNUSED - -/* - * If BOOT_DOUBLE_TAP_ENABLED is defined the bootloader is started by quickly - * tapping two times on the reset button (within 1/2 second). - * Size: ~96B. Enabled by default. - */ -#define BOOT_DOUBLE_TAP_ENABLED - -/* - * If BOOT_LOAD_PIN_ENABLED is defined, the bootloader is started if the selected - * pin is active after reset. There is a 10ms delay before testing the pin to - * allow time for debouncing capacitors to charge (ie: button use). PORT can be 0 - * (Port A) or 1 (Port B). Polarity can be PIN_POLARITY_ACTIVE_LOW or - * PIN_POLARITY_ACTIVE_HIGH. Config can be INPUT, INPUT_PULLUP, or INPUT_PULLDOWN. - * Size: ~84B. Disabled by default. - */ -//#define BOOT_LOAD_PIN_ENABLED -#define BOOT_LOAD_PIN_POLARITY PIN_POLARITY_ACTIVE_LOW -#define BOOT_LOAD_PIN_PORT (0) -#define BOOT_LOAD_PIN (21) -#define BOOT_LOAD_PIN_CONFIG INPUT_PULLUP - -/* - * If BOARD_LED_FADE_ENABLED is defined, then the main LED produces a PWM fade in an - * "M-wave" pattern, otherwise, it simply turns on (if enabled). When the SD bootloader - * is running, the fading will be twice as fast as the SAM-BA interface (USB CDC or UART). - * Size: ~160B. Enabled by default. - */ -#define BOARD_LED_FADE_ENABLED - -/* - * If the LED PORT is defined, then the LED on the associated pin is enabled. - * Polarity can be either LED_POLARITY_HIGH_ON or LED_POLARITY_LOW_ON. - * By default, only BOARD_LED is enabled. - */ -#define BOARD_LED_PORT (0) -#define BOARD_LED_PIN (20) -#define BOARD_LED_POLARITY LED_POLARITY_HIGH_ON - -//#define BOARD_LEDRX_PORT (0) -//#define BOARD_LEDRX_PIN (20) -//#define BOARD_LEDRX_POLARITY LED_POLARITY_LOW_ON - -//#define BOARD_LEDTX_PORT (0) -//#define BOARD_LEDTX_PIN (20) -//#define BOARD_LEDTX_POLARITY LED_POLARITY_LOW_ON - -#endif // _BOARD_DEFINITIONS_H_ diff --git a/bootloaders/zero/board_definitions/board_definitions_genuino_zero.h b/bootloaders/zero/board_definitions/board_definitions_genuino_zero.h deleted file mode 100644 index 3c60be5d0..000000000 --- a/bootloaders/zero/board_definitions/board_definitions_genuino_zero.h +++ /dev/null @@ -1,268 +0,0 @@ -/* - Copyright (c) 2017 MattairTech LLC. All right reserved. - Copyright (c) 2015 Arduino LLC. All right reserved. - Copyright (c) 2015 Atmel Corporation/Thibaut VIARD. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#ifndef _BOARD_DEFINITIONS_H_ -#define _BOARD_DEFINITIONS_H_ - -#include - -/* The SAM-BA interface, which is used with both USB CDC and UART (TTL - * serial), can operate in either binary (default) or terminal mode. If - * TERMINAL_MODE_ENABLED is defined, additional terminal handling code - * (add prompt, add \n\r to EOL, number formatting, etc.) will be compiled - * in. To switch to terminal mode, type 'T#' (you should then see a prompt). - * Then, type 'V#' to show version information. See README.md for more commands. - * Size: ~228B. Enabled by default. Disable with 4KB bootloader. - */ -#define TERMINAL_MODE_ENABLED - -/* If SDCARD_ENABLED is defined, SD card bootloader support is compiled in. - * See "SD Card Bootloader" section. This define can also be set from the - * makefile (so it can be used with the build_all_bootloaders.sh script). - * Size: ~2788B. Disabled by default. Available with 4KB bootloader. - */ -#ifndef SDCARD_ENABLED -//#define SDCARD_ENABLED -#endif - -/* If SDCARD_ENABLED is defined, then all SDCARD_SPI_* defines must also be set. - * When setting SDCARD_SPI_PADx defines, consult the appropriate header file - * from CMSIS-Atmel (ie: ~/arduino15/packages/MattairTech_Arduino/tools/CMSIS- - * Atmel/1.0.0-mattairtech-2/CMSIS/Device/ATMEL/sam/include/ - * .h). SDCARD_SPI_PAD_SETTINGS values are in SDCard/diskio.h. - * When using SDCARD_USE_PIN1 or SDCARD_USE_PIN2, the SPI peripheral and - * associated pins are only initialized if either pin is active. - */ -#define SDCARD_SPI_SERCOM_INSTANCE 4 -#define SDCARD_SPI_PAD_SETTINGS SPI_RX_PAD0_TX_PAD2_SCK_PAD3 -#define SDCARD_SPI_PAD0 PINMUX_PA12D_SERCOM4_PAD0 -#define SDCARD_SPI_PAD1 PINMUX_UNUSED -#define SDCARD_SPI_PAD2 PINMUX_PB10D_SERCOM4_PAD2 -#define SDCARD_SPI_PAD3 PINMUX_PB11D_SERCOM4_PAD3 - -/* If SDCARD_ENABLED is defined, then SDCARD_SPI_CS_PORT and SDCARD_SPI_CS_PIN - * must also be defined. PORT can be 0 (Port A) or 1 (Port B). - */ -#define SDCARD_SPI_CS_PORT (0) -#define SDCARD_SPI_CS_PIN (18) - -/* If SDCARD_ENABLED is defined, then SDCARD_USE_PIN1 and SDCARD_USE_PIN2 can - * optionally be defined. When SDCARD_USE_PIN2 is defined, SDCARD_USE_PIN1 must - * also be defined. See "SD Card External Pins" section for more information. PORT - * can be 0 (Port A) or 1 (Port B). Polarity can be PIN_POLARITY_ACTIVE_LOW or - * PIN_POLARITY_ACTIVE_HIGH. Config can be INPUT, INPUT_PULLUP, or INPUT_PULLDOWN. - * Size: ~60B for SDCARD_USE_PIN1, ~92B for both pins. By default, only pin1 used. - */ -#define SDCARD_USE_PIN1 -#define SDCARD_PIN1_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SDCARD_PIN1_PORT (0) -#define SDCARD_PIN1_PIN (6) -#define SDCARD_PIN1_CONFIG INPUT_PULLUP - -//#define SDCARD_USE_PIN2 -#define SDCARD_PIN2_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SDCARD_PIN2_PORT (0) -#define SDCARD_PIN2_PIN (7) -#define SDCARD_PIN2_CONFIG INPUT_PULLUP - -/* If SDCARD_VERIFICATION_DISABLED is defined, then verification of the FLASH - * after programming will not occur, nor will the initial check to see if the - * FLASH contents are already the same as the file. - * Size: ~284B. By default, this is not defined, so verification will be enabled. - */ -//#define SDCARD_VERIFICATION_DISABLED - -/* If SDCARD_AUTORUN_DISABLED is defined, then the SD card bootloader will not - * automatically run the firmware that was just installed. Instead, the LED will - * blink with status code LED_STATUS_SUCCESS. This option also applies when the - * binary file on the SD card already matches the installed firmware. In this - * case, the LED will blink with status code LED_STATUS_FILE_ALREADY_MATCHES. - * By default, SDCARD_AUTORUN_DISABLED is defined. - */ -#define SDCARD_AUTORUN_DISABLED - -/* Two different binary files can be loaded, depending on external pin settings. - * By default, the filenames are UPDATE.BIN and UPDATE2.BIN, but these can be - * overridden by defining SDCARD_FILENAME_PRIMARY and SDCARD_FILENAME_SECONDARY. - * If both pins are configured, SDCARD_FILENAME_PRIMARY (UPDATE.BIN) will be - * loaded when PIN1 is enabled, and SDCARD_FILENAME_PRIMARY (UPDATE2.BIN) is - * loaded when PIN2 is enabled. If only one pin or no pin is configured, only - * SDCARD_FILENAME_PRIMARY is loaded. - */ -//#define SDCARD_FILENAME_PRIMARY "UPDATE.BIN" -//#define SDCARD_FILENAME_SECONDARY "UPDATE2.BIN" - -/* Set SAM_BA_INTERFACE to SAM_BA_USBCDC_ONLY, SAM_BA_UART_ONLY, SAM_BA_NONE, or - * SAM_BA_BOTH_INTERFACES. With 4KB bootloaders, select only one interface (except - * when using SDCARD_ENABLED, then set SAM_BA_INTERFACE to SAM_BA_NONE). The C21 - * lacks USB, so set to SAM_BA_UART_ONLY in this case. By default, - * SAM_BA_USBCDC_ONLY is set (SAM_BA_UART_ONLY with the C21). - */ -#if defined(SDCARD_ENABLED) - #define SAM_BA_INTERFACE SAM_BA_USBCDC_ONLY -#else - #define SAM_BA_INTERFACE SAM_BA_BOTH_INTERFACES -#endif - -/* If SAM_BA_INTERFACE_USE_PIN is defined, then the associated pin controls which - * SAM-BA interface is used (if SAM_BA_BOTH_INTERFACES is defined). If only one - * interface is used, then the pin acts as an enable. In both cases, the value of - * SAM_BA_INTERFACE_PIN_POLARITY controls the polarity, with values of - * PIN_POLARITY_ACTIVE_LOW or PIN_POLARITY_ACTIVE_HIGH for a single interface, and - * PIN_POLARITY_USBCDC_LOW or PIN_POLARITY_USBCDC_HIGH when both interfaces are - * enabled. PORT can be 0 (Port A) or 1 (Port B). Config can be INPUT, INPUT_PULLUP, - * or INPUT_PULLDOWN.The USB/UART peripheral and pins will not be setup if the - * device is not selected/enabled. If no interface is selected by the pin, the LED - * will blink with status code LED_STATUS_NO_SAM_BA_INTERFACE. - * Size: ~100B. By default, SAM_BA_INTERFACE_USE_PIN is not defined. - */ -//#define SAM_BA_INTERFACE_USE_PIN -#define SAM_BA_INTERFACE_PIN_POLARITY PIN_POLARITY_ACTIVE_LOW -#define SAM_BA_INTERFACE_PIN_PORT (0) -#define SAM_BA_INTERFACE_PIN_PIN (21) -#define SAM_BA_INTERFACE_PIN_CONFIG INPUT_PULLUP - -/* If ARDUINO_EXTENDED_CAPABILITIES is defined and set to 1, 3 additional commands - * will become available which will speed up programming when using the Arduino - * IDE or the bossac tool standalone. Set to 0 with 4KB bootloaders. - * Size: ~904B. This is defined and set to 1 by default (except with 4KB). - */ -#define ARDUINO_EXTENDED_CAPABILITIES 1 - -/* The clock source must be chosen by setting CLOCKCONFIG_CLOCK_SOURCE to - * CLOCKCONFIG_32768HZ_CRYSTAL, CLOCKCONFIG_HS_CRYSTAL, CLOCKCONFIG_INTERNAL, - * or CLOCKCONFIG_INTERNAL_USB. If CLOCKCONFIG_32768HZ_CRYSTAL or - * CLOCKCONFIG_HS_CRYSTAL is defined, then the PLL will be used. If - * CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ must - * also be defined with the crystal frequency in Hertz. CLOCKCONFIG_INTERNAL - * uses the DFLL in open-loop mode, except with the C21 which lacks a DFLL, so - * the internal 48MHz RC oscillator is used instead. CLOCKCONFIG_INTERNAL_USB - * can be defined for the D21, D11, L21, or D51. It will also use the DFLL in - * open-loop mode, except when connected to a USB port with data lines (and - * not suspended), where it will calibrate against the USB SOF signal. - */ -#ifndef CLOCKCONFIG_CLOCK_SOURCE -#define CLOCKCONFIG_CLOCK_SOURCE CLOCKCONFIG_32768HZ_CRYSTAL -#endif - -/* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ - * must also be defined with the external crystal frequency in Hertz. - */ -//#define HS_CRYSTAL_FREQUENCY_HERTZ 16000000UL - -/* If the PLL is used (CLOCKCONFIG_32768HZ_CRYSTAL, or CLOCKCONFIG_HS_CRYSTAL - * defined), then PLL_FRACTIONAL_ENABLED can be defined, which will result in - * a more accurate 48MHz output frequency at the expense of increased jitter. - */ -//#define PLL_FRACTIONAL_ENABLED - -/* If both PLL_FAST_STARTUP and CLOCKCONFIG_HS_CRYSTAL are defined, the crystal - * will be divided down to 1MHz - 2MHz, rather than 32KHz - 64KHz, before being - * multiplied by the PLL. This will result in a faster lock time for the PLL, - * however, it will also result in a less accurate PLL output frequency if the - * crystal is not divisible (without remainder) by 1MHz. In this case, define - * PLL_FRACTIONAL_ENABLED as well. - */ -//#define PLL_FAST_STARTUP - -/* Master clock frequency (also Fcpu frequency). With the D51, - * this can be either 120000000ul or 48000000ul. See README.md. - */ -#define VARIANT_MCK (48000000ul) - -/* The fine calibration value for DFLL open-loop mode is defined here. - * The coarse calibration value is loaded from NVM OTP (factory calibration values). - */ -#define NVM_SW_CALIB_DFLL48M_FINE_VAL (512) - -/* If USB_VENDOR_STRINGS_ENABLED is defined, then STRING_MANUFACTURER and - * STRING_PRODUCT will be sent to the host. - * Size: ~228B. By default, USB_VENDOR_STRINGS_ENABLED is defined (including 4KB). - */ -#define USB_VENDOR_STRINGS_ENABLED -#define STRING_PRODUCT "Genuino Zero" - -/* If USB CDC is used, then the USB vendor ID (VID) and product ID (PID) must be set. */ -#define USB_VID_HIGH 0x23 -#define USB_VID_LOW 0x41 -#define USB_PID_HIGH 0x02 -#define USB_PID_LOW 0x4D - -/* BOOT_USART_SERCOM_INSTANCE must be a single digit representing the SERCOM number. - * See board_driver_serial.h for BOOT_USART_PAD_SETTINGS values. When setting - * BOOT_USART_PADx defines, consult the appropriate header file from CMSIS-Atmel (ie: - * ~/arduino15/packages/MattairTech_Arduino/tools/CMSIS-Atmel/1.0.0-mattairtech-2/ - * CMSIS/Device/ATMEL/sam/include/.h). Use PINMUX_UNUSED - * if not used. By default, this interface is not enabled (except with the C21). - */ -#define BOOT_USART_SERCOM_INSTANCE 0 -#define BOOT_USART_PAD_SETTINGS UART_RX_PAD3_TX_PAD2 -#define BOOT_USART_PAD3 PINMUX_PA11C_SERCOM0_PAD3 -#define BOOT_USART_PAD2 PINMUX_PA10C_SERCOM0_PAD2 -#define BOOT_USART_PAD1 PINMUX_UNUSED -#define BOOT_USART_PAD0 PINMUX_UNUSED - -/* - * If BOOT_DOUBLE_TAP_ENABLED is defined the bootloader is started by quickly - * tapping two times on the reset button (within 1/2 second). - * Size: ~96B. Enabled by default. - */ -#define BOOT_DOUBLE_TAP_ENABLED - -/* - * If BOOT_LOAD_PIN_ENABLED is defined, the bootloader is started if the selected - * pin is active after reset. There is a 10ms delay before testing the pin to - * allow time for debouncing capacitors to charge (ie: button use). PORT can be 0 - * (Port A) or 1 (Port B). Polarity can be PIN_POLARITY_ACTIVE_LOW or - * PIN_POLARITY_ACTIVE_HIGH. Config can be INPUT, INPUT_PULLUP, or INPUT_PULLDOWN. - * Size: ~84B. Disabled by default. - */ -//#define BOOT_LOAD_PIN_ENABLED -#define BOOT_LOAD_PIN_POLARITY PIN_POLARITY_ACTIVE_LOW -#define BOOT_LOAD_PIN_PORT (0) -#define BOOT_LOAD_PIN (21) -#define BOOT_LOAD_PIN_CONFIG INPUT_PULLUP - -/* - * If BOARD_LED_FADE_ENABLED is defined, then the main LED produces a PWM fade in an - * "M-wave" pattern, otherwise, it simply turns on (if enabled). When the SD bootloader - * is running, the fading will be twice as fast as the SAM-BA interface (USB CDC or UART). - * Size: ~160B. Enabled by default. - */ -#define BOARD_LED_FADE_ENABLED - -/* - * If the LED PORT is defined, then the LED on the associated pin is enabled. - * Polarity can be either LED_POLARITY_HIGH_ON or LED_POLARITY_LOW_ON. - * By default, only BOARD_LED is enabled. - */ -#define BOARD_LED_PORT (0) -#define BOARD_LED_PIN (17) -#define BOARD_LED_POLARITY LED_POLARITY_HIGH_ON - -//#define BOARD_LEDRX_PORT (1) -//#define BOARD_LEDRX_PIN (3) -//#define BOARD_LEDRX_POLARITY LED_POLARITY_LOW_ON - -//#define BOARD_LEDTX_PORT (0) -//#define BOARD_LEDTX_PIN (27) -//#define BOARD_LEDTX_POLARITY LED_POLARITY_LOW_ON - -#endif // _BOARD_DEFINITIONS_H_ diff --git a/bootloaders/zero/build_all_bootloaders.sh b/bootloaders/zero/build_all_bootloaders.sh index e9ec96577..d5a67f1a5 100755 --- a/bootloaders/zero/build_all_bootloaders.sh +++ b/bootloaders/zero/build_all_bootloaders.sh @@ -3,26 +3,6 @@ make clean # With SDCARD_DISABLED -BOARD_ID=Xeno MCU=SAMD21J18A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Xeno MCU=SAML21J18B SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Xeno MCU=SAMC21J18A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Xeno MCU=SAMD51J20A SDCARD=SDCARD_DISABLED make all mostly_clean - -BOARD_ID=Xeno_Mini MCU=SAMD51G19A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Xeno_Mini MCU=SAMD21G18A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Xeno_Mini MCU=SAML21G18B SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Xeno_Mini MCU=SAMC21G18A SDCARD=SDCARD_DISABLED make all mostly_clean - -BOARD_ID=MT_D21E_rev_A MCU=SAMD21E17A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=MT_D21E_rev_A MCU=SAMD21E18A SDCARD=SDCARD_DISABLED make all mostly_clean - -BOARD_ID=MT_D21E_rev_B MCU=SAMD21E17A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=MT_D21E_rev_B MCU=SAMD21E18A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=MT_D21E_rev_B MCU=SAML21E18B SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=MT_D21E_rev_B MCU=SAMC21E18A SDCARD=SDCARD_DISABLED make all mostly_clean - -BOARD_ID=MT_D11 MCU=SAMD11D14AM SDCARD=SDCARD_DISABLED make all mostly_clean - BOARD_ID=Generic_x21E MCU=SAMD21E15A SDCARD=SDCARD_DISABLED make all mostly_clean BOARD_ID=Generic_x21E MCU=SAMD21E16A SDCARD=SDCARD_DISABLED make all mostly_clean BOARD_ID=Generic_x21E MCU=SAMD21E17A SDCARD=SDCARD_DISABLED make all mostly_clean @@ -36,34 +16,36 @@ BOARD_ID=Generic_x21E MCU=SAMC21E16A SDCARD=SDCARD_DISABLED make all mostly_clea BOARD_ID=Generic_x21E MCU=SAMC21E17A SDCARD=SDCARD_DISABLED make all mostly_clean BOARD_ID=Generic_x21E MCU=SAMC21E18A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Generic_xx1G MCU=SAMD21G15A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Generic_xx1G MCU=SAMD21G16A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Generic_xx1G MCU=SAMD21G17A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Generic_xx1G MCU=SAMD21G18A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Generic_xx1G MCU=SAML21G16B SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Generic_xx1G MCU=SAML21G17B SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Generic_xx1G MCU=SAML21G18B SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Generic_xx1G MCU=SAMC21G15A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Generic_xx1G MCU=SAMC21G16A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Generic_xx1G MCU=SAMC21G17A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Generic_xx1G MCU=SAMC21G18A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Generic_xx1G MCU=SAMD51G18A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Generic_xx1G MCU=SAMD51G19A SDCARD=SDCARD_DISABLED make all mostly_clean - -BOARD_ID=Generic_xx1J MCU=SAMD21J15A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Generic_xx1J MCU=SAMD21J16A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Generic_xx1J MCU=SAMD21J17A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Generic_xx1J MCU=SAMD21J18A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Generic_xx1J MCU=SAML21J16B SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Generic_xx1J MCU=SAML21J17B SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Generic_xx1J MCU=SAML21J18B SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Generic_xx1J MCU=SAMC21J15A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Generic_xx1J MCU=SAMC21J16A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Generic_xx1J MCU=SAMC21J17A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Generic_xx1J MCU=SAMC21J18A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Generic_xx1J MCU=SAMD51J18A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Generic_xx1J MCU=SAMD51J19A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=Generic_xx1J MCU=SAMD51J20A SDCARD=SDCARD_DISABLED make all mostly_clean +BOARD_ID=Generic_x21G MCU=SAMD21G15A SDCARD=SDCARD_DISABLED make all mostly_clean +BOARD_ID=Generic_x21G MCU=SAMD21G16A SDCARD=SDCARD_DISABLED make all mostly_clean +BOARD_ID=Generic_x21G MCU=SAMD21G17A SDCARD=SDCARD_DISABLED make all mostly_clean +BOARD_ID=Generic_x21G MCU=SAMD21G18A SDCARD=SDCARD_DISABLED make all mostly_clean +BOARD_ID=Generic_x21G MCU=SAML21G16B SDCARD=SDCARD_DISABLED make all mostly_clean +BOARD_ID=Generic_x21G MCU=SAML21G17B SDCARD=SDCARD_DISABLED make all mostly_clean +BOARD_ID=Generic_x21G MCU=SAML21G18B SDCARD=SDCARD_DISABLED make all mostly_clean +BOARD_ID=Generic_x21G MCU=SAMC21G15A SDCARD=SDCARD_DISABLED make all mostly_clean +BOARD_ID=Generic_x21G MCU=SAMC21G16A SDCARD=SDCARD_DISABLED make all mostly_clean +BOARD_ID=Generic_x21G MCU=SAMC21G17A SDCARD=SDCARD_DISABLED make all mostly_clean +BOARD_ID=Generic_x21G MCU=SAMC21G18A SDCARD=SDCARD_DISABLED make all mostly_clean + +BOARD_ID=Generic_x21J MCU=SAMD21J15A SDCARD=SDCARD_DISABLED make all mostly_clean +BOARD_ID=Generic_x21J MCU=SAMD21J16A SDCARD=SDCARD_DISABLED make all mostly_clean +BOARD_ID=Generic_x21J MCU=SAMD21J17A SDCARD=SDCARD_DISABLED make all mostly_clean +BOARD_ID=Generic_x21J MCU=SAMD21J18A SDCARD=SDCARD_DISABLED make all mostly_clean +BOARD_ID=Generic_x21J MCU=SAML21J16B SDCARD=SDCARD_DISABLED make all mostly_clean +BOARD_ID=Generic_x21J MCU=SAML21J17B SDCARD=SDCARD_DISABLED make all mostly_clean +BOARD_ID=Generic_x21J MCU=SAML21J18B SDCARD=SDCARD_DISABLED make all mostly_clean +BOARD_ID=Generic_x21J MCU=SAMC21J15A SDCARD=SDCARD_DISABLED make all mostly_clean +BOARD_ID=Generic_x21J MCU=SAMC21J16A SDCARD=SDCARD_DISABLED make all mostly_clean +BOARD_ID=Generic_x21J MCU=SAMC21J17A SDCARD=SDCARD_DISABLED make all mostly_clean +BOARD_ID=Generic_x21J MCU=SAMC21J18A SDCARD=SDCARD_DISABLED make all mostly_clean + +BOARD_ID=Generic_D51G MCU=SAMD51G18A SDCARD=SDCARD_DISABLED make all mostly_clean +BOARD_ID=Generic_D51G MCU=SAMD51G19A SDCARD=SDCARD_DISABLED make all mostly_clean + +BOARD_ID=Generic_D51J MCU=SAMD51J18A SDCARD=SDCARD_DISABLED make all mostly_clean +BOARD_ID=Generic_D51J MCU=SAMD51J19A SDCARD=SDCARD_DISABLED make all mostly_clean +BOARD_ID=Generic_D51J MCU=SAMD51J20A SDCARD=SDCARD_DISABLED make all mostly_clean BOARD_ID=Generic_D51N MCU=SAMD51N19A SDCARD=SDCARD_DISABLED make all mostly_clean BOARD_ID=Generic_D51N MCU=SAMD51N20A SDCARD=SDCARD_DISABLED make all mostly_clean @@ -75,38 +57,7 @@ BOARD_ID=Generic_D11D14AM MCU=SAMD11D14AM SDCARD=SDCARD_DISABLED make all mostly BOARD_ID=Generic_D11D14AS MCU=SAMD11D14AS SDCARD=SDCARD_DISABLED make all mostly_clean BOARD_ID=Generic_D11C14A MCU=SAMD11C14A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=arduino_zero MCU=SAMD21G18A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=genuino_zero MCU=SAMD21G18A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=arduino_mkr1000 MCU=SAMD21G18A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=genuino_mkr1000 MCU=SAMD21G18A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=arduino_mkrzero MCU=SAMD21G18A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=arduino_mkrfox1200 MCU=SAMD21G18A SDCARD=SDCARD_DISABLED make all mostly_clean - -BOARD_ID=arduino_m0 MCU=SAMD21G18A SDCARD=SDCARD_DISABLED make all mostly_clean -BOARD_ID=arduino_m0_pro MCU=SAMD21G18A SDCARD=SDCARD_DISABLED make all mostly_clean - - # With SDCARD_ENABLED -BOARD_ID=Xeno MCU=SAMD21J18A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Xeno MCU=SAML21J18B SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Xeno MCU=SAMC21J18A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Xeno MCU=SAMD51J20A SDCARD=SDCARD_ENABLED make all mostly_clean - -BOARD_ID=Xeno_Mini MCU=SAMD51G19A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Xeno_Mini MCU=SAMD21G18A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Xeno_Mini MCU=SAML21G18B SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Xeno_Mini MCU=SAMC21G18A SDCARD=SDCARD_ENABLED make all mostly_clean - -BOARD_ID=MT_D21E_rev_A MCU=SAMD21E17A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=MT_D21E_rev_A MCU=SAMD21E18A SDCARD=SDCARD_ENABLED make all mostly_clean - -BOARD_ID=MT_D21E_rev_B MCU=SAMD21E17A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=MT_D21E_rev_B MCU=SAMD21E18A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=MT_D21E_rev_B MCU=SAML21E18B SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=MT_D21E_rev_B MCU=SAMC21E18A SDCARD=SDCARD_ENABLED make all mostly_clean - -BOARD_ID=MT_D11 MCU=SAMD11D14AM SDCARD=SDCARD_ENABLED make all mostly_clean - BOARD_ID=Generic_x21E MCU=SAMD21E15A SDCARD=SDCARD_ENABLED make all mostly_clean BOARD_ID=Generic_x21E MCU=SAMD21E16A SDCARD=SDCARD_ENABLED make all mostly_clean BOARD_ID=Generic_x21E MCU=SAMD21E17A SDCARD=SDCARD_ENABLED make all mostly_clean @@ -120,34 +71,36 @@ BOARD_ID=Generic_x21E MCU=SAMC21E16A SDCARD=SDCARD_ENABLED make all mostly_clean BOARD_ID=Generic_x21E MCU=SAMC21E17A SDCARD=SDCARD_ENABLED make all mostly_clean BOARD_ID=Generic_x21E MCU=SAMC21E18A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Generic_xx1G MCU=SAMD21G15A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Generic_xx1G MCU=SAMD21G16A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Generic_xx1G MCU=SAMD21G17A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Generic_xx1G MCU=SAMD21G18A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Generic_xx1G MCU=SAML21G16B SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Generic_xx1G MCU=SAML21G17B SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Generic_xx1G MCU=SAML21G18B SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Generic_xx1G MCU=SAMC21G15A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Generic_xx1G MCU=SAMC21G16A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Generic_xx1G MCU=SAMC21G17A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Generic_xx1G MCU=SAMC21G18A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Generic_xx1G MCU=SAMD51G18A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Generic_xx1G MCU=SAMD51G19A SDCARD=SDCARD_ENABLED make all mostly_clean - -BOARD_ID=Generic_xx1J MCU=SAMD21J15A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Generic_xx1J MCU=SAMD21J16A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Generic_xx1J MCU=SAMD21J17A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Generic_xx1J MCU=SAMD21J18A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Generic_xx1J MCU=SAML21J16B SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Generic_xx1J MCU=SAML21J17B SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Generic_xx1J MCU=SAML21J18B SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Generic_xx1J MCU=SAMC21J15A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Generic_xx1J MCU=SAMC21J16A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Generic_xx1J MCU=SAMC21J17A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Generic_xx1J MCU=SAMC21J18A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Generic_xx1J MCU=SAMD51J18A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Generic_xx1J MCU=SAMD51J19A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=Generic_xx1J MCU=SAMD51J20A SDCARD=SDCARD_ENABLED make all mostly_clean +BOARD_ID=Generic_x21G MCU=SAMD21G15A SDCARD=SDCARD_ENABLED make all mostly_clean +BOARD_ID=Generic_x21G MCU=SAMD21G16A SDCARD=SDCARD_ENABLED make all mostly_clean +BOARD_ID=Generic_x21G MCU=SAMD21G17A SDCARD=SDCARD_ENABLED make all mostly_clean +BOARD_ID=Generic_x21G MCU=SAMD21G18A SDCARD=SDCARD_ENABLED make all mostly_clean +BOARD_ID=Generic_x21G MCU=SAML21G16B SDCARD=SDCARD_ENABLED make all mostly_clean +BOARD_ID=Generic_x21G MCU=SAML21G17B SDCARD=SDCARD_ENABLED make all mostly_clean +BOARD_ID=Generic_x21G MCU=SAML21G18B SDCARD=SDCARD_ENABLED make all mostly_clean +BOARD_ID=Generic_x21G MCU=SAMC21G15A SDCARD=SDCARD_ENABLED make all mostly_clean +BOARD_ID=Generic_x21G MCU=SAMC21G16A SDCARD=SDCARD_ENABLED make all mostly_clean +BOARD_ID=Generic_x21G MCU=SAMC21G17A SDCARD=SDCARD_ENABLED make all mostly_clean +BOARD_ID=Generic_x21G MCU=SAMC21G18A SDCARD=SDCARD_ENABLED make all mostly_clean + +BOARD_ID=Generic_x21J MCU=SAMD21J15A SDCARD=SDCARD_ENABLED make all mostly_clean +BOARD_ID=Generic_x21J MCU=SAMD21J16A SDCARD=SDCARD_ENABLED make all mostly_clean +BOARD_ID=Generic_x21J MCU=SAMD21J17A SDCARD=SDCARD_ENABLED make all mostly_clean +BOARD_ID=Generic_x21J MCU=SAMD21J18A SDCARD=SDCARD_ENABLED make all mostly_clean +BOARD_ID=Generic_x21J MCU=SAML21J16B SDCARD=SDCARD_ENABLED make all mostly_clean +BOARD_ID=Generic_x21J MCU=SAML21J17B SDCARD=SDCARD_ENABLED make all mostly_clean +BOARD_ID=Generic_x21J MCU=SAML21J18B SDCARD=SDCARD_ENABLED make all mostly_clean +BOARD_ID=Generic_x21J MCU=SAMC21J15A SDCARD=SDCARD_ENABLED make all mostly_clean +BOARD_ID=Generic_x21J MCU=SAMC21J16A SDCARD=SDCARD_ENABLED make all mostly_clean +BOARD_ID=Generic_x21J MCU=SAMC21J17A SDCARD=SDCARD_ENABLED make all mostly_clean +BOARD_ID=Generic_x21J MCU=SAMC21J18A SDCARD=SDCARD_ENABLED make all mostly_clean + +BOARD_ID=Generic_D51G MCU=SAMD51G18A SDCARD=SDCARD_ENABLED make all mostly_clean +BOARD_ID=Generic_D51G MCU=SAMD51G19A SDCARD=SDCARD_ENABLED make all mostly_clean + +BOARD_ID=Generic_D51J MCU=SAMD51J18A SDCARD=SDCARD_ENABLED make all mostly_clean +BOARD_ID=Generic_D51J MCU=SAMD51J19A SDCARD=SDCARD_ENABLED make all mostly_clean +BOARD_ID=Generic_D51J MCU=SAMD51J20A SDCARD=SDCARD_ENABLED make all mostly_clean BOARD_ID=Generic_D51N MCU=SAMD51N19A SDCARD=SDCARD_ENABLED make all mostly_clean BOARD_ID=Generic_D51N MCU=SAMD51N20A SDCARD=SDCARD_ENABLED make all mostly_clean @@ -159,17 +112,6 @@ BOARD_ID=Generic_D11D14AM MCU=SAMD11D14AM SDCARD=SDCARD_ENABLED make all mostly_ BOARD_ID=Generic_D11D14AS MCU=SAMD11D14AS SDCARD=SDCARD_ENABLED make all mostly_clean BOARD_ID=Generic_D11C14A MCU=SAMD11C14A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=arduino_zero MCU=SAMD21G18A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=genuino_zero MCU=SAMD21G18A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=arduino_mkr1000 MCU=SAMD21G18A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=genuino_mkr1000 MCU=SAMD21G18A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=arduino_mkrzero MCU=SAMD21G18A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=arduino_mkrfox1200 MCU=SAMD21G18A SDCARD=SDCARD_ENABLED make all mostly_clean - -BOARD_ID=arduino_m0 MCU=SAMD21G18A SDCARD=SDCARD_ENABLED make all mostly_clean -BOARD_ID=arduino_m0_pro MCU=SAMD21G18A SDCARD=SDCARD_ENABLED make all mostly_clean - mv -v *.bin ./binaries/ echo Done building bootloaders! - diff --git a/cores/arduino/USB/SAMD21_USBDevice.h b/cores/arduino/USB/SAMD21_USBDevice.h index d2700290f..3c23271e4 100644 --- a/cores/arduino/USB/SAMD21_USBDevice.h +++ b/cores/arduino/USB/SAMD21_USBDevice.h @@ -16,7 +16,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if (!SAMC) #pragma once #include @@ -25,6 +24,8 @@ #include #include +#include "sync.h" + typedef uint8_t ep_t; class USBDevice_SAMD21G18x { @@ -37,7 +38,7 @@ class USBDevice_SAMD21G18x { // --------------------------- // Reset USB Device - void reset(); + inline void reset(); // Enable inline void enable() { usb.CTRLA.bit.ENABLE = 1; } @@ -48,11 +49,14 @@ class USBDevice_SAMD21G18x { #if (SAMD21 || SAML21 || SAMD51) inline void setUSBHostMode() { usb.CTRLA.bit.MODE = USB_CTRLA_MODE_HOST_Val; } #endif - inline void runInStandby() { usb.CTRLA.bit.RUNSTDBY = 1; } inline void noRunInStandby() { usb.CTRLA.bit.RUNSTDBY = 0; } inline void wakeupHost() { usb.CTRLB.bit.UPRSM = 1; } + // USB QoS + inline void setDataSensitiveQoS() { usb.QOSCTRL.bit.DQOS = 2; } + inline void setConfigSensitiveQoS() { usb.QOSCTRL.bit.CQOS = 2; } + // USB speed inline void setFullSpeed() { usb.CTRLB.bit.SPDCONF = USB_DEVICE_CTRLB_SPDCONF_FS_Val; } inline void setLowSpeed() { usb.CTRLB.bit.SPDCONF = USB_DEVICE_CTRLB_SPDCONF_LS_Val; } @@ -82,7 +86,7 @@ class USBDevice_SAMD21G18x { inline uint16_t frameNumber() { return usb.FNUM.bit.FNUM; } // Load calibration values - void calibrate(); + inline void calibrate(); // USB Device Endpoints function mapping // ------------------------------------- @@ -94,27 +98,37 @@ class USBDevice_SAMD21G18x { // Interrupts inline uint16_t epInterruptSummary() { return usb.EPINTSMRY.reg; } + inline bool epHasPendingInterrupts(ep_t ep) { return usb.DeviceEndpoint[ep].EPINTFLAG.reg != 0; } inline bool epBank0IsSetupReceived(ep_t ep) { return usb.DeviceEndpoint[ep].EPINTFLAG.bit.RXSTP; } inline bool epBank0IsStalled(ep_t ep) { return usb.DeviceEndpoint[ep].EPINTFLAG.bit.STALL0; } inline bool epBank1IsStalled(ep_t ep) { return usb.DeviceEndpoint[ep].EPINTFLAG.bit.STALL1; } + inline bool epBank0IsTransferFailed(ep_t ep) { return usb.DeviceEndpoint[ep].EPINTFLAG.bit.TRFAIL0; } + inline bool epBank1IsTransferFailed(ep_t ep) { return usb.DeviceEndpoint[ep].EPINTFLAG.bit.TRFAIL1; } inline bool epBank0IsTransferComplete(ep_t ep) { return usb.DeviceEndpoint[ep].EPINTFLAG.bit.TRCPT0; } inline bool epBank1IsTransferComplete(ep_t ep) { return usb.DeviceEndpoint[ep].EPINTFLAG.bit.TRCPT1; } + inline void epAckPendingInterrupts(ep_t ep) { usb.DeviceEndpoint[ep].EPINTFLAG.reg = 0x7F; } inline void epBank0AckSetupReceived(ep_t ep) { usb.DeviceEndpoint[ep].EPINTFLAG.reg = USB_DEVICE_EPINTFLAG_RXSTP; } inline void epBank0AckStalled(ep_t ep) { usb.DeviceEndpoint[ep].EPINTFLAG.reg = USB_DEVICE_EPINTFLAG_STALL(1); } inline void epBank1AckStalled(ep_t ep) { usb.DeviceEndpoint[ep].EPINTFLAG.reg = USB_DEVICE_EPINTFLAG_STALL(2); } + inline void epBank0AckTransferFailed(ep_t ep) { usb.DeviceEndpoint[ep].EPINTFLAG.reg = USB_DEVICE_EPINTFLAG_TRFAIL(1); } + inline void epBank1AckTransferFailed(ep_t ep) { usb.DeviceEndpoint[ep].EPINTFLAG.reg = USB_DEVICE_EPINTFLAG_TRFAIL(2); } inline void epBank0AckTransferComplete(ep_t ep) { usb.DeviceEndpoint[ep].EPINTFLAG.reg = USB_DEVICE_EPINTFLAG_TRCPT(1); } inline void epBank1AckTransferComplete(ep_t ep) { usb.DeviceEndpoint[ep].EPINTFLAG.reg = USB_DEVICE_EPINTFLAG_TRCPT(2); } inline void epBank0EnableSetupReceived(ep_t ep) { usb.DeviceEndpoint[ep].EPINTENSET.bit.RXSTP = 1; } inline void epBank0EnableStalled(ep_t ep) { usb.DeviceEndpoint[ep].EPINTENSET.bit.STALL0 = 1; } inline void epBank1EnableStalled(ep_t ep) { usb.DeviceEndpoint[ep].EPINTENSET.bit.STALL1 = 1; } + inline void epBank0EnableTransferFailed(ep_t ep) { usb.DeviceEndpoint[ep].EPINTENSET.bit.TRFAIL0 = 1; } + inline void epBank1EnableTransferFailed(ep_t ep) { usb.DeviceEndpoint[ep].EPINTENSET.bit.TRFAIL1 = 1; } inline void epBank0EnableTransferComplete(ep_t ep) { usb.DeviceEndpoint[ep].EPINTENSET.bit.TRCPT0 = 1; } inline void epBank1EnableTransferComplete(ep_t ep) { usb.DeviceEndpoint[ep].EPINTENSET.bit.TRCPT1 = 1; } inline void epBank0DisableSetupReceived(ep_t ep) { usb.DeviceEndpoint[ep].EPINTENCLR.bit.RXSTP = 1; } inline void epBank0DisableStalled(ep_t ep) { usb.DeviceEndpoint[ep].EPINTENCLR.bit.STALL0 = 1; } inline void epBank1DisableStalled(ep_t ep) { usb.DeviceEndpoint[ep].EPINTENCLR.bit.STALL1 = 1; } + inline void epBank0DisableTransferFailed(ep_t ep) { usb.DeviceEndpoint[ep].EPINTENCLR.bit.TRFAIL0 = 1; } + inline void epBank1DisableTransferFailed(ep_t ep) { usb.DeviceEndpoint[ep].EPINTENCLR.bit.TRFAIL1 = 1; } inline void epBank0DisableTransferComplete(ep_t ep) { usb.DeviceEndpoint[ep].EPINTENCLR.bit.TRCPT0 = 1; } inline void epBank1DisableTransferComplete(ep_t ep) { usb.DeviceEndpoint[ep].EPINTENCLR.bit.TRCPT1 = 1; } @@ -162,6 +176,15 @@ class USBDevice_SAMD21G18x { inline void epBank0EnableAutoZLP(ep_t ep) { EP[ep].DeviceDescBank[0].PCKSIZE.bit.AUTO_ZLP = 1; } inline void epBank1EnableAutoZLP(ep_t ep) { EP[ep].DeviceDescBank[1].PCKSIZE.bit.AUTO_ZLP = 1; } + // USB Device Endpoint transactions helpers + // ---------------------------------------- + + inline void epReleaseOutBank0(ep_t ep, uint16_t s) { + epBank0SetMultiPacketSize(ep, s); + epBank0SetByteCount(ep, 0); + epBank0ResetReady(ep); + } + private: // USB Device registers UsbDevice &usb; @@ -199,32 +222,6 @@ void USBDevice_SAMD21G18x::calibrate() { usb.PADCAL.bit.TRIM = pad_trim; } -/* - * Synchronization primitives. - * TODO: Move into a separate header file and make an API out of it - */ - -class __Guard { -public: - __Guard() : primask(__get_PRIMASK()), loops(1) { - __disable_irq(); - } - ~__Guard() { - if (primask == 0) { - __enable_irq(); - // http://infocenter.arm.com/help/topic/com.arm.doc.dai0321a/BIHBFEIB.html - __ISB(); - } - } - uint32_t enter() { return loops--; } -private: - uint32_t primask; - uint32_t loops; -}; - -#define synchronized for (__Guard __guard; __guard.enter(); ) - - /* * USB EP generic handlers. */ @@ -233,33 +230,41 @@ class EPHandler { public: virtual void handleEndpoint() = 0; virtual uint32_t recv(void *_data, uint32_t len) = 0; - virtual uint32_t available() const = 0; + virtual uint32_t available() = 0; + virtual int peek() = 0; }; class DoubleBufferedEPOutHandler : public EPHandler { public: - DoubleBufferedEPOutHandler(USBDevice_SAMD21G18x &usbDev, uint32_t endPoint, uint32_t bufferSize) : + enum { size = 64 }; + + DoubleBufferedEPOutHandler(USBDevice_SAMD21G18x &usbDev, uint32_t endPoint) : usbd(usbDev), - ep(endPoint), size(bufferSize), + ep(endPoint), current(0), incoming(0), first0(0), last0(0), ready0(false), first1(0), last1(0), ready1(false), notify(false) { - data0 = reinterpret_cast(malloc(size)); - data1 = reinterpret_cast(malloc(size)); - usbd.epBank0SetSize(ep, 64); usbd.epBank0SetType(ep, 3); // BULK OUT - usbd.epBank0SetAddress(ep, const_cast(data0)); + usbd.epBank0EnableTransferComplete(ep); release(); } - virtual uint32_t recv(void *_data, uint32_t len) + virtual ~DoubleBufferedEPOutHandler() { + } + + uint32_t _recv() { - uint8_t *data = reinterpret_cast(_data); + uint32_t i = 0; + uint32_t len = 0; + + synchronized { + len = _rx_buffer.availableForStore(); + } // R/W: current, first0/1, ready0/1, notify // R : last0/1, data0/1 @@ -270,9 +275,8 @@ class DoubleBufferedEPOutHandler : public EPHandler { } } // when ready0==true the buffer is not being filled and last0 is constant - uint32_t i; - for (i=0; i(_data); + synchronized { + for (; i < len && _rx_buffer.available(); i++) { + data[i] = _rx_buffer.read_char(); + } + } + return i; + } + + virtual uint32_t _available() const { + if (current == 0) { + bool ready = ready0; + synchronized { + ready = ready0; + } + return ready ? (last0 - first0) : 0; + } else { + bool ready = false; + synchronized { + ready = ready1; + } + return ready ? (last1 - first1) : 0; } } @@ -318,87 +348,69 @@ class DoubleBufferedEPOutHandler : public EPHandler { // W : last0/1, notify if (usbd.epBank0IsTransferComplete(ep)) { - // Ack Transfer complete - usbd.epBank0AckTransferComplete(ep); - //usbd.epBank0AckTransferFailed(ep); // XXX - + uint32_t received = usbd.epBank0ByteCount(ep); + if (received == 0) { + release(); + } else if (incoming == 0) { // Update counters and swap banks for non-ZLP's - if (incoming == 0) { - last0 = usbd.epBank0ByteCount(ep); - if (last0 != 0) { - incoming = 1; - usbd.epBank0SetAddress(ep, const_cast(data1)); - synchronized { - ready0 = true; - if (ready1) { - notify = true; - return; - } - notify = false; + last0 = received; + incoming = 1; + usbd.epBank0SetAddress(ep, const_cast(data1)); + synchronized { + ready0 = true; + notify = ready1; + if (!notify) { + release(); } } } else { - last1 = usbd.epBank0ByteCount(ep); - if (last1 != 0) { - incoming = 0; - usbd.epBank0SetAddress(ep, const_cast(data0)); - synchronized { - ready1 = true; - if (ready0) { - notify = true; - return; - } - notify = false; + last1 = received; + incoming = 0; + usbd.epBank0SetAddress(ep, const_cast(data0)); + synchronized { + ready1 = true; + notify = ready0; + if (!notify) { + release(); } } } - release(); + usbd.epAckPendingInterrupts(ep); } } // Returns how many bytes are stored in the buffers - virtual uint32_t available() const { - if (current == 0) { - bool ready = false; - synchronized { - ready = ready0; - } - return ready ? (last0 - first0) : 0; - } else { - bool ready = false; - synchronized { - ready = ready1; - } - return ready ? (last1 - first1) : 0; - } + virtual uint32_t available() { + _recv(); + return _rx_buffer.available(); + } + + virtual int peek() { + _recv(); + return _rx_buffer.peek(); } void release() { - // Release OUT EP - usbd.epBank0EnableTransferComplete(ep); - usbd.epBank0SetMultiPacketSize(ep, size); - usbd.epBank0SetByteCount(ep, 0); - usbd.epBank0ResetReady(ep); + usbd.epReleaseOutBank0(ep, size); } private: USBDevice_SAMD21G18x &usbd; + RingBuffer _rx_buffer; + const uint32_t ep; - const uint32_t size; - uint32_t current, incoming; + volatile uint32_t current, incoming; - volatile uint8_t *data0; + __attribute__((__aligned__(4))) volatile uint8_t data0[size]; uint32_t first0; volatile uint32_t last0; volatile bool ready0; - volatile uint8_t *data1; + __attribute__((__aligned__(4))) volatile uint8_t data1[size]; uint32_t first1; volatile uint32_t last1; volatile bool ready1; volatile bool notify; }; - -#endif diff --git a/cores/arduino/USB/USBCore.cpp b/cores/arduino/USB/USBCore.cpp index 7b334a46b..b698d8c65 100644 --- a/cores/arduino/USB/USBCore.cpp +++ b/cores/arduino/USB/USBCore.cpp @@ -516,7 +516,7 @@ void USBDeviceClass::initEP(uint32_t ep, uint32_t config) else if (config == (USB_ENDPOINT_TYPE_BULK | USB_ENDPOINT_OUT(0))) { if (epHandlers[ep] == NULL) { - epHandlers[ep] = new DoubleBufferedEPOutHandler(usbd, ep, 256); + epHandlers[ep] = new DoubleBufferedEPOutHandler(usbd, ep); } } else if (config == (USB_ENDPOINT_TYPE_BULK | USB_ENDPOINT_IN(0))) @@ -1092,6 +1092,9 @@ void USBDeviceClass::ISRHandler() #endif } + /* Remove any stall requests for endpoint #0 */ + if (usbd.epBank0IsStalled(0)) { usbd.epBank0DisableStalled(0); } + // Endpoint 0 Received Setup interrupt if (usbd.epBank0IsSetupReceived(0)) { @@ -1120,7 +1123,7 @@ void USBDeviceClass::ISRHandler() if (usbd.epBank1IsStalled(0)) { - usbd.epBank1AckStalled(0); + // usbd.epBank1AckStalled(0); // Remove stall request usbd.epBank1DisableStalled(0); @@ -1128,27 +1131,27 @@ void USBDeviceClass::ISRHandler() } // end Received Setup handler - uint8_t i = (USB_EPT_NUM - 1); - uint8_t ept_int = usbd.epInterruptSummary() & 0xFE; // Remove endpoint number 0 (setup) - while (ept_int && i) - { - // Check if endpoint has a pending interrupt - if ((ept_int & (1 << i)) != 0) - { - // Endpoint Transfer Complete (0/1) Interrupt - if (usbd.epBank0IsTransferComplete(i) || - usbd.epBank1IsTransferComplete(i)) - { - if (epHandlers[i]) { - epHandlers[i]->handleEndpoint(); - } else { - handleEndpoint(i); - } - } - ept_int &= ~(1 << i); - } - i--; - } + uint8_t i = (USB_EPT_NUM - 1); + uint8_t ept_int = usbd.epInterruptSummary() & 0xFE; // Remove endpoint number 0 (setup) + while (ept_int && i) + { + // Check if endpoint has a pending interrupt + if ((ept_int & (1 << i)) != 0) + { + // Endpoint Transfer Complete (0/1) Interrupt + if (usbd.epBank0IsTransferComplete(i) || + usbd.epBank1IsTransferComplete(i)) + { + if (epHandlers[i]) { + epHandlers[i]->handleEndpoint(); + } else { + handleEndpoint(i); + } + } + ept_int &= ~(1 << i); + } + i--; + } } #endif diff --git a/cores/arduino/sync.h b/cores/arduino/sync.h new file mode 100644 index 000000000..2750a2911 --- /dev/null +++ b/cores/arduino/sync.h @@ -0,0 +1,30 @@ +#include + +#ifndef _SYNC_H_ +#define _SYNC_H_ +/* + * Synchronization primitives. + * TODO: Move into a separate header file and make an API out of it + */ + +class __Guard { +public: + __Guard() : primask(__get_PRIMASK()), loops(1) { + __disable_irq(); + } + ~__Guard() { + if (primask == 0) { + __enable_irq(); + // http://infocenter.arm.com/help/topic/com.arm.doc.dai0321a/BIHBFEIB.html + __ISB(); + } + } + uint32_t enter() { return loops--; } +private: + uint32_t primask; + uint32_t loops; +}; + +#define synchronized for (__Guard __guard; __guard.enter(); ) + +#endif \ No newline at end of file diff --git a/cores/arduino/wiring_digital.c b/cores/arduino/wiring_digital.c index ac59c16f0..8f80e87af 100644 --- a/cores/arduino/wiring_digital.c +++ b/cores/arduino/wiring_digital.c @@ -30,6 +30,26 @@ void pinMode( uint32_t ulPin, uint32_t ulMode ) pinPeripheral(ulPin, ulMode); } +inline __attribute__((always_inline)) void digitalWriteFast( uint32_t ulPin, uint32_t ulVal ) +{ +#if defined(_VARIANT_GENERIC_D11C14A_) || defined(_VARIANT_GENERIC_D11D14AM_) || defined(_VARIANT_GENERIC_D11D14AS_) || defined(_VARIANT_GENERIC_XX1E_) + // Only PORT A + if ( ulVal == HIGH ) { + PORT_IOBUS->Group[PORTA].OUTSET.reg = (1ul << ulPin); + } else { + PORT_IOBUS->Group[PORTA].OUTCLR.reg = (1ul << ulPin); + } +#else + uint8_t pinPort = GetPort(ulPin); + uint8_t pinNum = GetPin(ulPin); + if ( ulVal == HIGH ) { + PORT_IOBUS->Group[pinPort].OUTSET.reg = (1ul << pinNum) ; + } else { + PORT_IOBUS->Group[pinPort].OUTCLR.reg = (1ul << pinNum) ; + } +#endif +} + void digitalWrite( uint32_t ulPin, uint32_t ulVal ) { uint8_t pinPort = GetPort(ulPin); @@ -106,4 +126,3 @@ int digitalRead( uint32_t ulPin ) #ifdef __cplusplus } #endif - diff --git a/cores/arduino/wiring_digital.h b/cores/arduino/wiring_digital.h index 9895390f2..cbcb07c7e 100644 --- a/cores/arduino/wiring_digital.h +++ b/cores/arduino/wiring_digital.h @@ -33,6 +33,14 @@ */ extern void pinMode( uint32_t dwPin, uint32_t dwMode ) ; +/** + * \brief Write a HIGH or a LOW value to a digital pin but faster. Requires the pin number to be a constant + * + * \param dwPin the pin number + * \param dwVal HIGH or LOW + */ +extern void digitalWriteFast(uint32_t dwPin, uint32_t dwVal); + /** * \brief Write a HIGH or a LOW value to a digital pin. * diff --git a/extras/pack.betabuild.bash b/extras/pack.betabuild.bash deleted file mode 100755 index b828f774b..000000000 --- a/extras/pack.betabuild.bash +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash -ex - -# pack.*.bash - Bash script to help packaging samd core releases. -# Copyright (c) 2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -BUILD_NUMBER=$1 -CURR_TIME=`date "+%Y-%m-%d %H:%M"` -CURR_TIME_SED=`date "+%Y\\-%m\\-%d %H:%M"` -VERSION=`grep version= platform.txt | sed 's/version=//g'` - -PWD=`pwd` -FOLDERNAME=`basename $PWD` -THIS_SCRIPT_NAME=`basename $0` -FILENAME=MattairTech_SAM_DLC_Core_for_Arduino-${VERSION}-beta-b${BUILD_NUMBER}.tar.bz2 - -rm -f $FILENAME - -# Change name in platform.txt -sed -i "s/name=.*/name=MattairTech SAM D|L|C Core for Arduino - Beta Build ${BUILD_NUMBER} (${CURR_TIME})/" platform.txt - -cd .. -tar --transform "s|$FOLDERNAME|MattairTech_SAM_DLC_Core_for_Arduino-${VERSION}-beta-b${BUILD_NUMBER}|g" --exclude=extras/** --exclude=.git* --exclude=.idea -cjf $FILENAME $FOLDERNAME -cd - - -mv ../$FILENAME . - -CHKSUM=`sha256sum $FILENAME | awk '{ print $1 }'` -SIZE=`wc -c $FILENAME | awk '{ print $1 }'` - -cat extras/package_index.json.Beta.template | -sed "s/%%BUILD_NUMBER%%/${BUILD_NUMBER}/" | -sed "s/%%CURR_TIME%%/${CURR_TIME_SED}/" | -sed "s/%%VERSION%%/${VERSION}-beta-b${BUILD_NUMBER}/" | -sed "s/%%FILENAME%%/${FILENAME}/" | -sed "s/%%CHECKSUM%%/${CHKSUM}/" | -sed "s/%%SIZE%%/${SIZE}/" > package_MattairTech_SAM_DLC_Core_for_Arduino-${VERSION}-beta-b${BUILD_NUMBER}_index.json - diff --git a/extras/pack.pullrequest.bash b/extras/pack.pullrequest.bash deleted file mode 100755 index 8feb107ee..000000000 --- a/extras/pack.pullrequest.bash +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -ex - -# pack.*.bash - Bash script to help packaging samd core releases. -# Copyright (c) 2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -PR_NUMBER=$1 -BUILD_NUMBER=$2 -VERSION=`grep version= platform.txt | sed 's/version=//g'` - -PWD=`pwd` -FOLDERNAME=`basename $PWD` -THIS_SCRIPT_NAME=`basename $0` -FILENAME=MattairTech_SAM_DLC_Core_for_Arduino-pr${PR_NUMBER}-b${BUILD_NUMBER}.tar.bz2 - -rm -f $FILENAME - -# Change name in platform.txt -sed -i "s/name=.*/name=MattairTech SAM D|L|C core for Arduino - Pull request #${PR_NUMBER} (Build ${BUILD_NUMBER})/" platform.txt - -cd .. -tar --transform "s|$FOLDERNAME|MattairTech_SAM_DLC_Core_for_Arduino-PR${PR_NUMBER}-b${BUILD_NUMBER}|g" --exclude=extras/** --exclude=.git* --exclude=.idea -cjf $FILENAME $FOLDERNAME -cd - - -mv ../$FILENAME . - -CHKSUM=`sha256sum $FILENAME | awk '{ print $1 }'` -SIZE=`wc -c $FILENAME | awk '{ print $1 }'` - -cat extras/package_index.json.PR.template | -sed s/%%PR_NUMBER%%/${PR_NUMBER}/ | -sed s/%%BUILD_NUMBER%%/${BUILD_NUMBER}/ | -sed s/%%VERSION%%/${VERSION}-build-${BUILD_NUMBER}/ | -sed s/%%FILENAME%%/${FILENAME}/ | -sed s/%%CHECKSUM%%/${CHKSUM}/ | -sed s/%%SIZE%%/${SIZE}/ > package_MattairTech_SAM_DLC_Core_for_Arduino-pr${PR_NUMBER}-b${BUILD_NUMBER}_index.json - diff --git a/extras/pack.release.bash b/extras/pack.release.bash index 9a1ac35a1..fd77a4ab2 100755 --- a/extras/pack.release.bash +++ b/extras/pack.release.bash @@ -22,12 +22,12 @@ VERSION=`grep version= platform.txt | sed 's/version=//g'` PWD=`pwd` FOLDERNAME=`basename $PWD` THIS_SCRIPT_NAME=`basename $0` -FILENAME=MattairTech_SAM_DLC_Core_for_Arduino-$VERSION.tar.bz2 +FILENAME=Fab_SAM_Core_for_Arduino-$VERSION.tar.bz2 rm -f $FILENAME cd .. -tar --transform "s|$FOLDERNAME|$FOLDERNAME-$VERSION|g" --exclude=extras/** --exclude=.git* --exclude=.idea -cjf $FILENAME $FOLDERNAME +tar --transform "s|$FOLDERNAME|$FOLDERNAME-$VERSION|g" --exclude=extras* --exclude=tools* --exclude=.git* --exclude=*.tar.bz2 --exclude=.idea --exclude=json* -cjf $FILENAME $FOLDERNAME cd - mv ../$FILENAME . @@ -39,4 +39,4 @@ cat extras/package_index.json.Release.template | sed "s/%%VERSION%%/${VERSION}/" | sed "s/%%FILENAME%%/${FILENAME}/" | sed "s/%%CHECKSUM%%/${CHKSUM}/" | -sed "s/%%SIZE%%/${SIZE}/" > package_MattairTech_SAM_DLC_Core_for_Arduino-${VERSION}_index.json +sed "s/%%SIZE%%/${SIZE}/" > json/package_Fab_SAM_Core_for_Arduino-${VERSION}_index.json diff --git a/extras/package_index.json.Beta.template b/extras/package_index.json.Beta.template deleted file mode 100644 index dde61a017..000000000 --- a/extras/package_index.json.Beta.template +++ /dev/null @@ -1,141 +0,0 @@ -{ - "packages": [ - { - "name": "MattairTech_Arduino_Beta", - "maintainer": "MattairTech LLC", - "websiteURL": "https://www.mattairtech.com/", - "email": "support@mattairtech.com", - "help": { - "online": "https://www.mattairtech.com/support/" - }, - "platforms": [ - { - "name": "MattairTech SAM D|L|C core for Arduino - Beta build", - "architecture": "samd", - "version": "%%VERSION%%", - "category": "Contributed", - "help": { - "online": "https://www.mattairtech.com/support/" - }, - "url": "https://www.mattairtech.com/software/arduino/beta/%%FILENAME%%", - "archiveFileName": "%%FILENAME%%", - "checksum": "SHA-256:%%CHECKSUM%%", - "size": "%%SIZE%%", - "boards": [ - {"name": "Xeno_Mini"}, - {"name": "Xeno"}, - {"name": "MT-D21E"}, - {"name": "MT-D21E_revB"}, - {"name": "MT-D11"}, - {"name": "Generic_D11C14A"}, - {"name": "Generic_D11D14AS"}, - {"name": "arduino_zero"}, - {"name": "arduino_mzero"} - ], - "toolsDependencies": [ - { - "packager": "arduino", - "name": "arm-none-eabi-gcc", - "version": "4.8.3-2014q1" - }, - { - "packager": "MattairTech_Arduino", - "name": "bossac", - "version": "1.7.0-mattairtech-3" - }, - { - "packager": "arduino", - "name": "openocd", - "version": "0.9.0-arduino" - }, - { - "packager": "arduino", - "name": "CMSIS", - "version": "4.5.0" - }, - { - "packager": "MattairTech_Arduino", - "name": "CMSIS-Atmel", - "version": "1.0.0-mattairtech-2" - }, - { - "packager": "arduino", - "name": "arduinoOTA", - "version": "1.2.0" - } - ] - } - ], - "tools": [ - { - "name": "bossac", - "version": "1.7.0-mattairtech-3", - "systems": [ - { - "host": "i686-mingw32", - "url": "https://www.mattairtech.com/software/arduino/bossac-1.7.0-mattairtech-3-mingw32.tar.gz", - "archiveFileName": "bossac-1.7.0-mattairtech-3-mingw32.tar.gz", - "checksum": "SHA-256:ce6ce590c612dc8b18ba52df3903ba3d43416c92ef54538881cc07fdd2ef1f04", - "size": "325719" - }, - { - "host": "x86_64-pc-linux-gnu", - "url": "https://www.mattairtech.com/software/arduino/bossac-1.7.0-mattairtech-3-x86_64-linux-gnu.tar.gz", - "archiveFileName": "bossac-1.7.0-mattairtech-3-x86_64-linux-gnu.tar.gz", - "checksum": "SHA-256:e0801cd435a0aa08a4ccc1781cdcc1bf9ae92e248888163a1bb4dce20c00bcf9", - "size": "34622" - }, - { - "host": "i686-pc-linux-gnu", - "url": "https://www.mattairtech.com/software/arduino/bossac-1.7.0-mattairtech-3-i686-linux-gnu.tar.gz", - "archiveFileName": "bossac-1.7.0-mattairtech-3-i686-linux-gnu.tar.gz", - "checksum": "SHA-256:edd3bc6fd80641563dc6ca337d695fca25c2d43242172ea0418b678d4dbe0628", - "size": "34628" - }, - { - "host": "x86_64-apple-darwin", - "url": "https://www.mattairtech.com/software/arduino/bossac-1.7.0-mattairtech-3-x86_64-apple-darwin.tar.gz", - "archiveFileName": "bossac-1.7.0-mattairtech-3-x86_64-apple-darwin.tar.gz", - "checksum": "SHA-256:da4d4b04582f92d09e3d48a1ec4d2473b6cd01bba992c0f1f2cd7ee1008f08f8", - "size": "88845" - } - ] - }, - { - "name": "CMSIS-Atmel", - "version": "1.0.0-mattairtech-2", - "systems": [ - { - "host": "i686-mingw32", - "url": "https://www.mattairtech.com/software/arduino/CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", - "archiveFileName": "CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", - "checksum": "SHA-256:d10ca2a14c8db5757d2b1b4c1e52473ae5337f0762c6617a6074373f2f44540d", - "size": "2008479" - }, - { - "host": "x86_64-pc-linux-gnu", - "url": "https://www.mattairtech.com/software/arduino/CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", - "archiveFileName": "CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", - "checksum": "SHA-256:d10ca2a14c8db5757d2b1b4c1e52473ae5337f0762c6617a6074373f2f44540d", - "size": "2008479" - }, - { - "host": "i686-pc-linux-gnu", - "url": "https://www.mattairtech.com/software/arduino/CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", - "archiveFileName": "CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", - "checksum": "SHA-256:d10ca2a14c8db5757d2b1b4c1e52473ae5337f0762c6617a6074373f2f44540d", - "size": "2008479" - }, - { - "host": "x86_64-apple-darwin", - "url": "https://www.mattairtech.com/software/arduino/CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", - "archiveFileName": "CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", - "checksum": "SHA-256:d10ca2a14c8db5757d2b1b4c1e52473ae5337f0762c6617a6074373f2f44540d", - "size": "2008479" - } - ] - } - ] - } - ] -} diff --git a/extras/package_index.json.PR.template b/extras/package_index.json.PR.template deleted file mode 100644 index 260717718..000000000 --- a/extras/package_index.json.PR.template +++ /dev/null @@ -1,141 +0,0 @@ -{ - "packages": [ - { - "name": "MattairTech_Arduino_Beta", - "maintainer": "MattairTech LLC", - "websiteURL": "https://www.mattairtech.com/", - "email": "support@mattairtech.com", - "help": { - "online": "https://www.mattairtech.com/support/" - }, - "platforms": [ - { - "name": "MattairTech SAM D|L|C core for Arduino - Pull request #%%PR_NUMBER%% (build %%BUILD_NUMBER%%)", - "architecture": "samd", - "version": "%%VERSION%%", - "category": "Contributed", - "help": { - "online": "https://www.mattairtech.com/support/" - }, - "url": "https://www.mattairtech.com/software/arduino/beta/%%FILENAME%%", - "archiveFileName": "%%FILENAME%%", - "checksum": "SHA-256:%%CHECKSUM%%", - "size": "%%SIZE%%", - "boards": [ - {"name": "Xeno_Mini"}, - {"name": "Xeno"}, - {"name": "MT-D21E"}, - {"name": "MT-D21E_revB"}, - {"name": "MT-D11"}, - {"name": "Generic_D11C14A"}, - {"name": "Generic_D11D14AS"}, - {"name": "arduino_zero"}, - {"name": "arduino_mzero"} - ], - "toolsDependencies": [ - { - "packager": "arduino", - "name": "arm-none-eabi-gcc", - "version": "4.8.3-2014q1" - }, - { - "packager": "MattairTech_Arduino", - "name": "bossac", - "version": "1.7.0-mattairtech-3" - }, - { - "packager": "arduino", - "name": "openocd", - "version": "0.9.0-arduino" - }, - { - "packager": "arduino", - "name": "CMSIS", - "version": "4.5.0" - }, - { - "packager": "MattairTech_Arduino", - "name": "CMSIS-Atmel", - "version": "1.0.0-mattairtech-2" - }, - { - "packager": "arduino", - "name": "arduinoOTA", - "version": "1.2.0" - } - ] - } - ], - "tools": [ - { - "name": "bossac", - "version": "1.7.0-mattairtech-3", - "systems": [ - { - "host": "i686-mingw32", - "url": "https://www.mattairtech.com/software/arduino/bossac-1.7.0-mattairtech-3-mingw32.tar.gz", - "archiveFileName": "bossac-1.7.0-mattairtech-3-mingw32.tar.gz", - "checksum": "SHA-256:ce6ce590c612dc8b18ba52df3903ba3d43416c92ef54538881cc07fdd2ef1f04", - "size": "325719" - }, - { - "host": "x86_64-pc-linux-gnu", - "url": "https://www.mattairtech.com/software/arduino/bossac-1.7.0-mattairtech-3-x86_64-linux-gnu.tar.gz", - "archiveFileName": "bossac-1.7.0-mattairtech-3-x86_64-linux-gnu.tar.gz", - "checksum": "SHA-256:e0801cd435a0aa08a4ccc1781cdcc1bf9ae92e248888163a1bb4dce20c00bcf9", - "size": "34622" - }, - { - "host": "i686-pc-linux-gnu", - "url": "https://www.mattairtech.com/software/arduino/bossac-1.7.0-mattairtech-3-i686-linux-gnu.tar.gz", - "archiveFileName": "bossac-1.7.0-mattairtech-3-i686-linux-gnu.tar.gz", - "checksum": "SHA-256:edd3bc6fd80641563dc6ca337d695fca25c2d43242172ea0418b678d4dbe0628", - "size": "34628" - }, - { - "host": "x86_64-apple-darwin", - "url": "https://www.mattairtech.com/software/arduino/bossac-1.7.0-mattairtech-3-x86_64-apple-darwin.tar.gz", - "archiveFileName": "bossac-1.7.0-mattairtech-3-x86_64-apple-darwin.tar.gz", - "checksum": "SHA-256:da4d4b04582f92d09e3d48a1ec4d2473b6cd01bba992c0f1f2cd7ee1008f08f8", - "size": "88845" - } - ] - }, - { - "name": "CMSIS-Atmel", - "version": "1.0.0-mattairtech-2", - "systems": [ - { - "host": "i686-mingw32", - "url": "https://www.mattairtech.com/software/arduino/CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", - "archiveFileName": "CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", - "checksum": "SHA-256:d10ca2a14c8db5757d2b1b4c1e52473ae5337f0762c6617a6074373f2f44540d", - "size": "2008479" - }, - { - "host": "x86_64-pc-linux-gnu", - "url": "https://www.mattairtech.com/software/arduino/CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", - "archiveFileName": "CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", - "checksum": "SHA-256:d10ca2a14c8db5757d2b1b4c1e52473ae5337f0762c6617a6074373f2f44540d", - "size": "2008479" - }, - { - "host": "i686-pc-linux-gnu", - "url": "https://www.mattairtech.com/software/arduino/CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", - "archiveFileName": "CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", - "checksum": "SHA-256:d10ca2a14c8db5757d2b1b4c1e52473ae5337f0762c6617a6074373f2f44540d", - "size": "2008479" - }, - { - "host": "x86_64-apple-darwin", - "url": "https://www.mattairtech.com/software/arduino/CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", - "archiveFileName": "CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", - "checksum": "SHA-256:d10ca2a14c8db5757d2b1b4c1e52473ae5337f0762c6617a6074373f2f44540d", - "size": "2008479" - } - ] - } - ] - } - ] -} diff --git a/extras/package_index.json.Release.template b/extras/package_index.json.Release.template index 9dd5045c2..e91b498d7 100644 --- a/extras/package_index.json.Release.template +++ b/extras/package_index.json.Release.template @@ -1,53 +1,68 @@ { - "name": "MattairTech SAM D|L|C core for Arduino", - "architecture": "samd", - "version": "%%VERSION%%", - "category": "Contributed", - "url": "https://www.mattairtech.com/software/arduino/%%FILENAME%%", - "archiveFileName": "%%FILENAME%%", - "checksum": "SHA-256:%%CHECKSUM%%", - "size": "%%SIZE%%", - "boards": [ - {"name": "Xeno_Mini"}, - {"name": "Xeno"}, - {"name": "MT-D21E"}, - {"name": "MT-D21E_revB"}, - {"name": "MT-D11"}, - {"name": "Generic_D11C14A"}, - {"name": "Generic_D11D14AS"}, - {"name": "arduino_zero"}, - {"name": "arduino_mzero"} - ], - "toolsDependencies": [ - { - "packager": "arduino", - "name": "arm-none-eabi-gcc", - "version": "4.8.3-2014q1" - }, - { - "packager": "MattairTech_Arduino", - "name": "bossac", - "version": "1.7.0-mattairtech-3" - }, - { - "packager": "arduino", - "name": "openocd", - "version": "0.9.0-arduino" - }, - { - "packager": "arduino", - "name": "CMSIS", - "version": "4.5.0" - }, - { - "packager": "MattairTech_Arduino", - "name": "CMSIS-Atmel", - "version": "1.0.0-mattairtech-2" - }, - { - "packager": "arduino", - "name": "arduinoOTA", - "version": "1.2.0" - } - ] + "name": "Fab SAM core for Arduino", + "architecture": "samd", + "version": "%%VERSION%%", + "category": "Contributed", + "url": "https://github.com/qbolsee/ArduinoCore-fab-sam/releases/download/%%VERSION%%/%%FILENAME%%", + "archiveFileName": "%%FILENAME%%", + "checksum": "SHA-256:%%CHECKSUM%%", + "size": "%%SIZE%%", + "boards": [ + { + "name": "Generic_D11C14A" + }, + { + "name": "Generic_D11D14AS" + }, + { + "name": "Generic_D11D14AM" + }, + { + "name": "Generic_x21E" + }, + { + "name": "Generic_x21G" + }, + { + "name": "Generic_x21J" + }, + { + "name": "Generic_D51G" + }, + { + "name": "Generic_D51J" + } + ], + "toolsDependencies": [ + { + "packager": "arduino", + "name": "arm-none-eabi-gcc", + "version": "7-2017q4" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "bossac", + "version": "1.9.0" + }, + { + "packager": "arduino", + "name": "openocd", + "version": "0.9.0-arduino" + }, + { + "packager": "arduino", + "name": "CMSIS", + "version": "4.5.0" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "CMSIS-Atmel", + "version": "1.0.0-mattairtech-2" + }, + { + "packager": "arduino", + "name": "arduinoOTA", + "version": "1.2.1" + } + ] } diff --git a/json/package_Fab_SAM_experimental.json b/json/package_Fab_SAM_experimental.json new file mode 100644 index 000000000..9d12939db --- /dev/null +++ b/json/package_Fab_SAM_experimental.json @@ -0,0 +1,760 @@ +{ + "packages": [ + { + "name": "Fab_SAM_Arduino", + "maintainer": "Fab Foundation", + "websiteURL": "https://github.com/qbolsee/ArduinoCore-fab-sam", + "email": "", + "help": { + "online": "" + }, + "platforms": [ + { + "name": "Fab SAM core for Arduino", + "architecture": "samd", + "version": "1.6.18-alpha1", + "category": "Contributed", + "url": "https://github.com/qbolsee/ArduinoCore-fab-sam/releases/download/1.6.18-alpha1/Fab_SAM_Core_for_Arduino-1.6.18-alpha1.tar.bz2", + "archiveFileName": "Fab_SAM_Core_for_Arduino-1.6.18-alpha1.tar.bz2", + "checksum": "SHA-256:5745e58fe3d6fc0b47b7f19f241684219e9df623eb6da033d7247e8e244b9bfd", + "size": "357035", + "boards": [ + { + "name": "Generic_D21E" + }, + { + "name": "Generic_D11C14A" + }, + { + "name": "Generic_D11D14AS" + } + ], + "toolsDependencies": [ + { + "packager": "arduino", + "name": "arm-none-eabi-gcc", + "version": "4.8.3-2014q1" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "bossac", + "version": "1.7.0-mattairtech-3" + }, + { + "packager": "arduino", + "name": "openocd", + "version": "0.9.0-arduino" + }, + { + "packager": "arduino", + "name": "CMSIS", + "version": "4.5.0" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "CMSIS-Atmel", + "version": "1.0.0-mattairtech-2" + }, + { + "packager": "arduino", + "name": "arduinoOTA", + "version": "1.2.0" + } + ] + }, + { + "name": "Fab SAM core for Arduino", + "architecture": "samd", + "version": "1.6.18-alpha2", + "category": "Contributed", + "url": "https://github.com/qbolsee/ArduinoCore-fab-sam/releases/download/1.6.18-alpha2/Fab_SAM_Core_for_Arduino-1.6.18-alpha2.tar.bz2", + "archiveFileName": "Fab_SAM_Core_for_Arduino-1.6.18-alpha2.tar.bz2", + "checksum": "SHA-256:76cf96905c6a70090a212f1309014bf4e7e94189d2dc88de90d8b95d1997c500", + "size": "356816", + "boards": [ + { + "name": "Generic_D11C14A" + }, + { + "name": "Generic_D11D14AS" + }, + { + "name": "Generic_D11D14AM" + }, + { + "name": "Generic_x21E" + }, + { + "name": "Generic_x21G" + }, + { + "name": "Generic_x21J" + }, + { + "name": "Generic_D51G" + }, + { + "name": "Generic_D51J" + } + ], + "toolsDependencies": [ + { + "packager": "arduino", + "name": "arm-none-eabi-gcc", + "version": "4.8.3-2014q1" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "bossac", + "version": "1.7.0-mattairtech-3" + }, + { + "packager": "arduino", + "name": "openocd", + "version": "0.9.0-arduino" + }, + { + "packager": "arduino", + "name": "CMSIS", + "version": "4.5.0" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "CMSIS-Atmel", + "version": "1.0.0-mattairtech-2" + }, + { + "packager": "arduino", + "name": "arduinoOTA", + "version": "1.2.1" + } + ] + }, + { + "name": "Fab SAM core for Arduino", + "architecture": "samd", + "version": "1.7.0", + "category": "Contributed", + "url": "https://github.com/qbolsee/ArduinoCore-fab-sam/releases/download/1.7.0/Fab_SAM_Core_for_Arduino-1.7.0.tar.bz2", + "archiveFileName": "Fab_SAM_Core_for_Arduino-1.7.0.tar.bz2", + "checksum": "SHA-256:84e5d6919fdea31c5a56420d9a8d8a0347196675f4b7b96b0e99c20bdfecae57", + "size": "356441", + "boards": [ + { + "name": "Generic_D11C14A" + }, + { + "name": "Generic_D11D14AS" + }, + { + "name": "Generic_D11D14AM" + }, + { + "name": "Generic_x21E" + }, + { + "name": "Generic_x21G" + }, + { + "name": "Generic_x21J" + }, + { + "name": "Generic_D51G" + }, + { + "name": "Generic_D51J" + } + ], + "toolsDependencies": [ + { + "packager": "arduino", + "name": "arm-none-eabi-gcc", + "version": "4.8.3-2014q1" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "bossac", + "version": "1.8.0" + }, + { + "packager": "arduino", + "name": "openocd", + "version": "0.9.0-arduino" + }, + { + "packager": "arduino", + "name": "CMSIS", + "version": "4.5.0" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "CMSIS-Atmel", + "version": "1.0.0-mattairtech-2" + }, + { + "packager": "arduino", + "name": "arduinoOTA", + "version": "1.2.1" + } + ] + }, + { + "name": "Fab SAM core for Arduino", + "architecture": "samd", + "version": "1.8.0", + "category": "Contributed", + "url": "https://github.com/qbolsee/ArduinoCore-fab-sam/releases/download/1.8.0/Fab_SAM_Core_for_Arduino-1.8.0.tar.bz2", + "archiveFileName": "Fab_SAM_Core_for_Arduino-1.8.0.tar.bz2", + "checksum": "SHA-256:a674d92cbd7544bd087b540ca1708633840104c2cd1f1940fda20e4c88f30bd9", + "size": "356161", + "boards": [ + { + "name": "Generic_D11C14A" + }, + { + "name": "Generic_D11D14AS" + }, + { + "name": "Generic_D11D14AM" + }, + { + "name": "Generic_x21E" + }, + { + "name": "Generic_x21G" + }, + { + "name": "Generic_x21J" + }, + { + "name": "Generic_D51G" + }, + { + "name": "Generic_D51J" + } + ], + "toolsDependencies": [ + { + "packager": "arduino", + "name": "arm-none-eabi-gcc", + "version": "4.8.3-2014q1" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "bossac", + "version": "1.9.0" + }, + { + "packager": "arduino", + "name": "openocd", + "version": "0.9.0-arduino" + }, + { + "packager": "arduino", + "name": "CMSIS", + "version": "4.5.0" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "CMSIS-Atmel", + "version": "1.0.0-mattairtech-2" + }, + { + "packager": "arduino", + "name": "arduinoOTA", + "version": "1.2.1" + } + ] + }, + { + "name": "Fab SAM core for Arduino", + "architecture": "samd", + "version": "1.9.0-Jakey", + "category": "Contributed", + "url": "https://github.com/qbolsee/ArduinoCore-fab-sam/releases/download/1.8.0/Fab_SAM_Core_for_Arduino-1.8.0.tar.bz2", + "archiveFileName": "Fab_SAM_Core_for_Arduino-1.8.0.tar.bz2", + "checksum": "SHA-256:a674d92cbd7544bd087b540ca1708633840104c2cd1f1940fda20e4c88f30bd9", + "size": "356161", + "boards": [ + { + "name": "Generic_D11C14A" + }, + { + "name": "Generic_D11D14AS" + }, + { + "name": "Generic_D11D14AM" + }, + { + "name": "Generic_x21E" + }, + { + "name": "Generic_x21G" + }, + { + "name": "Generic_x21J" + }, + { + "name": "Generic_D51G" + }, + { + "name": "Generic_D51J" + } + ], + "toolsDependencies": [ + { + "packager": "arduino", + "name": "arm-none-eabi-gcc", + "version": "7-2017q4" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "bossac", + "version": "1.9.0" + }, + { + "packager": "arduino", + "name": "openocd", + "version": "0.9.0-arduino" + }, + { + "packager": "arduino", + "name": "CMSIS", + "version": "4.5.0" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "CMSIS-Atmel", + "version": "1.0.0-mattairtech-2" + }, + { + "packager": "arduino", + "name": "arduinoOTA", + "version": "1.2.1" + } + ] + }, + { + "name": "Fab SAM core for Arduino", + "architecture": "samd", + "version": "1.9.0", + "category": "Contributed", + "url": "https://github.com/qbolsee/ArduinoCore-fab-sam/releases/download/1.9.0/Fab_SAM_Core_for_Arduino-1.9.0.tar.bz2", + "archiveFileName": "Fab_SAM_Core_for_Arduino-1.9.0.tar.bz2", + "checksum": "SHA-256:f038520e059002b40622bac8ead9d91e401cf775e2b1ad763412a230a41bebe3", + "size": "356933", + "boards": [ + { + "name": "Generic_D11C14A" + }, + { + "name": "Generic_D11D14AS" + }, + { + "name": "Generic_D11D14AM" + }, + { + "name": "Generic_x21E" + }, + { + "name": "Generic_x21G" + }, + { + "name": "Generic_x21J" + }, + { + "name": "Generic_D51G" + }, + { + "name": "Generic_D51J" + } + ], + "toolsDependencies": [ + { + "packager": "arduino", + "name": "arm-none-eabi-gcc", + "version": "7-2017q4" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "bossac", + "version": "1.9.0" + }, + { + "packager": "arduino", + "name": "openocd", + "version": "0.9.0-arduino" + }, + { + "packager": "arduino", + "name": "CMSIS", + "version": "4.5.0" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "CMSIS-Atmel", + "version": "1.0.0-mattairtech-2" + }, + { + "packager": "arduino", + "name": "arduinoOTA", + "version": "1.2.1" + } + ] + }, + { + "name": "Fab SAM core for Arduino", + "architecture": "samd", + "version": "1.10.0", + "category": "Contributed", + "url": "https://github.com/qbolsee/ArduinoCore-fab-sam/releases/download/1.10.0/Fab_SAM_Core_for_Arduino-1.10.0.tar.bz2", + "archiveFileName": "Fab_SAM_Core_for_Arduino-1.10.0.tar.bz2", + "checksum": "SHA-256:99fb9cc8c0ab2d9774c047f4647add031864099943c2377544ae7b9b4fa98b5a", + "size": "356729", + "boards": [ + { + "name": "Generic_D11C14A" + }, + { + "name": "Generic_D11D14AS" + }, + { + "name": "Generic_D11D14AM" + }, + { + "name": "Generic_x21E" + }, + { + "name": "Generic_x21G" + }, + { + "name": "Generic_x21J" + }, + { + "name": "Generic_D51G" + }, + { + "name": "Generic_D51J" + } + ], + "toolsDependencies": [ + { + "packager": "arduino", + "name": "arm-none-eabi-gcc", + "version": "7-2017q4" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "bossac", + "version": "1.9.0" + }, + { + "packager": "arduino", + "name": "openocd", + "version": "0.10.0-arduino7" + }, + { + "packager": "arduino", + "name": "CMSIS", + "version": "4.5.0" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "CMSIS-Atmel", + "version": "1.0.0-mattairtech-2" + }, + { + "packager": "arduino", + "name": "arduinoOTA", + "version": "1.2.1" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "edbg", + "version": "0.50.0" + } + ] + }, + { + "name": "Fab SAM core for Arduino", + "architecture": "samd", + "version": "1.11.0", + "category": "Contributed", + "url": "https://github.com/qbolsee/ArduinoCore-fab-sam/releases/download/1.11.0/Fab_SAM_Core_for_Arduino-1.11.0.tar.bz2", + "archiveFileName": "Fab_SAM_Core_for_Arduino-1.11.0.tar.bz2", + "checksum": "SHA-256:f015d271ab6f1d0b785c8a0c8c5ea55df3d2d7e810250ab7b2718c9b12db200d", + "size": "356710", + "boards": [ + { + "name": "Generic_D11C14A" + }, + { + "name": "Generic_D11D14AS" + }, + { + "name": "Generic_D11D14AM" + }, + { + "name": "Generic_x21E" + }, + { + "name": "Generic_x21G" + }, + { + "name": "Generic_x21J" + }, + { + "name": "Generic_D51G" + }, + { + "name": "Generic_D51J" + } + ], + "toolsDependencies": [ + { + "packager": "arduino", + "name": "arm-none-eabi-gcc", + "version": "7-2017q4" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "bossac", + "version": "1.9.0" + }, + { + "packager": "arduino", + "name": "openocd", + "version": "0.10.0-arduino7" + }, + { + "packager": "arduino", + "name": "CMSIS", + "version": "4.5.0" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "CMSIS-Atmel", + "version": "1.0.0-mattairtech-2" + }, + { + "packager": "arduino", + "name": "arduinoOTA", + "version": "1.2.1" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "edbg", + "version": "0.51.0" + } + ] + } + ], + "tools": [ + { + "name": "edbg", + "version": "0.51.0", + "systems": [ + { + "host": "i686-mingw32", + "url": "https://github.com/qbolsee/edbg/releases/download/0.51.0/edbg-0.51.0-win32.zip", + "archiveFileName": "edbg-0.51.0-win32.zip", + "checksum": "SHA-256:8dc289bf1c85fe522aae4bae08f673d364d02b74d0aef75c3eb40c1632f9bf10", + "size": "148847" + }, + { + "host": "x86_64-pc-linux-gnu", + "url": "https://github.com/qbolsee/edbg/releases/download/0.51.0/edbg-0.51.0-x86_64-linux.tar.bz2", + "archiveFileName": "edbg-0.51.0-x86_64-linux.tar.bz2", + "checksum": "SHA-256:ebbddae462f52a347a7548b59984a6489899bb5462de5ff26645f59bcfc27e37", + "size": "53512" + }, + { + "host": "i686-pc-linux-gnu", + "url": "https://github.com/qbolsee/edbg/releases/download/0.51.0/edbg-0.51.0-i686-linux.tar.bz2", + "archiveFileName": "edbg-0.51.0-i686-linux.tar.bz2", + "checksum": "SHA-256:ebbddae462f52a347a7548b59984a6489899bb5462de5ff26645f59bcfc27e37", + "size": "53512" + }, + { + "host": "i386-apple-darwin11", + "url": "https://github.com/qbolsee/edbg/releases/download/0.51.0/edbg-0.51.0-i386-apple-darwin11.tar.bz2", + "archiveFileName": "edbg-0.51.0-i386-apple-darwin11.tar.bz2", + "checksum": "SHA-256:cc69fba2bfdbbaf8a187ca5c8ad1f358be948e8ccba39da32b243857addc32b4", + "size": "44850" + } + ] + }, + { + "name": "edbg", + "version": "0.50.0", + "systems": [ + { + "host": "i686-mingw32", + "url": "https://raw.githubusercontent.com/qbolsee/ArduinoCore-fab-sam/master/tools/edbg/edbg-0.50.0-win32.zip", + "archiveFileName": "edbg-0.50.0-win32.zip", + "checksum": "SHA-256:c26c964c0635363ce3b947cf0b8995be33455d09cc42e506609ba65d97eb9a24", + "size": "148852" + }, + { + "host": "x86_64-pc-linux-gnu", + "url": "https://raw.githubusercontent.com/qbolsee/ArduinoCore-fab-sam/master/tools/edbg/edbg-0.50.0-x86_64-linux.tar.bz2", + "archiveFileName": "edbg-0.50.0-x86_64-linux.tar.bz2", + "checksum": "SHA-256:822936e2472a3ff70d00eb2eae5ccf0938ae078ccf8dcefb48bec570559b2c9f", + "size": "53577" + }, + { + "host": "i686-pc-linux-gnu", + "url": "https://raw.githubusercontent.com/qbolsee/ArduinoCore-fab-sam/master/tools/edbg/edbg-0.50.0-i686-linux.tar.bz2", + "archiveFileName": "edbg-0.50.0-i686-linux.tar.bz2", + "checksum": "SHA-256:7c6547be1a5c651865243ab835564b5b71b7d5cab6d6cbf782ef5170e350adad", + "size": "53558" + }, + { + "host": "i386-apple-darwin11", + "url": "https://raw.githubusercontent.com/qbolsee/ArduinoCore-fab-sam/master/tools/edbg/edbg-0.50.0-i386-apple-darwin11.tar.bz2", + "archiveFileName": "edbg-0.50.0-i386-apple-darwin11.tar.bz2", + "checksum": "SHA-256:f5797dc582f625a7d82e9e73cf4311be50998acf601aa3e9251c23e4bee025e4", + "size": "44141" + } + ] + }, + { + "name": "bossac", + "version": "1.7.0-mattairtech-3", + "systems": [ + { + "host": "i686-mingw32", + "url": "https://github.com/qbolsee/BOSSA/releases/download/1.7.0-mattairtech-3/bossac-1.7.0-mattairtech-3-mingw32.tar.gz", + "archiveFileName": "bossac-1.7.0-mattairtech-3-mingw32.tar.gz", + "checksum": "SHA-256:81e5fc6577135b548b3154035742826e855eba257cc2f4c8f98f32e8f82b8b1e", + "size": "326228" + }, + { + "host": "x86_64-pc-linux-gnu", + "url": "https://github.com/qbolsee/BOSSA/releases/download/1.7.0-mattairtech-3/bossac-1.7.0-mattairtech-3-x86_64-linux-gnu.tar.gz", + "archiveFileName": "bossac-1.7.0-mattairtech-3-x86_64-linux-gnu.tar.gz", + "checksum": "SHA-256:c1156472f375626e6494a06787e1989abdc88cf091b554b45015c4ef698fbcb4", + "size": "37896" + }, + { + "host": "i686-pc-linux-gnu", + "url": "https://github.com/qbolsee/BOSSA/releases/download/1.7.0-mattairtech-3/bossac-1.7.0-mattairtech-3-i686-linux-gnu.tar.gz", + "archiveFileName": "bossac-1.7.0-mattairtech-3-i686-linux-gnu.tar.gz", + "checksum": "SHA-256:c4e346ce1851c4202111da34db9c47a7f15f15b9a0110040c6d343ca3b0ed8d3", + "size": "40192" + }, + { + "host": "x86_64-apple-darwin", + "url": "https://github.com/qbolsee/BOSSA/releases/download/1.7.0-mattairtech-3/bossac-1.7.0-mattairtech-3-x86_64-apple-darwin.tar.gz", + "archiveFileName": "bossac-1.7.0-mattairtech-3-x86_64-apple-darwin.tar.gz", + "checksum": "SHA-256:0fe5cc3c8575b6747bae471582791ae36509aef65af156a9cad58b42c2c20200", + "size": "30073" + } + ] + }, + { + "name": "bossac", + "version": "1.8.0", + "systems": [ + { + "host": "i686-mingw32", + "url": "https://github.com/qbolsee/BOSSA/releases/download/1.8.0/bossac-1.8.0-windows.tar.gz", + "archiveFileName": "bossac-1.8.0-windows.tar.gz", + "checksum": "SHA-256:c2dee790792eb9d38fe716903798e18c91bd25b6718e89d8b177ebe4e5a55034", + "size": "347551" + }, + { + "host": "x86_64-pc-linux-gnu", + "url": "https://github.com/qbolsee/BOSSA/releases/download/1.8.0/bossac-1.8.0-x86_64-linux-gnu.tar.gz", + "archiveFileName": "bossac-1.8.0-x86_64-linux-gnu.tar.gz", + "checksum": "SHA-256:432faadba16b959013aa2905e69a94470b84ade4becffd92b39dcadff283ed3b", + "size": "38161" + }, + { + "host": "i686-pc-linux-gnu", + "url": "https://github.com/qbolsee/BOSSA/releases/download/1.8.0/bossac-1.8.0-i686-linux-gnu.tar.gz", + "archiveFileName": "bossac-1.8.0-i686-linux-gnu.tar.gz", + "checksum": "SHA-256:52d7e66d4880eeb4868f77b38ae676a5715cf7e192a1a7f6d74c867aaa3eefca", + "size": "40405" + }, + { + "host": "x86_64-apple-darwin", + "url": "https://github.com/qbolsee/BOSSA/releases/download/1.8.0/bossac-1.8.0-mac-os.tar.gz", + "archiveFileName": "bossac-1.8.0-mac-os.tar.gz", + "checksum": "SHA-256:fc2baa24fac7f41303ac2952c92704f23129e26090b048e693e0d202a1bbf613", + "size": "30052" + } + ] + }, + { + "name": "bossac", + "version": "1.9.0", + "systems": [ + { + "host": "i686-mingw32", + "url": "https://github.com/qbolsee/BOSSA/releases/download/1.9.0/bossac-1.9.0-windows.zip", + "archiveFileName": "bossac-1.9.0-windows.zip", + "checksum": "SHA-256:1677e81bde9c105399f18e8db59089a2464085c4bb250baaefad13a939330b14", + "size": "347565" + }, + { + "host": "x86_64-pc-linux-gnu", + "url": "https://github.com/qbolsee/BOSSA/releases/download/1.9.0/bossac-1.9.0-x86_64-linux-gnu.tar.bz2", + "archiveFileName": "bossac-1.9.0-x86_64-linux-gnu.tar.bz2", + "checksum": "SHA-256:b55a88b5b431ac7d5367ede0a8a5cbded2ad9f6c5ecede906dacfbb52578f428", + "size": "38374" + }, + { + "host": "i686-pc-linux-gnu", + "url": "https://github.com/qbolsee/BOSSA/releases/download/1.9.0/bossac-1.9.0-i686-linux-gnu.tar.bz2", + "archiveFileName": "bossac-1.9.0-i686-linux-gnu.tar.bz2", + "checksum": "SHA-256:4f7553978ef4d8e9cbdafd4badf598cdc9332753cf6c3d67c65633e6640783f8", + "size": "40871" + }, + { + "host": "x86_64-apple-darwin", + "url": "https://github.com/qbolsee/BOSSA/releases/download/1.9.0/bossac-1.9.0-mac-os.tar.bz2", + "archiveFileName": "bossac-1.9.0-mac-os.tar.bz2", + "checksum": "SHA-256:cfead2275d1509ab8122d2dc5e4e899d3dac41e8937d46248f271fa6dcc18f73", + "size": "31120" + } + ] + }, + { + "name": "CMSIS-Atmel", + "version": "1.0.0-mattairtech-2", + "systems": [ + { + "host": "i686-mingw32", + "url": "https://github.com/qbolsee/CMSIS-Atmel/releases/download/CMSIS-Atmel-1.0.0-mattairtech-2/CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", + "archiveFileName": "CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", + "checksum": "SHA-256:6d592de468028e76c085a7a416939a39389a06f3f03331cdc04a50e443ea4e9a", + "size": "1977965" + }, + { + "host": "x86_64-pc-linux-gnu", + "url": "https://github.com/qbolsee/CMSIS-Atmel/releases/download/CMSIS-Atmel-1.0.0-mattairtech-2/CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", + "archiveFileName": "CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", + "checksum": "SHA-256:6d592de468028e76c085a7a416939a39389a06f3f03331cdc04a50e443ea4e9a", + "size": "1977965" + }, + { + "host": "i686-pc-linux-gnu", + "url": "https://github.com/qbolsee/CMSIS-Atmel/releases/download/CMSIS-Atmel-1.0.0-mattairtech-2/CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", + "archiveFileName": "CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", + "checksum": "SHA-256:6d592de468028e76c085a7a416939a39389a06f3f03331cdc04a50e443ea4e9a", + "size": "1977965" + }, + { + "host": "x86_64-apple-darwin", + "url": "https://github.com/qbolsee/CMSIS-Atmel/releases/download/CMSIS-Atmel-1.0.0-mattairtech-2/CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", + "archiveFileName": "CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", + "checksum": "SHA-256:6d592de468028e76c085a7a416939a39389a06f3f03331cdc04a50e443ea4e9a", + "size": "1977965" + } + ] + } + ] + } + ] +} diff --git a/json/package_Fab_SAM_index.json b/json/package_Fab_SAM_index.json new file mode 100644 index 000000000..df5f4e9d3 --- /dev/null +++ b/json/package_Fab_SAM_index.json @@ -0,0 +1,765 @@ +{ + "packages": [ + { + "name": "Fab_SAM_Arduino", + "maintainer": "Fab Foundation", + "websiteURL": "https://github.com/qbolsee/ArduinoCore-fab-sam", + "email": "", + "help": { + "online": "" + }, + "platforms": [ + { + "name": "Fab SAM core for Arduino", + "architecture": "samd", + "version": "1.6.18-alpha1", + "category": "Contributed", + "url": "https://github.com/qbolsee/ArduinoCore-fab-sam/releases/download/1.6.18-alpha1/Fab_SAM_Core_for_Arduino-1.6.18-alpha1.tar.bz2", + "archiveFileName": "Fab_SAM_Core_for_Arduino-1.6.18-alpha1.tar.bz2", + "checksum": "SHA-256:5745e58fe3d6fc0b47b7f19f241684219e9df623eb6da033d7247e8e244b9bfd", + "size": "357035", + "boards": [ + { + "name": "Generic_D21E" + }, + { + "name": "Generic_D11C14A" + }, + { + "name": "Generic_D11D14AS" + } + ], + "toolsDependencies": [ + { + "packager": "arduino", + "name": "arm-none-eabi-gcc", + "version": "4.8.3-2014q1" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "bossac", + "version": "1.7.0-mattairtech-3" + }, + { + "packager": "arduino", + "name": "openocd", + "version": "0.9.0-arduino" + }, + { + "packager": "arduino", + "name": "CMSIS", + "version": "4.5.0" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "CMSIS-Atmel", + "version": "1.0.0-mattairtech-2" + }, + { + "packager": "arduino", + "name": "arduinoOTA", + "version": "1.2.0" + } + ] + }, + { + "name": "Fab SAM core for Arduino", + "architecture": "samd", + "version": "1.6.18-alpha2", + "category": "Contributed", + "url": "https://github.com/qbolsee/ArduinoCore-fab-sam/releases/download/1.6.18-alpha2/Fab_SAM_Core_for_Arduino-1.6.18-alpha2.tar.bz2", + "archiveFileName": "Fab_SAM_Core_for_Arduino-1.6.18-alpha2.tar.bz2", + "checksum": "SHA-256:76cf96905c6a70090a212f1309014bf4e7e94189d2dc88de90d8b95d1997c500", + "size": "356816", + "boards": [ + { + "name": "Generic_D11C14A" + }, + { + "name": "Generic_D11D14AS" + }, + { + "name": "Generic_D11D14AM" + }, + { + "name": "Generic_x21E" + }, + { + "name": "Generic_x21G" + }, + { + "name": "Generic_x21J" + }, + { + "name": "Generic_D51G" + }, + { + "name": "Generic_D51J" + } + ], + "toolsDependencies": [ + { + "packager": "arduino", + "name": "arm-none-eabi-gcc", + "version": "4.8.3-2014q1" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "bossac", + "version": "1.7.0-mattairtech-3" + }, + { + "packager": "arduino", + "name": "openocd", + "version": "0.9.0-arduino" + }, + { + "packager": "arduino", + "name": "CMSIS", + "version": "4.5.0" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "CMSIS-Atmel", + "version": "1.0.0-mattairtech-2" + }, + { + "packager": "arduino", + "name": "arduinoOTA", + "version": "1.2.1" + } + ] + }, + { + "name": "Fab SAM core for Arduino", + "architecture": "samd", + "version": "1.7.0", + "category": "Contributed", + "url": "https://github.com/qbolsee/ArduinoCore-fab-sam/releases/download/1.7.0/Fab_SAM_Core_for_Arduino-1.7.0.tar.bz2", + "archiveFileName": "Fab_SAM_Core_for_Arduino-1.7.0.tar.bz2", + "checksum": "SHA-256:84e5d6919fdea31c5a56420d9a8d8a0347196675f4b7b96b0e99c20bdfecae57", + "size": "356441", + "boards": [ + { + "name": "Generic_D11C14A" + }, + { + "name": "Generic_D11D14AS" + }, + { + "name": "Generic_D11D14AM" + }, + { + "name": "Generic_x21E" + }, + { + "name": "Generic_x21G" + }, + { + "name": "Generic_x21J" + }, + { + "name": "Generic_D51G" + }, + { + "name": "Generic_D51J" + } + ], + "toolsDependencies": [ + { + "packager": "arduino", + "name": "arm-none-eabi-gcc", + "version": "4.8.3-2014q1" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "bossac", + "version": "1.8.0" + }, + { + "packager": "arduino", + "name": "openocd", + "version": "0.9.0-arduino" + }, + { + "packager": "arduino", + "name": "CMSIS", + "version": "4.5.0" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "CMSIS-Atmel", + "version": "1.0.0-mattairtech-2" + }, + { + "packager": "arduino", + "name": "arduinoOTA", + "version": "1.2.1" + } + ] + }, + { + "name": "Fab SAM core for Arduino", + "architecture": "samd", + "version": "1.8.0", + "category": "Contributed", + "url": "https://github.com/qbolsee/ArduinoCore-fab-sam/releases/download/1.8.0/Fab_SAM_Core_for_Arduino-1.8.0.tar.bz2", + "archiveFileName": "Fab_SAM_Core_for_Arduino-1.8.0.tar.bz2", + "checksum": "SHA-256:a674d92cbd7544bd087b540ca1708633840104c2cd1f1940fda20e4c88f30bd9", + "size": "356161", + "boards": [ + { + "name": "Generic_D11C14A" + }, + { + "name": "Generic_D11D14AS" + }, + { + "name": "Generic_D11D14AM" + }, + { + "name": "Generic_x21E" + }, + { + "name": "Generic_x21G" + }, + { + "name": "Generic_x21J" + }, + { + "name": "Generic_D51G" + }, + { + "name": "Generic_D51J" + } + ], + "toolsDependencies": [ + { + "packager": "arduino", + "name": "arm-none-eabi-gcc", + "version": "4.8.3-2014q1" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "bossac", + "version": "1.9.0" + }, + { + "packager": "arduino", + "name": "openocd", + "version": "0.9.0-arduino" + }, + { + "packager": "arduino", + "name": "CMSIS", + "version": "4.5.0" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "CMSIS-Atmel", + "version": "1.0.0-mattairtech-2" + }, + { + "packager": "arduino", + "name": "arduinoOTA", + "version": "1.2.1" + } + ] + }, + { + "name": "Fab SAM core for Arduino", + "architecture": "samd", + "version": "1.9.0", + "category": "Contributed", + "url": "https://github.com/qbolsee/ArduinoCore-fab-sam/releases/download/1.9.0/Fab_SAM_Core_for_Arduino-1.9.0.tar.bz2", + "archiveFileName": "Fab_SAM_Core_for_Arduino-1.9.0.tar.bz2", + "checksum": "SHA-256:f038520e059002b40622bac8ead9d91e401cf775e2b1ad763412a230a41bebe3", + "size": "356933", + "boards": [ + { + "name": "Generic_D11C14A" + }, + { + "name": "Generic_D11D14AS" + }, + { + "name": "Generic_D11D14AM" + }, + { + "name": "Generic_x21E" + }, + { + "name": "Generic_x21G" + }, + { + "name": "Generic_x21J" + }, + { + "name": "Generic_D51G" + }, + { + "name": "Generic_D51J" + } + ], + "toolsDependencies": [ + { + "packager": "arduino", + "name": "arm-none-eabi-gcc", + "version": "7-2017q4" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "bossac", + "version": "1.9.0" + }, + { + "packager": "arduino", + "name": "openocd", + "version": "0.9.0-arduino" + }, + { + "packager": "arduino", + "name": "CMSIS", + "version": "4.5.0" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "CMSIS-Atmel", + "version": "1.0.0-mattairtech-2" + }, + { + "packager": "arduino", + "name": "arduinoOTA", + "version": "1.2.1" + } + ] + }, + { + "name": "Fab SAM core for Arduino", + "architecture": "samd", + "version": "1.10.0", + "category": "Contributed", + "url": "https://github.com/qbolsee/ArduinoCore-fab-sam/releases/download/1.10.0/Fab_SAM_Core_for_Arduino-1.10.0.tar.bz2", + "archiveFileName": "Fab_SAM_Core_for_Arduino-1.10.0.tar.bz2", + "checksum": "SHA-256:99fb9cc8c0ab2d9774c047f4647add031864099943c2377544ae7b9b4fa98b5a", + "size": "356729", + "boards": [ + { + "name": "Generic_D11C14A" + }, + { + "name": "Generic_D11D14AS" + }, + { + "name": "Generic_D11D14AM" + }, + { + "name": "Generic_x21E" + }, + { + "name": "Generic_x21G" + }, + { + "name": "Generic_x21J" + }, + { + "name": "Generic_D51G" + }, + { + "name": "Generic_D51J" + } + ], + "toolsDependencies": [ + { + "packager": "arduino", + "name": "arm-none-eabi-gcc", + "version": "7-2017q4" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "bossac", + "version": "1.9.0" + }, + { + "packager": "arduino", + "name": "openocd", + "version": "0.10.0-arduino7" + }, + { + "packager": "arduino", + "name": "CMSIS", + "version": "4.5.0" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "CMSIS-Atmel", + "version": "1.0.0-mattairtech-2" + }, + { + "packager": "arduino", + "name": "arduinoOTA", + "version": "1.2.1" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "edbg", + "version": "0.50.0" + } + ] + }, + { + "name": "Fab SAM core for Arduino", + "architecture": "samd", + "version": "1.11.0", + "category": "Contributed", + "url": "https://github.com/qbolsee/ArduinoCore-fab-sam/releases/download/1.11.0/Fab_SAM_Core_for_Arduino-1.11.0.tar.bz2", + "archiveFileName": "Fab_SAM_Core_for_Arduino-1.11.0.tar.bz2", + "checksum": "SHA-256:f015d271ab6f1d0b785c8a0c8c5ea55df3d2d7e810250ab7b2718c9b12db200d", + "size": "356710", + "boards": [ + { + "name": "Generic_D11C14A" + }, + { + "name": "Generic_D11D14AS" + }, + { + "name": "Generic_D11D14AM" + }, + { + "name": "Generic_x21E" + }, + { + "name": "Generic_x21G" + }, + { + "name": "Generic_x21J" + }, + { + "name": "Generic_D51G" + }, + { + "name": "Generic_D51J" + } + ], + "toolsDependencies": [ + { + "packager": "arduino", + "name": "arm-none-eabi-gcc", + "version": "7-2017q4" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "bossac", + "version": "1.9.0" + }, + { + "packager": "arduino", + "name": "openocd", + "version": "0.10.0-arduino7" + }, + { + "packager": "arduino", + "name": "CMSIS", + "version": "4.5.0" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "CMSIS-Atmel", + "version": "1.0.0-mattairtech-2" + }, + { + "packager": "arduino", + "name": "arduinoOTA", + "version": "1.2.1" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "edbg", + "version": "0.51.0" + } + ] + }, + { + "name": "Fab SAM core for Arduino", + "architecture": "samd", + "version": "1.12.0", + "category": "Contributed", + "url": "https://github.com/qbolsee/ArduinoCore-fab-sam/releases/download/1.12.0/Fab_SAM_Core_for_Arduino-1.12.0.tar.bz2", + "archiveFileName": "Fab_SAM_Core_for_Arduino-1.12.0.tar.bz2", + "checksum": "SHA-256:f0bd44defd0377192a543100f7e7086bab8844be7f75e3aed3dd208ec4064846", + "size": "356371", + "boards": [ + { + "name": "Generic_D11C14A" + }, + { + "name": "Generic_D11D14AS" + }, + { + "name": "Generic_D11D14AM" + }, + { + "name": "Generic_x21E" + }, + { + "name": "Generic_x21G" + }, + { + "name": "Generic_x21J" + }, + { + "name": "Generic_D51G" + }, + { + "name": "Generic_D51J" + } + ], + "toolsDependencies": [ + { + "packager": "arduino", + "name": "arm-none-eabi-gcc", + "version": "7-2017q4" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "bossac", + "version": "1.9.0" + }, + { + "packager": "arduino", + "name": "openocd", + "version": "0.10.0-arduino7" + }, + { + "packager": "arduino", + "name": "CMSIS", + "version": "4.5.0" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "CMSIS-Atmel", + "version": "1.0.0-mattairtech-2" + }, + { + "packager": "arduino", + "name": "arduinoOTA", + "version": "1.2.1" + }, + { + "packager": "Fab_SAM_Arduino", + "name": "edbg", + "version": "0.51.0" + } + ] + } + ], + "tools": [ + { + "name": "edbg", + "version": "0.51.0", + "systems": [ + { + "host": "i686-mingw32", + "url": "https://raw.githubusercontent.com/qbolsee/ArduinoCore-fab-sam/master/tools/edbg/edbg-0.51.0-win32.zip", + "archiveFileName": "edbg-0.51.0-win32.zip", + "checksum": "SHA-256:f2e1eb0ca2040fce69c6e37c3fefc50ad29e647d369b1b09696ee37a3d7358e6", + "size": "148853" + }, + { + "host": "x86_64-pc-linux-gnu", + "url": "https://raw.githubusercontent.com/qbolsee/ArduinoCore-fab-sam/master/tools/edbg/edbg-0.51.0-x86_64-linux.tar.bz2", + "archiveFileName": "edbg-0.51.0-x86_64-linux.tar.bz2", + "checksum": "SHA-256:1a7cf4b2ea31969eca14223f3b31f268b41f9ebc1b235ea62b483089c8844578", + "size": "53567" + }, + { + "host": "i686-pc-linux-gnu", + "url": "https://raw.githubusercontent.com/qbolsee/ArduinoCore-fab-sam/master/tools/edbg/edbg-0.51.0-i686-linux.tar.bz2", + "archiveFileName": "edbg-0.51.0-i686-linux.tar.bz2", + "checksum": "SHA-256:1a7cf4b2ea31969eca14223f3b31f268b41f9ebc1b235ea62b483089c8844578", + "size": "53567" + }, + { + "host": "i386-apple-darwin11", + "url": "https://raw.githubusercontent.com/qbolsee/ArduinoCore-fab-sam/master/tools/edbg/edbg-0.51.0-i386-apple-darwin11.tar.bz2", + "archiveFileName": "edbg-0.51.0-i386-apple-darwin11.tar.bz2", + "checksum": "SHA-256:4510eca1dece282f4a65297ff330fe4f2838bc30dc3d456418abc35877fb1390", + "size": "45562" + } + ] + }, + { + "name": "edbg", + "version": "0.50.0", + "systems": [ + { + "host": "i686-mingw32", + "url": "https://raw.githubusercontent.com/qbolsee/ArduinoCore-fab-sam/master/tools/edbg/edbg-0.50.0-win32.zip", + "archiveFileName": "edbg-0.50.0-win32.zip", + "checksum": "SHA-256:c26c964c0635363ce3b947cf0b8995be33455d09cc42e506609ba65d97eb9a24", + "size": "148852" + }, + { + "host": "x86_64-pc-linux-gnu", + "url": "https://raw.githubusercontent.com/qbolsee/ArduinoCore-fab-sam/master/tools/edbg/edbg-0.50.0-x86_64-linux.tar.bz2", + "archiveFileName": "edbg-0.50.0-x86_64-linux.tar.bz2", + "checksum": "SHA-256:822936e2472a3ff70d00eb2eae5ccf0938ae078ccf8dcefb48bec570559b2c9f", + "size": "53577" + }, + { + "host": "i686-pc-linux-gnu", + "url": "https://raw.githubusercontent.com/qbolsee/ArduinoCore-fab-sam/master/tools/edbg/edbg-0.50.0-i686-linux.tar.bz2", + "archiveFileName": "edbg-0.50.0-i686-linux.tar.bz2", + "checksum": "SHA-256:7c6547be1a5c651865243ab835564b5b71b7d5cab6d6cbf782ef5170e350adad", + "size": "53558" + }, + { + "host": "i386-apple-darwin11", + "url": "https://raw.githubusercontent.com/qbolsee/ArduinoCore-fab-sam/master/tools/edbg/edbg-0.50.0-i386-apple-darwin11.tar.bz2", + "archiveFileName": "edbg-0.50.0-i386-apple-darwin11.tar.bz2", + "checksum": "SHA-256:f5797dc582f625a7d82e9e73cf4311be50998acf601aa3e9251c23e4bee025e4", + "size": "44141" + } + ] + }, + { + "name": "bossac", + "version": "1.7.0-mattairtech-3", + "systems": [ + { + "host": "i686-mingw32", + "url": "https://github.com/qbolsee/BOSSA/releases/download/1.7.0-mattairtech-3/bossac-1.7.0-mattairtech-3-mingw32.tar.gz", + "archiveFileName": "bossac-1.7.0-mattairtech-3-mingw32.tar.gz", + "checksum": "SHA-256:81e5fc6577135b548b3154035742826e855eba257cc2f4c8f98f32e8f82b8b1e", + "size": "326228" + }, + { + "host": "x86_64-pc-linux-gnu", + "url": "https://github.com/qbolsee/BOSSA/releases/download/1.7.0-mattairtech-3/bossac-1.7.0-mattairtech-3-x86_64-linux-gnu.tar.gz", + "archiveFileName": "bossac-1.7.0-mattairtech-3-x86_64-linux-gnu.tar.gz", + "checksum": "SHA-256:c1156472f375626e6494a06787e1989abdc88cf091b554b45015c4ef698fbcb4", + "size": "37896" + }, + { + "host": "i686-pc-linux-gnu", + "url": "https://github.com/qbolsee/BOSSA/releases/download/1.7.0-mattairtech-3/bossac-1.7.0-mattairtech-3-i686-linux-gnu.tar.gz", + "archiveFileName": "bossac-1.7.0-mattairtech-3-i686-linux-gnu.tar.gz", + "checksum": "SHA-256:c4e346ce1851c4202111da34db9c47a7f15f15b9a0110040c6d343ca3b0ed8d3", + "size": "40192" + }, + { + "host": "x86_64-apple-darwin", + "url": "https://github.com/qbolsee/BOSSA/releases/download/1.7.0-mattairtech-3/bossac-1.7.0-mattairtech-3-x86_64-apple-darwin.tar.gz", + "archiveFileName": "bossac-1.7.0-mattairtech-3-x86_64-apple-darwin.tar.gz", + "checksum": "SHA-256:0fe5cc3c8575b6747bae471582791ae36509aef65af156a9cad58b42c2c20200", + "size": "30073" + } + ] + }, + { + "name": "bossac", + "version": "1.8.0", + "systems": [ + { + "host": "i686-mingw32", + "url": "https://github.com/qbolsee/BOSSA/releases/download/1.8.0/bossac-1.8.0-windows.tar.gz", + "archiveFileName": "bossac-1.8.0-windows.tar.gz", + "checksum": "SHA-256:c2dee790792eb9d38fe716903798e18c91bd25b6718e89d8b177ebe4e5a55034", + "size": "347551" + }, + { + "host": "x86_64-pc-linux-gnu", + "url": "https://github.com/qbolsee/BOSSA/releases/download/1.8.0/bossac-1.8.0-x86_64-linux-gnu.tar.gz", + "archiveFileName": "bossac-1.8.0-x86_64-linux-gnu.tar.gz", + "checksum": "SHA-256:432faadba16b959013aa2905e69a94470b84ade4becffd92b39dcadff283ed3b", + "size": "38161" + }, + { + "host": "i686-pc-linux-gnu", + "url": "https://github.com/qbolsee/BOSSA/releases/download/1.8.0/bossac-1.8.0-i686-linux-gnu.tar.gz", + "archiveFileName": "bossac-1.8.0-i686-linux-gnu.tar.gz", + "checksum": "SHA-256:52d7e66d4880eeb4868f77b38ae676a5715cf7e192a1a7f6d74c867aaa3eefca", + "size": "40405" + }, + { + "host": "x86_64-apple-darwin", + "url": "https://github.com/qbolsee/BOSSA/releases/download/1.8.0/bossac-1.8.0-mac-os.tar.gz", + "archiveFileName": "bossac-1.8.0-mac-os.tar.gz", + "checksum": "SHA-256:fc2baa24fac7f41303ac2952c92704f23129e26090b048e693e0d202a1bbf613", + "size": "30052" + } + ] + }, + { + "name": "bossac", + "version": "1.9.0", + "systems": [ + { + "host": "i686-mingw32", + "url": "https://github.com/qbolsee/BOSSA/releases/download/1.9.0/bossac-1.9.0-windows.zip", + "archiveFileName": "bossac-1.9.0-windows.zip", + "checksum": "SHA-256:1677e81bde9c105399f18e8db59089a2464085c4bb250baaefad13a939330b14", + "size": "347565" + }, + { + "host": "x86_64-pc-linux-gnu", + "url": "https://github.com/qbolsee/BOSSA/releases/download/1.9.0/bossac-1.9.0-x86_64-linux-gnu.tar.bz2", + "archiveFileName": "bossac-1.9.0-x86_64-linux-gnu.tar.bz2", + "checksum": "SHA-256:b55a88b5b431ac7d5367ede0a8a5cbded2ad9f6c5ecede906dacfbb52578f428", + "size": "38374" + }, + { + "host": "i686-pc-linux-gnu", + "url": "https://github.com/qbolsee/BOSSA/releases/download/1.9.0/bossac-1.9.0-i686-linux-gnu.tar.bz2", + "archiveFileName": "bossac-1.9.0-i686-linux-gnu.tar.bz2", + "checksum": "SHA-256:4f7553978ef4d8e9cbdafd4badf598cdc9332753cf6c3d67c65633e6640783f8", + "size": "40871" + }, + { + "host": "x86_64-apple-darwin", + "url": "https://github.com/qbolsee/BOSSA/releases/download/1.9.0/bossac-1.9.0-mac-os.tar.bz2", + "archiveFileName": "bossac-1.9.0-mac-os.tar.bz2", + "checksum": "SHA-256:cfead2275d1509ab8122d2dc5e4e899d3dac41e8937d46248f271fa6dcc18f73", + "size": "31120" + } + ] + }, + { + "name": "CMSIS-Atmel", + "version": "1.0.0-mattairtech-2", + "systems": [ + { + "host": "i686-mingw32", + "url": "https://github.com/qbolsee/CMSIS-Atmel/releases/download/CMSIS-Atmel-1.0.0-mattairtech-2/CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", + "archiveFileName": "CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", + "checksum": "SHA-256:6d592de468028e76c085a7a416939a39389a06f3f03331cdc04a50e443ea4e9a", + "size": "1977965" + }, + { + "host": "x86_64-pc-linux-gnu", + "url": "https://github.com/qbolsee/CMSIS-Atmel/releases/download/CMSIS-Atmel-1.0.0-mattairtech-2/CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", + "archiveFileName": "CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", + "checksum": "SHA-256:6d592de468028e76c085a7a416939a39389a06f3f03331cdc04a50e443ea4e9a", + "size": "1977965" + }, + { + "host": "i686-pc-linux-gnu", + "url": "https://github.com/qbolsee/CMSIS-Atmel/releases/download/CMSIS-Atmel-1.0.0-mattairtech-2/CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", + "archiveFileName": "CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", + "checksum": "SHA-256:6d592de468028e76c085a7a416939a39389a06f3f03331cdc04a50e443ea4e9a", + "size": "1977965" + }, + { + "host": "x86_64-apple-darwin", + "url": "https://github.com/qbolsee/CMSIS-Atmel/releases/download/CMSIS-Atmel-1.0.0-mattairtech-2/CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", + "archiveFileName": "CMSIS-Atmel-1.0.0-mattairtech-2.tar.gz", + "checksum": "SHA-256:6d592de468028e76c085a7a416939a39389a06f3f03331cdc04a50e443ea4e9a", + "size": "1977965" + } + ] + } + ] + } + ] +} diff --git a/package.json b/package.json new file mode 100644 index 000000000..c17279ef9 --- /dev/null +++ b/package.json @@ -0,0 +1,15 @@ +{ + "name": "framework-arduino-samd-fabsam", + "version": "1.16.18", + "description": "Arduino Wiring-based Framework for Microchip SAM D microcontrollers", + "keywords": [ + "framework", + "arduino", + "microchip", + "samd" + ], + "repository": { + "type": "git", + "url": "https://github.com/qbolsee/ArduinoCore-fab-sam.git" + } +} diff --git a/platform.txt b/platform.txt index 5ba8a633f..ff87cdc39 100644 --- a/platform.txt +++ b/platform.txt @@ -17,8 +17,8 @@ # For more info: # https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification -name=MattairTech SAM D|L|C core for Arduino -version=1.6.18 +name=Fab SAM core for Arduino +version=1.12.0 # Compile variables # ----------------- @@ -117,8 +117,21 @@ recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_ou recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" recipe.size.regex=\.text\s+([0-9]+).* -# Uploader tools -# -------------- +# Debugger configuration (general options) +# ---------------------------------------- +# EXPERIMENTAL feature: +# - this is alpha and may be subject to change without notice +debug.executable={build.path}/{build.project_name}.elf +debug.toolchain=gcc +debug.toolchain.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ +debug.toolchain.prefix=arm-none-eabi- +debug.server=openocd +debug.server.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path}/bin/openocd +debug.server.openocd.scripts_dir={runtime.tools.openocd-0.10.0-arduino7.path}/share/openocd/scripts/ +debug.server.openocd.script={runtime.platform.path}/variants/{build.variant}/{build.openocdscript} + +# Upload/Debug tools +# ------------------ # # AVRDUDE @@ -137,7 +150,7 @@ tools.avrdude_remote.upload.pattern="openocd --version 2>&1 | grep 2016 && if op # # BOSSA # -tools.bossac.path={runtime.tools.bossac-1.7.0-mattairtech-3.path} +tools.bossac.path={runtime.tools.bossac-1.9.0.path} tools.bossac.cmd=bossac tools.bossac.cmd.windows=bossac.exe @@ -151,55 +164,27 @@ tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b # -# OpenOCD sketch upload +# edbg sketch upload # +tools.edbg.path={runtime.tools.edbg-0.51.0.path} +tools.edbg.cmd=edbg +tools.edbg.cmd.windows=edbg.exe -tools.openocd.path={runtime.tools.openocd-0.9.0-arduino.path} -tools.openocd.cmd=bin/openocd -tools.openocd.cmd.windows=bin/openocd.exe +tools.edbg.upload.params.verbose=-b +tools.edbg.upload.params.quiet=-b +tools.edbg.upload.pattern="{path}/{cmd}" {upload.verbose} -t {build.chip} -pv {upload.erase} -f "{build.path}/{build.project_name}.bin" -x 10 -tools.openocd.upload.params.verbose=-d2 -tools.openocd.upload.params.quiet=-d0 -tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{{build.path}/{build.project_name}.bin}} verify reset 0x2000; shutdown" +tools.edbg.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA +tools.edbg.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b -tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA -tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b +tools.edbg.program.params.verbose=-b +tools.edbg.program.params.quiet=-b +tools.edbg.program.pattern="{path}/{cmd}" {program.verbose} -t {build.chip} -pv {upload.erase} -o {upload.offset} -f "{build.path}/{build.project_name}.bin" -x 10 -# Program flashes the binary at 0x0000, so use the linker script without_bootloader -tools.openocd.program.params.verbose=-d2 -tools.openocd.program.params.quiet=-d0 -tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{{build.path}/{build.project_name}.elf}} verify reset; shutdown" +tools.edbg.erase.params.verbose=-b +tools.edbg.erase.params.quiet=-b +tools.edbg.erase.pattern="{path}/{cmd}" {erase.verbose} -t {build.chip} -e -F w,2:0,7 -tools.openocd.erase.params.verbose=-d3 -tools.openocd.erase.params.quiet=-d0 -tools.openocd.erase.pattern= - -tools.openocd.bootloader.params.verbose=-d3 -tools.openocd.bootloader.params.quiet=-d0 -tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{{runtime.platform.path}/bootloaders/{bootloader.file}}} verify reset; shutdown" - -# -# OpenOCD sketch upload - version with configurable bootloader size -# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences -# - -tools.openocd-withbootsize.path={runtime.tools.openocd-0.9.0-arduino.path} -tools.openocd-withbootsize.cmd=bin/openocd -tools.openocd-withbootsize.cmd.windows=bin/openocd.exe - -tools.openocd-withbootsize.upload.params.verbose=-d2 -tools.openocd-withbootsize.upload.params.quiet=-d0 -tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{{build.path}/{build.project_name}.bin}} verify reset {bootloader.size}; shutdown" - -# Program flashes the binary at 0x0000, so use the linker script without_bootloader -tools.openocd-withbootsize.program.params.verbose=-d2 -tools.openocd-withbootsize.program.params.quiet=-d0 -tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{{build.path}/{build.project_name}.elf}} verify reset; shutdown" - -tools.openocd-withbootsize.erase.params.verbose=-d3 -tools.openocd-withbootsize.erase.params.quiet=-d0 -tools.openocd-withbootsize.erase.pattern= - -tools.openocd-withbootsize.bootloader.params.verbose=-d2 -tools.openocd-withbootsize.bootloader.params.quiet=-d0 -tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{{runtime.platform.path}/bootloaders/{bootloader.file}}} verify reset; shutdown" +tools.edbg.bootloader.params.verbose=-b +tools.edbg.bootloader.params.quiet=-b +tools.edbg.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -t {build.chip} -epv -f "{runtime.platform.path}/bootloaders/{bootloader.file}" diff --git a/programmers.txt b/programmers.txt index fd7471b7d..ac4a82a05 100644 --- a/programmers.txt +++ b/programmers.txt @@ -14,23 +14,16 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -edbg.name=Atmel EDBG +edbg.name=CMSIS-DAP edbg.communication=USB edbg.protocol= edbg.program.protocol= -edbg.program.tool=openocd +edbg.program.tool=edbg edbg.program.extra_params= atmel_ice.name=Atmel-ICE atmel_ice.communication=USB atmel_ice.protocol= atmel_ice.program.protocol= -atmel_ice.program.tool=openocd +atmel_ice.program.tool=edbg atmel_ice.program.extra_params= - -sam_ice.name=Atmel SAM-ICE -sam_ice.communication=USB -sam_ice.protocol= -sam_ice.program.protocol= -sam_ice.program.tool=openocd -sam_ice.program.extra_params= diff --git a/tools/edbg/edbg-0.50.0-i386-apple-darwin11.tar.bz2 b/tools/edbg/edbg-0.50.0-i386-apple-darwin11.tar.bz2 new file mode 100644 index 000000000..1664e1bb5 Binary files /dev/null and b/tools/edbg/edbg-0.50.0-i386-apple-darwin11.tar.bz2 differ diff --git a/tools/edbg/edbg-0.50.0-i686-linux.tar.bz2 b/tools/edbg/edbg-0.50.0-i686-linux.tar.bz2 new file mode 100644 index 000000000..cbf05108f Binary files /dev/null and b/tools/edbg/edbg-0.50.0-i686-linux.tar.bz2 differ diff --git a/tools/edbg/edbg-0.50.0-win32.zip b/tools/edbg/edbg-0.50.0-win32.zip new file mode 100644 index 000000000..76ea43e5c Binary files /dev/null and b/tools/edbg/edbg-0.50.0-win32.zip differ diff --git a/tools/edbg/edbg-0.50.0-x86_64-linux.tar.bz2 b/tools/edbg/edbg-0.50.0-x86_64-linux.tar.bz2 new file mode 100644 index 000000000..0ef5b81b7 Binary files /dev/null and b/tools/edbg/edbg-0.50.0-x86_64-linux.tar.bz2 differ diff --git a/tools/edbg/edbg-0.51.0-i386-apple-darwin11.tar.bz2 b/tools/edbg/edbg-0.51.0-i386-apple-darwin11.tar.bz2 new file mode 100644 index 000000000..3fd029ebb Binary files /dev/null and b/tools/edbg/edbg-0.51.0-i386-apple-darwin11.tar.bz2 differ diff --git a/tools/edbg/edbg-0.51.0-i686-linux.tar.bz2 b/tools/edbg/edbg-0.51.0-i686-linux.tar.bz2 new file mode 100644 index 000000000..4a4e8157e Binary files /dev/null and b/tools/edbg/edbg-0.51.0-i686-linux.tar.bz2 differ diff --git a/tools/edbg/edbg-0.51.0-win32.zip b/tools/edbg/edbg-0.51.0-win32.zip new file mode 100644 index 000000000..00af85c02 Binary files /dev/null and b/tools/edbg/edbg-0.51.0-win32.zip differ diff --git a/tools/edbg/edbg-0.51.0-x86_64-linux.tar.bz2 b/tools/edbg/edbg-0.51.0-x86_64-linux.tar.bz2 new file mode 100644 index 000000000..4a4e8157e Binary files /dev/null and b/tools/edbg/edbg-0.51.0-x86_64-linux.tar.bz2 differ diff --git a/variants/Generic_D11C14A/README.md b/variants/Generic_D11C14A/README.md index b18961546..41ed69155 100644 --- a/variants/Generic_D11C14A/README.md +++ b/variants/Generic_D11C14A/README.md @@ -1,271 +1,271 @@ -# Generic ATsamD11C14A - -``` -====================================== ATsamD11C14A ===================================== -Other COM PWM Analog INT Arduino* Arduino* INT Analog PWM COM Other -========================================================================================= - 1------------------- - SCK*/RX2 TCC01 * * 5 | A5 A4 | 4 * * TCC00 MOSI*/TX2 REF - MOSI* TCC02 * 8 | A8 (XIN) A2 | 2 * * DAC - SCK* TCC03 * 9 | A9 (XOUT) Vdd | - SDA/MISO* TC10 * NMI 14 | A14 Gnd | - SCL/SS* TC11 * * 15 | A15 A25 | 25 USB/DP -BOOT 28 | A28/RST A24 | 24 USB/DM -SWDCLK TX1/MISO* 30 | A30 A31 | 31 * RX1/SS* SWDIO - ------------------- - -* Most pins can be used for more than one function. When using PIN_MAP_STANDARD, the port - pin number printed on the chip above is also used in Arduino (but without the 'A') for - all of the supported functions (ie: digitalRead(), analogRead(), analogWrite(), etc.). - When using PIN_MAP_COMPACT, the Arduino numbering is sequential starting from 0 at the - top left pin (A5). PIN_MAP_COMPACT uses less FLASH. -* When USB CDC is enabled, Serial refers to SerialUSB, otherwise it refers to Serial1. -* When using ONE_UART_NO_WIRE_ONE_SPI, use SPI on pins 4, 5, 14, and 15. - When using NO_UART_ONE_WIRE_ONE_SPI, use SPI on pins 8, 9, 30, and 31. -* Tone available on TC2. TC2 is not routed to pins in the D11C14A. -* Leave pin A30 floating (or use external pullup) during reset. -* DO NOT connect voltages higher than 3.3V! -``` - - -## Pins descriptions for Generic ATsamD11C14A - -### PIN_MAP_STANDARD -``` -==================================================================================================================================== -Arduino | Port | Alternate Function | Comments (! means not used with this peripheral assignment) ---------|-------|-----------------------|------------------------------------------------------------------------------------------- -0 | ---- | NOT A PIN | NOT A PIN -1 | ---- | NOT A PIN | NOT A PIN -2 | PA02 | DAC | EIC/EXTINT[2] ADC/AIN[0] PTC/Y[0] DAC/VOUT -3 | ---- | NOT A PIN | NOT A PIN -4 | PA04 | REFB / TX2* / TCC00 | EIC/EXTINT[4] REF/ADC/VREFB ADC/AIN[2] AC/AIN[0] PTC/Y[2] SERCOM0/PAD[2] !SERCOM0/PAD[0] !TC1/WO[0] TCC0/WO[0] -5 | PA05 | RX2* / TCC01 | EIC/EXTINT[5] ADC/AIN[3] AC/AIN[1] PTC/Y[3] SERCOM0/PAD[3] !SERCOM0/PAD[1] !TC1/WO[1] TCC0/WO[1] -6 | ---- | NOT A PIN | NOT A PIN -7 | ---- | NOT A PIN | NOT A PIN -8 | PA08 | TX1 / MOSI / TCC02 | EIC/EXTINT[6] SERCOM1/PAD[2] !SERCOM0/PAD[2] TCC0/WO[2] !TCC0/WO[4] Xin32 / Xin -9 | PA09 | RX1 / SCK / TCC03 | EIC/EXTINT[7] SERCOM1/PAD[3] !SERCOM0/PAD[3] TCC0/WO[3] !TCC0/WO[5] Xout32 / Xout -10 | ---- | NOT A PIN | NOT A PIN -11 | ---- | NOT A PIN | NOT A PIN -12 | ---- | NOT A PIN | NOT A PIN -13 | ---- | NOT A PIN | NOT A PIN -14 | PA14 | SDA / TC10 | EIC/NMI ADC/AIN[6] PTC/X[0] PTC/Y[6] SERCOM0/PAD[0] !SERCOM2/PAD[0] TC1/WO[0] !TCC0/WO[0] -15 | PA15 | SCL / TC11 | EIC/EXTINT[1] ADC/AIN[7] PTC/X[1] PTC/Y[7] SERCOM0/PAD[1] !SERCOM2/PAD[1] TC1/WO[1] !TCC0/WO[1] -16 | ---- | NOT A PIN | NOT A PIN -17 | ---- | NOT A PIN | NOT A PIN -18 | ---- | NOT A PIN | NOT A PIN -19 | ---- | NOT A PIN | NOT A PIN -20 | ---- | NOT A PIN | NOT A PIN -21 | ---- | NOT A PIN | NOT A PIN -22 | ---- | NOT A PIN | NOT A PIN -23 | ---- | NOT A PIN | NOT A PIN -24 | PA24 | USB_NEGATIVE | USB/DM -25 | PA25 | USB_POSITIVE | USB/DP -26 | ---- | NOT A PIN | NOT A PIN -27 | ---- | NOT A PIN | NOT A PIN -28 | PA28 | Reset | Reset, BOOT (double tap bootloader entry) -29 | ---- | NOT A PIN | NOT A PIN -30 | PA30 | MISO / SWD CLK | !EIC/EXTINT[2] SERCOM1/PAD[0] !SERCOM1/PAD[2] !TC2/WO[0] !TCC0/WO[2] SWD CLK, leave floating during boot -31 | PA31 | SS / SWD IO | EIC/EXTINT[3] SERCOM1/PAD[1] !SERCOM1/PAD[3] !TC2/WO[1] !TCC0/WO[3] SWD IO -==================================================================================================================================== -``` - - -### PIN_MAP_COMPACT -``` -==================================================================================================================================== -Arduino | Port | Alternate Function | Comments (! means not used with this peripheral assignment) ---------|-------|-----------------------|------------------------------------------------------------------------------------------- -0 | PA02 | DAC | EIC/EXTINT[2] ADC/AIN[0] PTC/Y[0] DAC/VOUT -1 | PA04 | REFB / TX2* / TCC00 | EIC/EXTINT[4] REF/ADC/VREFB ADC/AIN[2] AC/AIN[0] PTC/Y[2] SERCOM0/PAD[2] !SERCOM0/PAD[0] !TC1/WO[0] TCC0/WO[0] -2 | PA05 | RX2* / TCC01 | EIC/EXTINT[5] ADC/AIN[3] AC/AIN[1] PTC/Y[3] SERCOM0/PAD[3] !SERCOM0/PAD[1] !TC1/WO[1] TCC0/WO[1] -3 | PA08 | TX1 / MOSI / TCC02 | EIC/EXTINT[6] SERCOM1/PAD[2] !SERCOM0/PAD[2] TCC0/WO[2] !TCC0/WO[4] Xin32 / Xin -4 | PA09 | RX1 / SCK / TCC03 | EIC/EXTINT[7] SERCOM1/PAD[3] !SERCOM0/PAD[3] TCC0/WO[3] !TCC0/WO[5] Xout32 / Xout -5 | PA14 | SDA / TC10 | EIC/NMI ADC/AIN[6] PTC/X[0] PTC/Y[6] SERCOM0/PAD[0] !SERCOM2/PAD[0] TC1/WO[0] !TCC0/WO[0] -6 | PA15 | SCL / TC11 | EIC/EXTINT[1] ADC/AIN[7] PTC/X[1] PTC/Y[7] SERCOM0/PAD[1] !SERCOM2/PAD[1] TC1/WO[1] !TCC0/WO[1] -7 | PA24 | USB_NEGATIVE | USB/DM -8 | PA25 | USB_POSITIVE | USB/DP -9 | PA28 | Reset | Reset, BOOT (double tap bootloader entry) -10 | PA30 | MISO / SWD CLK | !EIC/EXTINT[2] SERCOM1/PAD[0] !SERCOM1/PAD[2] !TC2/WO[0] !TCC0/WO[2] SWD CLK, leave floating during boot -11 | PA31 | SS / SWD IO | EIC/EXTINT[3] SERCOM1/PAD[1] !SERCOM1/PAD[3] !TC2/WO[1] !TCC0/WO[3] SWD IO -==================================================================================================================================== - -* Most pins can be used for more than one function. When using PIN_MAP_STANDARD, the port - pin number printed on the chip above is also used in Arduino (but without the 'A') for - all of the supported functions (ie: digitalRead(), analogRead(), analogWrite(), etc.). - When using PIN_MAP_COMPACT, the Arduino numbering is sequential starting from 0 at the - top left pin (A5). PIN_MAP_COMPACT uses less RAM. -* NOT A PIN means the Arduino pin number is not mapped to a physical pin. -* Pins 24 and 25 are in use by USB (USB_NEGATIVE and USB_POSITIVE). -* The tone library uses TC2. TC2 is not routed to pins in the D11C14A (14-pin). -* When using ONE_UART_NO_WIRE_ONE_SPI, Serial1 refers to TX2/RX2 instead of TX1/RX1. -* Leave pin A30 floating (or use external pullup) during reset. -* SERCOM2 does not exist on the D11C14A. -``` - - -## Board Configuration Notes - -* **Crystals** - * Either a 32.768KHz crystal or a high speed crystal can be used. - * The bootloader does not use an external crystal by default. Double-tap the reset button to enter manually. - -* **GPIO** - * All pins (including analog) support INPUT, OUTPUT, INPUT_PULLUP, and INPUT_PULLDOWN. - * Each pin can source or sink a maximum of 7 mA (when PER_ATTR_DRIVE_STRONG is set for the pin, enabled by default). - * Internal pull-up and pull-down resistors of 20-60 Kohms (40Kohm typ., disconnected by default). - -* **Analog Inputs** - * 5 pins can be configured as ADC analog inputs. - * Each pin measures from ground to 3.3 volts by default. - * Each pin provides 10 bits of resolution (1024 values) by default. - * 12-bit resolution supported by using the analogReadResolution() function. - * The upper end of the measurement range can be changed using the analogReference() function. - * A reference voltage can be connected to REF. - -* **DAC** - * One analog output is available on pin 2. - * Provides a 10-bit voltage output with the analogWrite() function. - -* **PWM** - * 6 pins can be configured as PWM outputs. - * Each pin provides 8 bits of resolution (256 values) by default. - * 12-bit resolution supported by using the analogWriteResolution() function. - -* **External Interrupts** - * 7 pins can be configured with external interrupts. - -* **SERCOM** - * 2 SERCOM are available. - * Up to 2 UART instances - * 1 SPI instance - * 1 WIRE (I2C) instance - - - -## PinDescription table format - -### Note that in 1.6.18-beta-b1 a new compact table format was added. -The standard PinDescription table uses 12 bytes per pin. Define PIN_DESCRIPTION_TABLE_SIMPLE -to use a more compact format that uses only 4 bytes per pin (currently only available -for the D11 chips). In this case, the PinType, PinAttribute, and GCLKCCL columns are not used -(they are not required). Additionally, the SetPortPin() and SetExtIntADC() macros are used to -pack Port and Pin into the PortPin column, and ExtInt and ADCChannelNumber into the ExtIntADC -column. Note that external libraries that reference the PinDescription table directly (uncommon) -will no longer work. This define can be combined with the PIN_MAP_COMPACT define, which -is available in variant.h of the D11 variants. This can save from 10's to over 200 bytes. - -### Note that a new column (GCLKCCL) was added for 1.6.8-beta-b0. -MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE in variant.h is used to track versions. -If using board variant files with the old format, the new core will still read the -table the old way, losing any new features introduced by the new column. Additionally, -new definitions have been added for D51, L21, and C21 support. - -### Each pin can have multiple functions. -The PinDescription table describes how each of the pins can be used by the Arduino -core. Each pin can have multiple functions (ie: ADC input, digital output, PWM, -communications, etc.), and the PinDescription table configures which functions can -be used for each pin. This table is mainly accessed by the pinPeripheral function in -wiring_private.c, which is used to attach a pin to a particular peripheral function. -The communications drivers (ie: SPI, I2C, and UART), analogRead(), analogWrite(), -analogReference(), attachInterrupt(), and pinMode() all call pinPeripheral() to -verify that the pin can perform the function requested, and to configure the pin for -that function. Most of the contents of pinMode() are now in pinPeripheral(). - -### Pin Mapping -There are different ways that pins can be mapped. Typically, there is no relation -between the arduino pin number used, and the actual port pin designator. Thus, the -pcb must be printed with the arduino numbering, otherwise, if the port pin is printed, -a cross reference table is needed to find the arduino pin number. However, this results -in the least amount of space used by the table. Another method, used by default by the -MT-D21E and MT-D11, maps Arduino pin numbers to the actual port pin number (ie: Arduino -pin 28 = Port A28). This works well when there is only one port (or if the PORTB pins -are used for onboard functions and not broken out). PIO_NOT_A_PIN entries must be added -for pins that are used for other purposes or for pins that do not exist (especially the -D11), so some FLASH space may be wasted. For an example of both types, see variant.cpp -from the MT-D11 variant. The Xeno combines both methods, using the actual port pin -designators from both PORTA and PORTB for arduino numbers 0-31 (ie: B1=1, A2=2), then -using arduino numbering only above 31. For 0-31 only one pin from PORTA or PORTB can be -used, leaving the other pin for some number above 31. - -**See [WVariant.h](https://github.com/mattairtech/ArduinoCore-samd/tree/master/cores/arduino/WVariant.h) for the definitions used in the table.** - -### Port -This is the port (ie: PORTA). Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### Pin -This is the pin (bit) within the port. Valid values are 0-31. Not used with -PIN_DESCRIPTION_TABLE_SIMPLE. - -### SetPortPin() -When PIN_DESCRIPTION_TABLE_SIMPLE is defined, Port and Pin are combined into one column -using the SetPortPin() packing macro: SetPortPin(PORTA, 2). If the pin is not usable, -use SetPortPin(NOT_A_PORT, 0). - -### PinType -This indicates what peripheral function the pin can be attached to. In most cases, -this is PIO_MULTI, which means that the pin can be anything listed in the PinAttribute -field. It can also be set to a specific peripheral. In this case, any attempt to -configure the pin (using pinPeripheral or pinMode) as anything else will fail (and -pinPeripheral will return -1). This can be used to prevent accidental re-configuration -of a pin that is configured for only one function (ie: USB D- and D+ pins). If a pin -is not used or does not exist, PIO_NOT_A_PIN must be entered in this field. See -WVariant.h for valid entries. These entries are also used as a parameter to -pinPeripheral() with the exception of PIO_NOT_A_PIN and PIO_MULTI. The pinMode function -now calls pinPeripheral() with the desired mode. Note that this field is not used to -select between the different peripherals possible with each of the SERCOM and TIMER -functions. PeripheralAttribute is now used for this. When PIN_DESCRIPTION_TABLE_SIMPLE -is defined, PinType is not used (the pin is treated as PIO_MULTI). - -### PeripheralAttribute -This is an 8-bit bitfield used for various peripheral configuration. It is primarily -used to select between the different peripherals possible with each of the SERCOM and -TIMER functions. TIMER pins are individual, while SERCOM uses a group of two to four -pins. This group of pins can span both peripherals. For example, pin 19 (SPI1 SCK) on -the MT-D21E uses PER_ATTR_SERCOM_ALT while pin 22 (SPI1 MISO) uses PER_ATTR_SERCOM_STD. -Both TIMER and SERCOM can exist for each pin. This bitfield is also used to set the -pin drive strength and the input buffer configuration (ie: totem-pole, open-drain, -buskeeper, etc.). Starting with 1.6.8, the ADC instance on the D51 and C21 (there are -two) is also selected here. Note that the D51 adds a third timer attribute and -requires consultation of the datasheet IOSET tables. See WVariant.h for valid entries. - -### PinAttribute -This is a 32-bit bitfield used to list all of the valid peripheral functions that a -pin can attach to. This includes GPIO functions like PIN_ATTR_OUTPUT. Certain -attributes are shorthand for a combination of other attributes. PIN_ATTR_DIGITAL -includes all of the GPIO functions, while PIN_ATTR_TIMER includes both -PIN_ATTR_TIMER_PWM and PIN_ATTR_TIMER_CAPTURE (capture is not used yet). -PIN_ATTR_ANALOG is an alias to PIN_ATTR_ANALOG_ADC. This bitfield is useful for -limiting a pin to only input related functions or output functions. This allows a pin -to have a more flexible configuration, while restricting the direction (ie: to avoid -contention). See WVariant.h for valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### TCChannel -This is the TC/TCC channel (if any) assigned to the pin. Some TC channels are available -on multiple pins. In general, only one pin should be configured in the pinDescription -table per TC channel. Starting with 1.6.8, the timer type is now encoded in this column -to support the D51, L21 and C21, which use TC numbers starting at 0 (rather than 3 as on -the D21). See WVariant.h for valid entries. - -### ADCChannelNumber -This is the ADC channel (if any) assigned to the pin. The D51 and C21 each have two ADC -instances, which are selected in the PeripheralAttribute column. See WVariant.h for -valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### ExtInt -This is the interrupt (if any) assigned to the pin. Some interrupt numbers are -available on multiple pins. In general, only one pin should be configured in the -pinDescription table per interrupt number. Thus, for example, if an interrupt was -needed on pin 2, EXTERNAL_INT_2 can be moved from pin 18. See WVariant.h for valid -entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### SetExtIntADC() -When PIN_DESCRIPTION_TABLE_SIMPLE is defined, ExtInt and ADCChannelNumber are combined -into one column using the SetExtIntADC() packing macro: SetExtIntADC(EXTERNAL_INT_4, -ADC_Channel2). If the pin is not usable, use SetExtIntADC(EXTERNAL_INT_NONE, No_ADC_Channel). - -### GCLKCCL -This column was added in 1.6.8-beta-b0. It is not yet used. It will eventually support -the Analog Comparators (AC), the Configurable Custom Logic (CCL) peripherals of the D51, -L21 and C21, and the GCLK outputs (inputs) of all of the MCUs. Not used with -PIN_DESCRIPTION_TABLE_SIMPLE. +# Generic ATsamD11C14A + +``` +====================================== ATsamD11C14A ========================================= +Other COM PWM Analog INT Arduino* Arduino* INT Analog PWM COM Other +============================================================================================= + 1------------------- + SCK*/RX2 TCC01 * * 5 | A5 A4 | 4 * * TCC00 MOSI*/TX2 REF + MOSI* TCC02 * 8 | A8 (XIN) A2 | 2 * * DAC + SCK* TCC03 * 9 | A9 (XOUT) Vdd | + SDA/MISO* TC10 * NMI 14 | A14 Gnd | + SCL/SS* TC11 * * 15 | A15 A25 | 25 USB/DP +BOOT 28 | A28/RST A24 | 24 USB/DM +SWDCLK TX1/MISO* 30 | A30 A31 | 31 * RX1/SS* SWDIO + ------------------- + +* Most pins can be used for more than one function. When using PIN_MAP_STANDARD, the port + pin number printed on the chip above is also used in Arduino (but without the 'A') for + all of the supported functions (ie: digitalRead(), analogRead(), analogWrite(), etc.). + When using PIN_MAP_COMPACT, the Arduino numbering is sequential starting from 0 at the + top left pin (A5). PIN_MAP_COMPACT uses less FLASH. +* When USB CDC is enabled, Serial refers to SerialUSB, otherwise it refers to Serial1. +* When using ONE_UART_NO_WIRE_ONE_SPI, use SPI on pins 4, 5, 14, and 15. + When using NO_UART_ONE_WIRE_ONE_SPI, use SPI on pins 8, 9, 30, and 31. +* Tone available on TC2. TC2 is not routed to pins in the D11C14A. +* Leave pin A30 floating (or use external pullup) during reset. +* DO NOT connect voltages higher than 3.3V! +``` + + +## Pins descriptions for Generic ATsamD11C14A + +### PIN_MAP_STANDARD +``` +==================================================================================================================================== +Arduino | Port | Alternate Function | Comments (! means not used with this peripheral assignment) +--------|-------|-----------------------|------------------------------------------------------------------------------------------- +0 | ---- | NOT A PIN | NOT A PIN +1 | ---- | NOT A PIN | NOT A PIN +2 | PA02 | DAC | EIC/EXTINT[2] ADC/AIN[0] PTC/Y[0] DAC/VOUT +3 | ---- | NOT A PIN | NOT A PIN +4 | PA04 | REFB / TX2* / TCC00 | EIC/EXTINT[4] REF/ADC/VREFB ADC/AIN[2] AC/AIN[0] PTC/Y[2] SERCOM0/PAD[2] !SERCOM0/PAD[0] !TC1/WO[0] TCC0/WO[0] +5 | PA05 | RX2* / TCC01 | EIC/EXTINT[5] ADC/AIN[3] AC/AIN[1] PTC/Y[3] SERCOM0/PAD[3] !SERCOM0/PAD[1] !TC1/WO[1] TCC0/WO[1] +6 | ---- | NOT A PIN | NOT A PIN +7 | ---- | NOT A PIN | NOT A PIN +8 | PA08 | TX1 / MOSI / TCC02 | EIC/EXTINT[6] SERCOM1/PAD[2] !SERCOM0/PAD[2] TCC0/WO[2] !TCC0/WO[4] Xin32 / Xin +9 | PA09 | RX1 / SCK / TCC03 | EIC/EXTINT[7] SERCOM1/PAD[3] !SERCOM0/PAD[3] TCC0/WO[3] !TCC0/WO[5] Xout32 / Xout +10 | ---- | NOT A PIN | NOT A PIN +11 | ---- | NOT A PIN | NOT A PIN +12 | ---- | NOT A PIN | NOT A PIN +13 | ---- | NOT A PIN | NOT A PIN +14 | PA14 | SDA / TC10 | EIC/NMI ADC/AIN[6] PTC/X[0] PTC/Y[6] SERCOM0/PAD[0] !SERCOM2/PAD[0] TC1/WO[0] !TCC0/WO[0] +15 | PA15 | SCL / TC11 | EIC/EXTINT[1] ADC/AIN[7] PTC/X[1] PTC/Y[7] SERCOM0/PAD[1] !SERCOM2/PAD[1] TC1/WO[1] !TCC0/WO[1] +16 | ---- | NOT A PIN | NOT A PIN +17 | ---- | NOT A PIN | NOT A PIN +18 | ---- | NOT A PIN | NOT A PIN +19 | ---- | NOT A PIN | NOT A PIN +20 | ---- | NOT A PIN | NOT A PIN +21 | ---- | NOT A PIN | NOT A PIN +22 | ---- | NOT A PIN | NOT A PIN +23 | ---- | NOT A PIN | NOT A PIN +24 | PA24 | USB_NEGATIVE | USB/DM +25 | PA25 | USB_POSITIVE | USB/DP +26 | ---- | NOT A PIN | NOT A PIN +27 | ---- | NOT A PIN | NOT A PIN +28 | PA28 | Reset | Reset, BOOT (double tap bootloader entry) +29 | ---- | NOT A PIN | NOT A PIN +30 | PA30 | MISO / SWD CLK | !EIC/EXTINT[2] SERCOM1/PAD[0] !SERCOM1/PAD[2] !TC2/WO[0] !TCC0/WO[2] SWD CLK, leave floating during boot +31 | PA31 | SS / SWD IO | EIC/EXTINT[3] SERCOM1/PAD[1] !SERCOM1/PAD[3] !TC2/WO[1] !TCC0/WO[3] SWD IO +==================================================================================================================================== +``` + + +### PIN_MAP_COMPACT +``` +==================================================================================================================================== +Arduino | Port | Alternate Function | Comments (! means not used with this peripheral assignment) +--------|-------|-----------------------|------------------------------------------------------------------------------------------- +0 | PA02 | DAC | EIC/EXTINT[2] ADC/AIN[0] PTC/Y[0] DAC/VOUT +1 | PA04 | REFB / TX2* / TCC00 | EIC/EXTINT[4] REF/ADC/VREFB ADC/AIN[2] AC/AIN[0] PTC/Y[2] SERCOM0/PAD[2] !SERCOM0/PAD[0] !TC1/WO[0] TCC0/WO[0] +2 | PA05 | RX2* / TCC01 | EIC/EXTINT[5] ADC/AIN[3] AC/AIN[1] PTC/Y[3] SERCOM0/PAD[3] !SERCOM0/PAD[1] !TC1/WO[1] TCC0/WO[1] +3 | PA08 | TX1 / MOSI / TCC02 | EIC/EXTINT[6] SERCOM1/PAD[2] !SERCOM0/PAD[2] TCC0/WO[2] !TCC0/WO[4] Xin32 / Xin +4 | PA09 | RX1 / SCK / TCC03 | EIC/EXTINT[7] SERCOM1/PAD[3] !SERCOM0/PAD[3] TCC0/WO[3] !TCC0/WO[5] Xout32 / Xout +5 | PA14 | SDA / TC10 | EIC/NMI ADC/AIN[6] PTC/X[0] PTC/Y[6] SERCOM0/PAD[0] !SERCOM2/PAD[0] TC1/WO[0] !TCC0/WO[0] +6 | PA15 | SCL / TC11 | EIC/EXTINT[1] ADC/AIN[7] PTC/X[1] PTC/Y[7] SERCOM0/PAD[1] !SERCOM2/PAD[1] TC1/WO[1] !TCC0/WO[1] +7 | PA24 | USB_NEGATIVE | USB/DM +8 | PA25 | USB_POSITIVE | USB/DP +9 | PA28 | Reset | Reset, BOOT (double tap bootloader entry) +10 | PA30 | MISO / SWD CLK | !EIC/EXTINT[2] SERCOM1/PAD[0] !SERCOM1/PAD[2] !TC2/WO[0] !TCC0/WO[2] SWD CLK, leave floating during boot +11 | PA31 | SS / SWD IO | EIC/EXTINT[3] SERCOM1/PAD[1] !SERCOM1/PAD[3] !TC2/WO[1] !TCC0/WO[3] SWD IO +==================================================================================================================================== + +* Most pins can be used for more than one function. When using PIN_MAP_STANDARD, the port + pin number printed on the chip above is also used in Arduino (but without the 'A') for + all of the supported functions (ie: digitalRead(), analogRead(), analogWrite(), etc.). + When using PIN_MAP_COMPACT, the Arduino numbering is sequential starting from 0 at the + top left pin (A5). PIN_MAP_COMPACT uses less RAM. +* NOT A PIN means the Arduino pin number is not mapped to a physical pin. +* Pins 24 and 25 are in use by USB (USB_NEGATIVE and USB_POSITIVE). +* The tone library uses TC2. TC2 is not routed to pins in the D11C14A (14-pin). +* When using ONE_UART_NO_WIRE_ONE_SPI, Serial1 refers to TX2/RX2 instead of TX1/RX1. +* Leave pin A30 floating (or use external pullup) during reset. +* SERCOM2 does not exist on the D11C14A. +``` + + +## Board Configuration Notes + +* **Crystals** + * Either a 32.768KHz crystal or a high speed crystal can be used. + * The bootloader does not use an external crystal by default. Double-tap the reset button to enter manually. + +* **GPIO** + * All pins (including analog) support INPUT, OUTPUT, INPUT_PULLUP, and INPUT_PULLDOWN. + * Each pin can source or sink a maximum of 7 mA (when PER_ATTR_DRIVE_STRONG is set for the pin, enabled by default). + * Internal pull-up and pull-down resistors of 20-60 Kohms (40Kohm typ., disconnected by default). + +* **Analog Inputs** + * 5 pins can be configured as ADC analog inputs. + * Each pin measures from ground to 3.3 volts by default. + * Each pin provides 10 bits of resolution (1024 values) by default. + * 12-bit resolution supported by using the analogReadResolution() function. + * The upper end of the measurement range can be changed using the analogReference() function. + * A reference voltage can be connected to REF. + +* **DAC** + * One analog output is available on pin 2. + * Provides a 10-bit voltage output with the analogWrite() function. + +* **PWM** + * 6 pins can be configured as PWM outputs. + * Each pin provides 8 bits of resolution (256 values) by default. + * 12-bit resolution supported by using the analogWriteResolution() function. + +* **External Interrupts** + * 7 pins can be configured with external interrupts. + +* **SERCOM** + * 2 SERCOM are available. + * Up to 2 UART instances + * 1 SPI instance + * 1 WIRE (I2C) instance + + + +## PinDescription table format + +### Note that in 1.6.18-beta-b1 a new compact table format was added. +The standard PinDescription table uses 12 bytes per pin. Define PIN_DESCRIPTION_TABLE_SIMPLE +to use a more compact format that uses only 4 bytes per pin (currently only available +for the D11 chips). In this case, the PinType, PinAttribute, and GCLKCCL columns are not used +(they are not required). Additionally, the SetPortPin() and SetExtIntADC() macros are used to +pack Port and Pin into the PortPin column, and ExtInt and ADCChannelNumber into the ExtIntADC +column. Note that external libraries that reference the PinDescription table directly (uncommon) +will no longer work. This define can be combined with the PIN_MAP_COMPACT define, which +is available in variant.h of the D11 variants. This can save from 10's to over 200 bytes. + +### Note that a new column (GCLKCCL) was added for 1.6.8-beta-b0. +MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE in variant.h is used to track versions. +If using board variant files with the old format, the new core will still read the +table the old way, losing any new features introduced by the new column. Additionally, +new definitions have been added for D51, L21, and C21 support. + +### Each pin can have multiple functions. +The PinDescription table describes how each of the pins can be used by the Arduino +core. Each pin can have multiple functions (ie: ADC input, digital output, PWM, +communications, etc.), and the PinDescription table configures which functions can +be used for each pin. This table is mainly accessed by the pinPeripheral function in +wiring_private.c, which is used to attach a pin to a particular peripheral function. +The communications drivers (ie: SPI, I2C, and UART), analogRead(), analogWrite(), +analogReference(), attachInterrupt(), and pinMode() all call pinPeripheral() to +verify that the pin can perform the function requested, and to configure the pin for +that function. Most of the contents of pinMode() are now in pinPeripheral(). + +### Pin Mapping +There are different ways that pins can be mapped. Typically, there is no relation +between the arduino pin number used, and the actual port pin designator. Thus, the +pcb must be printed with the arduino numbering, otherwise, if the port pin is printed, +a cross reference table is needed to find the arduino pin number. However, this results +in the least amount of space used by the table. Another method, used by default by the +MT-D21E and MT-D11, maps Arduino pin numbers to the actual port pin number (ie: Arduino +pin 28 = Port A28). This works well when there is only one port (or if the PORTB pins +are used for onboard functions and not broken out). PIO_NOT_A_PIN entries must be added +for pins that are used for other purposes or for pins that do not exist (especially the +D11), so some FLASH space may be wasted. For an example of both types, see variant.cpp +from the MT-D11 variant. The Xeno combines both methods, using the actual port pin +designators from both PORTA and PORTB for arduino numbers 0-31 (ie: B1=1, A2=2), then +using arduino numbering only above 31. For 0-31 only one pin from PORTA or PORTB can be +used, leaving the other pin for some number above 31. + +**See [WVariant.h](https://github.com/mattairtech/ArduinoCore-samd/tree/master/cores/arduino/WVariant.h) for the definitions used in the table.** + +### Port +This is the port (ie: PORTA). Not used with PIN_DESCRIPTION_TABLE_SIMPLE. + +### Pin +This is the pin (bit) within the port. Valid values are 0-31. Not used with +PIN_DESCRIPTION_TABLE_SIMPLE. + +### SetPortPin() +When PIN_DESCRIPTION_TABLE_SIMPLE is defined, Port and Pin are combined into one column +using the SetPortPin() packing macro: SetPortPin(PORTA, 2). If the pin is not usable, +use SetPortPin(NOT_A_PORT, 0). + +### PinType +This indicates what peripheral function the pin can be attached to. In most cases, +this is PIO_MULTI, which means that the pin can be anything listed in the PinAttribute +field. It can also be set to a specific peripheral. In this case, any attempt to +configure the pin (using pinPeripheral or pinMode) as anything else will fail (and +pinPeripheral will return -1). This can be used to prevent accidental re-configuration +of a pin that is configured for only one function (ie: USB D- and D+ pins). If a pin +is not used or does not exist, PIO_NOT_A_PIN must be entered in this field. See +WVariant.h for valid entries. These entries are also used as a parameter to +pinPeripheral() with the exception of PIO_NOT_A_PIN and PIO_MULTI. The pinMode function +now calls pinPeripheral() with the desired mode. Note that this field is not used to +select between the different peripherals possible with each of the SERCOM and TIMER +functions. PeripheralAttribute is now used for this. When PIN_DESCRIPTION_TABLE_SIMPLE +is defined, PinType is not used (the pin is treated as PIO_MULTI). + +### PeripheralAttribute +This is an 8-bit bitfield used for various peripheral configuration. It is primarily +used to select between the different peripherals possible with each of the SERCOM and +TIMER functions. TIMER pins are individual, while SERCOM uses a group of two to four +pins. This group of pins can span both peripherals. For example, pin 19 (SPI1 SCK) on +the MT-D21E uses PER_ATTR_SERCOM_ALT while pin 22 (SPI1 MISO) uses PER_ATTR_SERCOM_STD. +Both TIMER and SERCOM can exist for each pin. This bitfield is also used to set the +pin drive strength and the input buffer configuration (ie: totem-pole, open-drain, +buskeeper, etc.). Starting with 1.6.8, the ADC instance on the D51 and C21 (there are +two) is also selected here. Note that the D51 adds a third timer attribute and +requires consultation of the datasheet IOSET tables. See WVariant.h for valid entries. + +### PinAttribute +This is a 32-bit bitfield used to list all of the valid peripheral functions that a +pin can attach to. This includes GPIO functions like PIN_ATTR_OUTPUT. Certain +attributes are shorthand for a combination of other attributes. PIN_ATTR_DIGITAL +includes all of the GPIO functions, while PIN_ATTR_TIMER includes both +PIN_ATTR_TIMER_PWM and PIN_ATTR_TIMER_CAPTURE (capture is not used yet). +PIN_ATTR_ANALOG is an alias to PIN_ATTR_ANALOG_ADC. This bitfield is useful for +limiting a pin to only input related functions or output functions. This allows a pin +to have a more flexible configuration, while restricting the direction (ie: to avoid +contention). See WVariant.h for valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. + +### TCChannel +This is the TC/TCC channel (if any) assigned to the pin. Some TC channels are available +on multiple pins. In general, only one pin should be configured in the pinDescription +table per TC channel. Starting with 1.6.8, the timer type is now encoded in this column +to support the D51, L21 and C21, which use TC numbers starting at 0 (rather than 3 as on +the D21). See WVariant.h for valid entries. + +### ADCChannelNumber +This is the ADC channel (if any) assigned to the pin. The D51 and C21 each have two ADC +instances, which are selected in the PeripheralAttribute column. See WVariant.h for +valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. + +### ExtInt +This is the interrupt (if any) assigned to the pin. Some interrupt numbers are +available on multiple pins. In general, only one pin should be configured in the +pinDescription table per interrupt number. Thus, for example, if an interrupt was +needed on pin 2, EXTERNAL_INT_2 can be moved from pin 18. See WVariant.h for valid +entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. + +### SetExtIntADC() +When PIN_DESCRIPTION_TABLE_SIMPLE is defined, ExtInt and ADCChannelNumber are combined +into one column using the SetExtIntADC() packing macro: SetExtIntADC(EXTERNAL_INT_4, +ADC_Channel2). If the pin is not usable, use SetExtIntADC(EXTERNAL_INT_NONE, No_ADC_Channel). + +### GCLKCCL +This column was added in 1.6.8-beta-b0. It is not yet used. It will eventually support +the Analog Comparators (AC), the Configurable Custom Logic (CCL) peripherals of the D51, +L21 and C21, and the GCLK outputs (inputs) of all of the MCUs. Not used with +PIN_DESCRIPTION_TABLE_SIMPLE. diff --git a/variants/Generic_D11C14A/debug_scripts/SAMD11C14A.gdb b/variants/Generic_D11C14A/debug_scripts/SAMD11C14A.gdb index ff7008e6e..7fb9d812e 100644 --- a/variants/Generic_D11C14A/debug_scripts/SAMD11C14A.gdb +++ b/variants/Generic_D11C14A/debug_scripts/SAMD11C14A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd11c14a" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd11c14a" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/Generic_D11C14A/linker_scripts/gcc/4KB_Bootloader/flash_16KB.ld b/variants/Generic_D11C14A/linker_scripts/gcc/4KB_Bootloader/flash_16KB.ld index 1e2d5f052..6f9bc1576 100644 --- a/variants/Generic_D11C14A/linker_scripts/gcc/4KB_Bootloader/flash_16KB.ld +++ b/variants/Generic_D11C14A/linker_scripts/gcc/4KB_Bootloader/flash_16KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x1000, LENGTH = 0x00004000-0x1000 /* First 4KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x1000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x1000, LENGTH = 0x00004000-0x1000 /* First 4KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x1000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Generic_D11C14A/linker_scripts/gcc/No_Bootloader/flash_16KB.ld b/variants/Generic_D11C14A/linker_scripts/gcc/No_Bootloader/flash_16KB.ld index bd135b3dd..674a40d60 100644 --- a/variants/Generic_D11C14A/linker_scripts/gcc/No_Bootloader/flash_16KB.ld +++ b/variants/Generic_D11C14A/linker_scripts/gcc/No_Bootloader/flash_16KB.ld @@ -1,214 +1,214 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00004000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00004000 + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Generic_D11C14A/openocd_scripts/SAMD11C14A.cfg b/variants/Generic_D11C14A/openocd_scripts/SAMD11C14A.cfg index 2e1525a73..9bac13dd7 100644 --- a/variants/Generic_D11C14A/openocd_scripts/SAMD11C14A.cfg +++ b/variants/Generic_D11C14A/openocd_scripts/SAMD11C14A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samd11c14a -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samdXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samd11c14a +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samdXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/Generic_D11C14A/pins_arduino.h b/variants/Generic_D11C14A/pins_arduino.h index db0e40c3d..36ab06c77 100644 --- a/variants/Generic_D11C14A/pins_arduino.h +++ b/variants/Generic_D11C14A/pins_arduino.h @@ -1,21 +1,21 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -// API compatibility -#include "variant.h" - +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" + diff --git a/variants/Generic_D11C14A/variant.cpp b/variants/Generic_D11C14A/variant.cpp index 1aa33b74e..3a5ac4d52 100644 --- a/variants/Generic_D11C14A/variant.cpp +++ b/variants/Generic_D11C14A/variant.cpp @@ -1,164 +1,164 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* - * Modified 9 June 2018 by Justin Mattair - * for MattairTech boards (www.mattairtech.com) - * - * See README.md for documentation and pin mapping information - */ - - -#include "variant.h" - -/* - * Pins descriptions - */ -#if defined PIN_MAP_STANDARD -#if defined(PIN_DESCRIPTION_TABLE_SIMPLE) -const PinDescription g_APinDescription[]= -{ - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( PORTA, 2 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_2, ADC_Channel0 ) }, - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( PORTA, 4 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), TCC0_CH0, SetExtIntADC( EXTERNAL_INT_4, ADC_Channel2 ) }, - { SetPortPin( PORTA, 5 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), TCC0_CH1, SetExtIntADC( EXTERNAL_INT_5, ADC_Channel3 ) }, - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( PORTA, 8 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), TCC0_CH2, SetExtIntADC( EXTERNAL_INT_6, No_ADC_Channel ) }, - { SetPortPin( PORTA, 9 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), TCC0_CH3, SetExtIntADC( EXTERNAL_INT_7, No_ADC_Channel ) }, - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( PORTA, 14 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), TC1_CH0, SetExtIntADC( EXTERNAL_INT_NMI, ADC_Channel6 ) }, - { SetPortPin( PORTA, 15 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), TC1_CH1, SetExtIntADC( EXTERNAL_INT_1, ADC_Channel7 ) }, - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( PORTA, 24 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // USB/DM - { SetPortPin( PORTA, 25 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // USB/DP - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( PORTA, 28 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused (Reset) - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( PORTA, 30 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // SWD CLK - { SetPortPin( PORTA, 31 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_3, No_ADC_Channel ) }, // SWD IO -} ; -#else -const PinDescription g_APinDescription[]= -{ - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_2, GCLK_CCL_NONE }, - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { PORTA, 4, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH0, ADC_Channel2, EXTERNAL_INT_4, GCLK_CCL_NONE }, - { PORTA, 5, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH1, ADC_Channel3, EXTERNAL_INT_5, GCLK_CCL_NONE }, - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { PORTA, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH2, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, - { PORTA, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH3, No_ADC_Channel, EXTERNAL_INT_7, GCLK_CCL_NONE }, - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { PORTA, 14, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC1_CH0, ADC_Channel6, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, - { PORTA, 15, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC1_CH1, ADC_Channel7, EXTERNAL_INT_1, GCLK_CCL_NONE }, - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { PORTA, 24, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM - { PORTA, 25, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { PORTA, 28, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused (Reset) - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { PORTA, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD CLK - { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, // SWD IO -} ; -#endif -#elif defined(PIN_MAP_COMPACT) -#if defined(PIN_DESCRIPTION_TABLE_SIMPLE) -const PinDescription g_APinDescription[]= -{ - { SetPortPin( PORTA, 2 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_2, GCLK_CCL_NONE }, - { SetPortPin( PORTA, 4 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), TCC0_CH0, ADC_Channel2, EXTERNAL_INT_4, GCLK_CCL_NONE }, - { SetPortPin( PORTA, 5 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), TCC0_CH1, ADC_Channel3, EXTERNAL_INT_5, GCLK_CCL_NONE }, - { SetPortPin( PORTA, 8 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), TCC0_CH2, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, - { SetPortPin( PORTA, 9 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), TCC0_CH3, No_ADC_Channel, EXTERNAL_INT_7, GCLK_CCL_NONE }, - { SetPortPin( PORTA, 14 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), TC1_CH0, ADC_Channel6, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, - { SetPortPin( PORTA, 15 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), TC1_CH1, ADC_Channel7, EXTERNAL_INT_1, GCLK_CCL_NONE }, - { SetPortPin( PORTA, 24 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // USB/DM - { SetPortPin( PORTA, 25 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // USB/DP - { SetPortPin( PORTA, 28 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused (Reset) - { SetPortPin( PORTA, 30 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // SWD CLK - { SetPortPin( PORTA, 31 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, // SWD IO -} ; -#else -const PinDescription g_APinDescription[]= -{ - { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_2, GCLK_CCL_NONE }, - { PORTA, 4, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH0, ADC_Channel2, EXTERNAL_INT_4, GCLK_CCL_NONE }, - { PORTA, 5, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH1, ADC_Channel3, EXTERNAL_INT_5, GCLK_CCL_NONE }, - { PORTA, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH2, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, - { PORTA, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH3, No_ADC_Channel, EXTERNAL_INT_7, GCLK_CCL_NONE }, - { PORTA, 14, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC1_CH0, ADC_Channel6, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, - { PORTA, 15, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC1_CH1, ADC_Channel7, EXTERNAL_INT_1, GCLK_CCL_NONE }, - { PORTA, 24, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM - { PORTA, 25, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP - { PORTA, 28, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused (Reset) - { PORTA, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD CLK - { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, // SWD IO -} ; -#endif -#endif - -const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TC1, TC2 } ; - -// Multi-serial objects instantiation -SERCOM sercom0( SERCOM0 ) ; -SERCOM sercom1( SERCOM1 ) ; - -#if defined(ONE_UART) || defined(TWO_UART) -Uart Serial1( SERCOM_INSTANCE_SERIAL1, PIN_SERIAL1_RX, PIN_SERIAL1_TX, PAD_SERIAL1_RX, PAD_SERIAL1_TX ) ; - -void SERCOM1_Handler() -{ - Serial1.IrqHandler(); -} -#endif - -#if defined(TWO_UART) -Uart Serial2( SERCOM_INSTANCE_SERIAL2, PIN_SERIAL2_RX, PIN_SERIAL2_TX, PAD_SERIAL2_RX, PAD_SERIAL2_TX ) ; - -void SERCOM0_Handler() -{ - Serial2.IrqHandler(); -} -#endif +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* + * Modified 9 June 2018 by Justin Mattair + * for MattairTech boards (www.mattairtech.com) + * + * See README.md for documentation and pin mapping information + */ + + +#include "variant.h" + +/* + * Pins descriptions + */ +#if defined PIN_MAP_STANDARD +#if defined(PIN_DESCRIPTION_TABLE_SIMPLE) +const PinDescription g_APinDescription[]= +{ + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( PORTA, 2 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_2, ADC_Channel0 ) }, + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( PORTA, 4 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), TCC0_CH0, SetExtIntADC( EXTERNAL_INT_4, ADC_Channel2 ) }, + { SetPortPin( PORTA, 5 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), TCC0_CH1, SetExtIntADC( EXTERNAL_INT_5, ADC_Channel3 ) }, + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( PORTA, 8 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), TCC0_CH2, SetExtIntADC( EXTERNAL_INT_6, No_ADC_Channel ) }, + { SetPortPin( PORTA, 9 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), TCC0_CH3, SetExtIntADC( EXTERNAL_INT_7, No_ADC_Channel ) }, + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( PORTA, 14 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), TC1_CH0, SetExtIntADC( EXTERNAL_INT_NMI, ADC_Channel6 ) }, + { SetPortPin( PORTA, 15 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), TC1_CH1, SetExtIntADC( EXTERNAL_INT_1, ADC_Channel7 ) }, + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( PORTA, 24 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // USB/DM + { SetPortPin( PORTA, 25 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // USB/DP + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( PORTA, 28 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused (Reset) + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( PORTA, 30 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // SWD CLK + { SetPortPin( PORTA, 31 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_3, No_ADC_Channel ) }, // SWD IO +} ; +#else +const PinDescription g_APinDescription[]= +{ + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_2, GCLK_CCL_NONE }, + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { PORTA, 4, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH0, ADC_Channel2, EXTERNAL_INT_4, GCLK_CCL_NONE }, + { PORTA, 5, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH1, ADC_Channel3, EXTERNAL_INT_5, GCLK_CCL_NONE }, + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { PORTA, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH2, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, + { PORTA, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH3, No_ADC_Channel, EXTERNAL_INT_7, GCLK_CCL_NONE }, + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { PORTA, 14, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC1_CH0, ADC_Channel6, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, + { PORTA, 15, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC1_CH1, ADC_Channel7, EXTERNAL_INT_1, GCLK_CCL_NONE }, + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { PORTA, 24, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM + { PORTA, 25, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { PORTA, 28, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused (Reset) + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { PORTA, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD CLK + { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, // SWD IO +} ; +#endif +#elif defined(PIN_MAP_COMPACT) +#if defined(PIN_DESCRIPTION_TABLE_SIMPLE) +const PinDescription g_APinDescription[]= +{ + { SetPortPin( PORTA, 2 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_2, GCLK_CCL_NONE }, + { SetPortPin( PORTA, 4 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), TCC0_CH0, ADC_Channel2, EXTERNAL_INT_4, GCLK_CCL_NONE }, + { SetPortPin( PORTA, 5 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), TCC0_CH1, ADC_Channel3, EXTERNAL_INT_5, GCLK_CCL_NONE }, + { SetPortPin( PORTA, 8 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), TCC0_CH2, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, + { SetPortPin( PORTA, 9 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), TCC0_CH3, No_ADC_Channel, EXTERNAL_INT_7, GCLK_CCL_NONE }, + { SetPortPin( PORTA, 14 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), TC1_CH0, ADC_Channel6, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, + { SetPortPin( PORTA, 15 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), TC1_CH1, ADC_Channel7, EXTERNAL_INT_1, GCLK_CCL_NONE }, + { SetPortPin( PORTA, 24 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // USB/DM + { SetPortPin( PORTA, 25 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // USB/DP + { SetPortPin( PORTA, 28 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused (Reset) + { SetPortPin( PORTA, 30 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // SWD CLK + { SetPortPin( PORTA, 31 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, // SWD IO +} ; +#else +const PinDescription g_APinDescription[]= +{ + { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_2, GCLK_CCL_NONE }, + { PORTA, 4, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH0, ADC_Channel2, EXTERNAL_INT_4, GCLK_CCL_NONE }, + { PORTA, 5, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH1, ADC_Channel3, EXTERNAL_INT_5, GCLK_CCL_NONE }, + { PORTA, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH2, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, + { PORTA, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH3, No_ADC_Channel, EXTERNAL_INT_7, GCLK_CCL_NONE }, + { PORTA, 14, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC1_CH0, ADC_Channel6, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, + { PORTA, 15, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC1_CH1, ADC_Channel7, EXTERNAL_INT_1, GCLK_CCL_NONE }, + { PORTA, 24, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM + { PORTA, 25, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP + { PORTA, 28, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused (Reset) + { PORTA, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD CLK + { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, // SWD IO +} ; +#endif +#endif + +const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TC1, TC2 } ; + +// Multi-serial objects instantiation +SERCOM sercom0( SERCOM0 ) ; +SERCOM sercom1( SERCOM1 ) ; + +#if defined(ONE_UART) || defined(TWO_UART) +Uart Serial1( SERCOM_INSTANCE_SERIAL1, PIN_SERIAL1_RX, PIN_SERIAL1_TX, PAD_SERIAL1_RX, PAD_SERIAL1_TX ) ; + +void SERCOM1_Handler() +{ + Serial1.IrqHandler(); +} +#endif + +#if defined(TWO_UART) +Uart Serial2( SERCOM_INSTANCE_SERIAL2, PIN_SERIAL2_RX, PIN_SERIAL2_TX, PAD_SERIAL2_RX, PAD_SERIAL2_TX ) ; + +void SERCOM0_Handler() +{ + Serial2.IrqHandler(); +} +#endif diff --git a/variants/Generic_D11C14A/variant.h b/variants/Generic_D11C14A/variant.h index 7a8a67318..6e550598d 100644 --- a/variants/Generic_D11C14A/variant.h +++ b/variants/Generic_D11C14A/variant.h @@ -1,381 +1,381 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* - * Modified 16 June 2018 by Justin Mattair (www.mattairtech.com) - * See README.md for documentation and pin mapping information - */ - -#ifndef _VARIANT_MATTAIRTECH_D11C14A_ -#define _VARIANT_MATTAIRTECH_D11C14A_ - -/* This variant requires the MattairTech SAM D|L|C Core for Arduino >= 1.6.18-beta-b1. - * The format is different than the stock Arduino SAMD core, - * which uses ARDUINO_SAMD_VARIANT_COMPLIANCE instead. - */ -#define MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE 10618 - -/*---------------------------------------------------------------------------- - * Clock Configuration - *----------------------------------------------------------------------------*/ - -/** Master clock frequency (also Fcpu frequency) */ -#define VARIANT_MCK (48000000ul) - -/* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ - * must also be defined with the external crystal frequency in Hertz. - */ -#define HS_CRYSTAL_FREQUENCY_HERTZ 16000000UL - -/* If the PLL is used (CLOCKCONFIG_32768HZ_CRYSTAL, or CLOCKCONFIG_HS_CRYSTAL - * defined), then PLL_FRACTIONAL_ENABLED can be defined, which will result in - * a more accurate 48MHz output frequency at the expense of increased jitter. - */ -//#define PLL_FRACTIONAL_ENABLED - -/* If both PLL_FAST_STARTUP and CLOCKCONFIG_HS_CRYSTAL are defined, the crystal - * will be divided down to 1MHz - 2MHz, rather than 32KHz - 64KHz, before being - * multiplied by the PLL. This will result in a faster lock time for the PLL, - * however, it will also result in a less accurate PLL output frequency if the - * crystal is not divisible (without remainder) by 1MHz. In this case, define - * PLL_FRACTIONAL_ENABLED as well. - */ -//#define PLL_FAST_STARTUP - -/* The fine calibration value for DFLL open-loop mode is defined here. - * The coarse calibration value is loaded from NVM OTP (factory calibration values). - */ -#define NVM_SW_CALIB_DFLL48M_FINE_VAL (512) - -/*---------------------------------------------------------------------------- - * Headers - *----------------------------------------------------------------------------*/ - -#include "WVariant.h" -#include "sam.h" -#include "../../config.h" - -#ifdef __cplusplus -#include "SERCOM.h" -#include "Uart.h" -#endif // __cplusplus - -#ifdef __cplusplus -extern "C" -{ -#endif // __cplusplus - -/*---------------------------------------------------------------------------- - * Pins - *----------------------------------------------------------------------------*/ - -// Number of pins defined in PinDescription array -#define PIN_MAP_STANDARD -//#define PIN_MAP_COMPACT - -#if defined PIN_MAP_STANDARD - #define NUM_PIN_DESCRIPTION_ENTRIES (32u) -#elif defined PIN_MAP_COMPACT - #define NUM_PIN_DESCRIPTION_ENTRIES (12u) -#else - #error "variant.h: You must set PIN_MAP_STANDARD or PIN_MAP_COMPACT" -#endif - -#define PINS_COUNT NUM_PIN_DESCRIPTION_ENTRIES -#define NUM_DIGITAL_PINS PINS_COUNT -#define NUM_ANALOG_INPUTS (5u) -#define NUM_ANALOG_OUTPUTS (1u) -#define analogInputToDigitalPin(p) (p) - -#define digitalPinToPort(P) ( &(PORT->Group[GetPort(P)]) ) -#define digitalPinToBitMask(P) ( 1 << GetPin(P) ) - -#if defined(PIN_DESCRIPTION_TABLE_SIMPLE) - #define digitalPinHasPWM(P) ( g_APinDescription[P].ulTCChannel != NOT_ON_TIMER ) -#else - #define digitalPinHasPWM(P) ( (g_APinDescription[P].ulPinAttribute & PIN_ATTR_TIMER_PWM) == PIN_ATTR_TIMER_PWM ) -#endif - -//#define analogInPinToBit(P) ( ) -#define portOutputRegister(port) ( &(port->OUT.reg) ) -#define portInputRegister(port) ( &(port->IN.reg) ) -#define portModeRegister(port) ( &(port->DIR.reg) ) - -/* - * digitalPinToTimer(..) is AVR-specific and is not defined for SAMD - * architecture. If you need to check if a pin supports PWM you must - * use digitalPinHasPWM(..). - * - * https://github.com/arduino/Arduino/issues/1833 - */ -// #define digitalPinToTimer(P) - -/* LEDs - * None of these defines are currently used by the core. - */ -#if defined PIN_MAP_STANDARD -#define PIN_LED_13 (5u) -#define PIN_LED_RXL (8u) -#define PIN_LED_TXL (9u) -#elif defined PIN_MAP_COMPACT -#define PIN_LED_13 (2u) -#define PIN_LED_RXL (3u) -#define PIN_LED_TXL (4u) -#endif - -#define PIN_LED PIN_LED_13 -#define PIN_LED2 PIN_LED_RXL -#define PIN_LED3 PIN_LED_TXL -#define LED_BUILTIN PIN_LED_13 - -/* - * Analog pins - */ -#if defined PIN_MAP_STANDARD -#define PIN_A2 (2ul) -#define PIN_A4 (4ul) -#define PIN_A5 (5ul) -#define PIN_A14 (14ul) -#define PIN_A15 (15ul) -#define PIN_DAC0 (2ul) -#elif defined PIN_MAP_COMPACT -#define PIN_A2 (0ul) -#define PIN_A4 (1ul) -#define PIN_A5 (2ul) -#define PIN_A14 (5ul) -#define PIN_A15 (6ul) -#define PIN_DAC0 (2ul) -#endif - -static const uint8_t A2 = PIN_A2; -static const uint8_t A4 = PIN_A4; -static const uint8_t A5 = PIN_A5; -static const uint8_t A14 = PIN_A14; -static const uint8_t A15 = PIN_A15; -static const uint8_t DAC0 = PIN_DAC0; - - -#define ADC_RESOLUTION 12 - -// #define REMAP_ANALOG_PIN_ID(pin) if ( pin < A0 ) pin += A0 - -/* Set default analog voltage reference */ -#define VARIANT_AR_DEFAULT AR_DEFAULT - -/* Reference voltage pins (define even if not enabled with PIN_ATTR_REF in the PinDescription table) */ -#if defined PIN_MAP_STANDARD -#define REFB_PIN (4ul) -#elif defined PIN_MAP_COMPACT -#define REFB_PIN (1ul) -#endif - - -// The ATN pin may be used in the future as the first SPI chip select. -// On boards that do not have the Arduino physical form factor, it can to set to any free pin. -#if defined PIN_MAP_STANDARD -#define PIN_ATN (15ul) -#elif defined PIN_MAP_COMPACT -#define PIN_ATN (6ul) -#endif -static const uint8_t ATN = PIN_ATN; - - -/* - * Serial interfaces - */ -// Serial1 -#if defined PIN_MAP_STANDARD -#define PIN_SERIAL1_RX (31ul) -#define PIN_SERIAL1_TX (30ul) -#elif defined PIN_MAP_COMPACT -#define PIN_SERIAL1_RX (11ul) -#define PIN_SERIAL1_TX (10ul) -#endif - -#define PAD_SERIAL1_TX (UART_TX_PAD_0) -#define PAD_SERIAL1_RX (SERCOM_RX_PAD_1) -#define SERCOM_INSTANCE_SERIAL1 &sercom1 - -// Serial2 -#if defined PIN_MAP_STANDARD -#define PIN_SERIAL2_RX (5ul) -#define PIN_SERIAL2_TX (4ul) -#elif defined PIN_MAP_COMPACT -#define PIN_SERIAL2_RX (2ul) -#define PIN_SERIAL2_TX (1ul) -#endif - -#define PAD_SERIAL2_TX (UART_TX_PAD_2) -#define PAD_SERIAL2_RX (SERCOM_RX_PAD_3) -#define SERCOM_INSTANCE_SERIAL2 &sercom0 - - -/* - * SPI Interfaces - */ -#if defined(ONE_SPI) -#define SPI_INTERFACES_COUNT 1 -#else -#define SPI_INTERFACES_COUNT 0 -#endif - -#if defined(ONE_WIRE) && defined (ONE_SPI) - #if defined PIN_MAP_STANDARD - #define PIN_SPI_MISO (30u) - #define PIN_SPI_MOSI (8u) - #define PIN_SPI_SCK (9u) - #define PIN_SPI_SS (31u) - #elif defined PIN_MAP_COMPACT - #define PIN_SPI_MISO (10u) - #define PIN_SPI_MOSI (3u) - #define PIN_SPI_SCK (4u) - #define PIN_SPI_SS (11u) - #endif - - #define PERIPH_SPI sercom1 - #define PAD_SPI_TX SPI_PAD_2_SCK_3 - #define PAD_SPI_RX SERCOM_RX_PAD_0 - -// ONE_UART and ONE_SPI -#else - #if defined PIN_MAP_STANDARD - #define PIN_SPI_MISO (14u) - #define PIN_SPI_MOSI (4u) - #define PIN_SPI_SCK (5u) - #define PIN_SPI_SS (15u) - #elif defined PIN_MAP_COMPACT - #define PIN_SPI_MISO (5u) - #define PIN_SPI_MOSI (1u) - #define PIN_SPI_SCK (2u) - #define PIN_SPI_SS (5u) - #endif - - #define PERIPH_SPI sercom0 - #define PAD_SPI_TX SPI_PAD_2_SCK_3 - #define PAD_SPI_RX SERCOM_RX_PAD_0 -#endif - -static const uint8_t SS = PIN_SPI_SS ; // The SERCOM SS PAD is available on this pin but HW SS isn't used. Set here only for reference. -static const uint8_t MOSI = PIN_SPI_MOSI ; -static const uint8_t MISO = PIN_SPI_MISO ; -static const uint8_t SCK = PIN_SPI_SCK ; - - -/* - * Wire Interfaces - */ -#if defined(ONE_WIRE) -#define WIRE_INTERFACES_COUNT 1 -#else -#define WIRE_INTERFACES_COUNT 0 -#endif - -#if defined PIN_MAP_STANDARD -#define PIN_WIRE_SDA (14u) -#define PIN_WIRE_SCL (15u) -#elif defined PIN_MAP_COMPACT -#define PIN_WIRE_SDA (5u) -#define PIN_WIRE_SCL (6u) -#endif - -#define PERIPH_WIRE sercom0 -#define WIRE_IT_HANDLER SERCOM0_Handler - -static const uint8_t SDA = PIN_WIRE_SDA; -static const uint8_t SCL = PIN_WIRE_SCL; - - -/* - * USB - Define PIN_USB_HOST_ENABLE to assert the defined pin to - * PIN_USB_HOST_ENABLE_VALUE during startup. Leave undefined to disable this pin. - */ -#if defined PIN_MAP_STANDARD -#define PIN_USB_DM (24ul) -#define PIN_USB_DP (25ul) -//#define PIN_USB_HOST_ENABLE (14ul) -#elif defined PIN_MAP_COMPACT -#define PIN_USB_DM (7ul) -#define PIN_USB_DP (8ul) -//#define PIN_USB_HOST_ENABLE (5ul) -#endif - -#define PIN_USB_HOST_ENABLE_VALUE HIGH - -#ifdef __cplusplus -} -#endif - - -/*---------------------------------------------------------------------------- - * Arduino objects - C++ only - *----------------------------------------------------------------------------*/ - -#ifdef __cplusplus - -/* ========================= - * ===== SERCOM DEFINITION - * ========================= -*/ -extern SERCOM sercom0; -extern SERCOM sercom1; - -extern Uart Serial1; -extern Uart Serial2; - -#endif - -// These serial port names are intended to allow libraries and architecture-neutral -// sketches to automatically default to the correct port name for a particular type -// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, -// the first hardware serial port whose RX/TX pins are not dedicated to another use. -// -// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor -// -// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial -// -// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library -// -// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. -// -// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX -// pins are NOT connected to anything by default. -#define SERIAL_PORT_USBVIRTUAL SerialUSB -// SERIAL_PORT_MONITOR seems to be used only by the USB Host library (as of 1.6.5). -// It normally allows debugging output on the USB programming port, while the USB host uses the USB native port. -// The programming port is connected to a hardware UART through a USB-Serial bridge (EDBG chip) on the Zero. -// Boards that do not have the EDBG chip will have to connect a USB-TTL serial adapter to 'Serial' to get -// the USB Host debugging output. -#define SERIAL_PORT_MONITOR Serial1 -// Serial has no physical pins broken out, so it's not listed as HARDWARE port -#define SERIAL_PORT_HARDWARE Serial1 -#define SERIAL_PORT_HARDWARE_OPEN Serial1 - -// The MT-D11 does not have the EDBG support chip, which provides a USB-UART bridge -// accessible using Serial (the Arduino serial monitor is normally connected to this). -// So, the USB virtual serial port (SerialUSB) must be used to communicate with the host. -// Because most sketches use Serial to print to the monitor, it is aliased to SerialUSB. -// Remember to use while(!Serial); to wait for a connection before Serial printing. - -// When USB CDC is enabled, Serial refers to SerialUSB, otherwise it refers to Serial1. -#if defined(CDC_ONLY) || defined(CDC_HID) || defined(WITH_CDC) -#define Serial SerialUSB -#else -#define Serial Serial1 -#endif - -#endif /* _VARIANT_ARDUINO_ZERO_ */ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* + * Modified 16 June 2018 by Justin Mattair (www.mattairtech.com) + * See README.md for documentation and pin mapping information + */ + +#ifndef _VARIANT_GENERIC_D11C14A_ +#define _VARIANT_GENERIC_D11C14A_ + +/* This variant requires the MattairTech SAM D|L|C Core for Arduino >= 1.6.18-beta-b1. + * The format is different than the stock Arduino SAMD core, + * which uses ARDUINO_SAMD_VARIANT_COMPLIANCE instead. + */ +#define MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE 10618 + +/*---------------------------------------------------------------------------- + * Clock Configuration + *----------------------------------------------------------------------------*/ + +/** Master clock frequency (also Fcpu frequency) */ +#define VARIANT_MCK (48000000ul) + +/* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ + * must also be defined with the external crystal frequency in Hertz. + */ +#define HS_CRYSTAL_FREQUENCY_HERTZ 16000000UL + +/* If the PLL is used (CLOCKCONFIG_32768HZ_CRYSTAL, or CLOCKCONFIG_HS_CRYSTAL + * defined), then PLL_FRACTIONAL_ENABLED can be defined, which will result in + * a more accurate 48MHz output frequency at the expense of increased jitter. + */ +//#define PLL_FRACTIONAL_ENABLED + +/* If both PLL_FAST_STARTUP and CLOCKCONFIG_HS_CRYSTAL are defined, the crystal + * will be divided down to 1MHz - 2MHz, rather than 32KHz - 64KHz, before being + * multiplied by the PLL. This will result in a faster lock time for the PLL, + * however, it will also result in a less accurate PLL output frequency if the + * crystal is not divisible (without remainder) by 1MHz. In this case, define + * PLL_FRACTIONAL_ENABLED as well. + */ +//#define PLL_FAST_STARTUP + +/* The fine calibration value for DFLL open-loop mode is defined here. + * The coarse calibration value is loaded from NVM OTP (factory calibration values). + */ +#define NVM_SW_CALIB_DFLL48M_FINE_VAL (512) + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" +#include "sam.h" +#include "../../config.h" + +#ifdef __cplusplus +#include "SERCOM.h" +#include "Uart.h" +#endif // __cplusplus + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +/*---------------------------------------------------------------------------- + * Pins + *----------------------------------------------------------------------------*/ + +// Number of pins defined in PinDescription array +#define PIN_MAP_STANDARD +//#define PIN_MAP_COMPACT + +#if defined PIN_MAP_STANDARD + #define NUM_PIN_DESCRIPTION_ENTRIES (32u) +#elif defined PIN_MAP_COMPACT + #define NUM_PIN_DESCRIPTION_ENTRIES (12u) +#else + #error "variant.h: You must set PIN_MAP_STANDARD or PIN_MAP_COMPACT" +#endif + +#define PINS_COUNT NUM_PIN_DESCRIPTION_ENTRIES +#define NUM_DIGITAL_PINS PINS_COUNT +#define NUM_ANALOG_INPUTS (5u) +#define NUM_ANALOG_OUTPUTS (1u) +#define analogInputToDigitalPin(p) (p) + +#define digitalPinToPort(P) ( &(PORT->Group[GetPort(P)]) ) +#define digitalPinToBitMask(P) ( 1 << GetPin(P) ) + +#if defined(PIN_DESCRIPTION_TABLE_SIMPLE) + #define digitalPinHasPWM(P) ( g_APinDescription[P].ulTCChannel != NOT_ON_TIMER ) +#else + #define digitalPinHasPWM(P) ( (g_APinDescription[P].ulPinAttribute & PIN_ATTR_TIMER_PWM) == PIN_ATTR_TIMER_PWM ) +#endif + +//#define analogInPinToBit(P) ( ) +#define portOutputRegister(port) ( &(port->OUT.reg) ) +#define portInputRegister(port) ( &(port->IN.reg) ) +#define portModeRegister(port) ( &(port->DIR.reg) ) + +/* + * digitalPinToTimer(..) is AVR-specific and is not defined for SAMD + * architecture. If you need to check if a pin supports PWM you must + * use digitalPinHasPWM(..). + * + * https://github.com/arduino/Arduino/issues/1833 + */ +// #define digitalPinToTimer(P) + +/* LEDs + * None of these defines are currently used by the core. + */ +#if defined PIN_MAP_STANDARD +#define PIN_LED_13 (5u) +#define PIN_LED_RXL (8u) +#define PIN_LED_TXL (9u) +#elif defined PIN_MAP_COMPACT +#define PIN_LED_13 (2u) +#define PIN_LED_RXL (3u) +#define PIN_LED_TXL (4u) +#endif + +#define PIN_LED PIN_LED_13 +#define PIN_LED2 PIN_LED_RXL +#define PIN_LED3 PIN_LED_TXL +#define LED_BUILTIN PIN_LED_13 + +/* + * Analog pins + */ +#if defined PIN_MAP_STANDARD +#define PIN_A2 (2ul) +#define PIN_A4 (4ul) +#define PIN_A5 (5ul) +#define PIN_A14 (14ul) +#define PIN_A15 (15ul) +#define PIN_DAC0 (2ul) +#elif defined PIN_MAP_COMPACT +#define PIN_A2 (0ul) +#define PIN_A4 (1ul) +#define PIN_A5 (2ul) +#define PIN_A14 (5ul) +#define PIN_A15 (6ul) +#define PIN_DAC0 (2ul) +#endif + +static const uint8_t A2 = PIN_A2; +static const uint8_t A4 = PIN_A4; +static const uint8_t A5 = PIN_A5; +static const uint8_t A14 = PIN_A14; +static const uint8_t A15 = PIN_A15; +static const uint8_t DAC0 = PIN_DAC0; + + +#define ADC_RESOLUTION 12 + +// #define REMAP_ANALOG_PIN_ID(pin) if ( pin < A0 ) pin += A0 + +/* Set default analog voltage reference */ +#define VARIANT_AR_DEFAULT AR_DEFAULT + +/* Reference voltage pins (define even if not enabled with PIN_ATTR_REF in the PinDescription table) */ +#if defined PIN_MAP_STANDARD +#define REFB_PIN (4ul) +#elif defined PIN_MAP_COMPACT +#define REFB_PIN (1ul) +#endif + + +// The ATN pin may be used in the future as the first SPI chip select. +// On boards that do not have the Arduino physical form factor, it can to set to any free pin. +#if defined PIN_MAP_STANDARD +#define PIN_ATN (15ul) +#elif defined PIN_MAP_COMPACT +#define PIN_ATN (6ul) +#endif +static const uint8_t ATN = PIN_ATN; + + +/* + * Serial interfaces + */ +// Serial1 +#if defined PIN_MAP_STANDARD +#define PIN_SERIAL1_RX (31ul) +#define PIN_SERIAL1_TX (30ul) +#elif defined PIN_MAP_COMPACT +#define PIN_SERIAL1_RX (11ul) +#define PIN_SERIAL1_TX (10ul) +#endif + +#define PAD_SERIAL1_TX (UART_TX_PAD_0) +#define PAD_SERIAL1_RX (SERCOM_RX_PAD_1) +#define SERCOM_INSTANCE_SERIAL1 &sercom1 + +// Serial2 +#if defined PIN_MAP_STANDARD +#define PIN_SERIAL2_RX (5ul) +#define PIN_SERIAL2_TX (4ul) +#elif defined PIN_MAP_COMPACT +#define PIN_SERIAL2_RX (2ul) +#define PIN_SERIAL2_TX (1ul) +#endif + +#define PAD_SERIAL2_TX (UART_TX_PAD_2) +#define PAD_SERIAL2_RX (SERCOM_RX_PAD_3) +#define SERCOM_INSTANCE_SERIAL2 &sercom0 + + +/* + * SPI Interfaces + */ +#if defined(ONE_SPI) +#define SPI_INTERFACES_COUNT 1 +#else +#define SPI_INTERFACES_COUNT 0 +#endif + +#if defined(ONE_WIRE) && defined (ONE_SPI) + #if defined PIN_MAP_STANDARD + #define PIN_SPI_MISO (30u) + #define PIN_SPI_MOSI (8u) + #define PIN_SPI_SCK (9u) + #define PIN_SPI_SS (31u) + #elif defined PIN_MAP_COMPACT + #define PIN_SPI_MISO (10u) + #define PIN_SPI_MOSI (3u) + #define PIN_SPI_SCK (4u) + #define PIN_SPI_SS (11u) + #endif + + #define PERIPH_SPI sercom1 + #define PAD_SPI_TX SPI_PAD_2_SCK_3 + #define PAD_SPI_RX SERCOM_RX_PAD_0 + +// ONE_UART and ONE_SPI +#else + #if defined PIN_MAP_STANDARD + #define PIN_SPI_MISO (14u) + #define PIN_SPI_MOSI (4u) + #define PIN_SPI_SCK (5u) + #define PIN_SPI_SS (15u) + #elif defined PIN_MAP_COMPACT + #define PIN_SPI_MISO (5u) + #define PIN_SPI_MOSI (1u) + #define PIN_SPI_SCK (2u) + #define PIN_SPI_SS (5u) + #endif + + #define PERIPH_SPI sercom0 + #define PAD_SPI_TX SPI_PAD_2_SCK_3 + #define PAD_SPI_RX SERCOM_RX_PAD_0 +#endif + +static const uint8_t SS = PIN_SPI_SS ; // The SERCOM SS PAD is available on this pin but HW SS isn't used. Set here only for reference. +static const uint8_t MOSI = PIN_SPI_MOSI ; +static const uint8_t MISO = PIN_SPI_MISO ; +static const uint8_t SCK = PIN_SPI_SCK ; + + +/* + * Wire Interfaces + */ +#if defined(ONE_WIRE) +#define WIRE_INTERFACES_COUNT 1 +#else +#define WIRE_INTERFACES_COUNT 0 +#endif + +#if defined PIN_MAP_STANDARD +#define PIN_WIRE_SDA (14u) +#define PIN_WIRE_SCL (15u) +#elif defined PIN_MAP_COMPACT +#define PIN_WIRE_SDA (5u) +#define PIN_WIRE_SCL (6u) +#endif + +#define PERIPH_WIRE sercom0 +#define WIRE_IT_HANDLER SERCOM0_Handler + +static const uint8_t SDA = PIN_WIRE_SDA; +static const uint8_t SCL = PIN_WIRE_SCL; + + +/* + * USB - Define PIN_USB_HOST_ENABLE to assert the defined pin to + * PIN_USB_HOST_ENABLE_VALUE during startup. Leave undefined to disable this pin. + */ +#if defined PIN_MAP_STANDARD +#define PIN_USB_DM (24ul) +#define PIN_USB_DP (25ul) +//#define PIN_USB_HOST_ENABLE (14ul) +#elif defined PIN_MAP_COMPACT +#define PIN_USB_DM (7ul) +#define PIN_USB_DP (8ul) +//#define PIN_USB_HOST_ENABLE (5ul) +#endif + +#define PIN_USB_HOST_ENABLE_VALUE HIGH + +#ifdef __cplusplus +} +#endif + + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#ifdef __cplusplus + +/* ========================= + * ===== SERCOM DEFINITION + * ========================= +*/ +extern SERCOM sercom0; +extern SERCOM sercom1; + +extern Uart Serial1; +extern Uart Serial2; + +#endif + +// These serial port names are intended to allow libraries and architecture-neutral +// sketches to automatically default to the correct port name for a particular type +// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, +// the first hardware serial port whose RX/TX pins are not dedicated to another use. +// +// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor +// +// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial +// +// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library +// +// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. +// +// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX +// pins are NOT connected to anything by default. +#define SERIAL_PORT_USBVIRTUAL SerialUSB +// SERIAL_PORT_MONITOR seems to be used only by the USB Host library (as of 1.6.5). +// It normally allows debugging output on the USB programming port, while the USB host uses the USB native port. +// The programming port is connected to a hardware UART through a USB-Serial bridge (EDBG chip) on the Zero. +// Boards that do not have the EDBG chip will have to connect a USB-TTL serial adapter to 'Serial' to get +// the USB Host debugging output. +#define SERIAL_PORT_MONITOR Serial1 +// Serial has no physical pins broken out, so it's not listed as HARDWARE port +#define SERIAL_PORT_HARDWARE Serial1 +#define SERIAL_PORT_HARDWARE_OPEN Serial1 + +// The MT-D11 does not have the EDBG support chip, which provides a USB-UART bridge +// accessible using Serial (the Arduino serial monitor is normally connected to this). +// So, the USB virtual serial port (SerialUSB) must be used to communicate with the host. +// Because most sketches use Serial to print to the monitor, it is aliased to SerialUSB. +// Remember to use while(!Serial); to wait for a connection before Serial printing. + +// When USB CDC is enabled, Serial refers to SerialUSB, otherwise it refers to Serial1. +#if defined(CDC_ONLY) || defined(CDC_HID) || defined(WITH_CDC) +#define Serial SerialUSB +#else +#define Serial Serial1 +#endif + +#endif /* _VARIANT_GENERIC_D11C14A_ */ diff --git a/variants/MT_D11/README.md b/variants/Generic_D11D14AM/README.md similarity index 98% rename from variants/MT_D11/README.md rename to variants/Generic_D11D14AM/README.md index d8f52d1d0..3c22972ed 100644 --- a/variants/MT_D11/README.md +++ b/variants/Generic_D11D14AM/README.md @@ -1,286 +1,286 @@ -# MattairTech MT-D11 (ATsamD11D14AM) - -``` -=========================== MattairTech MT-D11 (ATsamD11D14AM) ========================== -Other COM PWM Analog INT Arduino* Arduino* INT PWM COM Other -========================================================================================= - ------------------- -DAC * 2 | A2 | USB | Gnd | -REF * 3 | A3 | | Vcc | - TCC00 * * 4 | A4 ----- A31 | 31 * TC21 RX1 SWDIO - TCC01 * * 5 | A5 A30 | 30 TC20 TX1 SWDCLK - TCC02 * 6 | A6 A27 | 27 * - TCC03 * 7 | A7 A23 | 23 SCL - MOSI / TX2 * * 10 | A10 A22 | 22 * SDA - SCK / RX2 * 11 | A11 A17 | 17 TC11 - MISO * NMI 14 | A14 A16 | 16 * TC10 LED -BTN SS * * 15 | A15 RST | BOOT - ------------------- - -* Most pins can be used for more than one function. When using PIN_MAP_STANDARD, the port - pin number printed on the board is also used in Arduino (but without the 'A') for all - of the supported functions (ie: digitalRead(), analogRead(), analogWrite(), etc.). When - using PIN_MAP_COMPACT, the Arduino numbering is sequential starting from 0 at the top - left pin (A2). PIN_MAP_COMPACT uses less FLASH. -* When USB CDC is enabled, Serial refers to SerialUSB, otherwise it refers to Serial1. -* Leave pin A30 floating (or use external pullup) during reset. -* DO NOT connect voltages higher than 3.3V! -* Tone available on TC2. -``` - - -## Pins descriptions for the MattairTech MT-D11 - -### PIN_MAP_STANDARD -``` -============================================================================================================================================ -Arduino | Silk | Port | Alternate Function | Comments (! means not used with this peripheral assignment) ---------|-------|-------|-----------------------|------------------------------------------------------------------------------------------- -0 | --- | ---- | NOT A PIN | NOT A PIN -1 | --- | ---- | NOT A PIN | NOT A PIN -2 | A2 | PA02 | DAC | !EIC/EXTINT[2] ADC/AIN[0] PTC/Y[0] DAC/VOUT -3 | A3 | PA03 | REFA | !EIC/EXTINT[3] REF/ADC/VREFA REF/DAC/VREFA ADC/AIN[1] PTC/Y[1] -4 | A4 | PA04 | REFB / VM | EIC/EXTINT[4] REF/ADC/VREFB ADC/AIN[4] AC/AIN[0] PTC/Y[2] !SERCOM0/PAD[2] !SERCOM0/PAD[0] !TC1/WO[0] TCC0/WO[0] -5 | A5 | PA05 | | EIC/EXTINT[5] ADC/AIN[3] AC/AIN[1] PTC/Y[3] !SERCOM0/PAD[3] !SERCOM0/PAD[1] !TC1/WO[1] TCC0/WO[1] -6 | A6 | PA06 | | !EIC/EXTINT[6] ADC/AIN[4] AC/AIN[2] PTC/Y[4] !SERCOM0/PAD[0] !SERCOM0/PAD[2] !TC2/WO[0] TCC0/WO[2] -7 | A7 | PA07 | | !EIC/EXTINT[7] ADC/AIN[5] AC/AIN[3] PTC/Y[5] !SERCOM0/PAD[1] !SERCOM0/PAD[3] !TC2/WO[1] TCC0/WO[3] -8 | -- | PA08 | Xin32 / Xin | Xin32 -9 | -- | PA09 | Xout32 / Xout | Xout32 -10 | A10 | PA10 | SPI MOSI / TX2 | EIC/EXTINT[2] ADC/AIN[8] PTC/X[2] PTC/Y[8] SERCOM0/PAD[2] !SERCOM2/PAD[2] !TC2/WO[0] !TCC0/WO[2] -11 | A11 | PA11 | SPI SCK / RX2 | !EIC/EXTINT[3] ADC/AIN[9] PTC/X[3] PTC/Y[9] SERCOM0/PAD[3] !SERCOM2/PAD[3] !TC2/WO[1] !TCC0/WO[3] -12 | --- | ---- | NOT A PIN | NOT A PIN -13 | --- | ---- | NOT A PIN | NOT A PIN -14 | A14 | PA14 | SPI MISO | EIC/NMI ADC/AIN[6] PTC/X[0] PTC/Y[6] SERCOM0/PAD[0] !SERCOM2/PAD[0] !TC1/WO[0] !TCC0/WO[0] -15 | A15 | PA15 | Button / SPI SS | EIC/EXTINT[1] ADC/AIN[7] PTC/X[1] PTC/Y[7] SERCOM0/PAD[1] !SERCOM2/PAD[1] !TC1/WO[1] !TCC0/WO[1] Button -16 | A16 | PA16 | LED | EIC/EXTINT[0] PTC/X[4] PTC/Y[10] !SERCOM1/PAD[2] !SERCOM2/PAD[2] TC1/WO[0] !TCC0/WO[6] LED -17 | A17 | PA17 | HOST_ENABLE | !EIC/EXTINT[1] PTC/X[5] PTC/Y[11] !SERCOM1/PAD[3] !SERCOM2/PAD[3] TC1/WO[1] !TCC0/WO[7] HOST_ENABLE -18 | --- | ---- | NOT A PIN | NOT A PIN -19 | --- | ---- | NOT A PIN | NOT A PIN -20 | --- | ---- | NOT A PIN | NOT A PIN -21 | --- | ---- | NOT A PIN | NOT A PIN -22 | A22 | PA22 | I2C/SDA w/pullup | EIC/EXTINT[6] PTC/X[6] PTC/Y[12] !SERCOM1/PAD[0] SERCOM2/PAD[0] !TC1/WO[0] !TCC0/WO[4] -23 | A23 | PA23 | I2C/SCL w/pullup | !EIC/EXTINT[7] PTC/X[7] PTC/Y[13] !SERCOM1/PAD[1] SERCOM2/PAD[1] !TC1/WO[1] !TCC0/WO[5] -24 | --- | PA24 | USB_NEGATIVE | USB/DM -25 | --- | PA25 | USB_POSITIVE | USB/DP -26 | --- | ---- | NOT A PIN | NOT A PIN -27 | A27 | PA27 | | EIC/EXTINT[7] PTC/X[10] -28 | A28 | PA28 | Reset | Reset, BOOT (double tap bootloader entry) -29 | --- | ---- | NOT A PIN | NOT A PIN -30 | A30 | PA30 | TX1 / SWD CLK | !EIC/EXTINT[2] !SERCOM1/PAD[0] SERCOM1/PAD[2] TC2/WO[0] !TCC0/WO[2] SWD CLK, leave floating during boot -31 | A31 | PA31 | RX1 / SWD IO | EIC/EXTINT[3] !SERCOM1/PAD[1] SERCOM1/PAD[3] TC2/WO[1] !TCC0/WO[3] SWD IO -============================================================================================================================================ -``` - -### PIN_MAP_COMPACT -``` -============================================================================================================================================ -Arduino | Silk | Port | Alternate Function | Comments (! means not used with this peripheral assignment) ---------|-------|-------|-----------------------|------------------------------------------------------------------------------------------- -0 | A2 | PA02 | DAC | !EIC/EXTINT[2] ADC/AIN[0] PTC/Y[0] DAC/VOUT -1 | A3 | PA03 | REFA | !EIC/EXTINT[3] REF/ADC/VREFA REF/DAC/VREFA ADC/AIN[1] PTC/Y[1] -2 | A4 | PA04 | REFB / VM | EIC/EXTINT[4] REF/ADC/VREFB ADC/AIN[4] AC/AIN[0] PTC/Y[2] !SERCOM0/PAD[2] !SERCOM0/PAD[0] !TC1/WO[0] TCC0/WO[0] -3 | A5 | PA05 | | EIC/EXTINT[5] ADC/AIN[3] AC/AIN[1] PTC/Y[3] !SERCOM0/PAD[3] !SERCOM0/PAD[1] !TC1/WO[1] TCC0/WO[1] -4 | A6 | PA06 | | !EIC/EXTINT[6] ADC/AIN[4] AC/AIN[2] PTC/Y[4] !SERCOM0/PAD[0] !SERCOM0/PAD[2] !TC2/WO[0] TCC0/WO[2] -5 | A7 | PA07 | | !EIC/EXTINT[7] ADC/AIN[5] AC/AIN[3] PTC/Y[5] !SERCOM0/PAD[1] !SERCOM0/PAD[3] !TC2/WO[1] TCC0/WO[3] -6 | A10 | PA10 | SPI MOSI / TX2 | EIC/EXTINT[2] ADC/AIN[8] PTC/X[2] PTC/Y[8] SERCOM0/PAD[2] !SERCOM2/PAD[2] !TC2/WO[0] !TCC0/WO[2] -7 | A11 | PA11 | SPI SCK / RX2 | !EIC/EXTINT[3] ADC/AIN[9] PTC/X[3] PTC/Y[9] SERCOM0/PAD[3] !SERCOM2/PAD[3] !TC2/WO[1] !TCC0/WO[3] -8 | A14 | PA14 | SPI MISO | EIC/NMI ADC/AIN[6] PTC/X[0] PTC/Y[6] SERCOM0/PAD[0] !SERCOM2/PAD[0] !TC1/WO[0] !TCC0/WO[0] -9 | A15 | PA15 | Button / SPI SS | EIC/EXTINT[1] ADC/AIN[7] PTC/X[1] PTC/Y[7] SERCOM0/PAD[1] !SERCOM2/PAD[1] !TC1/WO[1] !TCC0/WO[1] Button -10 | A16 | PA16 | LED | EIC/EXTINT[0] PTC/X[4] PTC/Y[10] !SERCOM1/PAD[2] !SERCOM2/PAD[2] TC1/WO[0] !TCC0/WO[6] LED -11 | A17 | PA17 | HOST_ENABLE | !EIC/EXTINT[1] PTC/X[5] PTC/Y[11] !SERCOM1/PAD[3] !SERCOM2/PAD[3] TC1/WO[1] !TCC0/WO[7] HOST_ENABLE -12 | A22 | PA22 | I2C/SDA w/pullup | EIC/EXTINT[6] PTC/X[6] PTC/Y[12] !SERCOM1/PAD[0] SERCOM2/PAD[0] !TC1/WO[0] !TCC0/WO[4] -13 | A23 | PA23 | I2C/SCL w/pullup | !EIC/EXTINT[7] PTC/X[7] PTC/Y[13] !SERCOM1/PAD[1] SERCOM2/PAD[1] !TC1/WO[1] !TCC0/WO[5] -14 | A27 | PA27 | | EIC/EXTINT[7] PTC/X[10] -15 | A30 | PA30 | TX1 / SWD CLK | !EIC/EXTINT[2] !SERCOM1/PAD[0] SERCOM1/PAD[2] TC2/WO[0] !TCC0/WO[2] SWD CLK, leave floating during boot -16 | A31 | PA31 | RX1 / SWD IO | EIC/EXTINT[3] !SERCOM1/PAD[1] SERCOM1/PAD[3] TC2/WO[1] !TCC0/WO[3] SWD IO -============================================================================================================================================ - -* Most pins can be used for more than one function. When using PIN_MAP_STANDARD, the port - pin number printed on the board is also used in Arduino (but without the 'A') for all - of the supported functions (ie: digitalRead(), analogRead(), analogWrite(), etc.). When - using PIN_MAP_COMPACT, the Arduino numbering is sequential starting from 0 at the top - left pin (A2). PIN_MAP_COMPACT uses less RAM. -* The following Arduino pin numbers are not mapped to a physical pin: 0, 1, 8, 9, 12, 13, 18, 19, 20, 21, 24, 25, 26, 28, and 29. -* Pins 24 and 25 are in use by USB (USB_NEGATIVE and USB_POSITIVE). -* Leave pin A30 floating (or use external pullup) during reset. -* Pins 8 and 9 are by default connected to the 32.768KHz crystal. -* The tone library uses TC2. -``` - - -## Board Configuration Notes - -* **Crystals** - * Either the 32.768KHz crystal or the 16MHz crystal can be used. Be sure to set the correct solder jumpers. - * The bootloader does not use an external crystal by default. Double-tap the reset button to enter manually. - -* **LED (LED_BUILTIN)** - * Bring the pin HIGH to turn the LED on. - * The LED is enabled (solder jumper) by default. - -* **Button (BUTTON_BUILTIN)** - * Pressing the button will bring the pin LOW. The pullup must be enabled first. - * If the debouncing capacitor is connected, delay reading the pin at least 6ms after turning on the pullup. - * The button is connected to the Reset pin by default, but can be connected to pin 15 via the solder jumper. - * BTN pin is shared with SPI SS, so the button must be configured as reset (default) when using SPI. - -* **GPIO** - * All pins (including analog) support INPUT, OUTPUT, INPUT_PULLUP, and INPUT_PULLDOWN. - * Each pin can source or sink a maximum of 7 mA (when PER_ATTR_DRIVE_STRONG is set for the pin, enabled by default). - * Internal pull-up and pull-down resistors of 20-60 Kohms (40Kohm typ., disconnected by default). - -* **Analog Inputs** - * 10 pins can be configured as ADC analog inputs. - * Each pin measures from ground to 3.3 volts by default. - * Each pin provides 10 bits of resolution (1024 values) by default. - * 12-bit resolution supported by using the analogReadResolution() function. - * The upper end of the measurement range can be changed using the analogReference() function. - * A reference voltage can be connected to REF. In this case, the capacitor should be enabled via the solder jumper. - -* **DAC** - * One analog output is available on pin 2. - * Provides a 10-bit voltage output with the analogWrite() function. - -* **PWM** - * 8 pins can be configured as PWM outputs. - * Each pin provides 8 bits of resolution (256 values) by default. - * 12-bit resolution supported by using the analogWriteResolution() function. - -* **External Interrupts** - * 8 pins can be configured with external interrupts. - -* **SERCOM** - * 3 SERCOM are available. - * Up to 2 UART instances - * 1 SPI instance - * 1 WIRE (I2C) instance - * The WIRE pullup resistors are enabled by default. - - - -## PinDescription table format - -### Note that in 1.6.18-beta-b1 a new compact table format was added. -The standard PinDescription table uses 12 bytes per pin. Define PIN_DESCRIPTION_TABLE_SIMPLE -to use a more compact format that uses only 4 bytes per pin (currently only available -for the D11 chips). In this case, the PinType, PinAttribute, and GCLKCCL columns are not used -(they are not required). Additionally, the SetPortPin() and SetExtIntADC() macros are used to -pack Port and Pin into the PortPin column, and ExtInt and ADCChannelNumber into the ExtIntADC -column. Note that external libraries that reference the PinDescription table directly (uncommon) -will no longer work. This define can be combined with the PIN_MAP_COMPACT define, which -is available in variant.h of the D11 variants. This can save from 10's to over 200 bytes. - -### Note that a new column (GCLKCCL) was added for 1.6.8-beta-b0. -MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE in variant.h is used to track versions. -If using board variant files with the old format, the new core will still read the -table the old way, losing any new features introduced by the new column. Additionally, -new definitions have been added for D51, L21, and C21 support. - -### Each pin can have multiple functions. -The PinDescription table describes how each of the pins can be used by the Arduino -core. Each pin can have multiple functions (ie: ADC input, digital output, PWM, -communications, etc.), and the PinDescription table configures which functions can -be used for each pin. This table is mainly accessed by the pinPeripheral function in -wiring_private.c, which is used to attach a pin to a particular peripheral function. -The communications drivers (ie: SPI, I2C, and UART), analogRead(), analogWrite(), -analogReference(), attachInterrupt(), and pinMode() all call pinPeripheral() to -verify that the pin can perform the function requested, and to configure the pin for -that function. Most of the contents of pinMode() are now in pinPeripheral(). - -### Pin Mapping -There are different ways that pins can be mapped. Typically, there is no relation -between the arduino pin number used, and the actual port pin designator. Thus, the -pcb must be printed with the arduino numbering, otherwise, if the port pin is printed, -a cross reference table is needed to find the arduino pin number. However, this results -in the least amount of space used by the table. Another method, used by default by the -MT-D21E and MT-D11, maps Arduino pin numbers to the actual port pin number (ie: Arduino -pin 28 = Port A28). This works well when there is only one port (or if the PORTB pins -are used for onboard functions and not broken out). PIO_NOT_A_PIN entries must be added -for pins that are used for other purposes or for pins that do not exist (especially the -D11), so some FLASH space may be wasted. For an example of both types, see variant.cpp -from the MT-D11 variant. The Xeno combines both methods, using the actual port pin -designators from both PORTA and PORTB for arduino numbers 0-31 (ie: B1=1, A2=2), then -using arduino numbering only above 31. For 0-31 only one pin from PORTA or PORTB can be -used, leaving the other pin for some number above 31. - -**See [WVariant.h](https://github.com/mattairtech/ArduinoCore-samd/tree/master/cores/arduino/WVariant.h) for the definitions used in the table.** - -### Port -This is the port (ie: PORTA). Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### Pin -This is the pin (bit) within the port. Valid values are 0-31. Not used with -PIN_DESCRIPTION_TABLE_SIMPLE. - -### SetPortPin() -When PIN_DESCRIPTION_TABLE_SIMPLE is defined, Port and Pin are combined into one column -using the SetPortPin() packing macro: SetPortPin(PORTA, 2). If the pin is not usable, -use SetPortPin(NOT_A_PORT, 0). - -### PinType -This indicates what peripheral function the pin can be attached to. In most cases, -this is PIO_MULTI, which means that the pin can be anything listed in the PinAttribute -field. It can also be set to a specific peripheral. In this case, any attempt to -configure the pin (using pinPeripheral or pinMode) as anything else will fail (and -pinPeripheral will return -1). This can be used to prevent accidental re-configuration -of a pin that is configured for only one function (ie: USB D- and D+ pins). If a pin -is not used or does not exist, PIO_NOT_A_PIN must be entered in this field. See -WVariant.h for valid entries. These entries are also used as a parameter to -pinPeripheral() with the exception of PIO_NOT_A_PIN and PIO_MULTI. The pinMode function -now calls pinPeripheral() with the desired mode. Note that this field is not used to -select between the different peripherals possible with each of the SERCOM and TIMER -functions. PeripheralAttribute is now used for this. When PIN_DESCRIPTION_TABLE_SIMPLE -is defined, PinType is not used (the pin is treated as PIO_MULTI). - -### PeripheralAttribute -This is an 8-bit bitfield used for various peripheral configuration. It is primarily -used to select between the different peripherals possible with each of the SERCOM and -TIMER functions. TIMER pins are individual, while SERCOM uses a group of two to four -pins. This group of pins can span both peripherals. For example, pin 19 (SPI1 SCK) on -the MT-D21E uses PER_ATTR_SERCOM_ALT while pin 22 (SPI1 MISO) uses PER_ATTR_SERCOM_STD. -Both TIMER and SERCOM can exist for each pin. This bitfield is also used to set the -pin drive strength and the input buffer configuration (ie: totem-pole, open-drain, -buskeeper, etc.). Starting with 1.6.8, the ADC instance on the D51 and C21 (there are -two) is also selected here. Note that the D51 adds a third timer attribute and -requires consultation of the datasheet IOSET tables. See WVariant.h for valid entries. - -### PinAttribute -This is a 32-bit bitfield used to list all of the valid peripheral functions that a -pin can attach to. This includes GPIO functions like PIN_ATTR_OUTPUT. Certain -attributes are shorthand for a combination of other attributes. PIN_ATTR_DIGITAL -includes all of the GPIO functions, while PIN_ATTR_TIMER includes both -PIN_ATTR_TIMER_PWM and PIN_ATTR_TIMER_CAPTURE (capture is not used yet). -PIN_ATTR_ANALOG is an alias to PIN_ATTR_ANALOG_ADC. This bitfield is useful for -limiting a pin to only input related functions or output functions. This allows a pin -to have a more flexible configuration, while restricting the direction (ie: to avoid -contention). See WVariant.h for valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### TCChannel -This is the TC/TCC channel (if any) assigned to the pin. Some TC channels are available -on multiple pins. In general, only one pin should be configured in the pinDescription -table per TC channel. Starting with 1.6.8, the timer type is now encoded in this column -to support the D51, L21 and C21, which use TC numbers starting at 0 (rather than 3 as on -the D21). See WVariant.h for valid entries. - -### ADCChannelNumber -This is the ADC channel (if any) assigned to the pin. The D51 and C21 each have two ADC -instances, which are selected in the PeripheralAttribute column. See WVariant.h for -valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### ExtInt -This is the interrupt (if any) assigned to the pin. Some interrupt numbers are -available on multiple pins. In general, only one pin should be configured in the -pinDescription table per interrupt number. Thus, for example, if an interrupt was -needed on pin 2, EXTERNAL_INT_2 can be moved from pin 18. See WVariant.h for valid -entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### SetExtIntADC() -When PIN_DESCRIPTION_TABLE_SIMPLE is defined, ExtInt and ADCChannelNumber are combined -into one column using the SetExtIntADC() packing macro: SetExtIntADC(EXTERNAL_INT_4, -ADC_Channel2). If the pin is not usable, use SetExtIntADC(EXTERNAL_INT_NONE, No_ADC_Channel). - -### GCLKCCL -This column was added in 1.6.8-beta-b0. It is not yet used. It will eventually support -the Analog Comparators (AC), the Configurable Custom Logic (CCL) peripherals of the D51, -L21 and C21, and the GCLK outputs (inputs) of all of the MCUs. Not used with -PIN_DESCRIPTION_TABLE_SIMPLE. +# MattairTech MT-D11 (ATsamD11D14AM) + +``` +=========================== MattairTech MT-D11 (ATsamD11D14AM) ========================== +Other COM PWM Analog INT Arduino* Arduino* INT PWM COM Other +========================================================================================= + ------------------- +DAC * 2 | A2 | USB | Gnd | +REF * 3 | A3 | | Vcc | + TCC00 * * 4 | A4 ----- A31 | 31 * TC21 RX1 SWDIO + TCC01 * * 5 | A5 A30 | 30 TC20 TX1 SWDCLK + TCC02 * 6 | A6 A27 | 27 * + TCC03 * 7 | A7 A23 | 23 SCL + MOSI / TX2 * * 10 | A10 A22 | 22 * SDA + SCK / RX2 * 11 | A11 A17 | 17 TC11 + MISO * NMI 14 | A14 A16 | 16 * TC10 LED +BTN SS * * 15 | A15 RST | BOOT + ------------------- + +* Most pins can be used for more than one function. When using PIN_MAP_STANDARD, the port + pin number printed on the board is also used in Arduino (but without the 'A') for all + of the supported functions (ie: digitalRead(), analogRead(), analogWrite(), etc.). When + using PIN_MAP_COMPACT, the Arduino numbering is sequential starting from 0 at the top + left pin (A2). PIN_MAP_COMPACT uses less FLASH. +* When USB CDC is enabled, Serial refers to SerialUSB, otherwise it refers to Serial1. +* Leave pin A30 floating (or use external pullup) during reset. +* DO NOT connect voltages higher than 3.3V! +* Tone available on TC2. +``` + + +## Pins descriptions for the MattairTech MT-D11 + +### PIN_MAP_STANDARD +``` +============================================================================================================================================ +Arduino | Silk | Port | Alternate Function | Comments (! means not used with this peripheral assignment) +--------|-------|-------|-----------------------|------------------------------------------------------------------------------------------- +0 | --- | ---- | NOT A PIN | NOT A PIN +1 | --- | ---- | NOT A PIN | NOT A PIN +2 | A2 | PA02 | DAC | !EIC/EXTINT[2] ADC/AIN[0] PTC/Y[0] DAC/VOUT +3 | A3 | PA03 | REFA | !EIC/EXTINT[3] REF/ADC/VREFA REF/DAC/VREFA ADC/AIN[1] PTC/Y[1] +4 | A4 | PA04 | REFB / VM | EIC/EXTINT[4] REF/ADC/VREFB ADC/AIN[4] AC/AIN[0] PTC/Y[2] !SERCOM0/PAD[2] !SERCOM0/PAD[0] !TC1/WO[0] TCC0/WO[0] +5 | A5 | PA05 | | EIC/EXTINT[5] ADC/AIN[3] AC/AIN[1] PTC/Y[3] !SERCOM0/PAD[3] !SERCOM0/PAD[1] !TC1/WO[1] TCC0/WO[1] +6 | A6 | PA06 | | !EIC/EXTINT[6] ADC/AIN[4] AC/AIN[2] PTC/Y[4] !SERCOM0/PAD[0] !SERCOM0/PAD[2] !TC2/WO[0] TCC0/WO[2] +7 | A7 | PA07 | | !EIC/EXTINT[7] ADC/AIN[5] AC/AIN[3] PTC/Y[5] !SERCOM0/PAD[1] !SERCOM0/PAD[3] !TC2/WO[1] TCC0/WO[3] +8 | -- | PA08 | Xin32 / Xin | Xin32 +9 | -- | PA09 | Xout32 / Xout | Xout32 +10 | A10 | PA10 | SPI MOSI / TX2 | EIC/EXTINT[2] ADC/AIN[8] PTC/X[2] PTC/Y[8] SERCOM0/PAD[2] !SERCOM2/PAD[2] !TC2/WO[0] !TCC0/WO[2] +11 | A11 | PA11 | SPI SCK / RX2 | !EIC/EXTINT[3] ADC/AIN[9] PTC/X[3] PTC/Y[9] SERCOM0/PAD[3] !SERCOM2/PAD[3] !TC2/WO[1] !TCC0/WO[3] +12 | --- | ---- | NOT A PIN | NOT A PIN +13 | --- | ---- | NOT A PIN | NOT A PIN +14 | A14 | PA14 | SPI MISO | EIC/NMI ADC/AIN[6] PTC/X[0] PTC/Y[6] SERCOM0/PAD[0] !SERCOM2/PAD[0] !TC1/WO[0] !TCC0/WO[0] +15 | A15 | PA15 | Button / SPI SS | EIC/EXTINT[1] ADC/AIN[7] PTC/X[1] PTC/Y[7] SERCOM0/PAD[1] !SERCOM2/PAD[1] !TC1/WO[1] !TCC0/WO[1] Button +16 | A16 | PA16 | LED | EIC/EXTINT[0] PTC/X[4] PTC/Y[10] !SERCOM1/PAD[2] !SERCOM2/PAD[2] TC1/WO[0] !TCC0/WO[6] LED +17 | A17 | PA17 | HOST_ENABLE | !EIC/EXTINT[1] PTC/X[5] PTC/Y[11] !SERCOM1/PAD[3] !SERCOM2/PAD[3] TC1/WO[1] !TCC0/WO[7] HOST_ENABLE +18 | --- | ---- | NOT A PIN | NOT A PIN +19 | --- | ---- | NOT A PIN | NOT A PIN +20 | --- | ---- | NOT A PIN | NOT A PIN +21 | --- | ---- | NOT A PIN | NOT A PIN +22 | A22 | PA22 | I2C/SDA w/pullup | EIC/EXTINT[6] PTC/X[6] PTC/Y[12] !SERCOM1/PAD[0] SERCOM2/PAD[0] !TC1/WO[0] !TCC0/WO[4] +23 | A23 | PA23 | I2C/SCL w/pullup | !EIC/EXTINT[7] PTC/X[7] PTC/Y[13] !SERCOM1/PAD[1] SERCOM2/PAD[1] !TC1/WO[1] !TCC0/WO[5] +24 | --- | PA24 | USB_NEGATIVE | USB/DM +25 | --- | PA25 | USB_POSITIVE | USB/DP +26 | --- | ---- | NOT A PIN | NOT A PIN +27 | A27 | PA27 | | EIC/EXTINT[7] PTC/X[10] +28 | A28 | PA28 | Reset | Reset, BOOT (double tap bootloader entry) +29 | --- | ---- | NOT A PIN | NOT A PIN +30 | A30 | PA30 | TX1 / SWD CLK | !EIC/EXTINT[2] !SERCOM1/PAD[0] SERCOM1/PAD[2] TC2/WO[0] !TCC0/WO[2] SWD CLK, leave floating during boot +31 | A31 | PA31 | RX1 / SWD IO | EIC/EXTINT[3] !SERCOM1/PAD[1] SERCOM1/PAD[3] TC2/WO[1] !TCC0/WO[3] SWD IO +============================================================================================================================================ +``` + +### PIN_MAP_COMPACT +``` +============================================================================================================================================ +Arduino | Silk | Port | Alternate Function | Comments (! means not used with this peripheral assignment) +--------|-------|-------|-----------------------|------------------------------------------------------------------------------------------- +0 | A2 | PA02 | DAC | !EIC/EXTINT[2] ADC/AIN[0] PTC/Y[0] DAC/VOUT +1 | A3 | PA03 | REFA | !EIC/EXTINT[3] REF/ADC/VREFA REF/DAC/VREFA ADC/AIN[1] PTC/Y[1] +2 | A4 | PA04 | REFB / VM | EIC/EXTINT[4] REF/ADC/VREFB ADC/AIN[4] AC/AIN[0] PTC/Y[2] !SERCOM0/PAD[2] !SERCOM0/PAD[0] !TC1/WO[0] TCC0/WO[0] +3 | A5 | PA05 | | EIC/EXTINT[5] ADC/AIN[3] AC/AIN[1] PTC/Y[3] !SERCOM0/PAD[3] !SERCOM0/PAD[1] !TC1/WO[1] TCC0/WO[1] +4 | A6 | PA06 | | !EIC/EXTINT[6] ADC/AIN[4] AC/AIN[2] PTC/Y[4] !SERCOM0/PAD[0] !SERCOM0/PAD[2] !TC2/WO[0] TCC0/WO[2] +5 | A7 | PA07 | | !EIC/EXTINT[7] ADC/AIN[5] AC/AIN[3] PTC/Y[5] !SERCOM0/PAD[1] !SERCOM0/PAD[3] !TC2/WO[1] TCC0/WO[3] +6 | A10 | PA10 | SPI MOSI / TX2 | EIC/EXTINT[2] ADC/AIN[8] PTC/X[2] PTC/Y[8] SERCOM0/PAD[2] !SERCOM2/PAD[2] !TC2/WO[0] !TCC0/WO[2] +7 | A11 | PA11 | SPI SCK / RX2 | !EIC/EXTINT[3] ADC/AIN[9] PTC/X[3] PTC/Y[9] SERCOM0/PAD[3] !SERCOM2/PAD[3] !TC2/WO[1] !TCC0/WO[3] +8 | A14 | PA14 | SPI MISO | EIC/NMI ADC/AIN[6] PTC/X[0] PTC/Y[6] SERCOM0/PAD[0] !SERCOM2/PAD[0] !TC1/WO[0] !TCC0/WO[0] +9 | A15 | PA15 | Button / SPI SS | EIC/EXTINT[1] ADC/AIN[7] PTC/X[1] PTC/Y[7] SERCOM0/PAD[1] !SERCOM2/PAD[1] !TC1/WO[1] !TCC0/WO[1] Button +10 | A16 | PA16 | LED | EIC/EXTINT[0] PTC/X[4] PTC/Y[10] !SERCOM1/PAD[2] !SERCOM2/PAD[2] TC1/WO[0] !TCC0/WO[6] LED +11 | A17 | PA17 | HOST_ENABLE | !EIC/EXTINT[1] PTC/X[5] PTC/Y[11] !SERCOM1/PAD[3] !SERCOM2/PAD[3] TC1/WO[1] !TCC0/WO[7] HOST_ENABLE +12 | A22 | PA22 | I2C/SDA w/pullup | EIC/EXTINT[6] PTC/X[6] PTC/Y[12] !SERCOM1/PAD[0] SERCOM2/PAD[0] !TC1/WO[0] !TCC0/WO[4] +13 | A23 | PA23 | I2C/SCL w/pullup | !EIC/EXTINT[7] PTC/X[7] PTC/Y[13] !SERCOM1/PAD[1] SERCOM2/PAD[1] !TC1/WO[1] !TCC0/WO[5] +14 | A27 | PA27 | | EIC/EXTINT[7] PTC/X[10] +15 | A30 | PA30 | TX1 / SWD CLK | !EIC/EXTINT[2] !SERCOM1/PAD[0] SERCOM1/PAD[2] TC2/WO[0] !TCC0/WO[2] SWD CLK, leave floating during boot +16 | A31 | PA31 | RX1 / SWD IO | EIC/EXTINT[3] !SERCOM1/PAD[1] SERCOM1/PAD[3] TC2/WO[1] !TCC0/WO[3] SWD IO +============================================================================================================================================ + +* Most pins can be used for more than one function. When using PIN_MAP_STANDARD, the port + pin number printed on the board is also used in Arduino (but without the 'A') for all + of the supported functions (ie: digitalRead(), analogRead(), analogWrite(), etc.). When + using PIN_MAP_COMPACT, the Arduino numbering is sequential starting from 0 at the top + left pin (A2). PIN_MAP_COMPACT uses less RAM. +* The following Arduino pin numbers are not mapped to a physical pin: 0, 1, 8, 9, 12, 13, 18, 19, 20, 21, 24, 25, 26, 28, and 29. +* Pins 24 and 25 are in use by USB (USB_NEGATIVE and USB_POSITIVE). +* Leave pin A30 floating (or use external pullup) during reset. +* Pins 8 and 9 are by default connected to the 32.768KHz crystal. +* The tone library uses TC2. +``` + + +## Board Configuration Notes + +* **Crystals** + * Either the 32.768KHz crystal or the 16MHz crystal can be used. Be sure to set the correct solder jumpers. + * The bootloader does not use an external crystal by default. Double-tap the reset button to enter manually. + +* **LED (LED_BUILTIN)** + * Bring the pin HIGH to turn the LED on. + * The LED is enabled (solder jumper) by default. + +* **Button (BUTTON_BUILTIN)** + * Pressing the button will bring the pin LOW. The pullup must be enabled first. + * If the debouncing capacitor is connected, delay reading the pin at least 6ms after turning on the pullup. + * The button is connected to the Reset pin by default, but can be connected to pin 15 via the solder jumper. + * BTN pin is shared with SPI SS, so the button must be configured as reset (default) when using SPI. + +* **GPIO** + * All pins (including analog) support INPUT, OUTPUT, INPUT_PULLUP, and INPUT_PULLDOWN. + * Each pin can source or sink a maximum of 7 mA (when PER_ATTR_DRIVE_STRONG is set for the pin, enabled by default). + * Internal pull-up and pull-down resistors of 20-60 Kohms (40Kohm typ., disconnected by default). + +* **Analog Inputs** + * 10 pins can be configured as ADC analog inputs. + * Each pin measures from ground to 3.3 volts by default. + * Each pin provides 10 bits of resolution (1024 values) by default. + * 12-bit resolution supported by using the analogReadResolution() function. + * The upper end of the measurement range can be changed using the analogReference() function. + * A reference voltage can be connected to REF. In this case, the capacitor should be enabled via the solder jumper. + +* **DAC** + * One analog output is available on pin 2. + * Provides a 10-bit voltage output with the analogWrite() function. + +* **PWM** + * 8 pins can be configured as PWM outputs. + * Each pin provides 8 bits of resolution (256 values) by default. + * 12-bit resolution supported by using the analogWriteResolution() function. + +* **External Interrupts** + * 8 pins can be configured with external interrupts. + +* **SERCOM** + * 3 SERCOM are available. + * Up to 2 UART instances + * 1 SPI instance + * 1 WIRE (I2C) instance + * The WIRE pullup resistors are enabled by default. + + + +## PinDescription table format + +### Note that in 1.6.18-beta-b1 a new compact table format was added. +The standard PinDescription table uses 12 bytes per pin. Define PIN_DESCRIPTION_TABLE_SIMPLE +to use a more compact format that uses only 4 bytes per pin (currently only available +for the D11 chips). In this case, the PinType, PinAttribute, and GCLKCCL columns are not used +(they are not required). Additionally, the SetPortPin() and SetExtIntADC() macros are used to +pack Port and Pin into the PortPin column, and ExtInt and ADCChannelNumber into the ExtIntADC +column. Note that external libraries that reference the PinDescription table directly (uncommon) +will no longer work. This define can be combined with the PIN_MAP_COMPACT define, which +is available in variant.h of the D11 variants. This can save from 10's to over 200 bytes. + +### Note that a new column (GCLKCCL) was added for 1.6.8-beta-b0. +MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE in variant.h is used to track versions. +If using board variant files with the old format, the new core will still read the +table the old way, losing any new features introduced by the new column. Additionally, +new definitions have been added for D51, L21, and C21 support. + +### Each pin can have multiple functions. +The PinDescription table describes how each of the pins can be used by the Arduino +core. Each pin can have multiple functions (ie: ADC input, digital output, PWM, +communications, etc.), and the PinDescription table configures which functions can +be used for each pin. This table is mainly accessed by the pinPeripheral function in +wiring_private.c, which is used to attach a pin to a particular peripheral function. +The communications drivers (ie: SPI, I2C, and UART), analogRead(), analogWrite(), +analogReference(), attachInterrupt(), and pinMode() all call pinPeripheral() to +verify that the pin can perform the function requested, and to configure the pin for +that function. Most of the contents of pinMode() are now in pinPeripheral(). + +### Pin Mapping +There are different ways that pins can be mapped. Typically, there is no relation +between the arduino pin number used, and the actual port pin designator. Thus, the +pcb must be printed with the arduino numbering, otherwise, if the port pin is printed, +a cross reference table is needed to find the arduino pin number. However, this results +in the least amount of space used by the table. Another method, used by default by the +MT-D21E and MT-D11, maps Arduino pin numbers to the actual port pin number (ie: Arduino +pin 28 = Port A28). This works well when there is only one port (or if the PORTB pins +are used for onboard functions and not broken out). PIO_NOT_A_PIN entries must be added +for pins that are used for other purposes or for pins that do not exist (especially the +D11), so some FLASH space may be wasted. For an example of both types, see variant.cpp +from the MT-D11 variant. The Xeno combines both methods, using the actual port pin +designators from both PORTA and PORTB for arduino numbers 0-31 (ie: B1=1, A2=2), then +using arduino numbering only above 31. For 0-31 only one pin from PORTA or PORTB can be +used, leaving the other pin for some number above 31. + +**See [WVariant.h](https://github.com/mattairtech/ArduinoCore-samd/tree/master/cores/arduino/WVariant.h) for the definitions used in the table.** + +### Port +This is the port (ie: PORTA). Not used with PIN_DESCRIPTION_TABLE_SIMPLE. + +### Pin +This is the pin (bit) within the port. Valid values are 0-31. Not used with +PIN_DESCRIPTION_TABLE_SIMPLE. + +### SetPortPin() +When PIN_DESCRIPTION_TABLE_SIMPLE is defined, Port and Pin are combined into one column +using the SetPortPin() packing macro: SetPortPin(PORTA, 2). If the pin is not usable, +use SetPortPin(NOT_A_PORT, 0). + +### PinType +This indicates what peripheral function the pin can be attached to. In most cases, +this is PIO_MULTI, which means that the pin can be anything listed in the PinAttribute +field. It can also be set to a specific peripheral. In this case, any attempt to +configure the pin (using pinPeripheral or pinMode) as anything else will fail (and +pinPeripheral will return -1). This can be used to prevent accidental re-configuration +of a pin that is configured for only one function (ie: USB D- and D+ pins). If a pin +is not used or does not exist, PIO_NOT_A_PIN must be entered in this field. See +WVariant.h for valid entries. These entries are also used as a parameter to +pinPeripheral() with the exception of PIO_NOT_A_PIN and PIO_MULTI. The pinMode function +now calls pinPeripheral() with the desired mode. Note that this field is not used to +select between the different peripherals possible with each of the SERCOM and TIMER +functions. PeripheralAttribute is now used for this. When PIN_DESCRIPTION_TABLE_SIMPLE +is defined, PinType is not used (the pin is treated as PIO_MULTI). + +### PeripheralAttribute +This is an 8-bit bitfield used for various peripheral configuration. It is primarily +used to select between the different peripherals possible with each of the SERCOM and +TIMER functions. TIMER pins are individual, while SERCOM uses a group of two to four +pins. This group of pins can span both peripherals. For example, pin 19 (SPI1 SCK) on +the MT-D21E uses PER_ATTR_SERCOM_ALT while pin 22 (SPI1 MISO) uses PER_ATTR_SERCOM_STD. +Both TIMER and SERCOM can exist for each pin. This bitfield is also used to set the +pin drive strength and the input buffer configuration (ie: totem-pole, open-drain, +buskeeper, etc.). Starting with 1.6.8, the ADC instance on the D51 and C21 (there are +two) is also selected here. Note that the D51 adds a third timer attribute and +requires consultation of the datasheet IOSET tables. See WVariant.h for valid entries. + +### PinAttribute +This is a 32-bit bitfield used to list all of the valid peripheral functions that a +pin can attach to. This includes GPIO functions like PIN_ATTR_OUTPUT. Certain +attributes are shorthand for a combination of other attributes. PIN_ATTR_DIGITAL +includes all of the GPIO functions, while PIN_ATTR_TIMER includes both +PIN_ATTR_TIMER_PWM and PIN_ATTR_TIMER_CAPTURE (capture is not used yet). +PIN_ATTR_ANALOG is an alias to PIN_ATTR_ANALOG_ADC. This bitfield is useful for +limiting a pin to only input related functions or output functions. This allows a pin +to have a more flexible configuration, while restricting the direction (ie: to avoid +contention). See WVariant.h for valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. + +### TCChannel +This is the TC/TCC channel (if any) assigned to the pin. Some TC channels are available +on multiple pins. In general, only one pin should be configured in the pinDescription +table per TC channel. Starting with 1.6.8, the timer type is now encoded in this column +to support the D51, L21 and C21, which use TC numbers starting at 0 (rather than 3 as on +the D21). See WVariant.h for valid entries. + +### ADCChannelNumber +This is the ADC channel (if any) assigned to the pin. The D51 and C21 each have two ADC +instances, which are selected in the PeripheralAttribute column. See WVariant.h for +valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. + +### ExtInt +This is the interrupt (if any) assigned to the pin. Some interrupt numbers are +available on multiple pins. In general, only one pin should be configured in the +pinDescription table per interrupt number. Thus, for example, if an interrupt was +needed on pin 2, EXTERNAL_INT_2 can be moved from pin 18. See WVariant.h for valid +entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. + +### SetExtIntADC() +When PIN_DESCRIPTION_TABLE_SIMPLE is defined, ExtInt and ADCChannelNumber are combined +into one column using the SetExtIntADC() packing macro: SetExtIntADC(EXTERNAL_INT_4, +ADC_Channel2). If the pin is not usable, use SetExtIntADC(EXTERNAL_INT_NONE, No_ADC_Channel). + +### GCLKCCL +This column was added in 1.6.8-beta-b0. It is not yet used. It will eventually support +the Analog Comparators (AC), the Configurable Custom Logic (CCL) peripherals of the D51, +L21 and C21, and the GCLK outputs (inputs) of all of the MCUs. Not used with +PIN_DESCRIPTION_TABLE_SIMPLE. diff --git a/variants/MT_D11/debug_scripts/SAMD11D14AM.gdb b/variants/Generic_D11D14AM/debug_scripts/SAMD11D14AM.gdb similarity index 97% rename from variants/MT_D11/debug_scripts/SAMD11D14AM.gdb rename to variants/Generic_D11D14AM/debug_scripts/SAMD11D14AM.gdb index ebd381b55..2842b9322 100644 --- a/variants/MT_D11/debug_scripts/SAMD11D14AM.gdb +++ b/variants/Generic_D11D14AM/debug_scripts/SAMD11D14AM.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd11d14am" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd11d14am" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/MT_D11/linker_scripts/gcc/4KB_Bootloader/flash_16KB.ld b/variants/Generic_D11D14AM/linker_scripts/gcc/4KB_Bootloader/flash_16KB.ld similarity index 95% rename from variants/MT_D11/linker_scripts/gcc/4KB_Bootloader/flash_16KB.ld rename to variants/Generic_D11D14AM/linker_scripts/gcc/4KB_Bootloader/flash_16KB.ld index 1e2d5f052..6f9bc1576 100644 --- a/variants/MT_D11/linker_scripts/gcc/4KB_Bootloader/flash_16KB.ld +++ b/variants/Generic_D11D14AM/linker_scripts/gcc/4KB_Bootloader/flash_16KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x1000, LENGTH = 0x00004000-0x1000 /* First 4KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x1000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x1000, LENGTH = 0x00004000-0x1000 /* First 4KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x1000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/MT_D11/linker_scripts/gcc/No_Bootloader/flash_16KB.ld b/variants/Generic_D11D14AM/linker_scripts/gcc/No_Bootloader/flash_16KB.ld similarity index 95% rename from variants/MT_D11/linker_scripts/gcc/No_Bootloader/flash_16KB.ld rename to variants/Generic_D11D14AM/linker_scripts/gcc/No_Bootloader/flash_16KB.ld index bd135b3dd..674a40d60 100644 --- a/variants/MT_D11/linker_scripts/gcc/No_Bootloader/flash_16KB.ld +++ b/variants/Generic_D11D14AM/linker_scripts/gcc/No_Bootloader/flash_16KB.ld @@ -1,214 +1,214 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00004000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00004000 + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/MT_D11/openocd_scripts/SAMD11D14AM.cfg b/variants/Generic_D11D14AM/openocd_scripts/SAMD11D14AM.cfg similarity index 93% rename from variants/MT_D11/openocd_scripts/SAMD11D14AM.cfg rename to variants/Generic_D11D14AM/openocd_scripts/SAMD11D14AM.cfg index 5cbf9770f..318192046 100644 --- a/variants/MT_D11/openocd_scripts/SAMD11D14AM.cfg +++ b/variants/Generic_D11D14AM/openocd_scripts/SAMD11D14AM.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samd11d14am -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samdXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samd11d14am +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samdXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/MT_D11/pins_arduino.h b/variants/Generic_D11D14AM/pins_arduino.h similarity index 97% rename from variants/MT_D11/pins_arduino.h rename to variants/Generic_D11D14AM/pins_arduino.h index db0e40c3d..36ab06c77 100644 --- a/variants/MT_D11/pins_arduino.h +++ b/variants/Generic_D11D14AM/pins_arduino.h @@ -1,21 +1,21 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -// API compatibility -#include "variant.h" - +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" + diff --git a/variants/MT_D11/variant.cpp b/variants/Generic_D11D14AM/variant.cpp similarity index 98% rename from variants/MT_D11/variant.cpp rename to variants/Generic_D11D14AM/variant.cpp index ec95c56e0..68f998606 100644 --- a/variants/MT_D11/variant.cpp +++ b/variants/Generic_D11D14AM/variant.cpp @@ -1,243 +1,243 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* - * Modified 26 April 2018 by Justin Mattair - * for MattairTech boards (www.mattairtech.com) - * - * See README.md for documentation and pin mapping information - */ - - -#include "variant.h" - -/* - * Pins descriptions - */ -#if defined(PIN_MAP_STANDARD) -#if defined(PIN_DESCRIPTION_TABLE_SIMPLE) -const PinDescription g_APinDescription[]= -{ - // 0..1 pins don't exist - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - - // 2..7 - Analog capable pins (DAC available on 0) - { SetPortPin( PORTA, 2 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel0 ) }, - { SetPortPin( PORTA, 3 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel1 ) }, - { SetPortPin( PORTA, 4 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), TCC0_CH0, SetExtIntADC( EXTERNAL_INT_4, ADC_Channel2 ) }, - { SetPortPin( PORTA, 5 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), TCC0_CH1, SetExtIntADC( EXTERNAL_INT_5, ADC_Channel3 ) }, - { SetPortPin( PORTA, 6 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), TCC0_CH2, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel4 ) }, - { SetPortPin( PORTA, 7 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), TCC0_CH3, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel5 ) }, - - // 8..9 are unused (pins in use by 32.768KHz crystal, which in turn is used by the Arduino core) - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - - // 10..11 - SERCOM/SPI (SPI) or Analog or Digital functions (Button available on pin 9) - { SetPortPin( PORTA, 10 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_2, ADC_Channel8 ) }, // SPI MOSI - { SetPortPin( PORTA, 11 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel9 ) }, // SPI SCK - - // 12..13 pins don't exist - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - - // 14..15 - SERCOM/SPI (SPI) or Analog or Digital functions (Button available on pin 15) - { SetPortPin( PORTA, 14 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel6 ) }, // SPI MISO - { SetPortPin( PORTA, 15 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_1, ADC_Channel7 ) }, // Button / SPI SS (unused) - - // 16..17 Digital functions (LED available on pin 10) - { SetPortPin( PORTA, 16 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), TC1_CH0, SetExtIntADC( EXTERNAL_INT_0, No_ADC_Channel ) }, // LED - { SetPortPin( PORTA, 17 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), TC1_CH1, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, - - // 18..21 pins don't exist - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - - // 22..23 SERCOM/I2C (Wire) or Digital functions - { SetPortPin( PORTA, 22 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_6, No_ADC_Channel ) }, // SDA - { SetPortPin( PORTA, 23 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // SCL - - // 24..26 are unused (25 and 26 in use by USB_NEGATIVE and USB_POSITIVE, pin 26 does not exist) - { SetPortPin( PORTA, 24 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // USB/DM - { SetPortPin( PORTA, 25 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // USB/DP - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - - // 27..29 Digital functions (pin 28 is Reset and pin 29 does not exist) - { SetPortPin( PORTA, 27 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_7, No_ADC_Channel ) }, - { SetPortPin( PORTA, 28 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused (Reset) - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - - // 30..31 SERCOM/UART (Serial1) or Digital functions or Debug interface (SWD CLK and SWD IO) - { SetPortPin( PORTA, 30 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), TC2_CH0, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // TX / SWD CLK - { SetPortPin( PORTA, 31 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), TC2_CH1, SetExtIntADC( EXTERNAL_INT_3, No_ADC_Channel ) }, // RX / SWD IO -} ; -#else -const PinDescription g_APinDescription[]= -{ - // 0..1 pins don't exist - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 2..7 - Analog capable pins (DAC available on 2) - { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 4, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TCC0_CH0, ADC_Channel2, EXTERNAL_INT_4, GCLK_CCL_NONE }, - { PORTA, 5, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TCC0_CH1, ADC_Channel3, EXTERNAL_INT_5, GCLK_CCL_NONE }, - { PORTA, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH2, ADC_Channel4, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 7, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH3, ADC_Channel5, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - - // 8..9 are unused (pins in use by 32.768KHz crystal, which in turn is used by the Arduino core) - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 10..11 - SERCOM/SPI (SPI) or Analog or Digital functions - { PORTA, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel8, EXTERNAL_INT_2, GCLK_CCL_NONE }, // SPI MOSI - { PORTA, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel9, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SPI SCK - - // 12..13 pins don't exist - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 14..15 - SERCOM/SPI (SPI) or Analog or Digital functions (Button available on pin 15) - { PORTA, 14, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel6, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, // SPI MISO - { PORTA, 15, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel7, EXTERNAL_INT_1, GCLK_CCL_NONE }, // Button / SPI SS (unused) - - // 16..17 Digital functions (LED available on pin 16) - { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TC1_CH0, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, // LED - { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC1_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - - // 18..21 pins don't exist - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 22..23 SERCOM/I2C (Wire) or Digital functions - { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, // SDA - { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SCL - - // 24..26 are unused (25 and 26 in use by USB_NEGATIVE and USB_POSITIVE, pin 26 does not exist) - { PORTA, 24, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM - { PORTA, 25, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 27..29 Digital functions (pin 28 is Reset and pin 29 does not exist) - { PORTA, 27, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_7, GCLK_CCL_NONE }, - { PORTA, 28, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused (Reset) - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 30..31 SERCOM/UART (Serial1) or Digital functions or Debug interface (SWD CLK and SWD IO) - { PORTA, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC2_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // TX / SWD CLK - { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC2_CH1, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, // RX / SWD IO -} ; -#endif -#elif defined(PIN_MAP_COMPACT) -#if defined(PIN_DESCRIPTION_TABLE_SIMPLE) -const PinDescription g_APinDescription[]= -{ - // 0..5 - Analog capable pins (DAC available on 0) - { SetPortPin( PORTA, 2 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel0 ) }, - { SetPortPin( PORTA, 3 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel1 ) }, - { SetPortPin( PORTA, 4 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), TCC0_CH0, SetExtIntADC( EXTERNAL_INT_4, ADC_Channel2 ) }, - { SetPortPin( PORTA, 5 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), TCC0_CH1, SetExtIntADC( EXTERNAL_INT_5, ADC_Channel3 ) }, - { SetPortPin( PORTA, 6 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), TCC0_CH2, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel4 ) }, - { SetPortPin( PORTA, 7 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), TCC0_CH3, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel5 ) }, - - // 6..9 - SERCOM/SPI (SPI) or Analog or Digital functions (Button available on pin 9) - { SetPortPin( PORTA, 10 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_2, ADC_Channel8 ) }, // SPI MOSI - { SetPortPin( PORTA, 11 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel9 ) }, // SPI SCK - { SetPortPin( PORTA, 14 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel6 ) }, // SPI MISO - { SetPortPin( PORTA, 15 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_1, ADC_Channel7 ) }, // Button / SPI SS (unused) - - // 10..11 Digital functions (LED available on pin 10) - { SetPortPin( PORTA, 16 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), TC1_CH0, SetExtIntADC( EXTERNAL_INT_0, No_ADC_Channel ) }, // LED - { SetPortPin( PORTA, 17 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), TC1_CH1, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, - - // 12..13 SERCOM/I2C (Wire) or Digital functions - { SetPortPin( PORTA, 22 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_6, No_ADC_Channel ) }, // SDA - { SetPortPin( PORTA, 23 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // SCL - - // 14 Digital functions - { SetPortPin( PORTA, 27 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_7, No_ADC_Channel ) }, - - // 15..16 SERCOM/UART (Serial1) or Digital functions or Debug interface (SWD CLK and SWD IO) - { SetPortPin( PORTA, 30 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), TC2_CH0, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // TX / SWD CLK - { SetPortPin( PORTA, 31 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), TC2_CH1, SetExtIntADC( EXTERNAL_INT_3, No_ADC_Channel ) }, // RX / SWD IO -} ; -#else -const PinDescription g_APinDescription[]= -{ - // 0..5 - Analog capable pins (DAC available on 0) - { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 4, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TCC0_CH0, ADC_Channel2, EXTERNAL_INT_4, GCLK_CCL_NONE }, - { PORTA, 5, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TCC0_CH1, ADC_Channel3, EXTERNAL_INT_5, GCLK_CCL_NONE }, - { PORTA, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH2, ADC_Channel4, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 7, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH3, ADC_Channel5, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - - // 6..9 - SERCOM/SPI (SPI) or Analog or Digital functions (Button available on pin 9) - { PORTA, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel8, EXTERNAL_INT_2, GCLK_CCL_NONE }, // SPI MOSI - { PORTA, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel9, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SPI SCK - { PORTA, 14, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel6, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, // SPI MISO - { PORTA, 15, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel7, EXTERNAL_INT_1, GCLK_CCL_NONE }, // Button / SPI SS (unused) - - // 10..11 Digital functions (LED available on pin 10) - { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TC1_CH0, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, // LED - { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC1_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - - // 12..13 SERCOM/I2C (Wire) or Digital functions - { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, // SDA - { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SCL - - // 14 Digital functions - { PORTA, 27, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_7, GCLK_CCL_NONE }, - - // 15..16 SERCOM/UART (Serial1) or Digital functions or Debug interface (SWD CLK and SWD IO) - { PORTA, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC2_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // TX / SWD CLK - { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC2_CH1, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, // RX / SWD IO -} ; -#endif -#endif - -const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TC1, TC2 } ; - -// Multi-serial objects instantiation -SERCOM sercom0( SERCOM0 ) ; -SERCOM sercom1( SERCOM1 ) ; -SERCOM sercom2( SERCOM2 ) ; - -#if defined(ONE_UART) || defined(TWO_UART) -Uart Serial1( SERCOM_INSTANCE_SERIAL1, PIN_SERIAL1_RX, PIN_SERIAL1_TX, PAD_SERIAL1_RX, PAD_SERIAL1_TX ) ; - -void SERCOM1_Handler() -{ - Serial1.IrqHandler(); -} -#endif - -#if defined(TWO_UART) -Uart Serial2( SERCOM_INSTANCE_SERIAL2, PIN_SERIAL2_RX, PIN_SERIAL2_TX, PAD_SERIAL2_RX, PAD_SERIAL2_TX ) ; - -void SERCOM0_Handler() -{ - Serial2.IrqHandler(); -} -#endif +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* + * Modified 26 April 2018 by Justin Mattair + * for MattairTech boards (www.mattairtech.com) + * + * See README.md for documentation and pin mapping information + */ + + +#include "variant.h" + +/* + * Pins descriptions + */ +#if defined(PIN_MAP_STANDARD) +#if defined(PIN_DESCRIPTION_TABLE_SIMPLE) +const PinDescription g_APinDescription[]= +{ + // 0..1 pins don't exist + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + + // 2..7 - Analog capable pins (DAC available on 0) + { SetPortPin( PORTA, 2 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel0 ) }, + { SetPortPin( PORTA, 3 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel1 ) }, + { SetPortPin( PORTA, 4 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), TCC0_CH0, SetExtIntADC( EXTERNAL_INT_4, ADC_Channel2 ) }, + { SetPortPin( PORTA, 5 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), TCC0_CH1, SetExtIntADC( EXTERNAL_INT_5, ADC_Channel3 ) }, + { SetPortPin( PORTA, 6 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), TCC0_CH2, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel4 ) }, + { SetPortPin( PORTA, 7 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), TCC0_CH3, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel5 ) }, + + // 8..9 are unused (pins in use by 32.768KHz crystal, which in turn is used by the Arduino core) + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + + // 10..11 - SERCOM/SPI (SPI) or Analog or Digital functions (Button available on pin 9) + { SetPortPin( PORTA, 10 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_2, ADC_Channel8 ) }, // SPI MOSI + { SetPortPin( PORTA, 11 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel9 ) }, // SPI SCK + + // 12..13 pins don't exist + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + + // 14..15 - SERCOM/SPI (SPI) or Analog or Digital functions (Button available on pin 15) + { SetPortPin( PORTA, 14 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel6 ) }, // SPI MISO + { SetPortPin( PORTA, 15 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_1, ADC_Channel7 ) }, // Button / SPI SS (unused) + + // 16..17 Digital functions (LED available on pin 10) + { SetPortPin( PORTA, 16 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), TC1_CH0, SetExtIntADC( EXTERNAL_INT_0, No_ADC_Channel ) }, // LED + { SetPortPin( PORTA, 17 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), TC1_CH1, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, + + // 18..21 pins don't exist + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + + // 22..23 SERCOM/I2C (Wire) or Digital functions + { SetPortPin( PORTA, 22 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_6, No_ADC_Channel ) }, // SDA + { SetPortPin( PORTA, 23 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // SCL + + // 24..26 are unused (25 and 26 in use by USB_NEGATIVE and USB_POSITIVE, pin 26 does not exist) + { SetPortPin( PORTA, 24 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // USB/DM + { SetPortPin( PORTA, 25 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // USB/DP + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + + // 27..29 Digital functions (pin 28 is Reset and pin 29 does not exist) + { SetPortPin( PORTA, 27 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_7, No_ADC_Channel ) }, + { SetPortPin( PORTA, 28 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused (Reset) + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + + // 30..31 SERCOM/UART (Serial1) or Digital functions or Debug interface (SWD CLK and SWD IO) + { SetPortPin( PORTA, 30 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), TC2_CH0, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // TX / SWD CLK + { SetPortPin( PORTA, 31 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), TC2_CH1, SetExtIntADC( EXTERNAL_INT_3, No_ADC_Channel ) }, // RX / SWD IO +} ; +#else +const PinDescription g_APinDescription[]= +{ + // 0..1 pins don't exist + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + + // 2..7 - Analog capable pins (DAC available on 2) + { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 4, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TCC0_CH0, ADC_Channel2, EXTERNAL_INT_4, GCLK_CCL_NONE }, + { PORTA, 5, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TCC0_CH1, ADC_Channel3, EXTERNAL_INT_5, GCLK_CCL_NONE }, + { PORTA, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH2, ADC_Channel4, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 7, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH3, ADC_Channel5, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + + // 8..9 are unused (pins in use by 32.768KHz crystal, which in turn is used by the Arduino core) + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + + // 10..11 - SERCOM/SPI (SPI) or Analog or Digital functions + { PORTA, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel8, EXTERNAL_INT_2, GCLK_CCL_NONE }, // SPI MOSI + { PORTA, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel9, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SPI SCK + + // 12..13 pins don't exist + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + + // 14..15 - SERCOM/SPI (SPI) or Analog or Digital functions (Button available on pin 15) + { PORTA, 14, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel6, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, // SPI MISO + { PORTA, 15, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel7, EXTERNAL_INT_1, GCLK_CCL_NONE }, // Button / SPI SS (unused) + + // 16..17 Digital functions (LED available on pin 16) + { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TC1_CH0, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, // LED + { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC1_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + + // 18..21 pins don't exist + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + + // 22..23 SERCOM/I2C (Wire) or Digital functions + { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, // SDA + { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SCL + + // 24..26 are unused (25 and 26 in use by USB_NEGATIVE and USB_POSITIVE, pin 26 does not exist) + { PORTA, 24, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM + { PORTA, 25, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + + // 27..29 Digital functions (pin 28 is Reset and pin 29 does not exist) + { PORTA, 27, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_7, GCLK_CCL_NONE }, + { PORTA, 28, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused (Reset) + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + + // 30..31 SERCOM/UART (Serial1) or Digital functions or Debug interface (SWD CLK and SWD IO) + { PORTA, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC2_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // TX / SWD CLK + { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC2_CH1, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, // RX / SWD IO +} ; +#endif +#elif defined(PIN_MAP_COMPACT) +#if defined(PIN_DESCRIPTION_TABLE_SIMPLE) +const PinDescription g_APinDescription[]= +{ + // 0..5 - Analog capable pins (DAC available on 0) + { SetPortPin( PORTA, 2 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel0 ) }, + { SetPortPin( PORTA, 3 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel1 ) }, + { SetPortPin( PORTA, 4 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), TCC0_CH0, SetExtIntADC( EXTERNAL_INT_4, ADC_Channel2 ) }, + { SetPortPin( PORTA, 5 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), TCC0_CH1, SetExtIntADC( EXTERNAL_INT_5, ADC_Channel3 ) }, + { SetPortPin( PORTA, 6 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), TCC0_CH2, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel4 ) }, + { SetPortPin( PORTA, 7 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), TCC0_CH3, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel5 ) }, + + // 6..9 - SERCOM/SPI (SPI) or Analog or Digital functions (Button available on pin 9) + { SetPortPin( PORTA, 10 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_2, ADC_Channel8 ) }, // SPI MOSI + { SetPortPin( PORTA, 11 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel9 ) }, // SPI SCK + { SetPortPin( PORTA, 14 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel6 ) }, // SPI MISO + { SetPortPin( PORTA, 15 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_1, ADC_Channel7 ) }, // Button / SPI SS (unused) + + // 10..11 Digital functions (LED available on pin 10) + { SetPortPin( PORTA, 16 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), TC1_CH0, SetExtIntADC( EXTERNAL_INT_0, No_ADC_Channel ) }, // LED + { SetPortPin( PORTA, 17 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), TC1_CH1, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, + + // 12..13 SERCOM/I2C (Wire) or Digital functions + { SetPortPin( PORTA, 22 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_6, No_ADC_Channel ) }, // SDA + { SetPortPin( PORTA, 23 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // SCL + + // 14 Digital functions + { SetPortPin( PORTA, 27 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_7, No_ADC_Channel ) }, + + // 15..16 SERCOM/UART (Serial1) or Digital functions or Debug interface (SWD CLK and SWD IO) + { SetPortPin( PORTA, 30 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), TC2_CH0, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // TX / SWD CLK + { SetPortPin( PORTA, 31 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), TC2_CH1, SetExtIntADC( EXTERNAL_INT_3, No_ADC_Channel ) }, // RX / SWD IO +} ; +#else +const PinDescription g_APinDescription[]= +{ + // 0..5 - Analog capable pins (DAC available on 0) + { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 4, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TCC0_CH0, ADC_Channel2, EXTERNAL_INT_4, GCLK_CCL_NONE }, + { PORTA, 5, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TCC0_CH1, ADC_Channel3, EXTERNAL_INT_5, GCLK_CCL_NONE }, + { PORTA, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH2, ADC_Channel4, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 7, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH3, ADC_Channel5, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + + // 6..9 - SERCOM/SPI (SPI) or Analog or Digital functions (Button available on pin 9) + { PORTA, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel8, EXTERNAL_INT_2, GCLK_CCL_NONE }, // SPI MOSI + { PORTA, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel9, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SPI SCK + { PORTA, 14, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel6, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, // SPI MISO + { PORTA, 15, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel7, EXTERNAL_INT_1, GCLK_CCL_NONE }, // Button / SPI SS (unused) + + // 10..11 Digital functions (LED available on pin 10) + { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TC1_CH0, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, // LED + { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC1_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + + // 12..13 SERCOM/I2C (Wire) or Digital functions + { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, // SDA + { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SCL + + // 14 Digital functions + { PORTA, 27, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_7, GCLK_CCL_NONE }, + + // 15..16 SERCOM/UART (Serial1) or Digital functions or Debug interface (SWD CLK and SWD IO) + { PORTA, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC2_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // TX / SWD CLK + { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC2_CH1, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, // RX / SWD IO +} ; +#endif +#endif + +const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TC1, TC2 } ; + +// Multi-serial objects instantiation +SERCOM sercom0( SERCOM0 ) ; +SERCOM sercom1( SERCOM1 ) ; +SERCOM sercom2( SERCOM2 ) ; + +#if defined(ONE_UART) || defined(TWO_UART) +Uart Serial1( SERCOM_INSTANCE_SERIAL1, PIN_SERIAL1_RX, PIN_SERIAL1_TX, PAD_SERIAL1_RX, PAD_SERIAL1_TX ) ; + +void SERCOM1_Handler() +{ + Serial1.IrqHandler(); +} +#endif + +#if defined(TWO_UART) +Uart Serial2( SERCOM_INSTANCE_SERIAL2, PIN_SERIAL2_RX, PIN_SERIAL2_TX, PAD_SERIAL2_RX, PAD_SERIAL2_TX ) ; + +void SERCOM0_Handler() +{ + Serial2.IrqHandler(); +} +#endif diff --git a/variants/MT_D11/variant.h b/variants/Generic_D11D14AM/variant.h similarity index 96% rename from variants/MT_D11/variant.h rename to variants/Generic_D11D14AM/variant.h index 22c7abb4c..cd024d8ce 100644 --- a/variants/MT_D11/variant.h +++ b/variants/Generic_D11D14AM/variant.h @@ -1,397 +1,397 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* - * Modified 16 June 2018 by Justin Mattair (www.mattairtech.com) - * See README.md for documentation and pin mapping information - */ - -#ifndef _VARIANT_MATTAIRTECH_MT_D11_ -#define _VARIANT_MATTAIRTECH_MT_D11_ - -/* This variant requires the MattairTech SAM D|L|C Core for Arduino >= 1.6.18-beta-b1. - * The format is different than the stock Arduino SAMD core, - * which uses ARDUINO_SAMD_VARIANT_COMPLIANCE instead. - */ -#define MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE 10618 - -/*---------------------------------------------------------------------------- - * Clock Configuration - *----------------------------------------------------------------------------*/ - -/** Master clock frequency (also Fcpu frequency) */ -#define VARIANT_MCK (48000000ul) - -/* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ - * must also be defined with the external crystal frequency in Hertz. - */ -#define HS_CRYSTAL_FREQUENCY_HERTZ 16000000UL - -/* If the PLL is used (CLOCKCONFIG_32768HZ_CRYSTAL, or CLOCKCONFIG_HS_CRYSTAL - * defined), then PLL_FRACTIONAL_ENABLED can be defined, which will result in - * a more accurate 48MHz output frequency at the expense of increased jitter. - */ -//#define PLL_FRACTIONAL_ENABLED - -/* If both PLL_FAST_STARTUP and CLOCKCONFIG_HS_CRYSTAL are defined, the crystal - * will be divided down to 1MHz - 2MHz, rather than 32KHz - 64KHz, before being - * multiplied by the PLL. This will result in a faster lock time for the PLL, - * however, it will also result in a less accurate PLL output frequency if the - * crystal is not divisible (without remainder) by 1MHz. In this case, define - * PLL_FRACTIONAL_ENABLED as well. - */ -//#define PLL_FAST_STARTUP - -/* The fine calibration value for DFLL open-loop mode is defined here. - * The coarse calibration value is loaded from NVM OTP (factory calibration values). - */ -#define NVM_SW_CALIB_DFLL48M_FINE_VAL (512) - -/*---------------------------------------------------------------------------- - * Headers - *----------------------------------------------------------------------------*/ - -#include "WVariant.h" -#include "sam.h" -#include "../../config.h" - -#ifdef __cplusplus -#include "SERCOM.h" -#include "Uart.h" -#endif // __cplusplus - -#ifdef __cplusplus -extern "C" -{ -#endif // __cplusplus - -/*---------------------------------------------------------------------------- - * Pins - *----------------------------------------------------------------------------*/ - -// Number of pins defined in PinDescription array -#define PIN_MAP_STANDARD -//#define PIN_MAP_COMPACT - -#if defined PIN_MAP_STANDARD - #define NUM_PIN_DESCRIPTION_ENTRIES (32u) -#elif defined PIN_MAP_COMPACT - #define NUM_PIN_DESCRIPTION_ENTRIES (17u) -#else - #error "variant.h: You must set PIN_MAP_STANDARD or PIN_MAP_COMPACT" -#endif - -#define PINS_COUNT NUM_PIN_DESCRIPTION_ENTRIES -#define NUM_DIGITAL_PINS PINS_COUNT -#define NUM_ANALOG_INPUTS (10u) -#define NUM_ANALOG_OUTPUTS (1u) -#define analogInputToDigitalPin(p) (p) - -#define digitalPinToPort(P) ( &(PORT->Group[GetPort(P)]) ) -#define digitalPinToBitMask(P) ( 1 << GetPin(P) ) - -#if defined(PIN_DESCRIPTION_TABLE_SIMPLE) - #define digitalPinHasPWM(P) ( g_APinDescription[P].ulTCChannel != NOT_ON_TIMER ) -#else - #define digitalPinHasPWM(P) ( (g_APinDescription[P].ulPinAttribute & PIN_ATTR_TIMER_PWM) == PIN_ATTR_TIMER_PWM ) -#endif - -//#define analogInPinToBit(P) ( ) -#define portOutputRegister(port) ( &(port->OUT.reg) ) -#define portInputRegister(port) ( &(port->IN.reg) ) -#define portModeRegister(port) ( &(port->DIR.reg) ) - -/* - * digitalPinToTimer(..) is AVR-specific and is not defined for SAMD - * architecture. If you need to check if a pin supports PWM you must - * use digitalPinHasPWM(..). - * - * https://github.com/arduino/Arduino/issues/1833 - */ -// #define digitalPinToTimer(P) - -/* LEDs - * None of these defines are currently used by the core. - * The MT-D11 onboard LED is on pin 16. - * The RX and TX LEDs are not present. - * You may optionally add them to any free pins. - */ -#if defined PIN_MAP_STANDARD -#define PIN_LED_13 (16u) -#define PIN_LED_RXL (10u) -#define PIN_LED_TXL (11u) -#elif defined PIN_MAP_COMPACT -#define PIN_LED_13 (10u) -#define PIN_LED_RXL (6u) -#define PIN_LED_TXL (7u) -#endif - -#define PIN_LED PIN_LED_13 -#define PIN_LED2 PIN_LED_RXL -#define PIN_LED3 PIN_LED_TXL -#define LED_BUILTIN PIN_LED_13 - -/* Buttons - * Note that Button A is connected to Reset by default. - * A solder jumper can be changed to route Button A to pin 15 instead. - * Thre is a debouncing capacitor connected, so delay reading the pin - * at least 6ms after turning on the pullup to allow the capacitor to charge. - */ -#if defined PIN_MAP_STANDARD -#define BUTTON (15u) -#elif defined PIN_MAP_COMPACT -#define BUTTON (9u) -#endif - -#define BUTTON_BUILTIN BUTTON - - -/* - * Analog pins - */ -#if defined PIN_MAP_STANDARD -#define PIN_A2 (2ul) -#define PIN_A3 (3ul) -#define PIN_A4 (4ul) -#define PIN_A5 (5ul) -#define PIN_A6 (6ul) -#define PIN_A7 (7ul) -#define PIN_A10 (10ul) -#define PIN_A11 (11ul) -#define PIN_A14 (14ul) -#define PIN_A15 (15ul) -#define PIN_DAC0 (2ul) -#elif defined PIN_MAP_COMPACT -#define PIN_A2 (0ul) -#define PIN_A3 (1ul) -#define PIN_A4 (2ul) -#define PIN_A5 (3ul) -#define PIN_A6 (4ul) -#define PIN_A7 (5ul) -#define PIN_A10 (6ul) -#define PIN_A11 (7ul) -#define PIN_A14 (8ul) -#define PIN_A15 (9ul) -#define PIN_DAC0 (0ul) -#endif - -static const uint8_t A2 = PIN_A2; -static const uint8_t A3 = PIN_A3; -static const uint8_t A4 = PIN_A4; -static const uint8_t A5 = PIN_A5; -static const uint8_t A6 = PIN_A6; -static const uint8_t A7 = PIN_A7; -static const uint8_t A10 = PIN_A10; -static const uint8_t A11 = PIN_A11; -static const uint8_t A14 = PIN_A14; -static const uint8_t A15 = PIN_A15; -static const uint8_t DAC0 = PIN_DAC0; - -#define ADC_RESOLUTION 12 - -// #define REMAP_ANALOG_PIN_ID(pin) if ( pin < A0 ) pin += A0 - -/* Set default analog voltage reference */ -#define VARIANT_AR_DEFAULT AR_DEFAULT - -/* Reference voltage pins (define even if not enabled with PIN_ATTR_REF in the PinDescription table) */ -#if defined PIN_MAP_STANDARD -#define REFA_PIN (3ul) -#define REFB_PIN (4ul) -#elif defined PIN_MAP_COMPACT -#define REFA_PIN (1ul) -#define REFB_PIN (2ul) -#endif - - -// The ATN pin may be used in the future as the first SPI chip select. -// On boards that do not have the Arduino physical form factor, it can to set to any free pin. -#if defined PIN_MAP_STANDARD -#define PIN_ATN (15ul) -#elif defined PIN_MAP_COMPACT -#define PIN_ATN (9ul) -#endif -static const uint8_t ATN = PIN_ATN; - - -/* - * Serial interfaces - */ -// Serial1 -#if defined PIN_MAP_STANDARD -#define PIN_SERIAL1_RX (31ul) -#define PIN_SERIAL1_TX (30ul) -#elif defined PIN_MAP_COMPACT -#define PIN_SERIAL1_RX (16ul) -#define PIN_SERIAL1_TX (15ul) -#endif - -#define PAD_SERIAL1_TX (UART_TX_PAD_2) -#define PAD_SERIAL1_RX (SERCOM_RX_PAD_3) -#define SERCOM_INSTANCE_SERIAL1 &sercom1 - -// Serial2 -#if defined PIN_MAP_STANDARD -#define PIN_SERIAL2_RX (11ul) -#define PIN_SERIAL2_TX (10ul) -#elif defined PIN_MAP_COMPACT -#define PIN_SERIAL2_RX (7ul) -#define PIN_SERIAL2_TX (6ul) -#endif - -#define PAD_SERIAL2_TX (UART_TX_PAD_2) -#define PAD_SERIAL2_RX (SERCOM_RX_PAD_3) -#define SERCOM_INSTANCE_SERIAL2 &sercom0 - - -/* - * SPI Interfaces - */ -#if defined(ONE_SPI) -#define SPI_INTERFACES_COUNT 1 -#else -#define SPI_INTERFACES_COUNT 0 -#endif - -#if defined PIN_MAP_STANDARD -#define PIN_SPI_MISO (14u) -#define PIN_SPI_MOSI (10u) -#define PIN_SPI_SCK (11u) -#define PIN_SPI_SS (15u) -#elif defined PIN_MAP_COMPACT -#define PIN_SPI_MISO (8u) -#define PIN_SPI_MOSI (6u) -#define PIN_SPI_SCK (7u) -#define PIN_SPI_SS (9u) -#endif - -#define PERIPH_SPI sercom0 -#define PAD_SPI_TX SPI_PAD_2_SCK_3 -#define PAD_SPI_RX SERCOM_RX_PAD_0 - -static const uint8_t SS = PIN_SPI_SS ; // The SERCOM SS PAD is available on this pin but HW SS isn't used. Set here only for reference. -static const uint8_t MOSI = PIN_SPI_MOSI ; -static const uint8_t MISO = PIN_SPI_MISO ; -static const uint8_t SCK = PIN_SPI_SCK ; - - -/* - * Wire Interfaces - */ -#if defined(ONE_WIRE) -#define WIRE_INTERFACES_COUNT 1 -#else -#define WIRE_INTERFACES_COUNT 0 -#endif - -#if defined PIN_MAP_STANDARD -#define PIN_WIRE_SDA (22u) -#define PIN_WIRE_SCL (23u) -#elif defined PIN_MAP_COMPACT -#define PIN_WIRE_SDA (12u) -#define PIN_WIRE_SCL (13u) -#endif - -#define PERIPH_WIRE sercom2 -#define WIRE_IT_HANDLER SERCOM2_Handler - -static const uint8_t SDA = PIN_WIRE_SDA; -static const uint8_t SCL = PIN_WIRE_SCL; - - -/* - * USB - Define PIN_USB_HOST_ENABLE to assert the defined pin to - * PIN_USB_HOST_ENABLE_VALUE during startup. Leave undefined to disable this pin. - */ -#if defined PIN_MAP_STANDARD -#define PIN_USB_DM (24ul) -#define PIN_USB_DP (25ul) -//#define PIN_USB_HOST_ENABLE (17ul) -#elif defined PIN_MAP_COMPACT -// USB pins not directly accessible using PIN_MAP_COMPACT -#define PIN_USB_DM (0ul) -#define PIN_USB_DP (0ul) -//#define PIN_USB_HOST_ENABLE (0ul) -#endif - -#define PIN_USB_HOST_ENABLE_VALUE HIGH - -#ifdef __cplusplus -} -#endif - - -/*---------------------------------------------------------------------------- - * Arduino objects - C++ only - *----------------------------------------------------------------------------*/ - -#ifdef __cplusplus - -/* ========================= - * ===== SERCOM DEFINITION - * ========================= -*/ -extern SERCOM sercom0; -extern SERCOM sercom1; -extern SERCOM sercom2; - -extern Uart Serial1; -extern Uart Serial2; - -#endif - -// These serial port names are intended to allow libraries and architecture-neutral -// sketches to automatically default to the correct port name for a particular type -// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, -// the first hardware serial port whose RX/TX pins are not dedicated to another use. -// -// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor -// -// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial -// -// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library -// -// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. -// -// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX -// pins are NOT connected to anything by default. -#define SERIAL_PORT_USBVIRTUAL SerialUSB -// SERIAL_PORT_MONITOR seems to be used only by the USB Host library (as of 1.6.5). -// It normally allows debugging output on the USB programming port, while the USB host uses the USB native port. -// The programming port is connected to a hardware UART through a USB-Serial bridge (EDBG chip) on the Zero. -// Boards that do not have the EDBG chip will have to connect a USB-TTL serial adapter to 'Serial' to get -// the USB Host debugging output. -#define SERIAL_PORT_MONITOR Serial1 -// Serial has no physical pins broken out, so it's not listed as HARDWARE port -#define SERIAL_PORT_HARDWARE Serial1 -#define SERIAL_PORT_HARDWARE_OPEN Serial1 - -// The MT-D11 does not have the EDBG support chip, which provides a USB-UART bridge -// accessible using Serial (the Arduino serial monitor is normally connected to this). -// So, the USB virtual serial port (SerialUSB) must be used to communicate with the host. -// Because most sketches use Serial to print to the monitor, it is aliased to SerialUSB. -// Remember to use while(!Serial); to wait for a connection before Serial printing. - -// When USB CDC is enabled, Serial refers to SerialUSB, otherwise it refers to Serial1. -#if defined(CDC_ONLY) || defined(CDC_HID) || defined(WITH_CDC) -#define Serial SerialUSB -#else -#define Serial Serial1 -#endif - -#endif /* _VARIANT_MATTAIRTECH_MT_D11_ */ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* + * Modified 16 June 2018 by Justin Mattair (www.mattairtech.com) + * See README.md for documentation and pin mapping information + */ + +#ifndef _VARIANT_GENERIC_D11D14AM_ +#define _VARIANT_GENERIC_D11D14AM_ + +/* This variant requires the MattairTech SAM D|L|C Core for Arduino >= 1.6.18-beta-b1. + * The format is different than the stock Arduino SAMD core, + * which uses ARDUINO_SAMD_VARIANT_COMPLIANCE instead. + */ +#define MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE 10618 + +/*---------------------------------------------------------------------------- + * Clock Configuration + *----------------------------------------------------------------------------*/ + +/** Master clock frequency (also Fcpu frequency) */ +#define VARIANT_MCK (48000000ul) + +/* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ + * must also be defined with the external crystal frequency in Hertz. + */ +#define HS_CRYSTAL_FREQUENCY_HERTZ 16000000UL + +/* If the PLL is used (CLOCKCONFIG_32768HZ_CRYSTAL, or CLOCKCONFIG_HS_CRYSTAL + * defined), then PLL_FRACTIONAL_ENABLED can be defined, which will result in + * a more accurate 48MHz output frequency at the expense of increased jitter. + */ +//#define PLL_FRACTIONAL_ENABLED + +/* If both PLL_FAST_STARTUP and CLOCKCONFIG_HS_CRYSTAL are defined, the crystal + * will be divided down to 1MHz - 2MHz, rather than 32KHz - 64KHz, before being + * multiplied by the PLL. This will result in a faster lock time for the PLL, + * however, it will also result in a less accurate PLL output frequency if the + * crystal is not divisible (without remainder) by 1MHz. In this case, define + * PLL_FRACTIONAL_ENABLED as well. + */ +//#define PLL_FAST_STARTUP + +/* The fine calibration value for DFLL open-loop mode is defined here. + * The coarse calibration value is loaded from NVM OTP (factory calibration values). + */ +#define NVM_SW_CALIB_DFLL48M_FINE_VAL (512) + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" +#include "sam.h" +#include "../../config.h" + +#ifdef __cplusplus +#include "SERCOM.h" +#include "Uart.h" +#endif // __cplusplus + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +/*---------------------------------------------------------------------------- + * Pins + *----------------------------------------------------------------------------*/ + +// Number of pins defined in PinDescription array +#define PIN_MAP_STANDARD +//#define PIN_MAP_COMPACT + +#if defined PIN_MAP_STANDARD + #define NUM_PIN_DESCRIPTION_ENTRIES (32u) +#elif defined PIN_MAP_COMPACT + #define NUM_PIN_DESCRIPTION_ENTRIES (17u) +#else + #error "variant.h: You must set PIN_MAP_STANDARD or PIN_MAP_COMPACT" +#endif + +#define PINS_COUNT NUM_PIN_DESCRIPTION_ENTRIES +#define NUM_DIGITAL_PINS PINS_COUNT +#define NUM_ANALOG_INPUTS (10u) +#define NUM_ANALOG_OUTPUTS (1u) +#define analogInputToDigitalPin(p) (p) + +#define digitalPinToPort(P) ( &(PORT->Group[GetPort(P)]) ) +#define digitalPinToBitMask(P) ( 1 << GetPin(P) ) + +#if defined(PIN_DESCRIPTION_TABLE_SIMPLE) + #define digitalPinHasPWM(P) ( g_APinDescription[P].ulTCChannel != NOT_ON_TIMER ) +#else + #define digitalPinHasPWM(P) ( (g_APinDescription[P].ulPinAttribute & PIN_ATTR_TIMER_PWM) == PIN_ATTR_TIMER_PWM ) +#endif + +//#define analogInPinToBit(P) ( ) +#define portOutputRegister(port) ( &(port->OUT.reg) ) +#define portInputRegister(port) ( &(port->IN.reg) ) +#define portModeRegister(port) ( &(port->DIR.reg) ) + +/* + * digitalPinToTimer(..) is AVR-specific and is not defined for SAMD + * architecture. If you need to check if a pin supports PWM you must + * use digitalPinHasPWM(..). + * + * https://github.com/arduino/Arduino/issues/1833 + */ +// #define digitalPinToTimer(P) + +/* LEDs + * None of these defines are currently used by the core. + * The MT-D11 onboard LED is on pin 16. + * The RX and TX LEDs are not present. + * You may optionally add them to any free pins. + */ +#if defined PIN_MAP_STANDARD +#define PIN_LED_13 (16u) +#define PIN_LED_RXL (10u) +#define PIN_LED_TXL (11u) +#elif defined PIN_MAP_COMPACT +#define PIN_LED_13 (10u) +#define PIN_LED_RXL (6u) +#define PIN_LED_TXL (7u) +#endif + +#define PIN_LED PIN_LED_13 +#define PIN_LED2 PIN_LED_RXL +#define PIN_LED3 PIN_LED_TXL +#define LED_BUILTIN PIN_LED_13 + +/* Buttons + * Note that Button A is connected to Reset by default. + * A solder jumper can be changed to route Button A to pin 15 instead. + * Thre is a debouncing capacitor connected, so delay reading the pin + * at least 6ms after turning on the pullup to allow the capacitor to charge. + */ +#if defined PIN_MAP_STANDARD +#define BUTTON (15u) +#elif defined PIN_MAP_COMPACT +#define BUTTON (9u) +#endif + +#define BUTTON_BUILTIN BUTTON + + +/* + * Analog pins + */ +#if defined PIN_MAP_STANDARD +#define PIN_A2 (2ul) +#define PIN_A3 (3ul) +#define PIN_A4 (4ul) +#define PIN_A5 (5ul) +#define PIN_A6 (6ul) +#define PIN_A7 (7ul) +#define PIN_A10 (10ul) +#define PIN_A11 (11ul) +#define PIN_A14 (14ul) +#define PIN_A15 (15ul) +#define PIN_DAC0 (2ul) +#elif defined PIN_MAP_COMPACT +#define PIN_A2 (0ul) +#define PIN_A3 (1ul) +#define PIN_A4 (2ul) +#define PIN_A5 (3ul) +#define PIN_A6 (4ul) +#define PIN_A7 (5ul) +#define PIN_A10 (6ul) +#define PIN_A11 (7ul) +#define PIN_A14 (8ul) +#define PIN_A15 (9ul) +#define PIN_DAC0 (0ul) +#endif + +static const uint8_t A2 = PIN_A2; +static const uint8_t A3 = PIN_A3; +static const uint8_t A4 = PIN_A4; +static const uint8_t A5 = PIN_A5; +static const uint8_t A6 = PIN_A6; +static const uint8_t A7 = PIN_A7; +static const uint8_t A10 = PIN_A10; +static const uint8_t A11 = PIN_A11; +static const uint8_t A14 = PIN_A14; +static const uint8_t A15 = PIN_A15; +static const uint8_t DAC0 = PIN_DAC0; + +#define ADC_RESOLUTION 12 + +// #define REMAP_ANALOG_PIN_ID(pin) if ( pin < A0 ) pin += A0 + +/* Set default analog voltage reference */ +#define VARIANT_AR_DEFAULT AR_DEFAULT + +/* Reference voltage pins (define even if not enabled with PIN_ATTR_REF in the PinDescription table) */ +#if defined PIN_MAP_STANDARD +#define REFA_PIN (3ul) +#define REFB_PIN (4ul) +#elif defined PIN_MAP_COMPACT +#define REFA_PIN (1ul) +#define REFB_PIN (2ul) +#endif + + +// The ATN pin may be used in the future as the first SPI chip select. +// On boards that do not have the Arduino physical form factor, it can to set to any free pin. +#if defined PIN_MAP_STANDARD +#define PIN_ATN (15ul) +#elif defined PIN_MAP_COMPACT +#define PIN_ATN (9ul) +#endif +static const uint8_t ATN = PIN_ATN; + + +/* + * Serial interfaces + */ +// Serial1 +#if defined PIN_MAP_STANDARD +#define PIN_SERIAL1_RX (31ul) +#define PIN_SERIAL1_TX (30ul) +#elif defined PIN_MAP_COMPACT +#define PIN_SERIAL1_RX (16ul) +#define PIN_SERIAL1_TX (15ul) +#endif + +#define PAD_SERIAL1_TX (UART_TX_PAD_2) +#define PAD_SERIAL1_RX (SERCOM_RX_PAD_3) +#define SERCOM_INSTANCE_SERIAL1 &sercom1 + +// Serial2 +#if defined PIN_MAP_STANDARD +#define PIN_SERIAL2_RX (11ul) +#define PIN_SERIAL2_TX (10ul) +#elif defined PIN_MAP_COMPACT +#define PIN_SERIAL2_RX (7ul) +#define PIN_SERIAL2_TX (6ul) +#endif + +#define PAD_SERIAL2_TX (UART_TX_PAD_2) +#define PAD_SERIAL2_RX (SERCOM_RX_PAD_3) +#define SERCOM_INSTANCE_SERIAL2 &sercom0 + + +/* + * SPI Interfaces + */ +#if defined(ONE_SPI) +#define SPI_INTERFACES_COUNT 1 +#else +#define SPI_INTERFACES_COUNT 0 +#endif + +#if defined PIN_MAP_STANDARD +#define PIN_SPI_MISO (14u) +#define PIN_SPI_MOSI (10u) +#define PIN_SPI_SCK (11u) +#define PIN_SPI_SS (15u) +#elif defined PIN_MAP_COMPACT +#define PIN_SPI_MISO (8u) +#define PIN_SPI_MOSI (6u) +#define PIN_SPI_SCK (7u) +#define PIN_SPI_SS (9u) +#endif + +#define PERIPH_SPI sercom0 +#define PAD_SPI_TX SPI_PAD_2_SCK_3 +#define PAD_SPI_RX SERCOM_RX_PAD_0 + +static const uint8_t SS = PIN_SPI_SS ; // The SERCOM SS PAD is available on this pin but HW SS isn't used. Set here only for reference. +static const uint8_t MOSI = PIN_SPI_MOSI ; +static const uint8_t MISO = PIN_SPI_MISO ; +static const uint8_t SCK = PIN_SPI_SCK ; + + +/* + * Wire Interfaces + */ +#if defined(ONE_WIRE) +#define WIRE_INTERFACES_COUNT 1 +#else +#define WIRE_INTERFACES_COUNT 0 +#endif + +#if defined PIN_MAP_STANDARD +#define PIN_WIRE_SDA (22u) +#define PIN_WIRE_SCL (23u) +#elif defined PIN_MAP_COMPACT +#define PIN_WIRE_SDA (12u) +#define PIN_WIRE_SCL (13u) +#endif + +#define PERIPH_WIRE sercom2 +#define WIRE_IT_HANDLER SERCOM2_Handler + +static const uint8_t SDA = PIN_WIRE_SDA; +static const uint8_t SCL = PIN_WIRE_SCL; + + +/* + * USB - Define PIN_USB_HOST_ENABLE to assert the defined pin to + * PIN_USB_HOST_ENABLE_VALUE during startup. Leave undefined to disable this pin. + */ +#if defined PIN_MAP_STANDARD +#define PIN_USB_DM (24ul) +#define PIN_USB_DP (25ul) +//#define PIN_USB_HOST_ENABLE (17ul) +#elif defined PIN_MAP_COMPACT +// USB pins not directly accessible using PIN_MAP_COMPACT +#define PIN_USB_DM (0ul) +#define PIN_USB_DP (0ul) +//#define PIN_USB_HOST_ENABLE (0ul) +#endif + +#define PIN_USB_HOST_ENABLE_VALUE HIGH + +#ifdef __cplusplus +} +#endif + + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#ifdef __cplusplus + +/* ========================= + * ===== SERCOM DEFINITION + * ========================= +*/ +extern SERCOM sercom0; +extern SERCOM sercom1; +extern SERCOM sercom2; + +extern Uart Serial1; +extern Uart Serial2; + +#endif + +// These serial port names are intended to allow libraries and architecture-neutral +// sketches to automatically default to the correct port name for a particular type +// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, +// the first hardware serial port whose RX/TX pins are not dedicated to another use. +// +// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor +// +// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial +// +// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library +// +// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. +// +// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX +// pins are NOT connected to anything by default. +#define SERIAL_PORT_USBVIRTUAL SerialUSB +// SERIAL_PORT_MONITOR seems to be used only by the USB Host library (as of 1.6.5). +// It normally allows debugging output on the USB programming port, while the USB host uses the USB native port. +// The programming port is connected to a hardware UART through a USB-Serial bridge (EDBG chip) on the Zero. +// Boards that do not have the EDBG chip will have to connect a USB-TTL serial adapter to 'Serial' to get +// the USB Host debugging output. +#define SERIAL_PORT_MONITOR Serial1 +// Serial has no physical pins broken out, so it's not listed as HARDWARE port +#define SERIAL_PORT_HARDWARE Serial1 +#define SERIAL_PORT_HARDWARE_OPEN Serial1 + +// The MT-D11 does not have the EDBG support chip, which provides a USB-UART bridge +// accessible using Serial (the Arduino serial monitor is normally connected to this). +// So, the USB virtual serial port (SerialUSB) must be used to communicate with the host. +// Because most sketches use Serial to print to the monitor, it is aliased to SerialUSB. +// Remember to use while(!Serial); to wait for a connection before Serial printing. + +// When USB CDC is enabled, Serial refers to SerialUSB, otherwise it refers to Serial1. +#if defined(CDC_ONLY) || defined(CDC_HID) || defined(WITH_CDC) +#define Serial SerialUSB +#else +#define Serial Serial1 +#endif + +#endif /* _VARIANT_GENERIC_D11D14AM_ */ diff --git a/variants/Generic_D11D14AS/README.md b/variants/Generic_D11D14AS/README.md index 7ce74b90c..ead5dede5 100644 --- a/variants/Generic_D11D14AS/README.md +++ b/variants/Generic_D11D14AS/README.md @@ -1,275 +1,275 @@ -# Generic ATsamD11D14AS - -``` -===================================== ATsamD11D14AS =================================== -Other COM PWM Analog INT Arduino* Arduino* Analog INT PWM COM Other -========================================================================================= - 1------------------- - TCC01 * * 5 | A5 A4 | 4 * * TCC00 REFB - SS TCC02 * 6 | A6 A3 | 3 * REFA - MISO TCC03 * * 7 | A7 A2 | 2 * * DAC -Xin32/Xin 8 | A8 (XIN) Vdd | -Xout32/Xout 9 | A9 (XOUT) Gnd | - MOSI/TX2 * NMI 14 | A14 A25 | 25 USB D+ - SCK/RX2 TC11 * * 15 | A15 A24 | 24 USB D- - TC10 * 16 | A16 A31 | 31 * TC21 RX1 SWDIO - SDA * 22 | A22 A30 | 30 TC20 TX1 SWDCLK - SCL 23 | A23 RST/A28 | 28 BOOT - ------------------- - -* Most pins can be used for more than one function. When using PIN_MAP_STANDARD, the port - pin number printed on the chip above is also used in Arduino (but without the 'A') for - all of the supported functions (ie: digitalRead(), analogRead(), analogWrite(), etc.). - When using PIN_MAP_COMPACT, the Arduino numbering is sequential starting from 0 at the - top left pin (A5). PIN_MAP_COMPACT uses less FLASH. -* When USB CDC is enabled, Serial refers to SerialUSB, otherwise it refers to Serial1. -* Tone available on TC2. -* Leave pin A30 floating (or use external pullup) during reset. -* DO NOT connect voltages higher than 3.3V! -``` - - -## Pins descriptions for Generic ATsamD11D14AS - -### PIN_MAP_STANDARD -``` -============================================================================================================================================ -Arduino | Port | Alternate Function | Comments (! means not used with this peripheral assignment) ---------|-------|-----------------------|------------------------------------------------------------------------------------------- -0 | ---- | NOT A PIN | NOT A PIN -1 | ---- | NOT A PIN | NOT A PIN -2 | PA02 | DAC | EIC/EXTINT[2] ADC/AIN[0] PTC/Y[0] DAC/VOUT -3 | PA03 | REFA | !EIC/EXTINT[3] REF/ADC/VREFA REF/DAC/VREFA ADC/AIN[1] PTC/Y[1] -4 | PA04 | REFB / TCC00 | EIC/EXTINT[4] REF/ADC/VREFB ADC/AIN[4] AC/AIN[0] PTC/Y[2] !SERCOM0/PAD[2] !SERCOM0/PAD[0] !TC1/WO[0] TCC0/WO[0] -5 | PA05 | TCC01 | EIC/EXTINT[5] ADC/AIN[3] AC/AIN[1] PTC/Y[3] !SERCOM0/PAD[3] !SERCOM0/PAD[1] !TC1/WO[1] TCC0/WO[1] -6 | PA06 | SS (unused) / TCC02 | !EIC/EXTINT[6] ADC/AIN[4] AC/AIN[2] PTC/Y[4] SERCOM0/PAD[0] !SERCOM0/PAD[2] !TC2/WO[0] TCC0/WO[2] -7 | PA07 | MISO / TCC03 | EIC/EXTINT[7] ADC/AIN[5] AC/AIN[3] PTC/Y[5] SERCOM0/PAD[1] !SERCOM0/PAD[3] !TC2/WO[1] TCC0/WO[3] -8 | PA08 | Xin32 / Xin | Xin32 -9 | PA09 | Xout32 / Xout | Xout32 -10 | ---- | NOT A PIN | NOT A PIN -11 | ---- | NOT A PIN | NOT A PIN -12 | ---- | NOT A PIN | NOT A PIN -13 | ---- | NOT A PIN | NOT A PIN -14 | PA14 | MOSI / TX2 | EIC/NMI ADC/AIN[6] PTC/X[0] PTC/Y[6] SERCOM0/PAD[0] !SERCOM2/PAD[0] !TC1/WO[0] !TCC0/WO[0] -15 | PA15 | SCK / RX2 / TC11 | EIC/EXTINT[1] ADC/AIN[7] PTC/X[1] PTC/Y[7] SERCOM0/PAD[1] !SERCOM2/PAD[1] TC1/WO[1] !TCC0/WO[1] -16 | PA16 | TC10 | EIC/EXTINT[0] PTC/X[4] PTC/Y[10] !SERCOM1/PAD[2] !SERCOM2/PAD[2] TC1/WO[0] !TCC0/WO[6] -17 | ---- | NOT A PIN | NOT A PIN -18 | ---- | NOT A PIN | NOT A PIN -19 | ---- | NOT A PIN | NOT A PIN -20 | ---- | NOT A PIN | NOT A PIN -21 | ---- | NOT A PIN | NOT A PIN -22 | PA22 | SDA | EIC/EXTINT[6] PTC/X[6] PTC/Y[12] !SERCOM1/PAD[0] SERCOM2/PAD[0] !TC1/WO[0] !TCC0/WO[4] -23 | PA23 | SCL | !EIC/EXTINT[7] PTC/X[7] PTC/Y[13] !SERCOM1/PAD[1] SERCOM2/PAD[1] !TC1/WO[1] !TCC0/WO[5] -24 | PA24 | USB_NEGATIVE | USB/DM -25 | PA25 | USB_POSITIVE | USB/DP -26 | ---- | NOT A PIN | NOT A PIN -27 | ---- | NOT A PIN | NOT A PIN -28 | PA28 | Reset | Reset, BOOT (double tap bootloader entry) -29 | ---- | NOT A PIN | NOT A PIN -30 | PA30 | TX1 / TC20 / SWD CLK | !EIC/EXTINT[2] !SERCOM1/PAD[0] SERCOM1/PAD[2] TC2/WO[0] !TCC0/WO[2] SWD CLK, leave floating during boot -31 | PA31 | RX1 / TC21 / SWD IO | EIC/EXTINT[3] !SERCOM1/PAD[1] SERCOM1/PAD[3] TC2/WO[1] !TCC0/WO[3] SWD IO -============================================================================================================================================ -``` - -### PIN_MAP_COMPACT -``` -============================================================================================================================================ -Arduino | Port | Alternate Function | Comments (! means not used with this peripheral assignment) ---------|-------|-----------------------|------------------------------------------------------------------------------------------- -0 | PA02 | DAC | EIC/EXTINT[2] ADC/AIN[0] PTC/Y[0] DAC/VOUT -1 | PA03 | REFA | !EIC/EXTINT[3] REF/ADC/VREFA REF/DAC/VREFA ADC/AIN[1] PTC/Y[1] -2 | PA04 | REFB / TCC00 | EIC/EXTINT[4] REF/ADC/VREFB ADC/AIN[4] AC/AIN[0] PTC/Y[2] !SERCOM0/PAD[2] !SERCOM0/PAD[0] !TC1/WO[0] TCC0/WO[0] -3 | PA05 | TCC01 | EIC/EXTINT[5] ADC/AIN[3] AC/AIN[1] PTC/Y[3] !SERCOM0/PAD[3] !SERCOM0/PAD[1] !TC1/WO[1] TCC0/WO[1] -4 | PA06 | SS (unused) / TCC02 | !EIC/EXTINT[6] ADC/AIN[4] AC/AIN[2] PTC/Y[4] SERCOM0/PAD[0] !SERCOM0/PAD[2] !TC2/WO[0] TCC0/WO[2] -5 | PA07 | MISO / TCC03 | EIC/EXTINT[7] ADC/AIN[5] AC/AIN[3] PTC/Y[5] SERCOM0/PAD[1] !SERCOM0/PAD[3] !TC2/WO[1] TCC0/WO[3] -6 | PA08 | Xin32 / Xin | Xin32 -7 | PA09 | Xout32 / Xout | Xout32 -8 | PA14 | MOSI / TX2 | EIC/NMI ADC/AIN[6] PTC/X[0] PTC/Y[6] SERCOM0/PAD[0] !SERCOM2/PAD[0] !TC1/WO[0] !TCC0/WO[0] -9 | PA15 | SCK / RX2 / TC11 | EIC/EXTINT[1] ADC/AIN[7] PTC/X[1] PTC/Y[7] SERCOM0/PAD[1] !SERCOM2/PAD[1] TC1/WO[1] !TCC0/WO[1] -10 | PA16 | TC10 | EIC/EXTINT[0] PTC/X[4] PTC/Y[10] !SERCOM1/PAD[2] !SERCOM2/PAD[2] TC1/WO[0] !TCC0/WO[6] -11 | PA22 | SDA | EIC/EXTINT[6] PTC/X[6] PTC/Y[12] !SERCOM1/PAD[0] SERCOM2/PAD[0] !TC1/WO[0] !TCC0/WO[4] -12 | PA23 | SCL | !EIC/EXTINT[7] PTC/X[7] PTC/Y[13] !SERCOM1/PAD[1] SERCOM2/PAD[1] !TC1/WO[1] !TCC0/WO[5] -13 | PA24 | USB_NEGATIVE | USB/DM -14 | PA25 | USB_POSITIVE | USB/DP -15 | PA28 | Reset | Reset, BOOT (double tap bootloader entry) -16 | PA30 | TX1 / TC20 / SWD CLK | !EIC/EXTINT[2] !SERCOM1/PAD[0] SERCOM1/PAD[2] TC2/WO[0] !TCC0/WO[2] SWD CLK, leave floating during boot -17 | PA31 | RX1 / TC21 / SWD IO | EIC/EXTINT[3] !SERCOM1/PAD[1] SERCOM1/PAD[3] TC2/WO[1] !TCC0/WO[3] SWD IO -============================================================================================================================================ - -* Most pins can be used for more than one function. When using PIN_MAP_STANDARD, the port - pin number printed on the chip above is also used in Arduino (but without the 'A') for - all of the supported functions (ie: digitalRead(), analogRead(), analogWrite(), etc.). - When using PIN_MAP_COMPACT, the Arduino numbering is sequential starting from 0 at the - top left pin (A5). PIN_MAP_COMPACT uses less RAM. -* NOT A PIN means the Arduino pin number is not mapped to a physical pin. -* Pins 24 and 25 are in use by USB (USB_NEGATIVE and USB_POSITIVE). -* The tone library uses TC2. -* Leave pin A30 floating (or use external pullup) during reset. -``` - - -## Board Configuration Notes - -* **Crystals** - * Either a 32.768KHz crystal or a high speed crystal can be used. - * The bootloader does not use an external crystal by default. Double-tap the reset button to enter manually. - -* **GPIO** - * All pins (including analog) support INPUT, OUTPUT, INPUT_PULLUP, and INPUT_PULLDOWN. - * Each pin can source or sink a maximum of 7 mA (when PER_ATTR_DRIVE_STRONG is set for the pin, enabled by default). - * Internal pull-up and pull-down resistors of 20-60 Kohms (40Kohm typ., disconnected by default). - -* **Analog Inputs** - * 8 pins can be configured as ADC analog inputs. - * Each pin measures from ground to 3.3 volts by default. - * Each pin provides 10 bits of resolution (1024 values) by default. - * 12-bit resolution supported by using the analogReadResolution() function. - * The upper end of the measurement range can be changed using the analogReference() function. - * A reference voltage can be connected to REF. - -* **DAC** - * One analog output is available on pin 2. - * Provides a 10-bit voltage output with the analogWrite() function. - -* **PWM** - * 8 pins can be configured as PWM outputs. - * Each pin provides 8 bits of resolution (256 values) by default. - * 12-bit resolution supported by using the analogWriteResolution() function. - -* **External Interrupts** - * 8 pins can be configured with external interrupts. - -* **SERCOM** - * 3 SERCOM are available. - * Up to 2 UART instances - * 1 SPI instance - * 1 WIRE (I2C) instance - - - -## PinDescription table format - -### Note that in 1.6.18-beta-b1 a new compact table format was added. -The standard PinDescription table uses 12 bytes per pin. Define PIN_DESCRIPTION_TABLE_SIMPLE -to use a more compact format that uses only 4 bytes per pin (currently only available -for the D11 chips). In this case, the PinType, PinAttribute, and GCLKCCL columns are not used -(they are not required). Additionally, the SetPortPin() and SetExtIntADC() macros are used to -pack Port and Pin into the PortPin column, and ExtInt and ADCChannelNumber into the ExtIntADC -column. Note that external libraries that reference the PinDescription table directly (uncommon) -will no longer work. This define can be combined with the PIN_MAP_COMPACT define, which -is available in variant.h of the D11 variants. This can save from 10's to over 200 bytes. - -### Note that a new column (GCLKCCL) was added for 1.6.8-beta-b0. -MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE in variant.h is used to track versions. -If using board variant files with the old format, the new core will still read the -table the old way, losing any new features introduced by the new column. Additionally, -new definitions have been added for D51, L21, and C21 support. - -### Each pin can have multiple functions. -The PinDescription table describes how each of the pins can be used by the Arduino -core. Each pin can have multiple functions (ie: ADC input, digital output, PWM, -communications, etc.), and the PinDescription table configures which functions can -be used for each pin. This table is mainly accessed by the pinPeripheral function in -wiring_private.c, which is used to attach a pin to a particular peripheral function. -The communications drivers (ie: SPI, I2C, and UART), analogRead(), analogWrite(), -analogReference(), attachInterrupt(), and pinMode() all call pinPeripheral() to -verify that the pin can perform the function requested, and to configure the pin for -that function. Most of the contents of pinMode() are now in pinPeripheral(). - -### Pin Mapping -There are different ways that pins can be mapped. Typically, there is no relation -between the arduino pin number used, and the actual port pin designator. Thus, the -pcb must be printed with the arduino numbering, otherwise, if the port pin is printed, -a cross reference table is needed to find the arduino pin number. However, this results -in the least amount of space used by the table. Another method, used by default by the -MT-D21E and MT-D11, maps Arduino pin numbers to the actual port pin number (ie: Arduino -pin 28 = Port A28). This works well when there is only one port (or if the PORTB pins -are used for onboard functions and not broken out). PIO_NOT_A_PIN entries must be added -for pins that are used for other purposes or for pins that do not exist (especially the -D11), so some FLASH space may be wasted. For an example of both types, see variant.cpp -from the MT-D11 variant. The Xeno combines both methods, using the actual port pin -designators from both PORTA and PORTB for arduino numbers 0-31 (ie: B1=1, A2=2), then -using arduino numbering only above 31. For 0-31 only one pin from PORTA or PORTB can be -used, leaving the other pin for some number above 31. - -**See [WVariant.h](https://github.com/mattairtech/ArduinoCore-samd/tree/master/cores/arduino/WVariant.h) for the definitions used in the table.** - -### Port -This is the port (ie: PORTA). Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### Pin -This is the pin (bit) within the port. Valid values are 0-31. Not used with -PIN_DESCRIPTION_TABLE_SIMPLE. - -### SetPortPin() -When PIN_DESCRIPTION_TABLE_SIMPLE is defined, Port and Pin are combined into one column -using the SetPortPin() packing macro: SetPortPin(PORTA, 2). If the pin is not usable, -use SetPortPin(NOT_A_PORT, 0). - -### PinType -This indicates what peripheral function the pin can be attached to. In most cases, -this is PIO_MULTI, which means that the pin can be anything listed in the PinAttribute -field. It can also be set to a specific peripheral. In this case, any attempt to -configure the pin (using pinPeripheral or pinMode) as anything else will fail (and -pinPeripheral will return -1). This can be used to prevent accidental re-configuration -of a pin that is configured for only one function (ie: USB D- and D+ pins). If a pin -is not used or does not exist, PIO_NOT_A_PIN must be entered in this field. See -WVariant.h for valid entries. These entries are also used as a parameter to -pinPeripheral() with the exception of PIO_NOT_A_PIN and PIO_MULTI. The pinMode function -now calls pinPeripheral() with the desired mode. Note that this field is not used to -select between the different peripherals possible with each of the SERCOM and TIMER -functions. PeripheralAttribute is now used for this. When PIN_DESCRIPTION_TABLE_SIMPLE -is defined, PinType is not used (the pin is treated as PIO_MULTI). - -### PeripheralAttribute -This is an 8-bit bitfield used for various peripheral configuration. It is primarily -used to select between the different peripherals possible with each of the SERCOM and -TIMER functions. TIMER pins are individual, while SERCOM uses a group of two to four -pins. This group of pins can span both peripherals. For example, pin 19 (SPI1 SCK) on -the MT-D21E uses PER_ATTR_SERCOM_ALT while pin 22 (SPI1 MISO) uses PER_ATTR_SERCOM_STD. -Both TIMER and SERCOM can exist for each pin. This bitfield is also used to set the -pin drive strength and the input buffer configuration (ie: totem-pole, open-drain, -buskeeper, etc.). Starting with 1.6.8, the ADC instance on the D51 and C21 (there are -two) is also selected here. Note that the D51 adds a third timer attribute and -requires consultation of the datasheet IOSET tables. See WVariant.h for valid entries. - -### PinAttribute -This is a 32-bit bitfield used to list all of the valid peripheral functions that a -pin can attach to. This includes GPIO functions like PIN_ATTR_OUTPUT. Certain -attributes are shorthand for a combination of other attributes. PIN_ATTR_DIGITAL -includes all of the GPIO functions, while PIN_ATTR_TIMER includes both -PIN_ATTR_TIMER_PWM and PIN_ATTR_TIMER_CAPTURE (capture is not used yet). -PIN_ATTR_ANALOG is an alias to PIN_ATTR_ANALOG_ADC. This bitfield is useful for -limiting a pin to only input related functions or output functions. This allows a pin -to have a more flexible configuration, while restricting the direction (ie: to avoid -contention). See WVariant.h for valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### TCChannel -This is the TC/TCC channel (if any) assigned to the pin. Some TC channels are available -on multiple pins. In general, only one pin should be configured in the pinDescription -table per TC channel. Starting with 1.6.8, the timer type is now encoded in this column -to support the D51, L21 and C21, which use TC numbers starting at 0 (rather than 3 as on -the D21). See WVariant.h for valid entries. - -### ADCChannelNumber -This is the ADC channel (if any) assigned to the pin. The D51 and C21 each have two ADC -instances, which are selected in the PeripheralAttribute column. See WVariant.h for -valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### ExtInt -This is the interrupt (if any) assigned to the pin. Some interrupt numbers are -available on multiple pins. In general, only one pin should be configured in the -pinDescription table per interrupt number. Thus, for example, if an interrupt was -needed on pin 2, EXTERNAL_INT_2 can be moved from pin 18. See WVariant.h for valid -entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### SetExtIntADC() -When PIN_DESCRIPTION_TABLE_SIMPLE is defined, ExtInt and ADCChannelNumber are combined -into one column using the SetExtIntADC() packing macro: SetExtIntADC(EXTERNAL_INT_4, -ADC_Channel2). If the pin is not usable, use SetExtIntADC(EXTERNAL_INT_NONE, No_ADC_Channel). - -### GCLKCCL -This column was added in 1.6.8-beta-b0. It is not yet used. It will eventually support -the Analog Comparators (AC), the Configurable Custom Logic (CCL) peripherals of the D51, -L21 and C21, and the GCLK outputs (inputs) of all of the MCUs. Not used with -PIN_DESCRIPTION_TABLE_SIMPLE. +# Generic ATsamD11D14AS + +``` +===================================== ATsamD11D14AS =================================== +Other COM PWM Analog INT Arduino* Arduino* Analog INT PWM COM Other +========================================================================================= + 1------------------- + TCC01 * * 5 | A5 A4 | 4 * * TCC00 REFB + SS TCC02 * 6 | A6 A3 | 3 * REFA + MISO TCC03 * * 7 | A7 A2 | 2 * * DAC +Xin32/Xin 8 | A8 (XIN) Vdd | +Xout32/Xout 9 | A9 (XOUT) Gnd | + MOSI/TX2 * NMI 14 | A14 A25 | 25 USB D+ + SCK/RX2 TC11 * * 15 | A15 A24 | 24 USB D- + TC10 * 16 | A16 A31 | 31 * TC21 RX1 SWDIO + SDA * 22 | A22 A30 | 30 TC20 TX1 SWDCLK + SCL 23 | A23 RST/A28 | 28 BOOT + ------------------- + +* Most pins can be used for more than one function. When using PIN_MAP_STANDARD, the port + pin number printed on the chip above is also used in Arduino (but without the 'A') for + all of the supported functions (ie: digitalRead(), analogRead(), analogWrite(), etc.). + When using PIN_MAP_COMPACT, the Arduino numbering is sequential starting from 0 at the + top left pin (A5). PIN_MAP_COMPACT uses less FLASH. +* When USB CDC is enabled, Serial refers to SerialUSB, otherwise it refers to Serial1. +* Tone available on TC2. +* Leave pin A30 floating (or use external pullup) during reset. +* DO NOT connect voltages higher than 3.3V! +``` + + +## Pins descriptions for Generic ATsamD11D14AS + +### PIN_MAP_STANDARD +``` +============================================================================================================================================ +Arduino | Port | Alternate Function | Comments (! means not used with this peripheral assignment) +--------|-------|-----------------------|------------------------------------------------------------------------------------------- +0 | ---- | NOT A PIN | NOT A PIN +1 | ---- | NOT A PIN | NOT A PIN +2 | PA02 | DAC | EIC/EXTINT[2] ADC/AIN[0] PTC/Y[0] DAC/VOUT +3 | PA03 | REFA | !EIC/EXTINT[3] REF/ADC/VREFA REF/DAC/VREFA ADC/AIN[1] PTC/Y[1] +4 | PA04 | REFB / TCC00 | EIC/EXTINT[4] REF/ADC/VREFB ADC/AIN[4] AC/AIN[0] PTC/Y[2] !SERCOM0/PAD[2] !SERCOM0/PAD[0] !TC1/WO[0] TCC0/WO[0] +5 | PA05 | TCC01 | EIC/EXTINT[5] ADC/AIN[3] AC/AIN[1] PTC/Y[3] !SERCOM0/PAD[3] !SERCOM0/PAD[1] !TC1/WO[1] TCC0/WO[1] +6 | PA06 | SS (unused) / TCC02 | !EIC/EXTINT[6] ADC/AIN[4] AC/AIN[2] PTC/Y[4] SERCOM0/PAD[0] !SERCOM0/PAD[2] !TC2/WO[0] TCC0/WO[2] +7 | PA07 | MISO / TCC03 | EIC/EXTINT[7] ADC/AIN[5] AC/AIN[3] PTC/Y[5] SERCOM0/PAD[1] !SERCOM0/PAD[3] !TC2/WO[1] TCC0/WO[3] +8 | PA08 | Xin32 / Xin | Xin32 +9 | PA09 | Xout32 / Xout | Xout32 +10 | ---- | NOT A PIN | NOT A PIN +11 | ---- | NOT A PIN | NOT A PIN +12 | ---- | NOT A PIN | NOT A PIN +13 | ---- | NOT A PIN | NOT A PIN +14 | PA14 | MOSI / TX2 | EIC/NMI ADC/AIN[6] PTC/X[0] PTC/Y[6] SERCOM0/PAD[0] !SERCOM2/PAD[0] !TC1/WO[0] !TCC0/WO[0] +15 | PA15 | SCK / RX2 / TC11 | EIC/EXTINT[1] ADC/AIN[7] PTC/X[1] PTC/Y[7] SERCOM0/PAD[1] !SERCOM2/PAD[1] TC1/WO[1] !TCC0/WO[1] +16 | PA16 | TC10 | EIC/EXTINT[0] PTC/X[4] PTC/Y[10] !SERCOM1/PAD[2] !SERCOM2/PAD[2] TC1/WO[0] !TCC0/WO[6] +17 | ---- | NOT A PIN | NOT A PIN +18 | ---- | NOT A PIN | NOT A PIN +19 | ---- | NOT A PIN | NOT A PIN +20 | ---- | NOT A PIN | NOT A PIN +21 | ---- | NOT A PIN | NOT A PIN +22 | PA22 | SDA | EIC/EXTINT[6] PTC/X[6] PTC/Y[12] !SERCOM1/PAD[0] SERCOM2/PAD[0] !TC1/WO[0] !TCC0/WO[4] +23 | PA23 | SCL | !EIC/EXTINT[7] PTC/X[7] PTC/Y[13] !SERCOM1/PAD[1] SERCOM2/PAD[1] !TC1/WO[1] !TCC0/WO[5] +24 | PA24 | USB_NEGATIVE | USB/DM +25 | PA25 | USB_POSITIVE | USB/DP +26 | ---- | NOT A PIN | NOT A PIN +27 | ---- | NOT A PIN | NOT A PIN +28 | PA28 | Reset | Reset, BOOT (double tap bootloader entry) +29 | ---- | NOT A PIN | NOT A PIN +30 | PA30 | TX1 / TC20 / SWD CLK | !EIC/EXTINT[2] !SERCOM1/PAD[0] SERCOM1/PAD[2] TC2/WO[0] !TCC0/WO[2] SWD CLK, leave floating during boot +31 | PA31 | RX1 / TC21 / SWD IO | EIC/EXTINT[3] !SERCOM1/PAD[1] SERCOM1/PAD[3] TC2/WO[1] !TCC0/WO[3] SWD IO +============================================================================================================================================ +``` + +### PIN_MAP_COMPACT +``` +============================================================================================================================================ +Arduino | Port | Alternate Function | Comments (! means not used with this peripheral assignment) +--------|-------|-----------------------|------------------------------------------------------------------------------------------- +0 | PA02 | DAC | EIC/EXTINT[2] ADC/AIN[0] PTC/Y[0] DAC/VOUT +1 | PA03 | REFA | !EIC/EXTINT[3] REF/ADC/VREFA REF/DAC/VREFA ADC/AIN[1] PTC/Y[1] +2 | PA04 | REFB / TCC00 | EIC/EXTINT[4] REF/ADC/VREFB ADC/AIN[4] AC/AIN[0] PTC/Y[2] !SERCOM0/PAD[2] !SERCOM0/PAD[0] !TC1/WO[0] TCC0/WO[0] +3 | PA05 | TCC01 | EIC/EXTINT[5] ADC/AIN[3] AC/AIN[1] PTC/Y[3] !SERCOM0/PAD[3] !SERCOM0/PAD[1] !TC1/WO[1] TCC0/WO[1] +4 | PA06 | SS (unused) / TCC02 | !EIC/EXTINT[6] ADC/AIN[4] AC/AIN[2] PTC/Y[4] SERCOM0/PAD[0] !SERCOM0/PAD[2] !TC2/WO[0] TCC0/WO[2] +5 | PA07 | MISO / TCC03 | EIC/EXTINT[7] ADC/AIN[5] AC/AIN[3] PTC/Y[5] SERCOM0/PAD[1] !SERCOM0/PAD[3] !TC2/WO[1] TCC0/WO[3] +6 | PA08 | Xin32 / Xin | Xin32 +7 | PA09 | Xout32 / Xout | Xout32 +8 | PA14 | MOSI / TX2 | EIC/NMI ADC/AIN[6] PTC/X[0] PTC/Y[6] SERCOM0/PAD[0] !SERCOM2/PAD[0] !TC1/WO[0] !TCC0/WO[0] +9 | PA15 | SCK / RX2 / TC11 | EIC/EXTINT[1] ADC/AIN[7] PTC/X[1] PTC/Y[7] SERCOM0/PAD[1] !SERCOM2/PAD[1] TC1/WO[1] !TCC0/WO[1] +10 | PA16 | TC10 | EIC/EXTINT[0] PTC/X[4] PTC/Y[10] !SERCOM1/PAD[2] !SERCOM2/PAD[2] TC1/WO[0] !TCC0/WO[6] +11 | PA22 | SDA | EIC/EXTINT[6] PTC/X[6] PTC/Y[12] !SERCOM1/PAD[0] SERCOM2/PAD[0] !TC1/WO[0] !TCC0/WO[4] +12 | PA23 | SCL | !EIC/EXTINT[7] PTC/X[7] PTC/Y[13] !SERCOM1/PAD[1] SERCOM2/PAD[1] !TC1/WO[1] !TCC0/WO[5] +13 | PA24 | USB_NEGATIVE | USB/DM +14 | PA25 | USB_POSITIVE | USB/DP +15 | PA28 | Reset | Reset, BOOT (double tap bootloader entry) +16 | PA30 | TX1 / TC20 / SWD CLK | !EIC/EXTINT[2] !SERCOM1/PAD[0] SERCOM1/PAD[2] TC2/WO[0] !TCC0/WO[2] SWD CLK, leave floating during boot +17 | PA31 | RX1 / TC21 / SWD IO | EIC/EXTINT[3] !SERCOM1/PAD[1] SERCOM1/PAD[3] TC2/WO[1] !TCC0/WO[3] SWD IO +============================================================================================================================================ + +* Most pins can be used for more than one function. When using PIN_MAP_STANDARD, the port + pin number printed on the chip above is also used in Arduino (but without the 'A') for + all of the supported functions (ie: digitalRead(), analogRead(), analogWrite(), etc.). + When using PIN_MAP_COMPACT, the Arduino numbering is sequential starting from 0 at the + top left pin (A5). PIN_MAP_COMPACT uses less RAM. +* NOT A PIN means the Arduino pin number is not mapped to a physical pin. +* Pins 24 and 25 are in use by USB (USB_NEGATIVE and USB_POSITIVE). +* The tone library uses TC2. +* Leave pin A30 floating (or use external pullup) during reset. +``` + + +## Board Configuration Notes + +* **Crystals** + * Either a 32.768KHz crystal or a high speed crystal can be used. + * The bootloader does not use an external crystal by default. Double-tap the reset button to enter manually. + +* **GPIO** + * All pins (including analog) support INPUT, OUTPUT, INPUT_PULLUP, and INPUT_PULLDOWN. + * Each pin can source or sink a maximum of 7 mA (when PER_ATTR_DRIVE_STRONG is set for the pin, enabled by default). + * Internal pull-up and pull-down resistors of 20-60 Kohms (40Kohm typ., disconnected by default). + +* **Analog Inputs** + * 8 pins can be configured as ADC analog inputs. + * Each pin measures from ground to 3.3 volts by default. + * Each pin provides 10 bits of resolution (1024 values) by default. + * 12-bit resolution supported by using the analogReadResolution() function. + * The upper end of the measurement range can be changed using the analogReference() function. + * A reference voltage can be connected to REF. + +* **DAC** + * One analog output is available on pin 2. + * Provides a 10-bit voltage output with the analogWrite() function. + +* **PWM** + * 8 pins can be configured as PWM outputs. + * Each pin provides 8 bits of resolution (256 values) by default. + * 12-bit resolution supported by using the analogWriteResolution() function. + +* **External Interrupts** + * 8 pins can be configured with external interrupts. + +* **SERCOM** + * 3 SERCOM are available. + * Up to 2 UART instances + * 1 SPI instance + * 1 WIRE (I2C) instance + + + +## PinDescription table format + +### Note that in 1.6.18-beta-b1 a new compact table format was added. +The standard PinDescription table uses 12 bytes per pin. Define PIN_DESCRIPTION_TABLE_SIMPLE +to use a more compact format that uses only 4 bytes per pin (currently only available +for the D11 chips). In this case, the PinType, PinAttribute, and GCLKCCL columns are not used +(they are not required). Additionally, the SetPortPin() and SetExtIntADC() macros are used to +pack Port and Pin into the PortPin column, and ExtInt and ADCChannelNumber into the ExtIntADC +column. Note that external libraries that reference the PinDescription table directly (uncommon) +will no longer work. This define can be combined with the PIN_MAP_COMPACT define, which +is available in variant.h of the D11 variants. This can save from 10's to over 200 bytes. + +### Note that a new column (GCLKCCL) was added for 1.6.8-beta-b0. +MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE in variant.h is used to track versions. +If using board variant files with the old format, the new core will still read the +table the old way, losing any new features introduced by the new column. Additionally, +new definitions have been added for D51, L21, and C21 support. + +### Each pin can have multiple functions. +The PinDescription table describes how each of the pins can be used by the Arduino +core. Each pin can have multiple functions (ie: ADC input, digital output, PWM, +communications, etc.), and the PinDescription table configures which functions can +be used for each pin. This table is mainly accessed by the pinPeripheral function in +wiring_private.c, which is used to attach a pin to a particular peripheral function. +The communications drivers (ie: SPI, I2C, and UART), analogRead(), analogWrite(), +analogReference(), attachInterrupt(), and pinMode() all call pinPeripheral() to +verify that the pin can perform the function requested, and to configure the pin for +that function. Most of the contents of pinMode() are now in pinPeripheral(). + +### Pin Mapping +There are different ways that pins can be mapped. Typically, there is no relation +between the arduino pin number used, and the actual port pin designator. Thus, the +pcb must be printed with the arduino numbering, otherwise, if the port pin is printed, +a cross reference table is needed to find the arduino pin number. However, this results +in the least amount of space used by the table. Another method, used by default by the +MT-D21E and MT-D11, maps Arduino pin numbers to the actual port pin number (ie: Arduino +pin 28 = Port A28). This works well when there is only one port (or if the PORTB pins +are used for onboard functions and not broken out). PIO_NOT_A_PIN entries must be added +for pins that are used for other purposes or for pins that do not exist (especially the +D11), so some FLASH space may be wasted. For an example of both types, see variant.cpp +from the MT-D11 variant. The Xeno combines both methods, using the actual port pin +designators from both PORTA and PORTB for arduino numbers 0-31 (ie: B1=1, A2=2), then +using arduino numbering only above 31. For 0-31 only one pin from PORTA or PORTB can be +used, leaving the other pin for some number above 31. + +**See [WVariant.h](https://github.com/mattairtech/ArduinoCore-samd/tree/master/cores/arduino/WVariant.h) for the definitions used in the table.** + +### Port +This is the port (ie: PORTA). Not used with PIN_DESCRIPTION_TABLE_SIMPLE. + +### Pin +This is the pin (bit) within the port. Valid values are 0-31. Not used with +PIN_DESCRIPTION_TABLE_SIMPLE. + +### SetPortPin() +When PIN_DESCRIPTION_TABLE_SIMPLE is defined, Port and Pin are combined into one column +using the SetPortPin() packing macro: SetPortPin(PORTA, 2). If the pin is not usable, +use SetPortPin(NOT_A_PORT, 0). + +### PinType +This indicates what peripheral function the pin can be attached to. In most cases, +this is PIO_MULTI, which means that the pin can be anything listed in the PinAttribute +field. It can also be set to a specific peripheral. In this case, any attempt to +configure the pin (using pinPeripheral or pinMode) as anything else will fail (and +pinPeripheral will return -1). This can be used to prevent accidental re-configuration +of a pin that is configured for only one function (ie: USB D- and D+ pins). If a pin +is not used or does not exist, PIO_NOT_A_PIN must be entered in this field. See +WVariant.h for valid entries. These entries are also used as a parameter to +pinPeripheral() with the exception of PIO_NOT_A_PIN and PIO_MULTI. The pinMode function +now calls pinPeripheral() with the desired mode. Note that this field is not used to +select between the different peripherals possible with each of the SERCOM and TIMER +functions. PeripheralAttribute is now used for this. When PIN_DESCRIPTION_TABLE_SIMPLE +is defined, PinType is not used (the pin is treated as PIO_MULTI). + +### PeripheralAttribute +This is an 8-bit bitfield used for various peripheral configuration. It is primarily +used to select between the different peripherals possible with each of the SERCOM and +TIMER functions. TIMER pins are individual, while SERCOM uses a group of two to four +pins. This group of pins can span both peripherals. For example, pin 19 (SPI1 SCK) on +the MT-D21E uses PER_ATTR_SERCOM_ALT while pin 22 (SPI1 MISO) uses PER_ATTR_SERCOM_STD. +Both TIMER and SERCOM can exist for each pin. This bitfield is also used to set the +pin drive strength and the input buffer configuration (ie: totem-pole, open-drain, +buskeeper, etc.). Starting with 1.6.8, the ADC instance on the D51 and C21 (there are +two) is also selected here. Note that the D51 adds a third timer attribute and +requires consultation of the datasheet IOSET tables. See WVariant.h for valid entries. + +### PinAttribute +This is a 32-bit bitfield used to list all of the valid peripheral functions that a +pin can attach to. This includes GPIO functions like PIN_ATTR_OUTPUT. Certain +attributes are shorthand for a combination of other attributes. PIN_ATTR_DIGITAL +includes all of the GPIO functions, while PIN_ATTR_TIMER includes both +PIN_ATTR_TIMER_PWM and PIN_ATTR_TIMER_CAPTURE (capture is not used yet). +PIN_ATTR_ANALOG is an alias to PIN_ATTR_ANALOG_ADC. This bitfield is useful for +limiting a pin to only input related functions or output functions. This allows a pin +to have a more flexible configuration, while restricting the direction (ie: to avoid +contention). See WVariant.h for valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. + +### TCChannel +This is the TC/TCC channel (if any) assigned to the pin. Some TC channels are available +on multiple pins. In general, only one pin should be configured in the pinDescription +table per TC channel. Starting with 1.6.8, the timer type is now encoded in this column +to support the D51, L21 and C21, which use TC numbers starting at 0 (rather than 3 as on +the D21). See WVariant.h for valid entries. + +### ADCChannelNumber +This is the ADC channel (if any) assigned to the pin. The D51 and C21 each have two ADC +instances, which are selected in the PeripheralAttribute column. See WVariant.h for +valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. + +### ExtInt +This is the interrupt (if any) assigned to the pin. Some interrupt numbers are +available on multiple pins. In general, only one pin should be configured in the +pinDescription table per interrupt number. Thus, for example, if an interrupt was +needed on pin 2, EXTERNAL_INT_2 can be moved from pin 18. See WVariant.h for valid +entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. + +### SetExtIntADC() +When PIN_DESCRIPTION_TABLE_SIMPLE is defined, ExtInt and ADCChannelNumber are combined +into one column using the SetExtIntADC() packing macro: SetExtIntADC(EXTERNAL_INT_4, +ADC_Channel2). If the pin is not usable, use SetExtIntADC(EXTERNAL_INT_NONE, No_ADC_Channel). + +### GCLKCCL +This column was added in 1.6.8-beta-b0. It is not yet used. It will eventually support +the Analog Comparators (AC), the Configurable Custom Logic (CCL) peripherals of the D51, +L21 and C21, and the GCLK outputs (inputs) of all of the MCUs. Not used with +PIN_DESCRIPTION_TABLE_SIMPLE. diff --git a/variants/Generic_D11D14AS/debug_scripts/SAMD11D14AS.gdb b/variants/Generic_D11D14AS/debug_scripts/SAMD11D14AS.gdb index 1daf3ccc2..861e5a4d5 100644 --- a/variants/Generic_D11D14AS/debug_scripts/SAMD11D14AS.gdb +++ b/variants/Generic_D11D14AS/debug_scripts/SAMD11D14AS.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd11d14as" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd11d14as" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/Generic_D11D14AS/linker_scripts/gcc/4KB_Bootloader/flash_16KB.ld b/variants/Generic_D11D14AS/linker_scripts/gcc/4KB_Bootloader/flash_16KB.ld index 1e2d5f052..6f9bc1576 100644 --- a/variants/Generic_D11D14AS/linker_scripts/gcc/4KB_Bootloader/flash_16KB.ld +++ b/variants/Generic_D11D14AS/linker_scripts/gcc/4KB_Bootloader/flash_16KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x1000, LENGTH = 0x00004000-0x1000 /* First 4KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x1000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x1000, LENGTH = 0x00004000-0x1000 /* First 4KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x1000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Generic_D11D14AS/linker_scripts/gcc/No_Bootloader/flash_16KB.ld b/variants/Generic_D11D14AS/linker_scripts/gcc/No_Bootloader/flash_16KB.ld index bd135b3dd..674a40d60 100644 --- a/variants/Generic_D11D14AS/linker_scripts/gcc/No_Bootloader/flash_16KB.ld +++ b/variants/Generic_D11D14AS/linker_scripts/gcc/No_Bootloader/flash_16KB.ld @@ -1,214 +1,214 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00004000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00004000 + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Generic_D11D14AS/openocd_scripts/SAMD11D14AS.cfg b/variants/Generic_D11D14AS/openocd_scripts/SAMD11D14AS.cfg index 2b1d4c72f..aa4a7ddc3 100644 --- a/variants/Generic_D11D14AS/openocd_scripts/SAMD11D14AS.cfg +++ b/variants/Generic_D11D14AS/openocd_scripts/SAMD11D14AS.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samd11d14as -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samdXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samd11d14as +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samdXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/Generic_D11D14AS/pins_arduino.h b/variants/Generic_D11D14AS/pins_arduino.h index db0e40c3d..36ab06c77 100644 --- a/variants/Generic_D11D14AS/pins_arduino.h +++ b/variants/Generic_D11D14AS/pins_arduino.h @@ -1,21 +1,21 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -// API compatibility -#include "variant.h" - +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" + diff --git a/variants/Generic_D11D14AS/variant.cpp b/variants/Generic_D11D14AS/variant.cpp index bbd0675de..656cae9aa 100644 --- a/variants/Generic_D11D14AS/variant.cpp +++ b/variants/Generic_D11D14AS/variant.cpp @@ -1,177 +1,177 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* - * Modified 9 June 2018 by Justin Mattair - * for MattairTech boards (www.mattairtech.com) - * - * See README.md for documentation and pin mapping information - */ - - -#include "variant.h" - -/* - * Pins descriptions - */ -#if defined PIN_MAP_STANDARD -#if defined(PIN_DESCRIPTION_TABLE_SIMPLE) -const PinDescription g_APinDescription[]= -{ - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( PORTA, 2 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_2, ADC_Channel0 ) }, - { SetPortPin( PORTA, 3 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel1 ) }, - { SetPortPin( PORTA, 4 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), TCC0_CH0, SetExtIntADC( EXTERNAL_INT_4, ADC_Channel2 ) }, - { SetPortPin( PORTA, 5 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), TCC0_CH1, SetExtIntADC( EXTERNAL_INT_5, ADC_Channel3 ) }, - { SetPortPin( PORTA, 6 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), TCC0_CH2, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel4 ) }, - { SetPortPin( PORTA, 7 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), TCC0_CH3, SetExtIntADC( EXTERNAL_INT_7, ADC_Channel5 ) }, - { SetPortPin( PORTA, 8 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, - { SetPortPin( PORTA, 9 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( PORTA, 14 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NMI, ADC_Channel6 ) }, - { SetPortPin( PORTA, 15 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), TC1_CH1, SetExtIntADC( EXTERNAL_INT_1, ADC_Channel7 ) }, - { SetPortPin( PORTA, 16 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), TC1_CH0, SetExtIntADC( EXTERNAL_INT_0, No_ADC_Channel ) }, - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( PORTA, 22 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_6, No_ADC_Channel ) }, - { SetPortPin( PORTA, 23 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, - { SetPortPin( PORTA, 24 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // USB/DM - { SetPortPin( PORTA, 25 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // USB/DP - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( PORTA, 28 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused (Reset) - { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused - { SetPortPin( PORTA, 30 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), TC2_CH0, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // SWD CLK - { SetPortPin( PORTA, 31 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), TC2_CH1, SetExtIntADC( EXTERNAL_INT_3, No_ADC_Channel ) }, // SWD IO -} ; -#else -const PinDescription g_APinDescription[]= -{ - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_2, GCLK_CCL_NONE }, - { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 4, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TCC0_CH0, ADC_Channel2, EXTERNAL_INT_4, GCLK_CCL_NONE }, - { PORTA, 5, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TCC0_CH1, ADC_Channel3, EXTERNAL_INT_5, GCLK_CCL_NONE }, - { PORTA, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC0_CH2, ADC_Channel4, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 7, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH3, ADC_Channel5, EXTERNAL_INT_7, GCLK_CCL_NONE }, - { PORTA, 8, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 9, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { PORTA, 14, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel6, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, - { PORTA, 15, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC1_CH1, ADC_Channel7, EXTERNAL_INT_1, GCLK_CCL_NONE }, - { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TC1_CH0, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, - { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 24, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM - { PORTA, 25, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { PORTA, 28, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused (Reset) - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { PORTA, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC2_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD CLK - { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC2_CH1, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, // SWD IO -} ; -#endif -#elif defined(PIN_MAP_COMPACT) -#if defined(PIN_DESCRIPTION_TABLE_SIMPLE) -const PinDescription g_APinDescription[]= -{ - { SetPortPin( PORTA, 2 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_2, ADC_Channel0 ) }, - { SetPortPin( PORTA, 3 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel1 ) }, - { SetPortPin( PORTA, 4 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), TCC0_CH0, SetExtIntADC( EXTERNAL_INT_4, ADC_Channel2 ) }, - { SetPortPin( PORTA, 5 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), TCC0_CH1, SetExtIntADC( EXTERNAL_INT_5, ADC_Channel3 ) }, - { SetPortPin( PORTA, 6 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), TCC0_CH2, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel4 ) }, - { SetPortPin( PORTA, 7 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), TCC0_CH3, SetExtIntADC( EXTERNAL_INT_7, ADC_Channel5 ) }, - { SetPortPin( PORTA, 8 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, - { SetPortPin( PORTA, 9 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, - { SetPortPin( PORTA, 14 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NMI, ADC_Channel6 ) }, - { SetPortPin( PORTA, 15 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), TC1_CH1, SetExtIntADC( EXTERNAL_INT_1, ADC_Channel7 ) }, - { SetPortPin( PORTA, 16 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), TC1_CH0, SetExtIntADC( EXTERNAL_INT_0, No_ADC_Channel ) }, - { SetPortPin( PORTA, 22 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_6, No_ADC_Channel ) }, - { SetPortPin( PORTA, 23 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, - { SetPortPin( PORTA, 24 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // USB/DM - { SetPortPin( PORTA, 25 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // USB/DP - { SetPortPin( PORTA, 28 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused (Reset) - { SetPortPin( PORTA, 30 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), TC2_CH0, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // SWD CLK - { SetPortPin( PORTA, 31 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), TC2_CH1, SetExtIntADC( EXTERNAL_INT_3, No_ADC_Channel ) }, // SWD IO -} ; -#else -const PinDescription g_APinDescription[]= -{ - { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_2, GCLK_CCL_NONE }, - { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 4, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TCC0_CH0, ADC_Channel2, EXTERNAL_INT_4, GCLK_CCL_NONE }, - { PORTA, 5, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TCC0_CH1, ADC_Channel3, EXTERNAL_INT_5, GCLK_CCL_NONE }, - { PORTA, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC0_CH2, ADC_Channel4, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 7, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH3, ADC_Channel5, EXTERNAL_INT_7, GCLK_CCL_NONE }, - { PORTA, 8, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 9, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 14, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel6, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, - { PORTA, 15, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC1_CH1, ADC_Channel7, EXTERNAL_INT_1, GCLK_CCL_NONE }, - { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TC1_CH0, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, - { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, - { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 24, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM - { PORTA, 25, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP - { PORTA, 28, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused (Reset) - { PORTA, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC2_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD CLK - { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC2_CH1, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, // SWD IO -} ; -#endif -#endif - -const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TC1, TC2 } ; - -// Multi-serial objects instantiation -SERCOM sercom0( SERCOM0 ) ; -SERCOM sercom1( SERCOM1 ) ; -SERCOM sercom2( SERCOM2 ) ; - -#if defined(ONE_UART) || defined(TWO_UART) -Uart Serial1( SERCOM_INSTANCE_SERIAL1, PIN_SERIAL1_RX, PIN_SERIAL1_TX, PAD_SERIAL1_RX, PAD_SERIAL1_TX ) ; - -void SERCOM1_Handler() -{ - Serial1.IrqHandler(); -} -#endif - -#if defined(TWO_UART) -Uart Serial2( SERCOM_INSTANCE_SERIAL2, PIN_SERIAL2_RX, PIN_SERIAL2_TX, PAD_SERIAL2_RX, PAD_SERIAL2_TX ) ; - -void SERCOM0_Handler() -{ - Serial2.IrqHandler(); -} -#endif +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* + * Modified 9 June 2018 by Justin Mattair + * for MattairTech boards (www.mattairtech.com) + * + * See README.md for documentation and pin mapping information + */ + + +#include "variant.h" + +/* + * Pins descriptions + */ +#if defined PIN_MAP_STANDARD +#if defined(PIN_DESCRIPTION_TABLE_SIMPLE) +const PinDescription g_APinDescription[]= +{ + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( PORTA, 2 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_2, ADC_Channel0 ) }, + { SetPortPin( PORTA, 3 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel1 ) }, + { SetPortPin( PORTA, 4 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), TCC0_CH0, SetExtIntADC( EXTERNAL_INT_4, ADC_Channel2 ) }, + { SetPortPin( PORTA, 5 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), TCC0_CH1, SetExtIntADC( EXTERNAL_INT_5, ADC_Channel3 ) }, + { SetPortPin( PORTA, 6 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), TCC0_CH2, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel4 ) }, + { SetPortPin( PORTA, 7 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), TCC0_CH3, SetExtIntADC( EXTERNAL_INT_7, ADC_Channel5 ) }, + { SetPortPin( PORTA, 8 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, + { SetPortPin( PORTA, 9 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( PORTA, 14 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NMI, ADC_Channel6 ) }, + { SetPortPin( PORTA, 15 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), TC1_CH1, SetExtIntADC( EXTERNAL_INT_1, ADC_Channel7 ) }, + { SetPortPin( PORTA, 16 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), TC1_CH0, SetExtIntADC( EXTERNAL_INT_0, No_ADC_Channel ) }, + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( PORTA, 22 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_6, No_ADC_Channel ) }, + { SetPortPin( PORTA, 23 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, + { SetPortPin( PORTA, 24 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // USB/DM + { SetPortPin( PORTA, 25 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // USB/DP + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( PORTA, 28 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused (Reset) + { SetPortPin( NOT_A_PORT, 0 ), PER_ATTR_NONE, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused + { SetPortPin( PORTA, 30 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), TC2_CH0, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // SWD CLK + { SetPortPin( PORTA, 31 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), TC2_CH1, SetExtIntADC( EXTERNAL_INT_3, No_ADC_Channel ) }, // SWD IO +} ; +#else +const PinDescription g_APinDescription[]= +{ + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_2, GCLK_CCL_NONE }, + { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 4, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TCC0_CH0, ADC_Channel2, EXTERNAL_INT_4, GCLK_CCL_NONE }, + { PORTA, 5, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TCC0_CH1, ADC_Channel3, EXTERNAL_INT_5, GCLK_CCL_NONE }, + { PORTA, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC0_CH2, ADC_Channel4, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 7, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH3, ADC_Channel5, EXTERNAL_INT_7, GCLK_CCL_NONE }, + { PORTA, 8, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 9, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { PORTA, 14, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel6, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, + { PORTA, 15, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC1_CH1, ADC_Channel7, EXTERNAL_INT_1, GCLK_CCL_NONE }, + { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TC1_CH0, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, + { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 24, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM + { PORTA, 25, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { PORTA, 28, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused (Reset) + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { PORTA, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC2_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD CLK + { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC2_CH1, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, // SWD IO +} ; +#endif +#elif defined(PIN_MAP_COMPACT) +#if defined(PIN_DESCRIPTION_TABLE_SIMPLE) +const PinDescription g_APinDescription[]= +{ + { SetPortPin( PORTA, 2 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_2, ADC_Channel0 ) }, + { SetPortPin( PORTA, 3 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel1 ) }, + { SetPortPin( PORTA, 4 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), TCC0_CH0, SetExtIntADC( EXTERNAL_INT_4, ADC_Channel2 ) }, + { SetPortPin( PORTA, 5 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), TCC0_CH1, SetExtIntADC( EXTERNAL_INT_5, ADC_Channel3 ) }, + { SetPortPin( PORTA, 6 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), TCC0_CH2, SetExtIntADC( EXTERNAL_INT_NONE, ADC_Channel4 ) }, + { SetPortPin( PORTA, 7 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), TCC0_CH3, SetExtIntADC( EXTERNAL_INT_7, ADC_Channel5 ) }, + { SetPortPin( PORTA, 8 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, + { SetPortPin( PORTA, 9 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, + { SetPortPin( PORTA, 14 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NMI, ADC_Channel6 ) }, + { SetPortPin( PORTA, 15 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), TC1_CH1, SetExtIntADC( EXTERNAL_INT_1, ADC_Channel7 ) }, + { SetPortPin( PORTA, 16 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), TC1_CH0, SetExtIntADC( EXTERNAL_INT_0, No_ADC_Channel ) }, + { SetPortPin( PORTA, 22 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_6, No_ADC_Channel ) }, + { SetPortPin( PORTA, 23 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, + { SetPortPin( PORTA, 24 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // USB/DM + { SetPortPin( PORTA, 25 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // USB/DP + { SetPortPin( PORTA, 28 ), PER_ATTR_DRIVE_STRONG, NOT_ON_TIMER, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // Unused (Reset) + { SetPortPin( PORTA, 30 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), TC2_CH0, SetExtIntADC( EXTERNAL_INT_NONE, No_ADC_Channel ) }, // SWD CLK + { SetPortPin( PORTA, 31 ), (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), TC2_CH1, SetExtIntADC( EXTERNAL_INT_3, No_ADC_Channel ) }, // SWD IO +} ; +#else +const PinDescription g_APinDescription[]= +{ + { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_2, GCLK_CCL_NONE }, + { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 4, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TCC0_CH0, ADC_Channel2, EXTERNAL_INT_4, GCLK_CCL_NONE }, + { PORTA, 5, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TCC0_CH1, ADC_Channel3, EXTERNAL_INT_5, GCLK_CCL_NONE }, + { PORTA, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC0_CH2, ADC_Channel4, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 7, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH3, ADC_Channel5, EXTERNAL_INT_7, GCLK_CCL_NONE }, + { PORTA, 8, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 9, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 14, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel6, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, + { PORTA, 15, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC1_CH1, ADC_Channel7, EXTERNAL_INT_1, GCLK_CCL_NONE }, + { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TC1_CH0, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, + { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, + { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 24, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM + { PORTA, 25, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP + { PORTA, 28, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused (Reset) + { PORTA, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC2_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD CLK + { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC2_CH1, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, // SWD IO +} ; +#endif +#endif + +const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TC1, TC2 } ; + +// Multi-serial objects instantiation +SERCOM sercom0( SERCOM0 ) ; +SERCOM sercom1( SERCOM1 ) ; +SERCOM sercom2( SERCOM2 ) ; + +#if defined(ONE_UART) || defined(TWO_UART) +Uart Serial1( SERCOM_INSTANCE_SERIAL1, PIN_SERIAL1_RX, PIN_SERIAL1_TX, PAD_SERIAL1_RX, PAD_SERIAL1_TX ) ; + +void SERCOM1_Handler() +{ + Serial1.IrqHandler(); +} +#endif + +#if defined(TWO_UART) +Uart Serial2( SERCOM_INSTANCE_SERIAL2, PIN_SERIAL2_RX, PIN_SERIAL2_TX, PAD_SERIAL2_RX, PAD_SERIAL2_TX ) ; + +void SERCOM0_Handler() +{ + Serial2.IrqHandler(); +} +#endif diff --git a/variants/Generic_D11D14AS/variant.h b/variants/Generic_D11D14AS/variant.h index 1a2d12bb0..405b2c3e0 100644 --- a/variants/Generic_D11D14AS/variant.h +++ b/variants/Generic_D11D14AS/variant.h @@ -1,374 +1,374 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* - * Modified 16 June 2018 by Justin Mattair (www.mattairtech.com) - * See README.md for documentation and pin mapping information - */ - -#ifndef _VARIANT_MATTAIRTECH_D11D14AS_ -#define _VARIANT_MATTAIRTECH_D11D14AS_ - -/* This variant requires the MattairTech SAM D|L|C Core for Arduino >= 1.6.18-beta-b1. - * The format is different than the stock Arduino SAMD core, - * which uses ARDUINO_SAMD_VARIANT_COMPLIANCE instead. - */ -#define MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE 10618 - -/*---------------------------------------------------------------------------- - * Clock Configuration - *----------------------------------------------------------------------------*/ - -/** Master clock frequency (also Fcpu frequency) */ -#define VARIANT_MCK (48000000ul) - -/* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ - * must also be defined with the external crystal frequency in Hertz. - */ -#define HS_CRYSTAL_FREQUENCY_HERTZ 16000000UL - -/* If the PLL is used (CLOCKCONFIG_32768HZ_CRYSTAL, or CLOCKCONFIG_HS_CRYSTAL - * defined), then PLL_FRACTIONAL_ENABLED can be defined, which will result in - * a more accurate 48MHz output frequency at the expense of increased jitter. - */ -//#define PLL_FRACTIONAL_ENABLED - -/* If both PLL_FAST_STARTUP and CLOCKCONFIG_HS_CRYSTAL are defined, the crystal - * will be divided down to 1MHz - 2MHz, rather than 32KHz - 64KHz, before being - * multiplied by the PLL. This will result in a faster lock time for the PLL, - * however, it will also result in a less accurate PLL output frequency if the - * crystal is not divisible (without remainder) by 1MHz. In this case, define - * PLL_FRACTIONAL_ENABLED as well. - */ -//#define PLL_FAST_STARTUP - -/* The fine calibration value for DFLL open-loop mode is defined here. - * The coarse calibration value is loaded from NVM OTP (factory calibration values). - */ -#define NVM_SW_CALIB_DFLL48M_FINE_VAL (512) - -/*---------------------------------------------------------------------------- - * Headers - *----------------------------------------------------------------------------*/ - -#include "WVariant.h" -#include "sam.h" -#include "../../config.h" - -#ifdef __cplusplus -#include "SERCOM.h" -#include "Uart.h" -#endif // __cplusplus - -#ifdef __cplusplus -extern "C" -{ -#endif // __cplusplus - -/*---------------------------------------------------------------------------- - * Pins - *----------------------------------------------------------------------------*/ - -// Number of pins defined in PinDescription array -#define PIN_MAP_STANDARD -//#define PIN_MAP_COMPACT - -#if defined PIN_MAP_STANDARD - #define NUM_PIN_DESCRIPTION_ENTRIES (32u) -#elif defined PIN_MAP_COMPACT - #define NUM_PIN_DESCRIPTION_ENTRIES (18u) -#else - #error "variant.h: You must set PIN_MAP_STANDARD or PIN_MAP_COMPACT" -#endif - -#define PINS_COUNT NUM_PIN_DESCRIPTION_ENTRIES -#define NUM_DIGITAL_PINS PINS_COUNT -#define NUM_ANALOG_INPUTS (8u) -#define NUM_ANALOG_OUTPUTS (1u) -#define analogInputToDigitalPin(p) (p) - -#define digitalPinToPort(P) ( &(PORT->Group[GetPort(P)]) ) -#define digitalPinToBitMask(P) ( 1 << GetPin(P) ) - -#if defined(PIN_DESCRIPTION_TABLE_SIMPLE) - #define digitalPinHasPWM(P) ( g_APinDescription[P].ulTCChannel != NOT_ON_TIMER ) -#else - #define digitalPinHasPWM(P) ( (g_APinDescription[P].ulPinAttribute & PIN_ATTR_TIMER_PWM) == PIN_ATTR_TIMER_PWM ) -#endif - -//#define analogInPinToBit(P) ( ) -#define portOutputRegister(port) ( &(port->OUT.reg) ) -#define portInputRegister(port) ( &(port->IN.reg) ) -#define portModeRegister(port) ( &(port->DIR.reg) ) - -/* - * digitalPinToTimer(..) is AVR-specific and is not defined for SAMD - * architecture. If you need to check if a pin supports PWM you must - * use digitalPinHasPWM(..). - * - * https://github.com/arduino/Arduino/issues/1833 - */ -// #define digitalPinToTimer(P) - -/* LEDs - * None of these defines are currently used by the core. - */ -#if defined PIN_MAP_STANDARD -#define PIN_LED_13 (16u) -#define PIN_LED_RXL (22u) -#define PIN_LED_TXL (23u) -#elif defined PIN_MAP_COMPACT -#define PIN_LED_13 (10u) -#define PIN_LED_RXL (11u) -#define PIN_LED_TXL (12u) -#endif - -#define PIN_LED PIN_LED_13 -#define PIN_LED2 PIN_LED_RXL -#define PIN_LED3 PIN_LED_TXL -#define LED_BUILTIN PIN_LED_13 - - -/* - * Analog pins - */ -#if defined PIN_MAP_STANDARD -#define PIN_A2 (2ul) -#define PIN_A3 (3ul) -#define PIN_A4 (4ul) -#define PIN_A5 (5ul) -#define PIN_A6 (6ul) -#define PIN_A7 (7ul) -#define PIN_A14 (14ul) -#define PIN_A15 (15ul) -#define PIN_DAC0 (2ul) -#elif defined PIN_MAP_COMPACT -#define PIN_A2 (0ul) -#define PIN_A3 (1ul) -#define PIN_A4 (2ul) -#define PIN_A5 (3ul) -#define PIN_A6 (4ul) -#define PIN_A7 (5ul) -#define PIN_A14 (8ul) -#define PIN_A15 (9ul) -#define PIN_DAC0 (0ul) -#endif - -static const uint8_t A2 = PIN_A2; -static const uint8_t A3 = PIN_A3; -static const uint8_t A4 = PIN_A4; -static const uint8_t A5 = PIN_A5; -static const uint8_t A6 = PIN_A6; -static const uint8_t A7 = PIN_A7; -static const uint8_t A14 = PIN_A14; -static const uint8_t A15 = PIN_A15; -static const uint8_t DAC0 = PIN_DAC0; - -#define ADC_RESOLUTION 12 - -#define REMAP_ANALOG_PIN_ID while(0) -// #define REMAP_ANALOG_PIN_ID if ( ulPin < A0 ) ulPin += A0 - -/* Set default analog voltage reference */ -#define VARIANT_AR_DEFAULT AR_DEFAULT - -/* Reference voltage pins (define even if not enabled with PIN_ATTR_REF in the PinDescription table) */ -#if defined PIN_MAP_STANDARD -#define REFA_PIN (3ul) -#define REFB_PIN (4ul) -#elif defined PIN_MAP_COMPACT -#define REFA_PIN (1ul) -#define REFB_PIN (2ul) -#endif - - -// The ATN pin may be used in the future as the first SPI chip select. -// On boards that do not have the Arduino physical form factor, it can to set to any free pin. -#if defined PIN_MAP_STANDARD -#define PIN_ATN (6ul) -#elif defined PIN_MAP_COMPACT -#define PIN_ATN (4ul) -#endif -static const uint8_t ATN = PIN_ATN; - - -/* - * Serial interfaces - */ -// Serial1 -#if defined PIN_MAP_STANDARD -#define PIN_SERIAL1_RX (31ul) -#define PIN_SERIAL1_TX (30ul) -#elif defined PIN_MAP_COMPACT -#define PIN_SERIAL1_RX (17ul) -#define PIN_SERIAL1_TX (16ul) -#endif - -#define PAD_SERIAL1_TX (UART_TX_PAD_2) -#define PAD_SERIAL1_RX (SERCOM_RX_PAD_3) -#define SERCOM_INSTANCE_SERIAL1 &sercom1 - -// Serial2 -#if defined PIN_MAP_STANDARD -#define PIN_SERIAL2_RX (15ul) -#define PIN_SERIAL2_TX (14ul) -#elif defined PIN_MAP_COMPACT -#define PIN_SERIAL2_RX (9ul) -#define PIN_SERIAL2_TX (8ul) -#endif - -#define PAD_SERIAL2_TX (UART_TX_PAD_0) -#define PAD_SERIAL2_RX (SERCOM_RX_PAD_1) -#define SERCOM_INSTANCE_SERIAL2 &sercom0 - - -/* - * SPI Interfaces - */ -#if defined(ONE_SPI) -#define SPI_INTERFACES_COUNT 1 -#else -#define SPI_INTERFACES_COUNT 0 -#endif - -#if defined PIN_MAP_STANDARD -#define PIN_SPI_MISO (7u) -#define PIN_SPI_MOSI (14u) -#define PIN_SPI_SCK (15u) -#define PIN_SPI_SS (6u) -#elif defined PIN_MAP_COMPACT -#define PIN_SPI_MISO (5u) -#define PIN_SPI_MOSI (8u) -#define PIN_SPI_SCK (9u) -#define PIN_SPI_SS (4u) -#endif - -#define PERIPH_SPI sercom0 -#define PAD_SPI_TX SPI_PAD_0_SCK_1 -#define PAD_SPI_RX SERCOM_RX_PAD_3 - -static const uint8_t SS = PIN_SPI_SS ; // The SERCOM SS PAD is available on this pin but HW SS isn't used. Set here only for reference. -static const uint8_t MOSI = PIN_SPI_MOSI ; -static const uint8_t MISO = PIN_SPI_MISO ; -static const uint8_t SCK = PIN_SPI_SCK ; - - -/* - * Wire Interfaces - */ -#if defined(ONE_WIRE) -#define WIRE_INTERFACES_COUNT 1 -#else -#define WIRE_INTERFACES_COUNT 0 -#endif - -#if defined PIN_MAP_STANDARD -#define PIN_WIRE_SDA (22u) -#define PIN_WIRE_SCL (23u) -#elif defined PIN_MAP_COMPACT -#define PIN_WIRE_SDA (11u) -#define PIN_WIRE_SCL (12u) -#endif - -#define PERIPH_WIRE sercom2 -#define WIRE_IT_HANDLER SERCOM2_Handler - -static const uint8_t SDA = PIN_WIRE_SDA; -static const uint8_t SCL = PIN_WIRE_SCL; - - -/* - * USB - Define PIN_USB_HOST_ENABLE to assert the defined pin to - * PIN_USB_HOST_ENABLE_VALUE during startup. Leave undefined to disable this pin. - */ -#if defined PIN_MAP_STANDARD -#define PIN_USB_DM (24ul) -#define PIN_USB_DP (25ul) -//#define PIN_USB_HOST_ENABLE (28ul) -#elif defined PIN_MAP_COMPACT -#define PIN_USB_DM (13ul) -#define PIN_USB_DP (14ul) -//#define PIN_USB_HOST_ENABLE (15ul) -#endif - -#define PIN_USB_HOST_ENABLE_VALUE HIGH - -#ifdef __cplusplus -} -#endif - - -/*---------------------------------------------------------------------------- - * Arduino objects - C++ only - *----------------------------------------------------------------------------*/ - -#ifdef __cplusplus - -/* ========================= - * ===== SERCOM DEFINITION - * ========================= -*/ -extern SERCOM sercom0; -extern SERCOM sercom1; -extern SERCOM sercom2; - -extern Uart Serial1; -extern Uart Serial2; - -#endif - -// These serial port names are intended to allow libraries and architecture-neutral -// sketches to automatically default to the correct port name for a particular type -// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, -// the first hardware serial port whose RX/TX pins are not dedicated to another use. -// -// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor -// -// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial -// -// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library -// -// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. -// -// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX -// pins are NOT connected to anything by default. -#define SERIAL_PORT_USBVIRTUAL SerialUSB -// SERIAL_PORT_MONITOR seems to be used only by the USB Host library (as of 1.6.5). -// It normally allows debugging output on the USB programming port, while the USB host uses the USB native port. -// The programming port is connected to a hardware UART through a USB-Serial bridge (EDBG chip) on the Zero. -// Boards that do not have the EDBG chip will have to connect a USB-TTL serial adapter to 'Serial' to get -// the USB Host debugging output. -#define SERIAL_PORT_MONITOR Serial1 -// Serial has no physical pins broken out, so it's not listed as HARDWARE port -#define SERIAL_PORT_HARDWARE Serial1 -#define SERIAL_PORT_HARDWARE_OPEN Serial1 - -// The MT-D11 does not have the EDBG support chip, which provides a USB-UART bridge -// accessible using Serial (the Arduino serial monitor is normally connected to this). -// So, the USB virtual serial port (SerialUSB) must be used to communicate with the host. -// Because most sketches use Serial to print to the monitor, it is aliased to SerialUSB. -// Remember to use while(!Serial); to wait for a connection before Serial printing. - -// When USB CDC is enabled, Serial refers to SerialUSB, otherwise it refers to Serial1. -#if defined(CDC_ONLY) || defined(CDC_HID) || defined(WITH_CDC) -#define Serial SerialUSB -#else -#define Serial Serial1 -#endif - -#endif /* _VARIANT_ARDUINO_ZERO_ */ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* + * Modified 16 June 2018 by Justin Mattair (www.mattairtech.com) + * See README.md for documentation and pin mapping information + */ + +#ifndef _VARIANT_GENERIC_D11D14AS_ +#define _VARIANT_GENERIC_D11D14AS_ + +/* This variant requires the MattairTech SAM D|L|C Core for Arduino >= 1.6.18-beta-b1. + * The format is different than the stock Arduino SAMD core, + * which uses ARDUINO_SAMD_VARIANT_COMPLIANCE instead. + */ +#define MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE 10618 + +/*---------------------------------------------------------------------------- + * Clock Configuration + *----------------------------------------------------------------------------*/ + +/** Master clock frequency (also Fcpu frequency) */ +#define VARIANT_MCK (48000000ul) + +/* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ + * must also be defined with the external crystal frequency in Hertz. + */ +#define HS_CRYSTAL_FREQUENCY_HERTZ 16000000UL + +/* If the PLL is used (CLOCKCONFIG_32768HZ_CRYSTAL, or CLOCKCONFIG_HS_CRYSTAL + * defined), then PLL_FRACTIONAL_ENABLED can be defined, which will result in + * a more accurate 48MHz output frequency at the expense of increased jitter. + */ +//#define PLL_FRACTIONAL_ENABLED + +/* If both PLL_FAST_STARTUP and CLOCKCONFIG_HS_CRYSTAL are defined, the crystal + * will be divided down to 1MHz - 2MHz, rather than 32KHz - 64KHz, before being + * multiplied by the PLL. This will result in a faster lock time for the PLL, + * however, it will also result in a less accurate PLL output frequency if the + * crystal is not divisible (without remainder) by 1MHz. In this case, define + * PLL_FRACTIONAL_ENABLED as well. + */ +//#define PLL_FAST_STARTUP + +/* The fine calibration value for DFLL open-loop mode is defined here. + * The coarse calibration value is loaded from NVM OTP (factory calibration values). + */ +#define NVM_SW_CALIB_DFLL48M_FINE_VAL (512) + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" +#include "sam.h" +#include "../../config.h" + +#ifdef __cplusplus +#include "SERCOM.h" +#include "Uart.h" +#endif // __cplusplus + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +/*---------------------------------------------------------------------------- + * Pins + *----------------------------------------------------------------------------*/ + +// Number of pins defined in PinDescription array +#define PIN_MAP_STANDARD +//#define PIN_MAP_COMPACT + +#if defined PIN_MAP_STANDARD + #define NUM_PIN_DESCRIPTION_ENTRIES (32u) +#elif defined PIN_MAP_COMPACT + #define NUM_PIN_DESCRIPTION_ENTRIES (18u) +#else + #error "variant.h: You must set PIN_MAP_STANDARD or PIN_MAP_COMPACT" +#endif + +#define PINS_COUNT NUM_PIN_DESCRIPTION_ENTRIES +#define NUM_DIGITAL_PINS PINS_COUNT +#define NUM_ANALOG_INPUTS (8u) +#define NUM_ANALOG_OUTPUTS (1u) +#define analogInputToDigitalPin(p) (p) + +#define digitalPinToPort(P) ( &(PORT->Group[GetPort(P)]) ) +#define digitalPinToBitMask(P) ( 1 << GetPin(P) ) + +#if defined(PIN_DESCRIPTION_TABLE_SIMPLE) + #define digitalPinHasPWM(P) ( g_APinDescription[P].ulTCChannel != NOT_ON_TIMER ) +#else + #define digitalPinHasPWM(P) ( (g_APinDescription[P].ulPinAttribute & PIN_ATTR_TIMER_PWM) == PIN_ATTR_TIMER_PWM ) +#endif + +//#define analogInPinToBit(P) ( ) +#define portOutputRegister(port) ( &(port->OUT.reg) ) +#define portInputRegister(port) ( &(port->IN.reg) ) +#define portModeRegister(port) ( &(port->DIR.reg) ) + +/* + * digitalPinToTimer(..) is AVR-specific and is not defined for SAMD + * architecture. If you need to check if a pin supports PWM you must + * use digitalPinHasPWM(..). + * + * https://github.com/arduino/Arduino/issues/1833 + */ +// #define digitalPinToTimer(P) + +/* LEDs + * None of these defines are currently used by the core. + */ +#if defined PIN_MAP_STANDARD +#define PIN_LED_13 (16u) +#define PIN_LED_RXL (22u) +#define PIN_LED_TXL (23u) +#elif defined PIN_MAP_COMPACT +#define PIN_LED_13 (10u) +#define PIN_LED_RXL (11u) +#define PIN_LED_TXL (12u) +#endif + +#define PIN_LED PIN_LED_13 +#define PIN_LED2 PIN_LED_RXL +#define PIN_LED3 PIN_LED_TXL +#define LED_BUILTIN PIN_LED_13 + + +/* + * Analog pins + */ +#if defined PIN_MAP_STANDARD +#define PIN_A2 (2ul) +#define PIN_A3 (3ul) +#define PIN_A4 (4ul) +#define PIN_A5 (5ul) +#define PIN_A6 (6ul) +#define PIN_A7 (7ul) +#define PIN_A14 (14ul) +#define PIN_A15 (15ul) +#define PIN_DAC0 (2ul) +#elif defined PIN_MAP_COMPACT +#define PIN_A2 (0ul) +#define PIN_A3 (1ul) +#define PIN_A4 (2ul) +#define PIN_A5 (3ul) +#define PIN_A6 (4ul) +#define PIN_A7 (5ul) +#define PIN_A14 (8ul) +#define PIN_A15 (9ul) +#define PIN_DAC0 (0ul) +#endif + +static const uint8_t A2 = PIN_A2; +static const uint8_t A3 = PIN_A3; +static const uint8_t A4 = PIN_A4; +static const uint8_t A5 = PIN_A5; +static const uint8_t A6 = PIN_A6; +static const uint8_t A7 = PIN_A7; +static const uint8_t A14 = PIN_A14; +static const uint8_t A15 = PIN_A15; +static const uint8_t DAC0 = PIN_DAC0; + +#define ADC_RESOLUTION 12 + +#define REMAP_ANALOG_PIN_ID while(0) +// #define REMAP_ANALOG_PIN_ID if ( ulPin < A0 ) ulPin += A0 + +/* Set default analog voltage reference */ +#define VARIANT_AR_DEFAULT AR_DEFAULT + +/* Reference voltage pins (define even if not enabled with PIN_ATTR_REF in the PinDescription table) */ +#if defined PIN_MAP_STANDARD +#define REFA_PIN (3ul) +#define REFB_PIN (4ul) +#elif defined PIN_MAP_COMPACT +#define REFA_PIN (1ul) +#define REFB_PIN (2ul) +#endif + + +// The ATN pin may be used in the future as the first SPI chip select. +// On boards that do not have the Arduino physical form factor, it can to set to any free pin. +#if defined PIN_MAP_STANDARD +#define PIN_ATN (6ul) +#elif defined PIN_MAP_COMPACT +#define PIN_ATN (4ul) +#endif +static const uint8_t ATN = PIN_ATN; + + +/* + * Serial interfaces + */ +// Serial1 +#if defined PIN_MAP_STANDARD +#define PIN_SERIAL1_RX (31ul) +#define PIN_SERIAL1_TX (30ul) +#elif defined PIN_MAP_COMPACT +#define PIN_SERIAL1_RX (17ul) +#define PIN_SERIAL1_TX (16ul) +#endif + +#define PAD_SERIAL1_TX (UART_TX_PAD_2) +#define PAD_SERIAL1_RX (SERCOM_RX_PAD_3) +#define SERCOM_INSTANCE_SERIAL1 &sercom1 + +// Serial2 +#if defined PIN_MAP_STANDARD +#define PIN_SERIAL2_RX (15ul) +#define PIN_SERIAL2_TX (14ul) +#elif defined PIN_MAP_COMPACT +#define PIN_SERIAL2_RX (9ul) +#define PIN_SERIAL2_TX (8ul) +#endif + +#define PAD_SERIAL2_TX (UART_TX_PAD_0) +#define PAD_SERIAL2_RX (SERCOM_RX_PAD_1) +#define SERCOM_INSTANCE_SERIAL2 &sercom0 + + +/* + * SPI Interfaces + */ +#if defined(ONE_SPI) +#define SPI_INTERFACES_COUNT 1 +#else +#define SPI_INTERFACES_COUNT 0 +#endif + +#if defined PIN_MAP_STANDARD +#define PIN_SPI_MISO (7u) +#define PIN_SPI_MOSI (14u) +#define PIN_SPI_SCK (15u) +#define PIN_SPI_SS (6u) +#elif defined PIN_MAP_COMPACT +#define PIN_SPI_MISO (5u) +#define PIN_SPI_MOSI (8u) +#define PIN_SPI_SCK (9u) +#define PIN_SPI_SS (4u) +#endif + +#define PERIPH_SPI sercom0 +#define PAD_SPI_TX SPI_PAD_0_SCK_1 +#define PAD_SPI_RX SERCOM_RX_PAD_3 + +static const uint8_t SS = PIN_SPI_SS ; // The SERCOM SS PAD is available on this pin but HW SS isn't used. Set here only for reference. +static const uint8_t MOSI = PIN_SPI_MOSI ; +static const uint8_t MISO = PIN_SPI_MISO ; +static const uint8_t SCK = PIN_SPI_SCK ; + + +/* + * Wire Interfaces + */ +#if defined(ONE_WIRE) +#define WIRE_INTERFACES_COUNT 1 +#else +#define WIRE_INTERFACES_COUNT 0 +#endif + +#if defined PIN_MAP_STANDARD +#define PIN_WIRE_SDA (22u) +#define PIN_WIRE_SCL (23u) +#elif defined PIN_MAP_COMPACT +#define PIN_WIRE_SDA (11u) +#define PIN_WIRE_SCL (12u) +#endif + +#define PERIPH_WIRE sercom2 +#define WIRE_IT_HANDLER SERCOM2_Handler + +static const uint8_t SDA = PIN_WIRE_SDA; +static const uint8_t SCL = PIN_WIRE_SCL; + + +/* + * USB - Define PIN_USB_HOST_ENABLE to assert the defined pin to + * PIN_USB_HOST_ENABLE_VALUE during startup. Leave undefined to disable this pin. + */ +#if defined PIN_MAP_STANDARD +#define PIN_USB_DM (24ul) +#define PIN_USB_DP (25ul) +//#define PIN_USB_HOST_ENABLE (28ul) +#elif defined PIN_MAP_COMPACT +#define PIN_USB_DM (13ul) +#define PIN_USB_DP (14ul) +//#define PIN_USB_HOST_ENABLE (15ul) +#endif + +#define PIN_USB_HOST_ENABLE_VALUE HIGH + +#ifdef __cplusplus +} +#endif + + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#ifdef __cplusplus + +/* ========================= + * ===== SERCOM DEFINITION + * ========================= +*/ +extern SERCOM sercom0; +extern SERCOM sercom1; +extern SERCOM sercom2; + +extern Uart Serial1; +extern Uart Serial2; + +#endif + +// These serial port names are intended to allow libraries and architecture-neutral +// sketches to automatically default to the correct port name for a particular type +// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, +// the first hardware serial port whose RX/TX pins are not dedicated to another use. +// +// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor +// +// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial +// +// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library +// +// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. +// +// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX +// pins are NOT connected to anything by default. +#define SERIAL_PORT_USBVIRTUAL SerialUSB +// SERIAL_PORT_MONITOR seems to be used only by the USB Host library (as of 1.6.5). +// It normally allows debugging output on the USB programming port, while the USB host uses the USB native port. +// The programming port is connected to a hardware UART through a USB-Serial bridge (EDBG chip) on the Zero. +// Boards that do not have the EDBG chip will have to connect a USB-TTL serial adapter to 'Serial' to get +// the USB Host debugging output. +#define SERIAL_PORT_MONITOR Serial1 +// Serial has no physical pins broken out, so it's not listed as HARDWARE port +#define SERIAL_PORT_HARDWARE Serial1 +#define SERIAL_PORT_HARDWARE_OPEN Serial1 + +// The MT-D11 does not have the EDBG support chip, which provides a USB-UART bridge +// accessible using Serial (the Arduino serial monitor is normally connected to this). +// So, the USB virtual serial port (SerialUSB) must be used to communicate with the host. +// Because most sketches use Serial to print to the monitor, it is aliased to SerialUSB. +// Remember to use while(!Serial); to wait for a connection before Serial printing. + +// When USB CDC is enabled, Serial refers to SerialUSB, otherwise it refers to Serial1. +#if defined(CDC_ONLY) || defined(CDC_HID) || defined(WITH_CDC) +#define Serial SerialUSB +#else +#define Serial Serial1 +#endif + +#endif /* _VARIANT_GENERIC_D11D14AS_ */ diff --git a/variants/MT_D21E/README.md b/variants/Generic_x21E/README.md similarity index 98% rename from variants/MT_D21E/README.md rename to variants/Generic_x21E/README.md index dedbea61a..5fd352d38 100644 --- a/variants/MT_D21E/README.md +++ b/variants/Generic_x21E/README.md @@ -1,265 +1,265 @@ -# MattairTech MT-D21E (ATsamD21EXXA) - -``` -============================= MattairTech MT-D21E (ATsamD21EXXA) ======================== -Other COM PWM Analog INT Arduino* Arduino* INT PWM COM Other -========================================================================================= - ------------------- -Xin32 | A0 RST | BOOT -Xout32 | A1 NC | -DAC * 2 | A2 NC | -REFA * 3 | A3 A31 | 31 * TCC11 RX3 SWDIO* -REFB * * 4 | A4 A30 | 30 * TCC10 TX3 SWDCLK - * * 5 | A5 NC | - * 6 | A6 A28 | 28 * LED -VM * 7 | A7 A27 | 27 * BTNA - SDA1/MISO1 TCC00 * NMI 8 | A8 A23 | 23 * TC41 SS - SCL1/SS1 TCC01 * * 9 | A9 A22 | 22 * TC40 MISO - TX1 TCC02 * 10 | A10 A19 | 19 * SCK - RX1 TCC03 * 11 | A11 A18 | 18 * MOSI - TX2/MOSI1 TC30 * 14 | A14 A17 | 17 * TCC21 SCL/RX4 - RX2/SCK1 TC31 15 | A15 A16 | 16 * TCC20 SDA/TX4 - | NC NC | - | NC NC | - | Vbus 3.3V| * Button B available on 31. -USB D- TC50 | A24- _____ Vcc | -USB D+ TC51 | A25+ | | Vin | - | Gnd | USB | Gnd | - ------------------- - -* Most pins can be used for more than one function. The port pin number printed - on the board is also used in Arduino (but without the 'A') for all of the supported - functions (ie: digitalRead(), analogRead(), analogWrite(), attachInterrupt(), etc.). -* When USB CDC is enabled, Serial refers to SerialUSB, otherwise it refers to Serial1. -* Leave pin A30 floating (or use external pullup) during reset. -* DO NOT connect voltages higher than 3.3V! -* Tone available on TC5. -``` - -## Pins descriptions for the MattairTech MT-D21E -``` -============================================================================================================================================ -Arduino | Silk | Port | Alternate Function | Comments (! means not used with this peripheral assignment) ---------|-------|-------|-----------------------|------------------------------------------------------------------------------------------- -0 | A0 | PA00 | Xin32 | Xin32 -1 | A1 | PA01 | Xout32 | Xout32 -2 | A2 | PA02 | | !EIC/EXTINT[2] ADC/AIN[0] PTC/Y[0] DAC/VOUT -3 | A3 | PA03 | REFA | !EIC/EXTINT[3] REF/ADC/VREFA REF/DAC/VREFA ADC/AIN[1] PTC/Y[1] -4 | A4 | PA04 | REFB | EIC/EXTINT[4] REF/ADC/VREFB ADC/AIN[4] AC/AIN[0] PTC/Y[2] !SERCOM0/PAD[0] !TCC0/WO[0] -5 | A5 | PA05 | | EIC/EXTINT[5] ADC/AIN[5] AC/AIN[1] PTC/Y[3] !SERCOM0/PAD[1] !TCC0/WO[1] -6 | A6 | PA06 | | !EIC/EXTINT[6] ADC/AIN[6] AC/AIN[2] PTC/Y[4] !SERCOM0/PAD[2] !TCC1/WO[0] -7 | A7 | PA07 | Voltage Divider | !EIC/EXTINT[7] ADC/AIN[7] AC/AIN[3] PTC/Y[5] !SERCOM0/PAD[3] !TCC1/WO[1] -8 | A8 | PA08 | SDA1/MISO1 | EIC/NMI ADC/AIN[16] PTC/X[0] !SERCOM0/PAD[0] SERCOM2/PAD[0] TCC0/WO[0] !TCC1/WO[2] -9 | A9 | PA09 | SCL1/SS1 | EIC/EXTINT[9] ADC/AIN[17] PTC/X[1] !SERCOM0/PAD[1] SERCOM2/PAD[1] TCC0/WO[1] !TCC1/WO[3] -10 | A10 | PA10 | TX1 | !EIC/EXTINT[10] ADC/AIN[18] PTC/X[2] SERCOM0/PAD[2] !SERCOM2/PAD[2] !TCC1/WO[0] TCC0/WO[2] -11 | A11 | PA11 | RX1 | !EIC/EXTINT[11] ADC/AIN[19] PTC/X[3] SERCOM0/PAD[3] !SERCOM2/PAD[3] !TCC1/WO[1] TCC0/WO[3] -12 | --- | ---- | NOT A PIN | NOT A PIN -13 | --- | ---- | NOT A PIN | NOT A PIN -14 | A14 | PA14 | Xin, TX2/MOSI1 | EIC/EXTINT[14] SERCOM2/PAD[2] TC3/WO[0] !TCC0/WO[4] Xin, HOST_ENABLE -15 | A15 | PA15 | Xout, RX2/SCK1 | !EIC/EXTINT[15] SERCOM2/PAD[3] TC3/WO[1] !TCC0/WO[5] Xout -16 | A16 | PA16 | SDA/TX4 w/pullup | EIC/EXTINT[0] PTC/X[4] SERCOM1/PAD[0] SERCOM3/PAD[0] TCC2/WO[0] !TCC0/WO[6] -17 | A17 | PA17 | SCL/RX4 w/pullup | EIC/EXTINT[1] PTC/X[5] SERCOM1/PAD[1] SERCOM3/PAD[1] TCC2/WO[1] !TCC0/WO[7] -18 | A18 | PA18 | SPI | EIC/EXTINT[2] PTC/X[6] !SERCOM1/PAD[2] SERCOM3/PAD[2] !TC3/WO[0] !TCC0/WO[2] -19 | A19 | PA19 | SCK | EIC/EXTINT[3] PTC/X[7] !SERCOM1/PAD[3] SERCOM3/PAD[3] !TC3/WO[1] !TCC0/WO[3] -20 | --- | ---- | NOT A PIN | NOT A PIN -21 | --- | ---- | NOT A PIN | NOT A PIN -22 | A22 | PA22 | MISO | EIC/EXTINT[6] PTC/X[10] SERCOM3/PAD[0] TC4/WO[0] !TCC0/WO[4] -23 | A23 | PA23 | SS | EIC/EXTINT[7] PTC/X[11] SERCOM3/PAD[1] TC4/WO[1] !TCC0/WO[5] -24 | A24- | PA24 | USB_NEGATIVE | USB/DM TC5/WO[0] -25 | A25+ | PA25 | USB_POSITIVE | USB/DP TC5/WO[1] -26 | --- | ---- | NOT A PIN | NOT A PIN -27 | A27 | PA27 | Button A | EIC/EXTINT[15] Button A -28 | A28 | PA28 | LED | EIC/EXTINT[8] LED -29 | --- | ---- | NOT A PIN | NOT A PIN -30 | A30 | PA30 | SWDCLK / TX3 | EIC/EXTINT[10] SERCOM1/PAD[2] TCC1/WO[0] SWD CLK, leave floating during boot -31 | A31 | PA31 | Button B / SWDIO / RX3| EIC/EXTINT[11] SERCOM1/PAD[3] TCC1/WO[1] Button B SWD IO --- | RST | ---- | | Reset, BOOT (double tap bootloader entry) -============================================================================================================================================ - -* Most pins can be used for more than one function. The port pin number printed - on the board is also used in Arduino (but without the 'A') for all of the supported - functions (ie: digitalRead(), analogRead(), analogWrite(), attachInterrupt(), etc.). -* The following Arduino pin numbers are not mapped to a physical pin: 12, 13, 20, 21, 26, and 29. -* Pins 24 and 25 are by default in use by USB (USB_NEGATIVE and USB_POSITIVE). -* TC5(D21) is available on these pins otherwise. The tone library uses TC5. -* A0 and A1 are by default connected to the 32.768KHz crystal. -* Leave pin A30 floating (or use external pullup) during reset. -``` - - -## Board Configuration Notes - -* **Crystals** - * Either the 32.768KHz crystal or the 16MHz crystal can be used. Be sure to set the correct solder jumpers. - * The bootloader does not use an external crystal by default. Double-tap the reset button to enter manually. - -* **LED (LED_BUILTIN)** - * Bring the pin HIGH to turn the LED on. - * The LED is enabled (solder jumper) by default. - -* **Buttons (BUTTON_BUILTIN)** - * Button A (BTNA) is connected to pin 27 by default (BUTTON_BUILTIN). - * Button B (BTNB) is connected to the Reset pin by default, but can be connected to pin 31 via the solder jumper. - * Pressing the button will bring the pin LOW. The pullup must be enabled first. - * If the debouncing capacitor is connected, delay reading the pin at least 6ms after turning on the pullup. - -* **GPIO** - * All pins (including analog) support INPUT, OUTPUT, INPUT_PULLUP, and INPUT_PULLDOWN. - * Each pin can source or sink a maximum of 7 mA (when PER_ATTR_DRIVE_STRONG is set for the pin, enabled by default). - * Internal pull-up and pull-down resistors of 20-60 Kohms (40Kohm typ., disconnected by default). - -* **Analog Inputs** - * 10 pins can be configured as ADC analog inputs. - * Each pin measures from ground to 3.3 volts by default. - * Each pin provides 10 bits of resolution (1024 values) by default. - * 12-bit resolution supported by using the analogReadResolution() function. - * The upper end of the measurement range can be changed using the analogReference() function. - * A reference voltage can be connected to REFA or REFB. In these cases, the capacitors should be enabled via the solder jumpers. - -* **DAC** - * One analog output is available on pin 2. - * Provides a 10-bit voltage output with the analogWrite() function. - -* **PWM** - * 12 pins can be configured as PWM outputs. - * Each pin provides 8 bits of resolution (256 values) by default. - * 12-bit resolution supported by using the analogWriteResolution() function. - -* **External Interrupts** - * 14 pins can be configured with external interrupts. - -* **SERCOM** - * 4 SERCOM are available. - * Up to 4 UART instances - * Up to 2 SPI instances - * Up to 2 WIRE (I2C) instances - * The WIRE pullup resistors are enabled by default. - - - -## PinDescription table format - -### Note that in 1.6.18-beta-b1 a new compact table format was added. -The standard PinDescription table uses 12 bytes per pin. Define PIN_DESCRIPTION_TABLE_SIMPLE -to use a more compact format that uses only 4 bytes per pin (currently only available -for the D11 chips). In this case, the PinType, PinAttribute, and GCLKCCL columns are not used -(they are not required). Additionally, the SetPortPin() and SetExtIntADC() macros are used to -pack Port and Pin into the PortPin column, and ExtInt and ADCChannelNumber into the ExtIntADC -column. Note that external libraries that reference the PinDescription table directly (uncommon) -will no longer work. This define can be combined with the PIN_MAP_COMPACT define, which -is available in variant.h of the D11 variants. This can save from 10's to over 200 bytes. - -### Note that a new column (GCLKCCL) was added for 1.6.8-beta-b0. -MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE in variant.h is used to track versions. -If using board variant files with the old format, the new core will still read the -table the old way, losing any new features introduced by the new column. Additionally, -new definitions have been added for D51, L21, and C21 support. - -### Each pin can have multiple functions. -The PinDescription table describes how each of the pins can be used by the Arduino -core. Each pin can have multiple functions (ie: ADC input, digital output, PWM, -communications, etc.), and the PinDescription table configures which functions can -be used for each pin. This table is mainly accessed by the pinPeripheral function in -wiring_private.c, which is used to attach a pin to a particular peripheral function. -The communications drivers (ie: SPI, I2C, and UART), analogRead(), analogWrite(), -analogReference(), attachInterrupt(), and pinMode() all call pinPeripheral() to -verify that the pin can perform the function requested, and to configure the pin for -that function. Most of the contents of pinMode() are now in pinPeripheral(). - -### Pin Mapping -There are different ways that pins can be mapped. Typically, there is no relation -between the arduino pin number used, and the actual port pin designator. Thus, the -pcb must be printed with the arduino numbering, otherwise, if the port pin is printed, -a cross reference table is needed to find the arduino pin number. However, this results -in the least amount of space used by the table. Another method, used by default by the -MT-D21E and MT-D11, maps Arduino pin numbers to the actual port pin number (ie: Arduino -pin 28 = Port A28). This works well when there is only one port (or if the PORTB pins -are used for onboard functions and not broken out). PIO_NOT_A_PIN entries must be added -for pins that are used for other purposes or for pins that do not exist (especially the -D11), so some FLASH space may be wasted. For an example of both types, see variant.cpp -from the MT-D11 variant. The Xeno combines both methods, using the actual port pin -designators from both PORTA and PORTB for arduino numbers 0-31 (ie: B1=1, A2=2), then -using arduino numbering only above 31. For 0-31 only one pin from PORTA or PORTB can be -used, leaving the other pin for some number above 31. - -**See [WVariant.h](https://github.com/mattairtech/ArduinoCore-samd/tree/master/cores/arduino/WVariant.h) for the definitions used in the table.** - -### Port -This is the port (ie: PORTA). Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### Pin -This is the pin (bit) within the port. Valid values are 0-31. Not used with -PIN_DESCRIPTION_TABLE_SIMPLE. - -### SetPortPin() -When PIN_DESCRIPTION_TABLE_SIMPLE is defined, Port and Pin are combined into one column -using the SetPortPin() packing macro: SetPortPin(PORTA, 2). If the pin is not usable, -use SetPortPin(NOT_A_PORT, 0). - -### PinType -This indicates what peripheral function the pin can be attached to. In most cases, -this is PIO_MULTI, which means that the pin can be anything listed in the PinAttribute -field. It can also be set to a specific peripheral. In this case, any attempt to -configure the pin (using pinPeripheral or pinMode) as anything else will fail (and -pinPeripheral will return -1). This can be used to prevent accidental re-configuration -of a pin that is configured for only one function (ie: USB D- and D+ pins). If a pin -is not used or does not exist, PIO_NOT_A_PIN must be entered in this field. See -WVariant.h for valid entries. These entries are also used as a parameter to -pinPeripheral() with the exception of PIO_NOT_A_PIN and PIO_MULTI. The pinMode function -now calls pinPeripheral() with the desired mode. Note that this field is not used to -select between the different peripherals possible with each of the SERCOM and TIMER -functions. PeripheralAttribute is now used for this. When PIN_DESCRIPTION_TABLE_SIMPLE -is defined, PinType is not used (the pin is treated as PIO_MULTI). - -### PeripheralAttribute -This is an 8-bit bitfield used for various peripheral configuration. It is primarily -used to select between the different peripherals possible with each of the SERCOM and -TIMER functions. TIMER pins are individual, while SERCOM uses a group of two to four -pins. This group of pins can span both peripherals. For example, pin 19 (SPI1 SCK) on -the MT-D21E uses PER_ATTR_SERCOM_ALT while pin 22 (SPI1 MISO) uses PER_ATTR_SERCOM_STD. -Both TIMER and SERCOM can exist for each pin. This bitfield is also used to set the -pin drive strength and the input buffer configuration (ie: totem-pole, open-drain, -buskeeper, etc.). Starting with 1.6.8, the ADC instance on the D51 and C21 (there are -two) is also selected here. Note that the D51 adds a third timer attribute and -requires consultation of the datasheet IOSET tables. See WVariant.h for valid entries. - -### PinAttribute -This is a 32-bit bitfield used to list all of the valid peripheral functions that a -pin can attach to. This includes GPIO functions like PIN_ATTR_OUTPUT. Certain -attributes are shorthand for a combination of other attributes. PIN_ATTR_DIGITAL -includes all of the GPIO functions, while PIN_ATTR_TIMER includes both -PIN_ATTR_TIMER_PWM and PIN_ATTR_TIMER_CAPTURE (capture is not used yet). -PIN_ATTR_ANALOG is an alias to PIN_ATTR_ANALOG_ADC. This bitfield is useful for -limiting a pin to only input related functions or output functions. This allows a pin -to have a more flexible configuration, while restricting the direction (ie: to avoid -contention). See WVariant.h for valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### TCChannel -This is the TC/TCC channel (if any) assigned to the pin. Some TC channels are available -on multiple pins. In general, only one pin should be configured in the pinDescription -table per TC channel. Starting with 1.6.8, the timer type is now encoded in this column -to support the D51, L21 and C21, which use TC numbers starting at 0 (rather than 3 as on -the D21). See WVariant.h for valid entries. - -### ADCChannelNumber -This is the ADC channel (if any) assigned to the pin. The D51 and C21 each have two ADC -instances, which are selected in the PeripheralAttribute column. See WVariant.h for -valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### ExtInt -This is the interrupt (if any) assigned to the pin. Some interrupt numbers are -available on multiple pins. In general, only one pin should be configured in the -pinDescription table per interrupt number. Thus, for example, if an interrupt was -needed on pin 2, EXTERNAL_INT_2 can be moved from pin 18. See WVariant.h for valid -entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### SetExtIntADC() -When PIN_DESCRIPTION_TABLE_SIMPLE is defined, ExtInt and ADCChannelNumber are combined -into one column using the SetExtIntADC() packing macro: SetExtIntADC(EXTERNAL_INT_4, -ADC_Channel2). If the pin is not usable, use SetExtIntADC(EXTERNAL_INT_NONE, No_ADC_Channel). - -### GCLKCCL -This column was added in 1.6.8-beta-b0. It is not yet used. It will eventually support -the Analog Comparators (AC), the Configurable Custom Logic (CCL) peripherals of the D51, -L21 and C21, and the GCLK outputs (inputs) of all of the MCUs. Not used with -PIN_DESCRIPTION_TABLE_SIMPLE. +# MattairTech MT-D21E (ATsamD21EXXA) + +``` +============================= MattairTech MT-D21E (ATsamD21EXXA) ======================== +Other COM PWM Analog INT Arduino* Arduino* INT PWM COM Other +========================================================================================= + ------------------- +Xin32 | A0 RST | BOOT +Xout32 | A1 NC | +DAC * 2 | A2 NC | +REFA * 3 | A3 A31 | 31 * TCC11 RX3 SWDIO* +REFB * * 4 | A4 A30 | 30 * TCC10 TX3 SWDCLK + * * 5 | A5 NC | + * 6 | A6 A28 | 28 * LED +VM * 7 | A7 A27 | 27 * BTNA + SDA1/MISO1 TCC00 * NMI 8 | A8 A23 | 23 * TC41 SS + SCL1/SS1 TCC01 * * 9 | A9 A22 | 22 * TC40 MISO + TX1 TCC02 * 10 | A10 A19 | 19 * SCK + RX1 TCC03 * 11 | A11 A18 | 18 * MOSI + TX2/MOSI1 TC30 * 14 | A14 A17 | 17 * TCC21 SCL/RX4 + RX2/SCK1 TC31 15 | A15 A16 | 16 * TCC20 SDA/TX4 + | NC NC | + | NC NC | + | Vbus 3.3V| * Button B available on 31. +USB D- TC50 | A24- _____ Vcc | +USB D+ TC51 | A25+ | | Vin | + | Gnd | USB | Gnd | + ------------------- + +* Most pins can be used for more than one function. The port pin number printed + on the board is also used in Arduino (but without the 'A') for all of the supported + functions (ie: digitalRead(), analogRead(), analogWrite(), attachInterrupt(), etc.). +* When USB CDC is enabled, Serial refers to SerialUSB, otherwise it refers to Serial1. +* Leave pin A30 floating (or use external pullup) during reset. +* DO NOT connect voltages higher than 3.3V! +* Tone available on TC5. +``` + +## Pins descriptions for the MattairTech MT-D21E +``` +============================================================================================================================================ +Arduino | Silk | Port | Alternate Function | Comments (! means not used with this peripheral assignment) +--------|-------|-------|-----------------------|------------------------------------------------------------------------------------------- +0 | A0 | PA00 | Xin32 | Xin32 +1 | A1 | PA01 | Xout32 | Xout32 +2 | A2 | PA02 | | !EIC/EXTINT[2] ADC/AIN[0] PTC/Y[0] DAC/VOUT +3 | A3 | PA03 | REFA | !EIC/EXTINT[3] REF/ADC/VREFA REF/DAC/VREFA ADC/AIN[1] PTC/Y[1] +4 | A4 | PA04 | REFB | EIC/EXTINT[4] REF/ADC/VREFB ADC/AIN[4] AC/AIN[0] PTC/Y[2] !SERCOM0/PAD[0] !TCC0/WO[0] +5 | A5 | PA05 | | EIC/EXTINT[5] ADC/AIN[5] AC/AIN[1] PTC/Y[3] !SERCOM0/PAD[1] !TCC0/WO[1] +6 | A6 | PA06 | | !EIC/EXTINT[6] ADC/AIN[6] AC/AIN[2] PTC/Y[4] !SERCOM0/PAD[2] !TCC1/WO[0] +7 | A7 | PA07 | Voltage Divider | !EIC/EXTINT[7] ADC/AIN[7] AC/AIN[3] PTC/Y[5] !SERCOM0/PAD[3] !TCC1/WO[1] +8 | A8 | PA08 | SDA1/MISO1 | EIC/NMI ADC/AIN[16] PTC/X[0] !SERCOM0/PAD[0] SERCOM2/PAD[0] TCC0/WO[0] !TCC1/WO[2] +9 | A9 | PA09 | SCL1/SS1 | EIC/EXTINT[9] ADC/AIN[17] PTC/X[1] !SERCOM0/PAD[1] SERCOM2/PAD[1] TCC0/WO[1] !TCC1/WO[3] +10 | A10 | PA10 | TX1 | !EIC/EXTINT[10] ADC/AIN[18] PTC/X[2] SERCOM0/PAD[2] !SERCOM2/PAD[2] !TCC1/WO[0] TCC0/WO[2] +11 | A11 | PA11 | RX1 | !EIC/EXTINT[11] ADC/AIN[19] PTC/X[3] SERCOM0/PAD[3] !SERCOM2/PAD[3] !TCC1/WO[1] TCC0/WO[3] +12 | --- | ---- | NOT A PIN | NOT A PIN +13 | --- | ---- | NOT A PIN | NOT A PIN +14 | A14 | PA14 | Xin, TX2/MOSI1 | EIC/EXTINT[14] SERCOM2/PAD[2] TC3/WO[0] !TCC0/WO[4] Xin, HOST_ENABLE +15 | A15 | PA15 | Xout, RX2/SCK1 | !EIC/EXTINT[15] SERCOM2/PAD[3] TC3/WO[1] !TCC0/WO[5] Xout +16 | A16 | PA16 | SDA/TX4 w/pullup | EIC/EXTINT[0] PTC/X[4] SERCOM1/PAD[0] SERCOM3/PAD[0] TCC2/WO[0] !TCC0/WO[6] +17 | A17 | PA17 | SCL/RX4 w/pullup | EIC/EXTINT[1] PTC/X[5] SERCOM1/PAD[1] SERCOM3/PAD[1] TCC2/WO[1] !TCC0/WO[7] +18 | A18 | PA18 | SPI | EIC/EXTINT[2] PTC/X[6] !SERCOM1/PAD[2] SERCOM3/PAD[2] !TC3/WO[0] !TCC0/WO[2] +19 | A19 | PA19 | SCK | EIC/EXTINT[3] PTC/X[7] !SERCOM1/PAD[3] SERCOM3/PAD[3] !TC3/WO[1] !TCC0/WO[3] +20 | --- | ---- | NOT A PIN | NOT A PIN +21 | --- | ---- | NOT A PIN | NOT A PIN +22 | A22 | PA22 | MISO | EIC/EXTINT[6] PTC/X[10] SERCOM3/PAD[0] TC4/WO[0] !TCC0/WO[4] +23 | A23 | PA23 | SS | EIC/EXTINT[7] PTC/X[11] SERCOM3/PAD[1] TC4/WO[1] !TCC0/WO[5] +24 | A24- | PA24 | USB_NEGATIVE | USB/DM TC5/WO[0] +25 | A25+ | PA25 | USB_POSITIVE | USB/DP TC5/WO[1] +26 | --- | ---- | NOT A PIN | NOT A PIN +27 | A27 | PA27 | Button A | EIC/EXTINT[15] Button A +28 | A28 | PA28 | LED | EIC/EXTINT[8] LED +29 | --- | ---- | NOT A PIN | NOT A PIN +30 | A30 | PA30 | SWDCLK / TX3 | EIC/EXTINT[10] SERCOM1/PAD[2] TCC1/WO[0] SWD CLK, leave floating during boot +31 | A31 | PA31 | Button B / SWDIO / RX3| EIC/EXTINT[11] SERCOM1/PAD[3] TCC1/WO[1] Button B SWD IO +-- | RST | ---- | | Reset, BOOT (double tap bootloader entry) +============================================================================================================================================ + +* Most pins can be used for more than one function. The port pin number printed + on the board is also used in Arduino (but without the 'A') for all of the supported + functions (ie: digitalRead(), analogRead(), analogWrite(), attachInterrupt(), etc.). +* The following Arduino pin numbers are not mapped to a physical pin: 12, 13, 20, 21, 26, and 29. +* Pins 24 and 25 are by default in use by USB (USB_NEGATIVE and USB_POSITIVE). +* TC5(D21) is available on these pins otherwise. The tone library uses TC5. +* A0 and A1 are by default connected to the 32.768KHz crystal. +* Leave pin A30 floating (or use external pullup) during reset. +``` + + +## Board Configuration Notes + +* **Crystals** + * Either the 32.768KHz crystal or the 16MHz crystal can be used. Be sure to set the correct solder jumpers. + * The bootloader does not use an external crystal by default. Double-tap the reset button to enter manually. + +* **LED (LED_BUILTIN)** + * Bring the pin HIGH to turn the LED on. + * The LED is enabled (solder jumper) by default. + +* **Buttons (BUTTON_BUILTIN)** + * Button A (BTNA) is connected to pin 27 by default (BUTTON_BUILTIN). + * Button B (BTNB) is connected to the Reset pin by default, but can be connected to pin 31 via the solder jumper. + * Pressing the button will bring the pin LOW. The pullup must be enabled first. + * If the debouncing capacitor is connected, delay reading the pin at least 6ms after turning on the pullup. + +* **GPIO** + * All pins (including analog) support INPUT, OUTPUT, INPUT_PULLUP, and INPUT_PULLDOWN. + * Each pin can source or sink a maximum of 7 mA (when PER_ATTR_DRIVE_STRONG is set for the pin, enabled by default). + * Internal pull-up and pull-down resistors of 20-60 Kohms (40Kohm typ., disconnected by default). + +* **Analog Inputs** + * 10 pins can be configured as ADC analog inputs. + * Each pin measures from ground to 3.3 volts by default. + * Each pin provides 10 bits of resolution (1024 values) by default. + * 12-bit resolution supported by using the analogReadResolution() function. + * The upper end of the measurement range can be changed using the analogReference() function. + * A reference voltage can be connected to REFA or REFB. In these cases, the capacitors should be enabled via the solder jumpers. + +* **DAC** + * One analog output is available on pin 2. + * Provides a 10-bit voltage output with the analogWrite() function. + +* **PWM** + * 12 pins can be configured as PWM outputs. + * Each pin provides 8 bits of resolution (256 values) by default. + * 12-bit resolution supported by using the analogWriteResolution() function. + +* **External Interrupts** + * 14 pins can be configured with external interrupts. + +* **SERCOM** + * 4 SERCOM are available. + * Up to 4 UART instances + * Up to 2 SPI instances + * Up to 2 WIRE (I2C) instances + * The WIRE pullup resistors are enabled by default. + + + +## PinDescription table format + +### Note that in 1.6.18-beta-b1 a new compact table format was added. +The standard PinDescription table uses 12 bytes per pin. Define PIN_DESCRIPTION_TABLE_SIMPLE +to use a more compact format that uses only 4 bytes per pin (currently only available +for the D11 chips). In this case, the PinType, PinAttribute, and GCLKCCL columns are not used +(they are not required). Additionally, the SetPortPin() and SetExtIntADC() macros are used to +pack Port and Pin into the PortPin column, and ExtInt and ADCChannelNumber into the ExtIntADC +column. Note that external libraries that reference the PinDescription table directly (uncommon) +will no longer work. This define can be combined with the PIN_MAP_COMPACT define, which +is available in variant.h of the D11 variants. This can save from 10's to over 200 bytes. + +### Note that a new column (GCLKCCL) was added for 1.6.8-beta-b0. +MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE in variant.h is used to track versions. +If using board variant files with the old format, the new core will still read the +table the old way, losing any new features introduced by the new column. Additionally, +new definitions have been added for D51, L21, and C21 support. + +### Each pin can have multiple functions. +The PinDescription table describes how each of the pins can be used by the Arduino +core. Each pin can have multiple functions (ie: ADC input, digital output, PWM, +communications, etc.), and the PinDescription table configures which functions can +be used for each pin. This table is mainly accessed by the pinPeripheral function in +wiring_private.c, which is used to attach a pin to a particular peripheral function. +The communications drivers (ie: SPI, I2C, and UART), analogRead(), analogWrite(), +analogReference(), attachInterrupt(), and pinMode() all call pinPeripheral() to +verify that the pin can perform the function requested, and to configure the pin for +that function. Most of the contents of pinMode() are now in pinPeripheral(). + +### Pin Mapping +There are different ways that pins can be mapped. Typically, there is no relation +between the arduino pin number used, and the actual port pin designator. Thus, the +pcb must be printed with the arduino numbering, otherwise, if the port pin is printed, +a cross reference table is needed to find the arduino pin number. However, this results +in the least amount of space used by the table. Another method, used by default by the +MT-D21E and MT-D11, maps Arduino pin numbers to the actual port pin number (ie: Arduino +pin 28 = Port A28). This works well when there is only one port (or if the PORTB pins +are used for onboard functions and not broken out). PIO_NOT_A_PIN entries must be added +for pins that are used for other purposes or for pins that do not exist (especially the +D11), so some FLASH space may be wasted. For an example of both types, see variant.cpp +from the MT-D11 variant. The Xeno combines both methods, using the actual port pin +designators from both PORTA and PORTB for arduino numbers 0-31 (ie: B1=1, A2=2), then +using arduino numbering only above 31. For 0-31 only one pin from PORTA or PORTB can be +used, leaving the other pin for some number above 31. + +**See [WVariant.h](https://github.com/mattairtech/ArduinoCore-samd/tree/master/cores/arduino/WVariant.h) for the definitions used in the table.** + +### Port +This is the port (ie: PORTA). Not used with PIN_DESCRIPTION_TABLE_SIMPLE. + +### Pin +This is the pin (bit) within the port. Valid values are 0-31. Not used with +PIN_DESCRIPTION_TABLE_SIMPLE. + +### SetPortPin() +When PIN_DESCRIPTION_TABLE_SIMPLE is defined, Port and Pin are combined into one column +using the SetPortPin() packing macro: SetPortPin(PORTA, 2). If the pin is not usable, +use SetPortPin(NOT_A_PORT, 0). + +### PinType +This indicates what peripheral function the pin can be attached to. In most cases, +this is PIO_MULTI, which means that the pin can be anything listed in the PinAttribute +field. It can also be set to a specific peripheral. In this case, any attempt to +configure the pin (using pinPeripheral or pinMode) as anything else will fail (and +pinPeripheral will return -1). This can be used to prevent accidental re-configuration +of a pin that is configured for only one function (ie: USB D- and D+ pins). If a pin +is not used or does not exist, PIO_NOT_A_PIN must be entered in this field. See +WVariant.h for valid entries. These entries are also used as a parameter to +pinPeripheral() with the exception of PIO_NOT_A_PIN and PIO_MULTI. The pinMode function +now calls pinPeripheral() with the desired mode. Note that this field is not used to +select between the different peripherals possible with each of the SERCOM and TIMER +functions. PeripheralAttribute is now used for this. When PIN_DESCRIPTION_TABLE_SIMPLE +is defined, PinType is not used (the pin is treated as PIO_MULTI). + +### PeripheralAttribute +This is an 8-bit bitfield used for various peripheral configuration. It is primarily +used to select between the different peripherals possible with each of the SERCOM and +TIMER functions. TIMER pins are individual, while SERCOM uses a group of two to four +pins. This group of pins can span both peripherals. For example, pin 19 (SPI1 SCK) on +the MT-D21E uses PER_ATTR_SERCOM_ALT while pin 22 (SPI1 MISO) uses PER_ATTR_SERCOM_STD. +Both TIMER and SERCOM can exist for each pin. This bitfield is also used to set the +pin drive strength and the input buffer configuration (ie: totem-pole, open-drain, +buskeeper, etc.). Starting with 1.6.8, the ADC instance on the D51 and C21 (there are +two) is also selected here. Note that the D51 adds a third timer attribute and +requires consultation of the datasheet IOSET tables. See WVariant.h for valid entries. + +### PinAttribute +This is a 32-bit bitfield used to list all of the valid peripheral functions that a +pin can attach to. This includes GPIO functions like PIN_ATTR_OUTPUT. Certain +attributes are shorthand for a combination of other attributes. PIN_ATTR_DIGITAL +includes all of the GPIO functions, while PIN_ATTR_TIMER includes both +PIN_ATTR_TIMER_PWM and PIN_ATTR_TIMER_CAPTURE (capture is not used yet). +PIN_ATTR_ANALOG is an alias to PIN_ATTR_ANALOG_ADC. This bitfield is useful for +limiting a pin to only input related functions or output functions. This allows a pin +to have a more flexible configuration, while restricting the direction (ie: to avoid +contention). See WVariant.h for valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. + +### TCChannel +This is the TC/TCC channel (if any) assigned to the pin. Some TC channels are available +on multiple pins. In general, only one pin should be configured in the pinDescription +table per TC channel. Starting with 1.6.8, the timer type is now encoded in this column +to support the D51, L21 and C21, which use TC numbers starting at 0 (rather than 3 as on +the D21). See WVariant.h for valid entries. + +### ADCChannelNumber +This is the ADC channel (if any) assigned to the pin. The D51 and C21 each have two ADC +instances, which are selected in the PeripheralAttribute column. See WVariant.h for +valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. + +### ExtInt +This is the interrupt (if any) assigned to the pin. Some interrupt numbers are +available on multiple pins. In general, only one pin should be configured in the +pinDescription table per interrupt number. Thus, for example, if an interrupt was +needed on pin 2, EXTERNAL_INT_2 can be moved from pin 18. See WVariant.h for valid +entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. + +### SetExtIntADC() +When PIN_DESCRIPTION_TABLE_SIMPLE is defined, ExtInt and ADCChannelNumber are combined +into one column using the SetExtIntADC() packing macro: SetExtIntADC(EXTERNAL_INT_4, +ADC_Channel2). If the pin is not usable, use SetExtIntADC(EXTERNAL_INT_NONE, No_ADC_Channel). + +### GCLKCCL +This column was added in 1.6.8-beta-b0. It is not yet used. It will eventually support +the Analog Comparators (AC), the Configurable Custom Logic (CCL) peripherals of the D51, +L21 and C21, and the GCLK outputs (inputs) of all of the MCUs. Not used with +PIN_DESCRIPTION_TABLE_SIMPLE. diff --git a/variants/MT_D21E_revB/debug_scripts/SAMC21E15A.gdb b/variants/Generic_x21E/debug_scripts/SAMC21E15A.gdb similarity index 97% rename from variants/MT_D21E_revB/debug_scripts/SAMC21E15A.gdb rename to variants/Generic_x21E/debug_scripts/SAMC21E15A.gdb index 070351956..654279ee6 100644 --- a/variants/MT_D21E_revB/debug_scripts/SAMC21E15A.gdb +++ b/variants/Generic_x21E/debug_scripts/SAMC21E15A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21e15" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21e15" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/MT_D21E_revB/debug_scripts/SAMC21E16A.gdb b/variants/Generic_x21E/debug_scripts/SAMC21E16A.gdb similarity index 97% rename from variants/MT_D21E_revB/debug_scripts/SAMC21E16A.gdb rename to variants/Generic_x21E/debug_scripts/SAMC21E16A.gdb index acabddd1d..aba6fc528 100644 --- a/variants/MT_D21E_revB/debug_scripts/SAMC21E16A.gdb +++ b/variants/Generic_x21E/debug_scripts/SAMC21E16A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21e16" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21e16" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/MT_D21E/debug_scripts/SAMC21E17A.gdb b/variants/Generic_x21E/debug_scripts/SAMC21E17A.gdb similarity index 97% rename from variants/MT_D21E/debug_scripts/SAMC21E17A.gdb rename to variants/Generic_x21E/debug_scripts/SAMC21E17A.gdb index 4ae2dd669..506ebf41b 100644 --- a/variants/MT_D21E/debug_scripts/SAMC21E17A.gdb +++ b/variants/Generic_x21E/debug_scripts/SAMC21E17A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21e17" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21e17" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/MT_D21E_revB/debug_scripts/SAMC21E18A.gdb b/variants/Generic_x21E/debug_scripts/SAMC21E18A.gdb similarity index 97% rename from variants/MT_D21E_revB/debug_scripts/SAMC21E18A.gdb rename to variants/Generic_x21E/debug_scripts/SAMC21E18A.gdb index 2ca3b2cdc..ce6f69e30 100644 --- a/variants/MT_D21E_revB/debug_scripts/SAMC21E18A.gdb +++ b/variants/Generic_x21E/debug_scripts/SAMC21E18A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21e18" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21e18" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/MT_D21E/debug_scripts/SAMD21E15A.gdb b/variants/Generic_x21E/debug_scripts/SAMD21E15A.gdb similarity index 97% rename from variants/MT_D21E/debug_scripts/SAMD21E15A.gdb rename to variants/Generic_x21E/debug_scripts/SAMD21E15A.gdb index 4ae3c04f0..b76e47337 100644 --- a/variants/MT_D21E/debug_scripts/SAMD21E15A.gdb +++ b/variants/Generic_x21E/debug_scripts/SAMD21E15A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21e15" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21e15" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/MT_D21E/debug_scripts/SAMD21E16A.gdb b/variants/Generic_x21E/debug_scripts/SAMD21E16A.gdb similarity index 97% rename from variants/MT_D21E/debug_scripts/SAMD21E16A.gdb rename to variants/Generic_x21E/debug_scripts/SAMD21E16A.gdb index eb114b493..ddbcf4f0f 100644 --- a/variants/MT_D21E/debug_scripts/SAMD21E16A.gdb +++ b/variants/Generic_x21E/debug_scripts/SAMD21E16A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21e16" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21e16" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/MT_D21E/debug_scripts/SAMD21E17A.gdb b/variants/Generic_x21E/debug_scripts/SAMD21E17A.gdb similarity index 97% rename from variants/MT_D21E/debug_scripts/SAMD21E17A.gdb rename to variants/Generic_x21E/debug_scripts/SAMD21E17A.gdb index cb1c7c44e..f85cbcfa7 100644 --- a/variants/MT_D21E/debug_scripts/SAMD21E17A.gdb +++ b/variants/Generic_x21E/debug_scripts/SAMD21E17A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21e17" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21e17" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/MT_D21E/debug_scripts/SAMD21E18A.gdb b/variants/Generic_x21E/debug_scripts/SAMD21E18A.gdb similarity index 97% rename from variants/MT_D21E/debug_scripts/SAMD21E18A.gdb rename to variants/Generic_x21E/debug_scripts/SAMD21E18A.gdb index 13ee2a173..2ab8bf457 100644 --- a/variants/MT_D21E/debug_scripts/SAMD21E18A.gdb +++ b/variants/Generic_x21E/debug_scripts/SAMD21E18A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21e18" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21e18" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/MT_D21E/debug_scripts/SAML21E15B.gdb b/variants/Generic_x21E/debug_scripts/SAML21E15B.gdb similarity index 97% rename from variants/MT_D21E/debug_scripts/SAML21E15B.gdb rename to variants/Generic_x21E/debug_scripts/SAML21E15B.gdb index f4cdf835f..fc1b4efcd 100644 --- a/variants/MT_D21E/debug_scripts/SAML21E15B.gdb +++ b/variants/Generic_x21E/debug_scripts/SAML21E15B.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91saml21e15" -f target/at91samlXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91saml21e15" -f target/at91samlXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/MT_D21E/debug_scripts/SAML21E16B.gdb b/variants/Generic_x21E/debug_scripts/SAML21E16B.gdb similarity index 97% rename from variants/MT_D21E/debug_scripts/SAML21E16B.gdb rename to variants/Generic_x21E/debug_scripts/SAML21E16B.gdb index 50e424551..bab326bf4 100644 --- a/variants/MT_D21E/debug_scripts/SAML21E16B.gdb +++ b/variants/Generic_x21E/debug_scripts/SAML21E16B.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91saml21e16" -f target/at91samlXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91saml21e16" -f target/at91samlXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/MT_D21E/debug_scripts/SAML21E17B.gdb b/variants/Generic_x21E/debug_scripts/SAML21E17B.gdb similarity index 97% rename from variants/MT_D21E/debug_scripts/SAML21E17B.gdb rename to variants/Generic_x21E/debug_scripts/SAML21E17B.gdb index 29323011f..51d5a47d0 100644 --- a/variants/MT_D21E/debug_scripts/SAML21E17B.gdb +++ b/variants/Generic_x21E/debug_scripts/SAML21E17B.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91saml21e17" -f target/at91samlXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91saml21e17" -f target/at91samlXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/MT_D21E/debug_scripts/SAML21E18B.gdb b/variants/Generic_x21E/debug_scripts/SAML21E18B.gdb similarity index 97% rename from variants/MT_D21E/debug_scripts/SAML21E18B.gdb rename to variants/Generic_x21E/debug_scripts/SAML21E18B.gdb index b48a48445..77d302ab3 100644 --- a/variants/MT_D21E/debug_scripts/SAML21E18B.gdb +++ b/variants/Generic_x21E/debug_scripts/SAML21E18B.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91saml21e18" -f target/at91samlXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91saml21e18" -f target/at91samlXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/MT_D21E_revB/linker_scripts/gcc/16KB_Bootloader/flash_128KB.ld b/variants/Generic_x21E/linker_scripts/gcc/16KB_Bootloader/flash_128KB.ld similarity index 95% rename from variants/MT_D21E_revB/linker_scripts/gcc/16KB_Bootloader/flash_128KB.ld rename to variants/Generic_x21E/linker_scripts/gcc/16KB_Bootloader/flash_128KB.ld index c541d8cd0..90d7f473d 100644 --- a/variants/MT_D21E_revB/linker_scripts/gcc/16KB_Bootloader/flash_128KB.ld +++ b/variants/Generic_x21E/linker_scripts/gcc/16KB_Bootloader/flash_128KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00020000-0x4000 /* First 16KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00004000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x4000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00020000-0x4000 /* First 16KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00004000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x4000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/MT_D21E_revB/linker_scripts/gcc/16KB_Bootloader/flash_256KB.ld b/variants/Generic_x21E/linker_scripts/gcc/16KB_Bootloader/flash_256KB.ld similarity index 95% rename from variants/MT_D21E_revB/linker_scripts/gcc/16KB_Bootloader/flash_256KB.ld rename to variants/Generic_x21E/linker_scripts/gcc/16KB_Bootloader/flash_256KB.ld index a0b9f951f..74b6b298c 100644 --- a/variants/MT_D21E_revB/linker_scripts/gcc/16KB_Bootloader/flash_256KB.ld +++ b/variants/Generic_x21E/linker_scripts/gcc/16KB_Bootloader/flash_256KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00040000-0x4000 /* First 16KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x4000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00040000-0x4000 /* First 16KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x4000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/MT_D21E_revB/linker_scripts/gcc/16KB_Bootloader/flash_32KB.ld b/variants/Generic_x21E/linker_scripts/gcc/16KB_Bootloader/flash_32KB.ld similarity index 95% rename from variants/MT_D21E_revB/linker_scripts/gcc/16KB_Bootloader/flash_32KB.ld rename to variants/Generic_x21E/linker_scripts/gcc/16KB_Bootloader/flash_32KB.ld index 5d8d047a9..9030f5437 100644 --- a/variants/MT_D21E_revB/linker_scripts/gcc/16KB_Bootloader/flash_32KB.ld +++ b/variants/Generic_x21E/linker_scripts/gcc/16KB_Bootloader/flash_32KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00008000-0x4000 /* First 16KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x4000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00008000-0x4000 /* First 16KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x4000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/MT_D21E/linker_scripts/gcc/16KB_Bootloader/flash_64KB.ld b/variants/Generic_x21E/linker_scripts/gcc/16KB_Bootloader/flash_64KB.ld similarity index 95% rename from variants/MT_D21E/linker_scripts/gcc/16KB_Bootloader/flash_64KB.ld rename to variants/Generic_x21E/linker_scripts/gcc/16KB_Bootloader/flash_64KB.ld index 3f7223790..3f276ac1d 100644 --- a/variants/MT_D21E/linker_scripts/gcc/16KB_Bootloader/flash_64KB.ld +++ b/variants/Generic_x21E/linker_scripts/gcc/16KB_Bootloader/flash_64KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00010000-0x4000 /* First 16KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00002000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x4000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00010000-0x4000 /* First 16KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00002000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x4000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/MT_D21E/linker_scripts/gcc/8KB_Bootloader/flash_128KB.ld b/variants/Generic_x21E/linker_scripts/gcc/8KB_Bootloader/flash_128KB.ld similarity index 95% rename from variants/MT_D21E/linker_scripts/gcc/8KB_Bootloader/flash_128KB.ld rename to variants/Generic_x21E/linker_scripts/gcc/8KB_Bootloader/flash_128KB.ld index 07940acbd..4b2f64bca 100644 --- a/variants/MT_D21E/linker_scripts/gcc/8KB_Bootloader/flash_128KB.ld +++ b/variants/Generic_x21E/linker_scripts/gcc/8KB_Bootloader/flash_128KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00020000-0x2000 /* First 8KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00004000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x2000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00020000-0x2000 /* First 8KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00004000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x2000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/arduino_mzero/linker_scripts/gcc/8KB_Bootloader/flash_256KB.ld b/variants/Generic_x21E/linker_scripts/gcc/8KB_Bootloader/flash_256KB.ld similarity index 95% rename from variants/arduino_mzero/linker_scripts/gcc/8KB_Bootloader/flash_256KB.ld rename to variants/Generic_x21E/linker_scripts/gcc/8KB_Bootloader/flash_256KB.ld index 39944cffc..060e5acc5 100644 --- a/variants/arduino_mzero/linker_scripts/gcc/8KB_Bootloader/flash_256KB.ld +++ b/variants/Generic_x21E/linker_scripts/gcc/8KB_Bootloader/flash_256KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00040000-0x2000 /* First 8KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x2000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00040000-0x2000 /* First 8KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x2000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/MT_D21E_revB/linker_scripts/gcc/8KB_Bootloader/flash_32KB.ld b/variants/Generic_x21E/linker_scripts/gcc/8KB_Bootloader/flash_32KB.ld similarity index 95% rename from variants/MT_D21E_revB/linker_scripts/gcc/8KB_Bootloader/flash_32KB.ld rename to variants/Generic_x21E/linker_scripts/gcc/8KB_Bootloader/flash_32KB.ld index 0d3aaf7a9..f60a390ee 100644 --- a/variants/MT_D21E_revB/linker_scripts/gcc/8KB_Bootloader/flash_32KB.ld +++ b/variants/Generic_x21E/linker_scripts/gcc/8KB_Bootloader/flash_32KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00008000-0x2000 /* First 8KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x2000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00008000-0x2000 /* First 8KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x2000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/MT_D21E/linker_scripts/gcc/8KB_Bootloader/flash_64KB.ld b/variants/Generic_x21E/linker_scripts/gcc/8KB_Bootloader/flash_64KB.ld similarity index 95% rename from variants/MT_D21E/linker_scripts/gcc/8KB_Bootloader/flash_64KB.ld rename to variants/Generic_x21E/linker_scripts/gcc/8KB_Bootloader/flash_64KB.ld index 1c36f57e1..3b999367f 100644 --- a/variants/MT_D21E/linker_scripts/gcc/8KB_Bootloader/flash_64KB.ld +++ b/variants/Generic_x21E/linker_scripts/gcc/8KB_Bootloader/flash_64KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00010000-0x2000 /* First 8KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00002000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x2000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00010000-0x2000 /* First 8KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00002000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x2000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/arduino_zero/linker_scripts/gcc/No_Bootloader/flash_128KB.ld b/variants/Generic_x21E/linker_scripts/gcc/No_Bootloader/flash_128KB.ld similarity index 95% rename from variants/arduino_zero/linker_scripts/gcc/No_Bootloader/flash_128KB.ld rename to variants/Generic_x21E/linker_scripts/gcc/No_Bootloader/flash_128KB.ld index 74945d7da..eeb603e40 100644 --- a/variants/arduino_zero/linker_scripts/gcc/No_Bootloader/flash_128KB.ld +++ b/variants/Generic_x21E/linker_scripts/gcc/No_Bootloader/flash_128KB.ld @@ -1,215 +1,215 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00020000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00004000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - * __ram_end__ - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00020000 + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00004000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + * __ram_end__ + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/arduino_mzero/linker_scripts/gcc/No_Bootloader/flash_256KB.ld b/variants/Generic_x21E/linker_scripts/gcc/No_Bootloader/flash_256KB.ld similarity index 95% rename from variants/arduino_mzero/linker_scripts/gcc/No_Bootloader/flash_256KB.ld rename to variants/Generic_x21E/linker_scripts/gcc/No_Bootloader/flash_256KB.ld index 81adfe22d..a40ea2767 100644 --- a/variants/arduino_mzero/linker_scripts/gcc/No_Bootloader/flash_256KB.ld +++ b/variants/Generic_x21E/linker_scripts/gcc/No_Bootloader/flash_256KB.ld @@ -1,215 +1,215 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - * __ram_end__ - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000 + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + * __ram_end__ + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/arduino_zero/linker_scripts/gcc/No_Bootloader/flash_32KB.ld b/variants/Generic_x21E/linker_scripts/gcc/No_Bootloader/flash_32KB.ld similarity index 95% rename from variants/arduino_zero/linker_scripts/gcc/No_Bootloader/flash_32KB.ld rename to variants/Generic_x21E/linker_scripts/gcc/No_Bootloader/flash_32KB.ld index eb557284d..fb87bcc75 100644 --- a/variants/arduino_zero/linker_scripts/gcc/No_Bootloader/flash_32KB.ld +++ b/variants/Generic_x21E/linker_scripts/gcc/No_Bootloader/flash_32KB.ld @@ -1,215 +1,215 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00008000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - * __ram_end__ - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00008000 + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + * __ram_end__ + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/arduino_zero/linker_scripts/gcc/No_Bootloader/flash_64KB.ld b/variants/Generic_x21E/linker_scripts/gcc/No_Bootloader/flash_64KB.ld similarity index 95% rename from variants/arduino_zero/linker_scripts/gcc/No_Bootloader/flash_64KB.ld rename to variants/Generic_x21E/linker_scripts/gcc/No_Bootloader/flash_64KB.ld index c053d998b..cecbe42f8 100644 --- a/variants/arduino_zero/linker_scripts/gcc/No_Bootloader/flash_64KB.ld +++ b/variants/Generic_x21E/linker_scripts/gcc/No_Bootloader/flash_64KB.ld @@ -1,215 +1,215 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00010000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00002000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - * __ram_end__ - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00010000 + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00002000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + * __ram_end__ + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/MT_D21E/openocd_scripts/SAMC21E15A.cfg b/variants/Generic_x21E/openocd_scripts/SAMC21E15A.cfg similarity index 92% rename from variants/MT_D21E/openocd_scripts/SAMC21E15A.cfg rename to variants/Generic_x21E/openocd_scripts/SAMC21E15A.cfg index b6b72ccda..f8735b0d8 100644 --- a/variants/MT_D21E/openocd_scripts/SAMC21E15A.cfg +++ b/variants/Generic_x21E/openocd_scripts/SAMC21E15A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samc21e15 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samcXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samc21e15 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samcXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/MT_D21E_revB/openocd_scripts/SAMC21E16A.cfg b/variants/Generic_x21E/openocd_scripts/SAMC21E16A.cfg similarity index 92% rename from variants/MT_D21E_revB/openocd_scripts/SAMC21E16A.cfg rename to variants/Generic_x21E/openocd_scripts/SAMC21E16A.cfg index 613b357da..66eca2d01 100644 --- a/variants/MT_D21E_revB/openocd_scripts/SAMC21E16A.cfg +++ b/variants/Generic_x21E/openocd_scripts/SAMC21E16A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samc21e16 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samcXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samc21e16 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samcXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/MT_D21E_revB/openocd_scripts/SAMC21E17A.cfg b/variants/Generic_x21E/openocd_scripts/SAMC21E17A.cfg similarity index 92% rename from variants/MT_D21E_revB/openocd_scripts/SAMC21E17A.cfg rename to variants/Generic_x21E/openocd_scripts/SAMC21E17A.cfg index c687b08f0..4b281baad 100644 --- a/variants/MT_D21E_revB/openocd_scripts/SAMC21E17A.cfg +++ b/variants/Generic_x21E/openocd_scripts/SAMC21E17A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samc21e17 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samcXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samc21e17 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samcXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/MT_D21E_revB/openocd_scripts/SAMC21E18A.cfg b/variants/Generic_x21E/openocd_scripts/SAMC21E18A.cfg similarity index 92% rename from variants/MT_D21E_revB/openocd_scripts/SAMC21E18A.cfg rename to variants/Generic_x21E/openocd_scripts/SAMC21E18A.cfg index b87fb0116..f17e5e204 100644 --- a/variants/MT_D21E_revB/openocd_scripts/SAMC21E18A.cfg +++ b/variants/Generic_x21E/openocd_scripts/SAMC21E18A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samc21e18 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samcXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samc21e18 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samcXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/MT_D21E/openocd_scripts/SAMD21E15A.cfg b/variants/Generic_x21E/openocd_scripts/SAMD21E15A.cfg similarity index 92% rename from variants/MT_D21E/openocd_scripts/SAMD21E15A.cfg rename to variants/Generic_x21E/openocd_scripts/SAMD21E15A.cfg index 0355cc401..b1d60ed49 100644 --- a/variants/MT_D21E/openocd_scripts/SAMD21E15A.cfg +++ b/variants/Generic_x21E/openocd_scripts/SAMD21E15A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samd21e15 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samdXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samd21e15 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samdXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/MT_D21E_revB/openocd_scripts/SAMD21E16A.cfg b/variants/Generic_x21E/openocd_scripts/SAMD21E16A.cfg similarity index 92% rename from variants/MT_D21E_revB/openocd_scripts/SAMD21E16A.cfg rename to variants/Generic_x21E/openocd_scripts/SAMD21E16A.cfg index 4eaf7acfc..a0d3361e7 100644 --- a/variants/MT_D21E_revB/openocd_scripts/SAMD21E16A.cfg +++ b/variants/Generic_x21E/openocd_scripts/SAMD21E16A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samd21e16 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samdXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samd21e16 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samdXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/MT_D21E_revB/openocd_scripts/SAMD21E17A.cfg b/variants/Generic_x21E/openocd_scripts/SAMD21E17A.cfg similarity index 92% rename from variants/MT_D21E_revB/openocd_scripts/SAMD21E17A.cfg rename to variants/Generic_x21E/openocd_scripts/SAMD21E17A.cfg index 6b5641483..17eaa210b 100644 --- a/variants/MT_D21E_revB/openocd_scripts/SAMD21E17A.cfg +++ b/variants/Generic_x21E/openocd_scripts/SAMD21E17A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samd21e17 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samdXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samd21e17 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samdXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/MT_D21E_revB/openocd_scripts/SAMD21E18A.cfg b/variants/Generic_x21E/openocd_scripts/SAMD21E18A.cfg similarity index 92% rename from variants/MT_D21E_revB/openocd_scripts/SAMD21E18A.cfg rename to variants/Generic_x21E/openocd_scripts/SAMD21E18A.cfg index b99d610ef..2b202d5f2 100644 --- a/variants/MT_D21E_revB/openocd_scripts/SAMD21E18A.cfg +++ b/variants/Generic_x21E/openocd_scripts/SAMD21E18A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samd21e18 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samdXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samd21e18 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samdXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/MT_D21E/openocd_scripts/SAML21E15B.cfg b/variants/Generic_x21E/openocd_scripts/SAML21E15B.cfg similarity index 92% rename from variants/MT_D21E/openocd_scripts/SAML21E15B.cfg rename to variants/Generic_x21E/openocd_scripts/SAML21E15B.cfg index 82fbb0650..c9409ec7c 100644 --- a/variants/MT_D21E/openocd_scripts/SAML21E15B.cfg +++ b/variants/Generic_x21E/openocd_scripts/SAML21E15B.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91saml21e15 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samlXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91saml21e15 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samlXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/MT_D21E_revB/openocd_scripts/SAML21E16B.cfg b/variants/Generic_x21E/openocd_scripts/SAML21E16B.cfg similarity index 92% rename from variants/MT_D21E_revB/openocd_scripts/SAML21E16B.cfg rename to variants/Generic_x21E/openocd_scripts/SAML21E16B.cfg index c74f6102a..574bc5657 100644 --- a/variants/MT_D21E_revB/openocd_scripts/SAML21E16B.cfg +++ b/variants/Generic_x21E/openocd_scripts/SAML21E16B.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91saml21e16 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samlXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91saml21e16 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samlXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/MT_D21E_revB/openocd_scripts/SAML21E17B.cfg b/variants/Generic_x21E/openocd_scripts/SAML21E17B.cfg similarity index 92% rename from variants/MT_D21E_revB/openocd_scripts/SAML21E17B.cfg rename to variants/Generic_x21E/openocd_scripts/SAML21E17B.cfg index 3b844e436..4882342cc 100644 --- a/variants/MT_D21E_revB/openocd_scripts/SAML21E17B.cfg +++ b/variants/Generic_x21E/openocd_scripts/SAML21E17B.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91saml21e17 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samlXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91saml21e17 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samlXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/MT_D21E_revB/openocd_scripts/SAML21E18B.cfg b/variants/Generic_x21E/openocd_scripts/SAML21E18B.cfg similarity index 92% rename from variants/MT_D21E_revB/openocd_scripts/SAML21E18B.cfg rename to variants/Generic_x21E/openocd_scripts/SAML21E18B.cfg index 4e7a27fde..35f330027 100644 --- a/variants/MT_D21E_revB/openocd_scripts/SAML21E18B.cfg +++ b/variants/Generic_x21E/openocd_scripts/SAML21E18B.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91saml21e18 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samlXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91saml21e18 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samlXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/MT_D21E/pins_arduino.h b/variants/Generic_x21E/pins_arduino.h similarity index 97% rename from variants/MT_D21E/pins_arduino.h rename to variants/Generic_x21E/pins_arduino.h index db0e40c3d..36ab06c77 100644 --- a/variants/MT_D21E/pins_arduino.h +++ b/variants/Generic_x21E/pins_arduino.h @@ -1,21 +1,21 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -// API compatibility -#include "variant.h" - +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" + diff --git a/variants/MT_D21E/variant.cpp b/variants/Generic_x21E/variant.cpp similarity index 98% rename from variants/MT_D21E/variant.cpp rename to variants/Generic_x21E/variant.cpp index d360c87bd..2e628123d 100644 --- a/variants/MT_D21E/variant.cpp +++ b/variants/Generic_x21E/variant.cpp @@ -1,134 +1,134 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* - * Modified 9 December 2016 by Justin Mattair - * for MattairTech boards (www.mattairtech.com) - * - * See README.md for documentation and pin mapping information - */ - - -#include "variant.h" - -/* - * Pins descriptions - */ -const PinDescription g_APinDescription[]= -{ - // 0..1 are unused by default (pins in use by 32.768KHz crystal, which is used by the Arduino core) - { PORTA, 0, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 1, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - - // 2..9 - Analog capable pins (DAC available on 2) - { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // ADC/AIN[0] / DAC - { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // ADC/AIN[1] - { PORTA, 4, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel4, EXTERNAL_INT_4, GCLK_CCL_NONE }, // ADC/AIN[4] - { PORTA, 5, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel5, EXTERNAL_INT_5, GCLK_CCL_NONE }, // ADC/AIN[5] - { PORTA, 6, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel6, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // ADC/AIN[6] - { PORTA, 7, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, ADC_Channel7, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // ADC/AIN[7] - { PORTA, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), TCC0_CH0, ADC_Channel16, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, // TCC0/WO[0] - { PORTA, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), TCC0_CH1, ADC_Channel17, EXTERNAL_INT_9, GCLK_CCL_NONE }, // TCC0/WO[1] - - // 10..11 - SERCOM/UART (Serial1) or Analog or Digital functions - { PORTA, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_COM), TCC0_CH2, ADC_Channel18, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // TX: SERCOM0/PAD[2] - { PORTA, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_COM), TCC0_CH3, ADC_Channel19, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // RX: SERCOM0/PAD[3] - - // 12..13 pins don't exist - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 14..15 - SERCOM/UART (Serial2) or Digital functions - { PORTA, 14, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC3_CH0, No_ADC_Channel, EXTERNAL_INT_14, GCLK_CCL_NONE }, // TC3/WO[0], HOST_ENABLE - { PORTA, 15, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC3_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // TC3/WO[1], ATN - - // 16..17 SERCOM/I2C (Wire) or Serial4 or Digital functions -#if defined(FOUR_UART) - { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, // TX4: SERCOM3/PAD[0] - { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, // RX4: SERCOM3/PAD[1] -#else - { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, // SDA: SERCOM1/PAD[0] - { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, // SCL: SERCOM1/PAD[1] -#endif - - // 18..23 - SERCOM/SPI (SPI) or Digital functions (pins 20..21 do not exist) - { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_2, GCLK_CCL_NONE }, // SPI MOSI: SERCOM3/PAD[2] (PIN_ATTR_SERCOM_ALT) - { PORTA, 19, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, // SPI SCK: SERCOM3/PAD[3] (PIN_ATTR_SERCOM_ALT) - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC4_CH0, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, // SPI MISO: SERCOM3/PAD[0] - { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), TC4_CH1, No_ADC_Channel, EXTERNAL_INT_7, GCLK_CCL_NONE }, // SPI SS: SERCOM3/PAD[1] - - // 24..26 - USB_NEGATIVE and USB_POSITIVE, pin 26 does not exist - { PORTA, 24, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_COM), TC5_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM - { PORTA, 25, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_COM), TC5_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 27..29 Button A and LED (pin 29 does not exist) - { PORTA, 27, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_15, GCLK_CCL_NONE }, // Button A - { PORTA, 28, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_8, GCLK_CCL_NONE }, // LED - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 30..31 Digital functions / Debug interface (SWD CLK and SWD IO) - { PORTA, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC1_CH0, No_ADC_Channel, EXTERNAL_INT_10, GCLK_CCL_NONE }, // TCC1/WO[0] / SWD CLK / TX3 - { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC1_CH1, No_ADC_Channel, EXTERNAL_INT_11, GCLK_CCL_NONE }, // TCC1/WO[1] / SWD IO / RX3 -} ; - -const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TCC1, TCC2, TC3, TC4, TC5 } ; - -// Multi-serial objects instantiation -SERCOM sercom0( SERCOM0 ) ; -SERCOM sercom1( SERCOM1 ) ; -SERCOM sercom2( SERCOM2 ) ; -SERCOM sercom3( SERCOM3 ) ; - -#if defined(ONE_UART) || defined(TWO_UART) || defined(THREE_UART) || defined(FOUR_UART) -Uart Serial1( SERCOM_INSTANCE_SERIAL1, PIN_SERIAL1_RX, PIN_SERIAL1_TX, PAD_SERIAL1_RX, PAD_SERIAL1_TX ) ; - -void SERCOM0_Handler() -{ - Serial1.IrqHandler(); -} -#endif - -#if defined(TWO_UART) || defined(THREE_UART) || defined(FOUR_UART) -Uart Serial2( SERCOM_INSTANCE_SERIAL2, PIN_SERIAL2_RX, PIN_SERIAL2_TX, PAD_SERIAL2_RX, PAD_SERIAL2_TX ) ; - -void SERCOM2_Handler() -{ - Serial2.IrqHandler(); -} -#endif - -#if defined(THREE_UART) || defined(FOUR_UART) -Uart Serial3( SERCOM_INSTANCE_SERIAL3, PIN_SERIAL3_RX, PIN_SERIAL3_TX, PAD_SERIAL3_RX, PAD_SERIAL3_TX ) ; - -void SERCOM1_Handler() -{ - Serial3.IrqHandler(); -} -#endif - -#if defined(FOUR_UART) -Uart Serial4( SERCOM_INSTANCE_SERIAL4, PIN_SERIAL4_RX, PIN_SERIAL4_TX, PAD_SERIAL4_RX, PAD_SERIAL4_TX ) ; - -void SERCOM3_Handler() -{ - Serial4.IrqHandler(); -} -#endif +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* + * Modified 9 December 2016 by Justin Mattair + * for MattairTech boards (www.mattairtech.com) + * + * See README.md for documentation and pin mapping information + */ + + +#include "variant.h" + +/* + * Pins descriptions + */ +const PinDescription g_APinDescription[]= +{ + // 0..1 are unused by default (pins in use by 32.768KHz crystal, which is used by the Arduino core) + { PORTA, 0, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 1, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + + // 2..9 - Analog capable pins (DAC available on 2) + { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // ADC/AIN[0] / DAC + { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // ADC/AIN[1] + { PORTA, 4, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel4, EXTERNAL_INT_4, GCLK_CCL_NONE }, // ADC/AIN[4] + { PORTA, 5, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel5, EXTERNAL_INT_5, GCLK_CCL_NONE }, // ADC/AIN[5] + { PORTA, 6, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel6, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // ADC/AIN[6] + { PORTA, 7, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, ADC_Channel7, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // ADC/AIN[7] + { PORTA, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), TCC0_CH0, ADC_Channel16, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, // TCC0/WO[0] + { PORTA, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), TCC0_CH1, ADC_Channel17, EXTERNAL_INT_9, GCLK_CCL_NONE }, // TCC0/WO[1] + + // 10..11 - SERCOM/UART (Serial1) or Analog or Digital functions + { PORTA, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_COM), TCC0_CH2, ADC_Channel18, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // TX: SERCOM0/PAD[2] + { PORTA, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_COM), TCC0_CH3, ADC_Channel19, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // RX: SERCOM0/PAD[3] + + // 12..13 pins don't exist + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + + // 14..15 - SERCOM/UART (Serial2) or Digital functions + { PORTA, 14, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC3_CH0, No_ADC_Channel, EXTERNAL_INT_14, GCLK_CCL_NONE }, // TC3/WO[0], HOST_ENABLE + { PORTA, 15, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC3_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // TC3/WO[1], ATN + + // 16..17 SERCOM/I2C (Wire) or Serial4 or Digital functions +#if defined(FOUR_UART) + { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, // TX4: SERCOM3/PAD[0] + { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, // RX4: SERCOM3/PAD[1] +#else + { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, // SDA: SERCOM1/PAD[0] + { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, // SCL: SERCOM1/PAD[1] +#endif + + // 18..23 - SERCOM/SPI (SPI) or Digital functions (pins 20..21 do not exist) + { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_2, GCLK_CCL_NONE }, // SPI MOSI: SERCOM3/PAD[2] (PIN_ATTR_SERCOM_ALT) + { PORTA, 19, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, // SPI SCK: SERCOM3/PAD[3] (PIN_ATTR_SERCOM_ALT) + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC4_CH0, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, // SPI MISO: SERCOM3/PAD[0] + { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), TC4_CH1, No_ADC_Channel, EXTERNAL_INT_7, GCLK_CCL_NONE }, // SPI SS: SERCOM3/PAD[1] + + // 24..26 - USB_NEGATIVE and USB_POSITIVE, pin 26 does not exist + { PORTA, 24, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_COM), TC5_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM + { PORTA, 25, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_COM), TC5_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + + // 27..29 Button A and LED (pin 29 does not exist) + { PORTA, 27, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_15, GCLK_CCL_NONE }, // Button A + { PORTA, 28, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_8, GCLK_CCL_NONE }, // LED + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + + // 30..31 Digital functions / Debug interface (SWD CLK and SWD IO) + { PORTA, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC1_CH0, No_ADC_Channel, EXTERNAL_INT_10, GCLK_CCL_NONE }, // TCC1/WO[0] / SWD CLK / TX3 + { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC1_CH1, No_ADC_Channel, EXTERNAL_INT_11, GCLK_CCL_NONE }, // TCC1/WO[1] / SWD IO / RX3 +} ; + +const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TCC1, TCC2, TC3, TC4, TC5 } ; + +// Multi-serial objects instantiation +SERCOM sercom0( SERCOM0 ) ; +SERCOM sercom1( SERCOM1 ) ; +SERCOM sercom2( SERCOM2 ) ; +SERCOM sercom3( SERCOM3 ) ; + +#if defined(ONE_UART) || defined(TWO_UART) || defined(THREE_UART) || defined(FOUR_UART) +Uart Serial1( SERCOM_INSTANCE_SERIAL1, PIN_SERIAL1_RX, PIN_SERIAL1_TX, PAD_SERIAL1_RX, PAD_SERIAL1_TX ) ; + +void SERCOM0_Handler() +{ + Serial1.IrqHandler(); +} +#endif + +#if defined(TWO_UART) || defined(THREE_UART) || defined(FOUR_UART) +Uart Serial2( SERCOM_INSTANCE_SERIAL2, PIN_SERIAL2_RX, PIN_SERIAL2_TX, PAD_SERIAL2_RX, PAD_SERIAL2_TX ) ; + +void SERCOM2_Handler() +{ + Serial2.IrqHandler(); +} +#endif + +#if defined(THREE_UART) || defined(FOUR_UART) +Uart Serial3( SERCOM_INSTANCE_SERIAL3, PIN_SERIAL3_RX, PIN_SERIAL3_TX, PAD_SERIAL3_RX, PAD_SERIAL3_TX ) ; + +void SERCOM1_Handler() +{ + Serial3.IrqHandler(); +} +#endif + +#if defined(FOUR_UART) +Uart Serial4( SERCOM_INSTANCE_SERIAL4, PIN_SERIAL4_RX, PIN_SERIAL4_TX, PAD_SERIAL4_RX, PAD_SERIAL4_TX ) ; + +void SERCOM3_Handler() +{ + Serial4.IrqHandler(); +} +#endif diff --git a/variants/MT_D21E/variant.h b/variants/Generic_x21E/variant.h similarity index 96% rename from variants/MT_D21E/variant.h rename to variants/Generic_x21E/variant.h index f592778df..ececbbee8 100644 --- a/variants/MT_D21E/variant.h +++ b/variants/Generic_x21E/variant.h @@ -1,373 +1,373 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* - * Modified 9 December 2016 by Justin Mattair - * for MattairTech boards (www.mattairtech.com) - * - * See README.md for documentation and pin mapping information - */ - -#ifndef _VARIANT_MATTAIRTECH_MT_D21E_ -#define _VARIANT_MATTAIRTECH_MT_D21E_ - -/* The definitions here need the MattairTech SAMD core >=1.6.8. - * The format is different than the stock Arduino SAMD core, - * which uses ARDUINO_SAMD_VARIANT_COMPLIANCE instead. - */ -#define MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE 10608 - -/*---------------------------------------------------------------------------- - * Clock Configuration - *----------------------------------------------------------------------------*/ - -/** Master clock frequency (also Fcpu frequency) */ -#define VARIANT_MCK (48000000ul) - -/* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ - * must also be defined with the external crystal frequency in Hertz. - */ -#define HS_CRYSTAL_FREQUENCY_HERTZ 16000000UL - -/* If the PLL is used (CLOCKCONFIG_32768HZ_CRYSTAL, or CLOCKCONFIG_HS_CRYSTAL - * defined), then PLL_FRACTIONAL_ENABLED can be defined, which will result in - * a more accurate 48MHz output frequency at the expense of increased jitter. - */ -//#define PLL_FRACTIONAL_ENABLED - -/* If both PLL_FAST_STARTUP and CLOCKCONFIG_HS_CRYSTAL are defined, the crystal - * will be divided down to 1MHz - 2MHz, rather than 32KHz - 64KHz, before being - * multiplied by the PLL. This will result in a faster lock time for the PLL, - * however, it will also result in a less accurate PLL output frequency if the - * crystal is not divisible (without remainder) by 1MHz. In this case, define - * PLL_FRACTIONAL_ENABLED as well. - */ -//#define PLL_FAST_STARTUP - -/* The fine calibration value for DFLL open-loop mode is defined here. - * The coarse calibration value is loaded from NVM OTP (factory calibration values). - */ -#define NVM_SW_CALIB_DFLL48M_FINE_VAL (512) - -/*---------------------------------------------------------------------------- - * Headers - *----------------------------------------------------------------------------*/ - -#include "WVariant.h" -#include "sam.h" - -#ifdef __cplusplus -#include "SERCOM.h" -#include "Uart.h" -#endif // __cplusplus - -#ifdef __cplusplus -extern "C" -{ -#endif // __cplusplus - -/*---------------------------------------------------------------------------- - * Pins - *----------------------------------------------------------------------------*/ - -// Number of pins defined in PinDescription array -#define NUM_PIN_DESCRIPTION_ENTRIES (32u) - -#define PINS_COUNT NUM_PIN_DESCRIPTION_ENTRIES -#define NUM_DIGITAL_PINS PINS_COUNT -#define NUM_ANALOG_INPUTS (10u) -#define NUM_ANALOG_OUTPUTS (1u) -#define analogInputToDigitalPin(p) (p) - -#define digitalPinToPort(P) ( &(PORT->Group[g_APinDescription[P].ulPort]) ) -#define digitalPinToBitMask(P) ( 1 << g_APinDescription[P].ulPin ) -//#define analogInPinToBit(P) ( ) -#define portOutputRegister(port) ( &(port->OUT.reg) ) -#define portInputRegister(port) ( &(port->IN.reg) ) -#define portModeRegister(port) ( &(port->DIR.reg) ) -#define digitalPinHasPWM(P) ( (g_APinDescription[P].ulPinAttribute & PIN_ATTR_TIMER_PWM) == PIN_ATTR_TIMER_PWM ) - -/* - * digitalPinToTimer(..) is AVR-specific and is not defined for SAMD - * architecture. If you need to check if a pin supports PWM you must - * use digitalPinHasPWM(..). - * - * https://github.com/arduino/Arduino/issues/1833 - */ -// #define digitalPinToTimer(P) - -/* LEDs - * None of these defines are currently used by the core. - * The MT-D21E onboard LED is on pin 28. - * The RX and TX LEDs are not present. - * You may optionally add them to any free pins. - */ -#define PIN_LED_13 (28u) -#define PIN_LED_RXL (30u) -#define PIN_LED_TXL (31u) -#define PIN_LED PIN_LED_13 -#define PIN_LED2 PIN_LED_RXL -#define PIN_LED3 PIN_LED_TXL -#define LED_BUILTIN PIN_LED_13 - -/* Buttons - * Note that Button B is connected to Reset by default. - * A solder jumper can be changed to route Button B to pin 31 instead. - * There is a debouncing capacitor connected, so delay reading the pin for - * at least 6ms after turning on the pullup to allow the capacitor to charge. - */ -#define BUTTON_A (27u) -#define BUTTON_B (31u) -#define BUTTON_BUILTIN BUTTON_A - - -/* - * Analog pins - */ -#define PIN_A2 (2ul) -#define PIN_A3 (3ul) -#define PIN_A4 (4ul) -#define PIN_A5 (5ul) -#define PIN_A6 (6ul) -#define PIN_A7 (7ul) -#define PIN_A8 (8ul) -#define PIN_A9 (9ul) -#define PIN_A10 (10ul) -#define PIN_A11 (11ul) -#define PIN_DAC0 (2ul) - -static const uint8_t A2 = PIN_A2; -static const uint8_t A3 = PIN_A3; -static const uint8_t A4 = PIN_A4; -static const uint8_t A5 = PIN_A5; -static const uint8_t A6 = PIN_A6; -static const uint8_t A7 = PIN_A7; -static const uint8_t A8 = PIN_A8; -static const uint8_t A9 = PIN_A9; -static const uint8_t A10 = PIN_A10; -static const uint8_t A11 = PIN_A11; -static const uint8_t DAC0 = PIN_DAC0; - -#define ADC_RESOLUTION 12 - -// #define REMAP_ANALOG_PIN_ID(pin) if ( pin < A0 ) pin += A0 - -/* Set default analog voltage reference */ -#define VARIANT_AR_DEFAULT AR_DEFAULT - -/* Reference voltage pins (define even if not enabled with PIN_ATTR_REF in the PinDescription table) */ -#define REFA_PIN (3ul) -#define REFB_PIN (4ul) - - -// The ATN pin may be used in the future as the first SPI chip select. -// On boards that do not have the Arduino physical form factor, it can to set to any free pin. -#define PIN_ATN (15ul) -static const uint8_t ATN = PIN_ATN; - - -/* - * Serial interfaces - */ -// Serial1 -#define PIN_SERIAL1_RX (11ul) -#define PIN_SERIAL1_TX (10ul) -#define PAD_SERIAL1_TX (UART_TX_PAD_2) -#define PAD_SERIAL1_RX (SERCOM_RX_PAD_3) - -#define SERCOM_INSTANCE_SERIAL1 &sercom0 - -// Serial2 -#define PIN_SERIAL2_RX (15ul) -#define PIN_SERIAL2_TX (14ul) -#define PAD_SERIAL2_TX (UART_TX_PAD_2) -#define PAD_SERIAL2_RX (SERCOM_RX_PAD_3) - -#define SERCOM_INSTANCE_SERIAL2 &sercom2 - -// Serial3 -#define PIN_SERIAL3_RX (31ul) -#define PIN_SERIAL3_TX (30ul) -#define PAD_SERIAL3_TX (UART_TX_PAD_2) -#define PAD_SERIAL3_RX (SERCOM_RX_PAD_3) - -#define SERCOM_INSTANCE_SERIAL3 &sercom1 - -// Serial4 -#define PIN_SERIAL4_RX (17ul) -#define PIN_SERIAL4_TX (16ul) -#define PAD_SERIAL4_TX (UART_TX_PAD_0) -#define PAD_SERIAL4_RX (SERCOM_RX_PAD_1) - -#define SERCOM_INSTANCE_SERIAL4 &sercom3 - - -/* - * SPI Interfaces - */ -#if defined(TWO_SPI) -#define SPI_INTERFACES_COUNT 2 -#else -#define SPI_INTERFACES_COUNT 1 -#endif - -#define PIN_SPI_MISO (22u) -#define PIN_SPI_MOSI (18u) -#define PIN_SPI_SCK (19u) -#define PIN_SPI_SS (23u) -#define PERIPH_SPI sercom3 -#define PAD_SPI_TX SPI_PAD_2_SCK_3 -#define PAD_SPI_RX SERCOM_RX_PAD_0 - -static const uint8_t SS = PIN_SPI_SS ; // The SERCOM SS PAD is available on this pin but HW SS isn't used. Set here only for reference. -static const uint8_t MOSI = PIN_SPI_MOSI ; -static const uint8_t MISO = PIN_SPI_MISO ; -static const uint8_t SCK = PIN_SPI_SCK ; - -#define PIN_SPI1_MISO (8u) -#define PIN_SPI1_MOSI (14u) -#define PIN_SPI1_SCK (15u) -#define PIN_SPI1_SS (9u) -#define PERIPH_SPI1 sercom2 -#define PAD_SPI1_TX SPI_PAD_2_SCK_3 -#define PAD_SPI1_RX SERCOM_RX_PAD_0 - -static const uint8_t SS1 = PIN_SPI1_SS ; // The SERCOM SS PAD is available on this pin but HW SS isn't used. Set here only for reference. -static const uint8_t MOSI1 = PIN_SPI1_MOSI ; -static const uint8_t MISO1 = PIN_SPI1_MISO ; -static const uint8_t SCK1 = PIN_SPI1_SCK ; - - -/* - * Wire Interfaces - */ -#if defined(TWO_WIRE) -#define WIRE_INTERFACES_COUNT 2 -#else -#define WIRE_INTERFACES_COUNT 1 -#endif - -#define PIN_WIRE_SDA (16u) -#define PIN_WIRE_SCL (17u) -#if defined(THREE_UART) && defined(ONE_WIRE) && defined(NO_SPI) - #define PERIPH_WIRE sercom3 - #define WIRE_IT_HANDLER SERCOM3_Handler -#else - #define PERIPH_WIRE sercom1 - #define WIRE_IT_HANDLER SERCOM1_Handler -#endif - -static const uint8_t SDA = PIN_WIRE_SDA; -static const uint8_t SCL = PIN_WIRE_SCL; - -#define PIN_WIRE1_SDA (8u) -#define PIN_WIRE1_SCL (9u) -#define PERIPH_WIRE1 sercom2 -#define WIRE1_IT_HANDLER SERCOM2_Handler - -static const uint8_t SDA1 = PIN_WIRE1_SDA; -static const uint8_t SCL1 = PIN_WIRE1_SCL; - - -/* - * USB - Define PIN_USB_HOST_ENABLE to assert the defined pin to - * PIN_USB_HOST_ENABLE_VALUE during startup. Leave undefined to disable this pin. - */ -#define PIN_USB_DM (24ul) -#define PIN_USB_DP (25ul) -//#define PIN_USB_HOST_ENABLE (14ul) -#define PIN_USB_HOST_ENABLE_VALUE HIGH - -/* - * I2S Interfaces - */ -#define I2S_INTERFACES_COUNT 1 - -#define I2S_DEVICE 0 -#define I2S_CLOCK_GENERATOR 3 -#define PIN_I2S_SD (7u) -#define PIN_I2S_SCK (10u) -#define PIN_I2S_FS (11u) - -#ifdef __cplusplus -} -#endif - - -/*---------------------------------------------------------------------------- - * Arduino objects - C++ only - *----------------------------------------------------------------------------*/ - -#ifdef __cplusplus - -/* ========================= - * ===== SERCOM DEFINITION - * ========================= -*/ -extern SERCOM sercom0; -extern SERCOM sercom1; -extern SERCOM sercom2; -extern SERCOM sercom3; - -extern Uart Serial1; -extern Uart Serial2; -extern Uart Serial3; -extern Uart Serial4; - -#endif - -// These serial port names are intended to allow libraries and architecture-neutral -// sketches to automatically default to the correct port name for a particular type -// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, -// the first hardware serial port whose RX/TX pins are not dedicated to another use. -// -// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor -// -// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial -// -// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library -// -// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. -// -// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX -// pins are NOT connected to anything by default. -#define SERIAL_PORT_USBVIRTUAL SerialUSB -// SERIAL_PORT_MONITOR seems to be used only by the USB Host library (as of 1.6.5). -// It normally allows debugging output on the USB programming port, while the USB host uses the USB native port. -// The programming port is connected to a hardware UART through a USB-Serial bridge (EDBG chip) on the Zero. -// Boards that do not have the EDBG chip will have to connect a USB-TTL serial adapter to 'Serial' to get -// the USB Host debugging output. -#define SERIAL_PORT_MONITOR Serial1 -// Serial has no physical pins broken out, so it's not listed as HARDWARE port -#define SERIAL_PORT_HARDWARE Serial1 -#define SERIAL_PORT_HARDWARE_OPEN Serial1 - -// The MT-D21E does not have the EDBG support chip, which provides a USB-UART bridge -// accessible using Serial (the Arduino serial monitor is normally connected to this). -// So, the USB virtual serial port (SerialUSB) must be used to communicate with the host. -// Because most sketches use Serial to print to the monitor, it is aliased to SerialUSB. -// Remember to use while(!Serial); to wait for a connection before Serial printing. - -// When USB CDC is enabled, Serial refers to SerialUSB, otherwise it refers to Serial1. -#if defined(CDC_ONLY) || defined(CDC_HID) || defined(WITH_CDC) -#define Serial SerialUSB -#else -#define Serial Serial1 -#endif - -#endif /* _VARIANT_MATTAIRTECH_MT_D21E_ */ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* + * Modified 9 December 2016 by Justin Mattair + * for MattairTech boards (www.mattairtech.com) + * + * See README.md for documentation and pin mapping information + */ + +#ifndef _VARIANT_GENERIC_XX1E_ +#define _VARIANT_GENERIC_XX1E_ + +/* The definitions here need the MattairTech SAMD core >=1.6.8. + * The format is different than the stock Arduino SAMD core, + * which uses ARDUINO_SAMD_VARIANT_COMPLIANCE instead. + */ +#define MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE 10608 + +/*---------------------------------------------------------------------------- + * Clock Configuration + *----------------------------------------------------------------------------*/ + +/** Master clock frequency (also Fcpu frequency) */ +#define VARIANT_MCK (48000000ul) + +/* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ + * must also be defined with the external crystal frequency in Hertz. + */ +#define HS_CRYSTAL_FREQUENCY_HERTZ 16000000UL + +/* If the PLL is used (CLOCKCONFIG_32768HZ_CRYSTAL, or CLOCKCONFIG_HS_CRYSTAL + * defined), then PLL_FRACTIONAL_ENABLED can be defined, which will result in + * a more accurate 48MHz output frequency at the expense of increased jitter. + */ +//#define PLL_FRACTIONAL_ENABLED + +/* If both PLL_FAST_STARTUP and CLOCKCONFIG_HS_CRYSTAL are defined, the crystal + * will be divided down to 1MHz - 2MHz, rather than 32KHz - 64KHz, before being + * multiplied by the PLL. This will result in a faster lock time for the PLL, + * however, it will also result in a less accurate PLL output frequency if the + * crystal is not divisible (without remainder) by 1MHz. In this case, define + * PLL_FRACTIONAL_ENABLED as well. + */ +//#define PLL_FAST_STARTUP + +/* The fine calibration value for DFLL open-loop mode is defined here. + * The coarse calibration value is loaded from NVM OTP (factory calibration values). + */ +#define NVM_SW_CALIB_DFLL48M_FINE_VAL (512) + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" +#include "sam.h" + +#ifdef __cplusplus +#include "SERCOM.h" +#include "Uart.h" +#endif // __cplusplus + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +/*---------------------------------------------------------------------------- + * Pins + *----------------------------------------------------------------------------*/ + +// Number of pins defined in PinDescription array +#define NUM_PIN_DESCRIPTION_ENTRIES (32u) + +#define PINS_COUNT NUM_PIN_DESCRIPTION_ENTRIES +#define NUM_DIGITAL_PINS PINS_COUNT +#define NUM_ANALOG_INPUTS (10u) +#define NUM_ANALOG_OUTPUTS (1u) +#define analogInputToDigitalPin(p) (p) + +#define digitalPinToPort(P) ( &(PORT->Group[g_APinDescription[P].ulPort]) ) +#define digitalPinToBitMask(P) ( 1 << g_APinDescription[P].ulPin ) +//#define analogInPinToBit(P) ( ) +#define portOutputRegister(port) ( &(port->OUT.reg) ) +#define portInputRegister(port) ( &(port->IN.reg) ) +#define portModeRegister(port) ( &(port->DIR.reg) ) +#define digitalPinHasPWM(P) ( (g_APinDescription[P].ulPinAttribute & PIN_ATTR_TIMER_PWM) == PIN_ATTR_TIMER_PWM ) + +/* + * digitalPinToTimer(..) is AVR-specific and is not defined for SAMD + * architecture. If you need to check if a pin supports PWM you must + * use digitalPinHasPWM(..). + * + * https://github.com/arduino/Arduino/issues/1833 + */ +// #define digitalPinToTimer(P) + +/* LEDs + * None of these defines are currently used by the core. + * The MT-D21E onboard LED is on pin 28. + * The RX and TX LEDs are not present. + * You may optionally add them to any free pins. + */ +#define PIN_LED_13 (28u) +#define PIN_LED_RXL (30u) +#define PIN_LED_TXL (31u) +#define PIN_LED PIN_LED_13 +#define PIN_LED2 PIN_LED_RXL +#define PIN_LED3 PIN_LED_TXL +#define LED_BUILTIN PIN_LED_13 + +/* Buttons + * Note that Button B is connected to Reset by default. + * A solder jumper can be changed to route Button B to pin 31 instead. + * There is a debouncing capacitor connected, so delay reading the pin for + * at least 6ms after turning on the pullup to allow the capacitor to charge. + */ +#define BUTTON_A (27u) +#define BUTTON_B (31u) +#define BUTTON_BUILTIN BUTTON_A + + +/* + * Analog pins + */ +#define PIN_A2 (2ul) +#define PIN_A3 (3ul) +#define PIN_A4 (4ul) +#define PIN_A5 (5ul) +#define PIN_A6 (6ul) +#define PIN_A7 (7ul) +#define PIN_A8 (8ul) +#define PIN_A9 (9ul) +#define PIN_A10 (10ul) +#define PIN_A11 (11ul) +#define PIN_DAC0 (2ul) + +static const uint8_t A2 = PIN_A2; +static const uint8_t A3 = PIN_A3; +static const uint8_t A4 = PIN_A4; +static const uint8_t A5 = PIN_A5; +static const uint8_t A6 = PIN_A6; +static const uint8_t A7 = PIN_A7; +static const uint8_t A8 = PIN_A8; +static const uint8_t A9 = PIN_A9; +static const uint8_t A10 = PIN_A10; +static const uint8_t A11 = PIN_A11; +static const uint8_t DAC0 = PIN_DAC0; + +#define ADC_RESOLUTION 12 + +// #define REMAP_ANALOG_PIN_ID(pin) if ( pin < A0 ) pin += A0 + +/* Set default analog voltage reference */ +#define VARIANT_AR_DEFAULT AR_DEFAULT + +/* Reference voltage pins (define even if not enabled with PIN_ATTR_REF in the PinDescription table) */ +#define REFA_PIN (3ul) +#define REFB_PIN (4ul) + + +// The ATN pin may be used in the future as the first SPI chip select. +// On boards that do not have the Arduino physical form factor, it can to set to any free pin. +#define PIN_ATN (15ul) +static const uint8_t ATN = PIN_ATN; + + +/* + * Serial interfaces + */ +// Serial1 +#define PIN_SERIAL1_RX (11ul) +#define PIN_SERIAL1_TX (10ul) +#define PAD_SERIAL1_TX (UART_TX_PAD_2) +#define PAD_SERIAL1_RX (SERCOM_RX_PAD_3) + +#define SERCOM_INSTANCE_SERIAL1 &sercom0 + +// Serial2 +#define PIN_SERIAL2_RX (15ul) +#define PIN_SERIAL2_TX (14ul) +#define PAD_SERIAL2_TX (UART_TX_PAD_2) +#define PAD_SERIAL2_RX (SERCOM_RX_PAD_3) + +#define SERCOM_INSTANCE_SERIAL2 &sercom2 + +// Serial3 +#define PIN_SERIAL3_RX (31ul) +#define PIN_SERIAL3_TX (30ul) +#define PAD_SERIAL3_TX (UART_TX_PAD_2) +#define PAD_SERIAL3_RX (SERCOM_RX_PAD_3) + +#define SERCOM_INSTANCE_SERIAL3 &sercom1 + +// Serial4 +#define PIN_SERIAL4_RX (17ul) +#define PIN_SERIAL4_TX (16ul) +#define PAD_SERIAL4_TX (UART_TX_PAD_0) +#define PAD_SERIAL4_RX (SERCOM_RX_PAD_1) + +#define SERCOM_INSTANCE_SERIAL4 &sercom3 + + +/* + * SPI Interfaces + */ +#if defined(TWO_SPI) +#define SPI_INTERFACES_COUNT 2 +#else +#define SPI_INTERFACES_COUNT 1 +#endif + +#define PIN_SPI_MISO (22u) +#define PIN_SPI_MOSI (18u) +#define PIN_SPI_SCK (19u) +#define PIN_SPI_SS (23u) +#define PERIPH_SPI sercom3 +#define PAD_SPI_TX SPI_PAD_2_SCK_3 +#define PAD_SPI_RX SERCOM_RX_PAD_0 + +static const uint8_t SS = PIN_SPI_SS ; // The SERCOM SS PAD is available on this pin but HW SS isn't used. Set here only for reference. +static const uint8_t MOSI = PIN_SPI_MOSI ; +static const uint8_t MISO = PIN_SPI_MISO ; +static const uint8_t SCK = PIN_SPI_SCK ; + +#define PIN_SPI1_MISO (8u) +#define PIN_SPI1_MOSI (14u) +#define PIN_SPI1_SCK (15u) +#define PIN_SPI1_SS (9u) +#define PERIPH_SPI1 sercom2 +#define PAD_SPI1_TX SPI_PAD_2_SCK_3 +#define PAD_SPI1_RX SERCOM_RX_PAD_0 + +static const uint8_t SS1 = PIN_SPI1_SS ; // The SERCOM SS PAD is available on this pin but HW SS isn't used. Set here only for reference. +static const uint8_t MOSI1 = PIN_SPI1_MOSI ; +static const uint8_t MISO1 = PIN_SPI1_MISO ; +static const uint8_t SCK1 = PIN_SPI1_SCK ; + + +/* + * Wire Interfaces + */ +#if defined(TWO_WIRE) +#define WIRE_INTERFACES_COUNT 2 +#else +#define WIRE_INTERFACES_COUNT 1 +#endif + +#define PIN_WIRE_SDA (16u) +#define PIN_WIRE_SCL (17u) +#if defined(THREE_UART) && defined(ONE_WIRE) && defined(NO_SPI) + #define PERIPH_WIRE sercom3 + #define WIRE_IT_HANDLER SERCOM3_Handler +#else + #define PERIPH_WIRE sercom1 + #define WIRE_IT_HANDLER SERCOM1_Handler +#endif + +static const uint8_t SDA = PIN_WIRE_SDA; +static const uint8_t SCL = PIN_WIRE_SCL; + +#define PIN_WIRE1_SDA (8u) +#define PIN_WIRE1_SCL (9u) +#define PERIPH_WIRE1 sercom2 +#define WIRE1_IT_HANDLER SERCOM2_Handler + +static const uint8_t SDA1 = PIN_WIRE1_SDA; +static const uint8_t SCL1 = PIN_WIRE1_SCL; + + +/* + * USB - Define PIN_USB_HOST_ENABLE to assert the defined pin to + * PIN_USB_HOST_ENABLE_VALUE during startup. Leave undefined to disable this pin. + */ +#define PIN_USB_DM (24ul) +#define PIN_USB_DP (25ul) +//#define PIN_USB_HOST_ENABLE (14ul) +#define PIN_USB_HOST_ENABLE_VALUE HIGH + +/* + * I2S Interfaces + */ +#define I2S_INTERFACES_COUNT 1 + +#define I2S_DEVICE 0 +#define I2S_CLOCK_GENERATOR 3 +#define PIN_I2S_SD (7u) +#define PIN_I2S_SCK (10u) +#define PIN_I2S_FS (11u) + +#ifdef __cplusplus +} +#endif + + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#ifdef __cplusplus + +/* ========================= + * ===== SERCOM DEFINITION + * ========================= +*/ +extern SERCOM sercom0; +extern SERCOM sercom1; +extern SERCOM sercom2; +extern SERCOM sercom3; + +extern Uart Serial1; +extern Uart Serial2; +extern Uart Serial3; +extern Uart Serial4; + +#endif + +// These serial port names are intended to allow libraries and architecture-neutral +// sketches to automatically default to the correct port name for a particular type +// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, +// the first hardware serial port whose RX/TX pins are not dedicated to another use. +// +// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor +// +// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial +// +// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library +// +// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. +// +// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX +// pins are NOT connected to anything by default. +#define SERIAL_PORT_USBVIRTUAL SerialUSB +// SERIAL_PORT_MONITOR seems to be used only by the USB Host library (as of 1.6.5). +// It normally allows debugging output on the USB programming port, while the USB host uses the USB native port. +// The programming port is connected to a hardware UART through a USB-Serial bridge (EDBG chip) on the Zero. +// Boards that do not have the EDBG chip will have to connect a USB-TTL serial adapter to 'Serial' to get +// the USB Host debugging output. +#define SERIAL_PORT_MONITOR Serial1 +// Serial has no physical pins broken out, so it's not listed as HARDWARE port +#define SERIAL_PORT_HARDWARE Serial1 +#define SERIAL_PORT_HARDWARE_OPEN Serial1 + +// The MT-D21E does not have the EDBG support chip, which provides a USB-UART bridge +// accessible using Serial (the Arduino serial monitor is normally connected to this). +// So, the USB virtual serial port (SerialUSB) must be used to communicate with the host. +// Because most sketches use Serial to print to the monitor, it is aliased to SerialUSB. +// Remember to use while(!Serial); to wait for a connection before Serial printing. + +// When USB CDC is enabled, Serial refers to SerialUSB, otherwise it refers to Serial1. +#if defined(CDC_ONLY) || defined(CDC_HID) || defined(WITH_CDC) +#define Serial SerialUSB +#else +#define Serial Serial1 +#endif + +#endif /* _VARIANT_GENERIC_XX1E_ */ diff --git a/variants/Xeno_Mini/README.md b/variants/Generic_xx1G/README.md similarity index 98% rename from variants/Xeno_Mini/README.md rename to variants/Generic_xx1G/README.md index bb8d53d0f..5183877b7 100644 --- a/variants/Xeno_Mini/README.md +++ b/variants/Generic_xx1G/README.md @@ -1,229 +1,229 @@ -# MattairTech Xeno Mini (ATSAMD51G/ATSAMD21G/ATSAML21G/ATSAMC21G) - -``` -======== MattairTech Xeno Mini (Rev B) (ATSAMD51G/ATSAMD21G/ATSAML21G/ATSAMC21G) ======== -Alt COM PWM Analog INT Arduino* Arduino* INT Analog PWM COM Alt -========================================================================================= - ------------------- -HB1+ (MTR) TX1 TC~ O I 0 | B8 RST | BOOT -HB2+ (MTR) RX1 TC~ O I 1 | B9 B3 | 35 O Vcoin -DAC O 2 | A2 B2 | 34 O LED -REFA* O 3 | A3 B23 | 33 I SLP+ (MTR) -REFB O 4 | A4 B22 | 32 I INT+! (IMU) -VI (VIN) / DAC1* O 5 | A5 A31 | 31 TCC~ IO (DGB) -VU! (USB) O 6 | A6 A30 | 30 TCC~ CLK (DGB) -VB (VBAT) O 7 | A7 A27 | 27 -MOSI (MEM) O 8 | A8 A23 | 23 TCC0~ SCL1/SCK1* EN1+ (MTR) -MISO (MEM) O 9 | A9 A22 | 22 TCC0~ SDA1/MOSI1* EN2+ (MTR) -D2 (QSPI) O 10 | A10 A21 | 21 I TCC0~ MISO1 -D3 (QSPI) / SCK (MEM) O I 11 | A11 A20 | 20 I TCC0~ - TX2 TCC~ I 12 | A12 A19 | 19 I TC~ RX3 -CEN (CHG) RX2 TCC~ I 13 | A13 A18 | 18 I TC~ TX3 STA+! (CHG) -SCK (QSPI) TC~ I 14 | B10 A17 | 17 I SCL (I2C) -CS (MEM) TC~ 15 | B11 A16 | 16 I SDA (I2C) - | Vaux VccL | -USB D- / CAN TX | A24 _____ VccH | ! VccL is 3.3V by default. -USB D+ / CAN RX | A25 | | Vin | DO NOT exceed 3.6V on VccL or - | Gnd | USB | Gnd | any IO pin with the D51, D21, - USB: D51/D21/L21 only ------------------- or L21 installed. 5V allowed - CAN: D51/C21 only ONLY with the C21 installed. - -* Most pins can be used for more than one function. The port pin number printed on the - board is also used in Arduino for all 'A' pins. For 'B' pins, see Arduino column. - DAC1 is present only on the D51 and L21. With the D51, REFA is tied to VccL (J20). - For the D51, the COM pins on A22 and A23 are reversed (ie: A22 is instead SCL1/SCK1). - -+ This header pin has limited use because the alternate function, if installed, cannot be - disconnected via solder jumper. EN1, EN2, HB1, and HB2 have pulldowns, but can be used - if SLP is low. Note that Rev A boards differ with regards to the MTR pins (see docs). - -! These pins should not be driven if the associated hardware is installed. This variant - will only allow configuring these pins as inputs. To change this, edit configuration in - variant.h. INT from IMU will be driven low after reset. See IMU docs. - -~ D51: 3 TCC (6,4,3 ch.), 4 TC (2 ch.). D21/L21/C21: 3 TCC (4,2,2 ch.), 3 TC (2 ch.). - The D51 adds timers to pins A4, A5, A6, A7, A16, A17, and B2, however, the timers on - B8, B9, B10, and B11 are not present. The C21 adds timers to pins B2, B3, B22, and B23. - -Silkscreen Legend: - Top: A circle around pin is analog function, '~' is timer, small 'I' is interrupt - Bottom: A box around pin means 'Alt' function enabled by default if installed -``` - - -## Board Configuration Notes - -* **Crystals** - * Either the 32.768KHz crystal or the 24MHz crystal can be used. These pins do not route to headers. - * The bootloader does not use an external crystal by default. Double-tap the reset button to enter manually. - -* **LED (LED_BUILTIN)** - * Bring the pin HIGH to turn the LED on. - * The LED is enabled (solder jumper) by default. - -* **GPIO** - * All pins (including analog) support INPUT, OUTPUT, INPUT_PULLUP, and INPUT_PULLDOWN. - * When PER_ATTR_DRIVE_STRONG is set for the pin (enabled by default), each pin can source or sink a maximum of: - * **D51:** 8mA high, 8mA low - * **D21:** 7mA high, 10mA low - * **L21:** 5mA high, 6mA low (8 high drive pins: 10mA high, 12mA low) - * **C21:** 6mA high, 10mA low (2 high drive pins (A10, A11): 12mA high, 20mA low) - * Internal pull-up and pull-down resistors of 20-60 Kohms (40Kohm typ., disconnected by default). - -* **Analog Inputs** - * Up to 14 pins can be configured as ADC analog inputs. - * Each pin measures from ground to 3.3 volts by default. - * Each pin provides 10 bits of resolution (1024 values) by default. - * 12-bit resolution supported by using the analogReadResolution() function. - * The upper end of the measurement range can be changed using the analogReference() function. - * A reference voltage can be connected to REFA. In this case, the capacitors should be enabled via solder jumper J33. - * Due to errata with the D51 DAC, J20 is set to route VccL to the MCU REFA pin (the header pin is disconnected). - -* **DAC** - * D21/C21: One 10-bit 350Ksps analog output is available on pin 2. - * D51/L21: Two 12-bit 1Msps analog outputs are available on pins 2 and 5. - * Due to errata with the D51 DAC, J20 is set to route VccL to the MCU REFA pin (the header pin is disconnected). - -* **PWM** - * Up to 14 pins can be configured as PWM outputs (17 for D51, 18 for C21). - * Each pin provides 8 bits of resolution (256 values) by default. - * 12-bit resolution supported by using the analogWriteResolution() function. - -* **External Interrupts** - * Up to 14 pins can be configured with external interrupts. - -* **SERCOM** - * 6 SERCOM are available. - * Up to 3 UART instances (two for D51). More in a future release. - * Up to 2 SPI instances. - * Up to 2 WIRE (I2C) instances. - * The WIRE pullup resistors are enabled by default. - - - -## PinDescription table format - -### Note that in 1.6.18-beta-b1 a new compact table format was added. -The standard PinDescription table uses 12 bytes per pin. Define PIN_DESCRIPTION_TABLE_SIMPLE -to use a more compact format that uses only 4 bytes per pin (currently only available -for the D11 chips). In this case, the PinType, PinAttribute, and GCLKCCL columns are not used -(they are not required). Additionally, the SetPortPin() and SetExtIntADC() macros are used to -pack Port and Pin into the PortPin column, and ExtInt and ADCChannelNumber into the ExtIntADC -column. Note that external libraries that reference the PinDescription table directly (uncommon) -will no longer work. This define can be combined with the PIN_MAP_COMPACT define, which -is available in variant.h of the D11 variants. This can save from 10's to over 200 bytes. - -### Note that a new column (GCLKCCL) was added for 1.6.8-beta-b0. -MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE in variant.h is used to track versions. -If using board variant files with the old format, the new core will still read the -table the old way, losing any new features introduced by the new column. Additionally, -new definitions have been added for D51, L21, and C21 support. - -### Each pin can have multiple functions. -The PinDescription table describes how each of the pins can be used by the Arduino -core. Each pin can have multiple functions (ie: ADC input, digital output, PWM, -communications, etc.), and the PinDescription table configures which functions can -be used for each pin. This table is mainly accessed by the pinPeripheral function in -wiring_private.c, which is used to attach a pin to a particular peripheral function. -The communications drivers (ie: SPI, I2C, and UART), analogRead(), analogWrite(), -analogReference(), attachInterrupt(), and pinMode() all call pinPeripheral() to -verify that the pin can perform the function requested, and to configure the pin for -that function. Most of the contents of pinMode() are now in pinPeripheral(). - -### Pin Mapping -There are different ways that pins can be mapped. Typically, there is no relation -between the arduino pin number used, and the actual port pin designator. Thus, the -pcb must be printed with the arduino numbering, otherwise, if the port pin is printed, -a cross reference table is needed to find the arduino pin number. However, this results -in the least amount of space used by the table. Another method, used by default by the -MT-D21E and MT-D11, maps Arduino pin numbers to the actual port pin number (ie: Arduino -pin 28 = Port A28). This works well when there is only one port (or if the PORTB pins -are used for onboard functions and not broken out). PIO_NOT_A_PIN entries must be added -for pins that are used for other purposes or for pins that do not exist (especially the -D11), so some FLASH space may be wasted. For an example of both types, see variant.cpp -from the MT-D11 variant. The Xeno combines both methods, using the actual port pin -designators from both PORTA and PORTB for arduino numbers 0-31 (ie: B1=1, A2=2), then -using arduino numbering only above 31. For 0-31 only one pin from PORTA or PORTB can be -used, leaving the other pin for some number above 31. - -**See [WVariant.h](https://github.com/mattairtech/ArduinoCore-samd/tree/master/cores/arduino/WVariant.h) for the definitions used in the table.** - -### Port -This is the port (ie: PORTA). Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### Pin -This is the pin (bit) within the port. Valid values are 0-31. Not used with -PIN_DESCRIPTION_TABLE_SIMPLE. - -### SetPortPin() -When PIN_DESCRIPTION_TABLE_SIMPLE is defined, Port and Pin are combined into one column -using the SetPortPin() packing macro: SetPortPin(PORTA, 2). If the pin is not usable, -use SetPortPin(NOT_A_PORT, 0). - -### PinType -This indicates what peripheral function the pin can be attached to. In most cases, -this is PIO_MULTI, which means that the pin can be anything listed in the PinAttribute -field. It can also be set to a specific peripheral. In this case, any attempt to -configure the pin (using pinPeripheral or pinMode) as anything else will fail (and -pinPeripheral will return -1). This can be used to prevent accidental re-configuration -of a pin that is configured for only one function (ie: USB D- and D+ pins). If a pin -is not used or does not exist, PIO_NOT_A_PIN must be entered in this field. See -WVariant.h for valid entries. These entries are also used as a parameter to -pinPeripheral() with the exception of PIO_NOT_A_PIN and PIO_MULTI. The pinMode function -now calls pinPeripheral() with the desired mode. Note that this field is not used to -select between the different peripherals possible with each of the SERCOM and TIMER -functions. PeripheralAttribute is now used for this. When PIN_DESCRIPTION_TABLE_SIMPLE -is defined, PinType is not used (the pin is treated as PIO_MULTI). - -### PeripheralAttribute -This is an 8-bit bitfield used for various peripheral configuration. It is primarily -used to select between the different peripherals possible with each of the SERCOM and -TIMER functions. TIMER pins are individual, while SERCOM uses a group of two to four -pins. This group of pins can span both peripherals. For example, pin 19 (SPI1 SCK) on -the MT-D21E uses PER_ATTR_SERCOM_ALT while pin 22 (SPI1 MISO) uses PER_ATTR_SERCOM_STD. -Both TIMER and SERCOM can exist for each pin. This bitfield is also used to set the -pin drive strength and the input buffer configuration (ie: totem-pole, open-drain, -buskeeper, etc.). Starting with 1.6.8, the ADC instance on the D51 and C21 (there are -two) is also selected here. Note that the D51 adds a third timer attribute and -requires consultation of the datasheet IOSET tables. See WVariant.h for valid entries. - -### PinAttribute -This is a 32-bit bitfield used to list all of the valid peripheral functions that a -pin can attach to. This includes GPIO functions like PIN_ATTR_OUTPUT. Certain -attributes are shorthand for a combination of other attributes. PIN_ATTR_DIGITAL -includes all of the GPIO functions, while PIN_ATTR_TIMER includes both -PIN_ATTR_TIMER_PWM and PIN_ATTR_TIMER_CAPTURE (capture is not used yet). -PIN_ATTR_ANALOG is an alias to PIN_ATTR_ANALOG_ADC. This bitfield is useful for -limiting a pin to only input related functions or output functions. This allows a pin -to have a more flexible configuration, while restricting the direction (ie: to avoid -contention). See WVariant.h for valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### TCChannel -This is the TC/TCC channel (if any) assigned to the pin. Some TC channels are available -on multiple pins. In general, only one pin should be configured in the pinDescription -table per TC channel. Starting with 1.6.8, the timer type is now encoded in this column -to support the D51, L21 and C21, which use TC numbers starting at 0 (rather than 3 as on -the D21). See WVariant.h for valid entries. - -### ADCChannelNumber -This is the ADC channel (if any) assigned to the pin. The D51 and C21 each have two ADC -instances, which are selected in the PeripheralAttribute column. See WVariant.h for -valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### ExtInt -This is the interrupt (if any) assigned to the pin. Some interrupt numbers are -available on multiple pins. In general, only one pin should be configured in the -pinDescription table per interrupt number. Thus, for example, if an interrupt was -needed on pin 2, EXTERNAL_INT_2 can be moved from pin 18. See WVariant.h for valid -entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### SetExtIntADC() -When PIN_DESCRIPTION_TABLE_SIMPLE is defined, ExtInt and ADCChannelNumber are combined -into one column using the SetExtIntADC() packing macro: SetExtIntADC(EXTERNAL_INT_4, -ADC_Channel2). If the pin is not usable, use SetExtIntADC(EXTERNAL_INT_NONE, No_ADC_Channel). - -### GCLKCCL -This column was added in 1.6.8-beta-b0. It is not yet used. It will eventually support -the Analog Comparators (AC), the Configurable Custom Logic (CCL) peripherals of the D51, -L21 and C21, and the GCLK outputs (inputs) of all of the MCUs. Not used with -PIN_DESCRIPTION_TABLE_SIMPLE. +# MattairTech Xeno Mini (ATSAMD51G/ATSAMD21G/ATSAML21G/ATSAMC21G) + +``` +======== MattairTech Xeno Mini (Rev B) (ATSAMD51G/ATSAMD21G/ATSAML21G/ATSAMC21G) ======== +Alt COM PWM Analog INT Arduino* Arduino* INT Analog PWM COM Alt +========================================================================================= + ------------------- +HB1+ (MTR) TX1 TC~ O I 0 | B8 RST | BOOT +HB2+ (MTR) RX1 TC~ O I 1 | B9 B3 | 35 O Vcoin +DAC O 2 | A2 B2 | 34 O LED +REFA* O 3 | A3 B23 | 33 I SLP+ (MTR) +REFB O 4 | A4 B22 | 32 I INT+! (IMU) +VI (VIN) / DAC1* O 5 | A5 A31 | 31 TCC~ IO (DGB) +VU! (USB) O 6 | A6 A30 | 30 TCC~ CLK (DGB) +VB (VBAT) O 7 | A7 A27 | 27 +MOSI (MEM) O 8 | A8 A23 | 23 TCC0~ SCL1/SCK1* EN1+ (MTR) +MISO (MEM) O 9 | A9 A22 | 22 TCC0~ SDA1/MOSI1* EN2+ (MTR) +D2 (QSPI) O 10 | A10 A21 | 21 I TCC0~ MISO1 +D3 (QSPI) / SCK (MEM) O I 11 | A11 A20 | 20 I TCC0~ + TX2 TCC~ I 12 | A12 A19 | 19 I TC~ RX3 +CEN (CHG) RX2 TCC~ I 13 | A13 A18 | 18 I TC~ TX3 STA+! (CHG) +SCK (QSPI) TC~ I 14 | B10 A17 | 17 I SCL (I2C) +CS (MEM) TC~ 15 | B11 A16 | 16 I SDA (I2C) + | Vaux VccL | +USB D- / CAN TX | A24 _____ VccH | ! VccL is 3.3V by default. +USB D+ / CAN RX | A25 | | Vin | DO NOT exceed 3.6V on VccL or + | Gnd | USB | Gnd | any IO pin with the D51, D21, + USB: D51/D21/L21 only ------------------- or L21 installed. 5V allowed + CAN: D51/C21 only ONLY with the C21 installed. + +* Most pins can be used for more than one function. The port pin number printed on the + board is also used in Arduino for all 'A' pins. For 'B' pins, see Arduino column. + DAC1 is present only on the D51 and L21. With the D51, REFA is tied to VccL (J20). + For the D51, the COM pins on A22 and A23 are reversed (ie: A22 is instead SCL1/SCK1). + ++ This header pin has limited use because the alternate function, if installed, cannot be + disconnected via solder jumper. EN1, EN2, HB1, and HB2 have pulldowns, but can be used + if SLP is low. Note that Rev A boards differ with regards to the MTR pins (see docs). + +! These pins should not be driven if the associated hardware is installed. This variant + will only allow configuring these pins as inputs. To change this, edit configuration in + variant.h. INT from IMU will be driven low after reset. See IMU docs. + +~ D51: 3 TCC (6,4,3 ch.), 4 TC (2 ch.). D21/L21/C21: 3 TCC (4,2,2 ch.), 3 TC (2 ch.). + The D51 adds timers to pins A4, A5, A6, A7, A16, A17, and B2, however, the timers on + B8, B9, B10, and B11 are not present. The C21 adds timers to pins B2, B3, B22, and B23. + +Silkscreen Legend: + Top: A circle around pin is analog function, '~' is timer, small 'I' is interrupt + Bottom: A box around pin means 'Alt' function enabled by default if installed +``` + + +## Board Configuration Notes + +* **Crystals** + * Either the 32.768KHz crystal or the 24MHz crystal can be used. These pins do not route to headers. + * The bootloader does not use an external crystal by default. Double-tap the reset button to enter manually. + +* **LED (LED_BUILTIN)** + * Bring the pin HIGH to turn the LED on. + * The LED is enabled (solder jumper) by default. + +* **GPIO** + * All pins (including analog) support INPUT, OUTPUT, INPUT_PULLUP, and INPUT_PULLDOWN. + * When PER_ATTR_DRIVE_STRONG is set for the pin (enabled by default), each pin can source or sink a maximum of: + * **D51:** 8mA high, 8mA low + * **D21:** 7mA high, 10mA low + * **L21:** 5mA high, 6mA low (8 high drive pins: 10mA high, 12mA low) + * **C21:** 6mA high, 10mA low (2 high drive pins (A10, A11): 12mA high, 20mA low) + * Internal pull-up and pull-down resistors of 20-60 Kohms (40Kohm typ., disconnected by default). + +* **Analog Inputs** + * Up to 14 pins can be configured as ADC analog inputs. + * Each pin measures from ground to 3.3 volts by default. + * Each pin provides 10 bits of resolution (1024 values) by default. + * 12-bit resolution supported by using the analogReadResolution() function. + * The upper end of the measurement range can be changed using the analogReference() function. + * A reference voltage can be connected to REFA. In this case, the capacitors should be enabled via solder jumper J33. + * Due to errata with the D51 DAC, J20 is set to route VccL to the MCU REFA pin (the header pin is disconnected). + +* **DAC** + * D21/C21: One 10-bit 350Ksps analog output is available on pin 2. + * D51/L21: Two 12-bit 1Msps analog outputs are available on pins 2 and 5. + * Due to errata with the D51 DAC, J20 is set to route VccL to the MCU REFA pin (the header pin is disconnected). + +* **PWM** + * Up to 14 pins can be configured as PWM outputs (17 for D51, 18 for C21). + * Each pin provides 8 bits of resolution (256 values) by default. + * 12-bit resolution supported by using the analogWriteResolution() function. + +* **External Interrupts** + * Up to 14 pins can be configured with external interrupts. + +* **SERCOM** + * 6 SERCOM are available. + * Up to 3 UART instances (two for D51). More in a future release. + * Up to 2 SPI instances. + * Up to 2 WIRE (I2C) instances. + * The WIRE pullup resistors are enabled by default. + + + +## PinDescription table format + +### Note that in 1.6.18-beta-b1 a new compact table format was added. +The standard PinDescription table uses 12 bytes per pin. Define PIN_DESCRIPTION_TABLE_SIMPLE +to use a more compact format that uses only 4 bytes per pin (currently only available +for the D11 chips). In this case, the PinType, PinAttribute, and GCLKCCL columns are not used +(they are not required). Additionally, the SetPortPin() and SetExtIntADC() macros are used to +pack Port and Pin into the PortPin column, and ExtInt and ADCChannelNumber into the ExtIntADC +column. Note that external libraries that reference the PinDescription table directly (uncommon) +will no longer work. This define can be combined with the PIN_MAP_COMPACT define, which +is available in variant.h of the D11 variants. This can save from 10's to over 200 bytes. + +### Note that a new column (GCLKCCL) was added for 1.6.8-beta-b0. +MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE in variant.h is used to track versions. +If using board variant files with the old format, the new core will still read the +table the old way, losing any new features introduced by the new column. Additionally, +new definitions have been added for D51, L21, and C21 support. + +### Each pin can have multiple functions. +The PinDescription table describes how each of the pins can be used by the Arduino +core. Each pin can have multiple functions (ie: ADC input, digital output, PWM, +communications, etc.), and the PinDescription table configures which functions can +be used for each pin. This table is mainly accessed by the pinPeripheral function in +wiring_private.c, which is used to attach a pin to a particular peripheral function. +The communications drivers (ie: SPI, I2C, and UART), analogRead(), analogWrite(), +analogReference(), attachInterrupt(), and pinMode() all call pinPeripheral() to +verify that the pin can perform the function requested, and to configure the pin for +that function. Most of the contents of pinMode() are now in pinPeripheral(). + +### Pin Mapping +There are different ways that pins can be mapped. Typically, there is no relation +between the arduino pin number used, and the actual port pin designator. Thus, the +pcb must be printed with the arduino numbering, otherwise, if the port pin is printed, +a cross reference table is needed to find the arduino pin number. However, this results +in the least amount of space used by the table. Another method, used by default by the +MT-D21E and MT-D11, maps Arduino pin numbers to the actual port pin number (ie: Arduino +pin 28 = Port A28). This works well when there is only one port (or if the PORTB pins +are used for onboard functions and not broken out). PIO_NOT_A_PIN entries must be added +for pins that are used for other purposes or for pins that do not exist (especially the +D11), so some FLASH space may be wasted. For an example of both types, see variant.cpp +from the MT-D11 variant. The Xeno combines both methods, using the actual port pin +designators from both PORTA and PORTB for arduino numbers 0-31 (ie: B1=1, A2=2), then +using arduino numbering only above 31. For 0-31 only one pin from PORTA or PORTB can be +used, leaving the other pin for some number above 31. + +**See [WVariant.h](https://github.com/mattairtech/ArduinoCore-samd/tree/master/cores/arduino/WVariant.h) for the definitions used in the table.** + +### Port +This is the port (ie: PORTA). Not used with PIN_DESCRIPTION_TABLE_SIMPLE. + +### Pin +This is the pin (bit) within the port. Valid values are 0-31. Not used with +PIN_DESCRIPTION_TABLE_SIMPLE. + +### SetPortPin() +When PIN_DESCRIPTION_TABLE_SIMPLE is defined, Port and Pin are combined into one column +using the SetPortPin() packing macro: SetPortPin(PORTA, 2). If the pin is not usable, +use SetPortPin(NOT_A_PORT, 0). + +### PinType +This indicates what peripheral function the pin can be attached to. In most cases, +this is PIO_MULTI, which means that the pin can be anything listed in the PinAttribute +field. It can also be set to a specific peripheral. In this case, any attempt to +configure the pin (using pinPeripheral or pinMode) as anything else will fail (and +pinPeripheral will return -1). This can be used to prevent accidental re-configuration +of a pin that is configured for only one function (ie: USB D- and D+ pins). If a pin +is not used or does not exist, PIO_NOT_A_PIN must be entered in this field. See +WVariant.h for valid entries. These entries are also used as a parameter to +pinPeripheral() with the exception of PIO_NOT_A_PIN and PIO_MULTI. The pinMode function +now calls pinPeripheral() with the desired mode. Note that this field is not used to +select between the different peripherals possible with each of the SERCOM and TIMER +functions. PeripheralAttribute is now used for this. When PIN_DESCRIPTION_TABLE_SIMPLE +is defined, PinType is not used (the pin is treated as PIO_MULTI). + +### PeripheralAttribute +This is an 8-bit bitfield used for various peripheral configuration. It is primarily +used to select between the different peripherals possible with each of the SERCOM and +TIMER functions. TIMER pins are individual, while SERCOM uses a group of two to four +pins. This group of pins can span both peripherals. For example, pin 19 (SPI1 SCK) on +the MT-D21E uses PER_ATTR_SERCOM_ALT while pin 22 (SPI1 MISO) uses PER_ATTR_SERCOM_STD. +Both TIMER and SERCOM can exist for each pin. This bitfield is also used to set the +pin drive strength and the input buffer configuration (ie: totem-pole, open-drain, +buskeeper, etc.). Starting with 1.6.8, the ADC instance on the D51 and C21 (there are +two) is also selected here. Note that the D51 adds a third timer attribute and +requires consultation of the datasheet IOSET tables. See WVariant.h for valid entries. + +### PinAttribute +This is a 32-bit bitfield used to list all of the valid peripheral functions that a +pin can attach to. This includes GPIO functions like PIN_ATTR_OUTPUT. Certain +attributes are shorthand for a combination of other attributes. PIN_ATTR_DIGITAL +includes all of the GPIO functions, while PIN_ATTR_TIMER includes both +PIN_ATTR_TIMER_PWM and PIN_ATTR_TIMER_CAPTURE (capture is not used yet). +PIN_ATTR_ANALOG is an alias to PIN_ATTR_ANALOG_ADC. This bitfield is useful for +limiting a pin to only input related functions or output functions. This allows a pin +to have a more flexible configuration, while restricting the direction (ie: to avoid +contention). See WVariant.h for valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. + +### TCChannel +This is the TC/TCC channel (if any) assigned to the pin. Some TC channels are available +on multiple pins. In general, only one pin should be configured in the pinDescription +table per TC channel. Starting with 1.6.8, the timer type is now encoded in this column +to support the D51, L21 and C21, which use TC numbers starting at 0 (rather than 3 as on +the D21). See WVariant.h for valid entries. + +### ADCChannelNumber +This is the ADC channel (if any) assigned to the pin. The D51 and C21 each have two ADC +instances, which are selected in the PeripheralAttribute column. See WVariant.h for +valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. + +### ExtInt +This is the interrupt (if any) assigned to the pin. Some interrupt numbers are +available on multiple pins. In general, only one pin should be configured in the +pinDescription table per interrupt number. Thus, for example, if an interrupt was +needed on pin 2, EXTERNAL_INT_2 can be moved from pin 18. See WVariant.h for valid +entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. + +### SetExtIntADC() +When PIN_DESCRIPTION_TABLE_SIMPLE is defined, ExtInt and ADCChannelNumber are combined +into one column using the SetExtIntADC() packing macro: SetExtIntADC(EXTERNAL_INT_4, +ADC_Channel2). If the pin is not usable, use SetExtIntADC(EXTERNAL_INT_NONE, No_ADC_Channel). + +### GCLKCCL +This column was added in 1.6.8-beta-b0. It is not yet used. It will eventually support +the Analog Comparators (AC), the Configurable Custom Logic (CCL) peripherals of the D51, +L21 and C21, and the GCLK outputs (inputs) of all of the MCUs. Not used with +PIN_DESCRIPTION_TABLE_SIMPLE. diff --git a/variants/Xeno_Mini/debug_scripts/SAMC21G15A.gdb b/variants/Generic_xx1G/debug_scripts/SAMC21G15A.gdb similarity index 97% rename from variants/Xeno_Mini/debug_scripts/SAMC21G15A.gdb rename to variants/Generic_xx1G/debug_scripts/SAMC21G15A.gdb index f818c9bbe..3ad8f1526 100644 --- a/variants/Xeno_Mini/debug_scripts/SAMC21G15A.gdb +++ b/variants/Generic_xx1G/debug_scripts/SAMC21G15A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21g15" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21g15" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/Xeno_Mini/debug_scripts/SAMC21G16A.gdb b/variants/Generic_xx1G/debug_scripts/SAMC21G16A.gdb similarity index 97% rename from variants/Xeno_Mini/debug_scripts/SAMC21G16A.gdb rename to variants/Generic_xx1G/debug_scripts/SAMC21G16A.gdb index 5c258d3ac..a2f40259f 100644 --- a/variants/Xeno_Mini/debug_scripts/SAMC21G16A.gdb +++ b/variants/Generic_xx1G/debug_scripts/SAMC21G16A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21g16" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21g16" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/Xeno_Mini/debug_scripts/SAMC21G17A.gdb b/variants/Generic_xx1G/debug_scripts/SAMC21G17A.gdb similarity index 97% rename from variants/Xeno_Mini/debug_scripts/SAMC21G17A.gdb rename to variants/Generic_xx1G/debug_scripts/SAMC21G17A.gdb index 0387ce888..3405d43eb 100644 --- a/variants/Xeno_Mini/debug_scripts/SAMC21G17A.gdb +++ b/variants/Generic_xx1G/debug_scripts/SAMC21G17A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21g17" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21g17" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/Xeno_Mini/debug_scripts/SAMC21G18A.gdb b/variants/Generic_xx1G/debug_scripts/SAMC21G18A.gdb similarity index 97% rename from variants/Xeno_Mini/debug_scripts/SAMC21G18A.gdb rename to variants/Generic_xx1G/debug_scripts/SAMC21G18A.gdb index 1d0b9d1c0..c338879ed 100644 --- a/variants/Xeno_Mini/debug_scripts/SAMC21G18A.gdb +++ b/variants/Generic_xx1G/debug_scripts/SAMC21G18A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21g18" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21g18" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/Xeno_Mini/debug_scripts/SAMD21G15A.gdb b/variants/Generic_xx1G/debug_scripts/SAMD21G15A.gdb similarity index 97% rename from variants/Xeno_Mini/debug_scripts/SAMD21G15A.gdb rename to variants/Generic_xx1G/debug_scripts/SAMD21G15A.gdb index f8b1d04e3..3b079860c 100644 --- a/variants/Xeno_Mini/debug_scripts/SAMD21G15A.gdb +++ b/variants/Generic_xx1G/debug_scripts/SAMD21G15A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21g15" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21g15" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/Xeno_Mini/debug_scripts/SAMD21G16A.gdb b/variants/Generic_xx1G/debug_scripts/SAMD21G16A.gdb similarity index 97% rename from variants/Xeno_Mini/debug_scripts/SAMD21G16A.gdb rename to variants/Generic_xx1G/debug_scripts/SAMD21G16A.gdb index 2f9de5a98..de6b1df1b 100644 --- a/variants/Xeno_Mini/debug_scripts/SAMD21G16A.gdb +++ b/variants/Generic_xx1G/debug_scripts/SAMD21G16A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21g16" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21g16" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/Xeno_Mini/debug_scripts/SAMD21G17A.gdb b/variants/Generic_xx1G/debug_scripts/SAMD21G17A.gdb similarity index 97% rename from variants/Xeno_Mini/debug_scripts/SAMD21G17A.gdb rename to variants/Generic_xx1G/debug_scripts/SAMD21G17A.gdb index be4c3e9ab..efbcb5d1e 100644 --- a/variants/Xeno_Mini/debug_scripts/SAMD21G17A.gdb +++ b/variants/Generic_xx1G/debug_scripts/SAMD21G17A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21g17" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21g17" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/Xeno_Mini/debug_scripts/SAMD21G18A.gdb b/variants/Generic_xx1G/debug_scripts/SAMD21G18A.gdb similarity index 97% rename from variants/Xeno_Mini/debug_scripts/SAMD21G18A.gdb rename to variants/Generic_xx1G/debug_scripts/SAMD21G18A.gdb index 3c37ffde2..a1740ee9e 100644 --- a/variants/Xeno_Mini/debug_scripts/SAMD21G18A.gdb +++ b/variants/Generic_xx1G/debug_scripts/SAMD21G18A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21g18" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21g18" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/Xeno_Mini/debug_scripts/SAMD51G18A.gdb b/variants/Generic_xx1G/debug_scripts/SAMD51G18A.gdb similarity index 97% rename from variants/Xeno_Mini/debug_scripts/SAMD51G18A.gdb rename to variants/Generic_xx1G/debug_scripts/SAMD51G18A.gdb index 7f89fd5b7..d3863803b 100644 --- a/variants/Xeno_Mini/debug_scripts/SAMD51G18A.gdb +++ b/variants/Generic_xx1G/debug_scripts/SAMD51G18A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd51g18" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd51g18" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/Xeno_Mini/debug_scripts/SAMD51G19A.gdb b/variants/Generic_xx1G/debug_scripts/SAMD51G19A.gdb similarity index 97% rename from variants/Xeno_Mini/debug_scripts/SAMD51G19A.gdb rename to variants/Generic_xx1G/debug_scripts/SAMD51G19A.gdb index d7a2cd2ae..214337590 100644 --- a/variants/Xeno_Mini/debug_scripts/SAMD51G19A.gdb +++ b/variants/Generic_xx1G/debug_scripts/SAMD51G19A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd51g19" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd51g19" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/Xeno_Mini/debug_scripts/SAML21G16B.gdb b/variants/Generic_xx1G/debug_scripts/SAML21G16B.gdb similarity index 97% rename from variants/Xeno_Mini/debug_scripts/SAML21G16B.gdb rename to variants/Generic_xx1G/debug_scripts/SAML21G16B.gdb index d229f8f0c..d1eadc93e 100644 --- a/variants/Xeno_Mini/debug_scripts/SAML21G16B.gdb +++ b/variants/Generic_xx1G/debug_scripts/SAML21G16B.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91saml21g16" -f target/at91samlXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91saml21g16" -f target/at91samlXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/Xeno_Mini/debug_scripts/SAML21G17B.gdb b/variants/Generic_xx1G/debug_scripts/SAML21G17B.gdb similarity index 97% rename from variants/Xeno_Mini/debug_scripts/SAML21G17B.gdb rename to variants/Generic_xx1G/debug_scripts/SAML21G17B.gdb index f67cdcb2f..d306158c2 100644 --- a/variants/Xeno_Mini/debug_scripts/SAML21G17B.gdb +++ b/variants/Generic_xx1G/debug_scripts/SAML21G17B.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91saml21g17" -f target/at91samlXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91saml21g17" -f target/at91samlXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/Xeno_Mini/debug_scripts/SAML21G18B.gdb b/variants/Generic_xx1G/debug_scripts/SAML21G18B.gdb similarity index 97% rename from variants/Xeno_Mini/debug_scripts/SAML21G18B.gdb rename to variants/Generic_xx1G/debug_scripts/SAML21G18B.gdb index b5230803b..37ff5f4b6 100644 --- a/variants/Xeno_Mini/debug_scripts/SAML21G18B.gdb +++ b/variants/Generic_xx1G/debug_scripts/SAML21G18B.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91saml21g18" -f target/at91samlXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91saml21g18" -f target/at91samlXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/MT_D21E/linker_scripts/gcc/16KB_Bootloader/flash_128KB.ld b/variants/Generic_xx1G/linker_scripts/gcc/16KB_Bootloader/flash_128KB.ld similarity index 95% rename from variants/MT_D21E/linker_scripts/gcc/16KB_Bootloader/flash_128KB.ld rename to variants/Generic_xx1G/linker_scripts/gcc/16KB_Bootloader/flash_128KB.ld index c541d8cd0..90d7f473d 100644 --- a/variants/MT_D21E/linker_scripts/gcc/16KB_Bootloader/flash_128KB.ld +++ b/variants/Generic_xx1G/linker_scripts/gcc/16KB_Bootloader/flash_128KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00020000-0x4000 /* First 16KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00004000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x4000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00020000-0x4000 /* First 16KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00004000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x4000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Xeno/linker_scripts/gcc/16KB_Bootloader/flash_256KB.ld b/variants/Generic_xx1G/linker_scripts/gcc/16KB_Bootloader/flash_256KB.ld similarity index 95% rename from variants/Xeno/linker_scripts/gcc/16KB_Bootloader/flash_256KB.ld rename to variants/Generic_xx1G/linker_scripts/gcc/16KB_Bootloader/flash_256KB.ld index a0b9f951f..74b6b298c 100644 --- a/variants/Xeno/linker_scripts/gcc/16KB_Bootloader/flash_256KB.ld +++ b/variants/Generic_xx1G/linker_scripts/gcc/16KB_Bootloader/flash_256KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00040000-0x4000 /* First 16KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x4000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00040000-0x4000 /* First 16KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x4000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/MT_D21E/linker_scripts/gcc/16KB_Bootloader/flash_32KB.ld b/variants/Generic_xx1G/linker_scripts/gcc/16KB_Bootloader/flash_32KB.ld similarity index 95% rename from variants/MT_D21E/linker_scripts/gcc/16KB_Bootloader/flash_32KB.ld rename to variants/Generic_xx1G/linker_scripts/gcc/16KB_Bootloader/flash_32KB.ld index 5d8d047a9..9030f5437 100644 --- a/variants/MT_D21E/linker_scripts/gcc/16KB_Bootloader/flash_32KB.ld +++ b/variants/Generic_xx1G/linker_scripts/gcc/16KB_Bootloader/flash_32KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00008000-0x4000 /* First 16KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x4000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00008000-0x4000 /* First 16KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x4000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/MT_D21E_revB/linker_scripts/gcc/16KB_Bootloader/flash_64KB.ld b/variants/Generic_xx1G/linker_scripts/gcc/16KB_Bootloader/flash_64KB.ld similarity index 95% rename from variants/MT_D21E_revB/linker_scripts/gcc/16KB_Bootloader/flash_64KB.ld rename to variants/Generic_xx1G/linker_scripts/gcc/16KB_Bootloader/flash_64KB.ld index 3f7223790..3f276ac1d 100644 --- a/variants/MT_D21E_revB/linker_scripts/gcc/16KB_Bootloader/flash_64KB.ld +++ b/variants/Generic_xx1G/linker_scripts/gcc/16KB_Bootloader/flash_64KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00010000-0x4000 /* First 16KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00002000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x4000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00010000-0x4000 /* First 16KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00002000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x4000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Xeno_Mini/linker_scripts/gcc/16KB_Bootloader/flash_m4f_256KB.ld b/variants/Generic_xx1G/linker_scripts/gcc/16KB_Bootloader/flash_m4f_256KB.ld similarity index 95% rename from variants/Xeno_Mini/linker_scripts/gcc/16KB_Bootloader/flash_m4f_256KB.ld rename to variants/Generic_xx1G/linker_scripts/gcc/16KB_Bootloader/flash_m4f_256KB.ld index b541a7a7c..73ff15c35 100644 --- a/variants/Xeno_Mini/linker_scripts/gcc/16KB_Bootloader/flash_m4f_256KB.ld +++ b/variants/Generic_xx1G/linker_scripts/gcc/16KB_Bootloader/flash_m4f_256KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00040000-0x4000 /* First 16KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00020000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x4000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00040000-0x4000 /* First 16KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00020000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x4000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Xeno/linker_scripts/gcc/16KB_Bootloader/flash_m4f_512KB.ld b/variants/Generic_xx1G/linker_scripts/gcc/16KB_Bootloader/flash_m4f_512KB.ld similarity index 95% rename from variants/Xeno/linker_scripts/gcc/16KB_Bootloader/flash_m4f_512KB.ld rename to variants/Generic_xx1G/linker_scripts/gcc/16KB_Bootloader/flash_m4f_512KB.ld index e773c4011..4f7c9f2e5 100644 --- a/variants/Xeno/linker_scripts/gcc/16KB_Bootloader/flash_m4f_512KB.ld +++ b/variants/Generic_xx1G/linker_scripts/gcc/16KB_Bootloader/flash_m4f_512KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00080000-0x4000 /* First 16KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00030000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x4000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00080000-0x4000 /* First 16KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00030000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x4000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Xeno/linker_scripts/gcc/8KB_Bootloader/flash_128KB.ld b/variants/Generic_xx1G/linker_scripts/gcc/8KB_Bootloader/flash_128KB.ld similarity index 95% rename from variants/Xeno/linker_scripts/gcc/8KB_Bootloader/flash_128KB.ld rename to variants/Generic_xx1G/linker_scripts/gcc/8KB_Bootloader/flash_128KB.ld index 07940acbd..4b2f64bca 100644 --- a/variants/Xeno/linker_scripts/gcc/8KB_Bootloader/flash_128KB.ld +++ b/variants/Generic_xx1G/linker_scripts/gcc/8KB_Bootloader/flash_128KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00020000-0x2000 /* First 8KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00004000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x2000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00020000-0x2000 /* First 8KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00004000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x2000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/MT_D21E_revB/linker_scripts/gcc/8KB_Bootloader/flash_256KB.ld b/variants/Generic_xx1G/linker_scripts/gcc/8KB_Bootloader/flash_256KB.ld similarity index 95% rename from variants/MT_D21E_revB/linker_scripts/gcc/8KB_Bootloader/flash_256KB.ld rename to variants/Generic_xx1G/linker_scripts/gcc/8KB_Bootloader/flash_256KB.ld index 825aee666..b446667fd 100644 --- a/variants/MT_D21E_revB/linker_scripts/gcc/8KB_Bootloader/flash_256KB.ld +++ b/variants/Generic_xx1G/linker_scripts/gcc/8KB_Bootloader/flash_256KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00040000-0x2000 /* First 8KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x2000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00040000-0x2000 /* First 8KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x2000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Xeno/linker_scripts/gcc/8KB_Bootloader/flash_32KB.ld b/variants/Generic_xx1G/linker_scripts/gcc/8KB_Bootloader/flash_32KB.ld similarity index 95% rename from variants/Xeno/linker_scripts/gcc/8KB_Bootloader/flash_32KB.ld rename to variants/Generic_xx1G/linker_scripts/gcc/8KB_Bootloader/flash_32KB.ld index 0d3aaf7a9..f60a390ee 100644 --- a/variants/Xeno/linker_scripts/gcc/8KB_Bootloader/flash_32KB.ld +++ b/variants/Generic_xx1G/linker_scripts/gcc/8KB_Bootloader/flash_32KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00008000-0x2000 /* First 8KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x2000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00008000-0x2000 /* First 8KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x2000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/MT_D21E_revB/linker_scripts/gcc/8KB_Bootloader/flash_64KB.ld b/variants/Generic_xx1G/linker_scripts/gcc/8KB_Bootloader/flash_64KB.ld similarity index 95% rename from variants/MT_D21E_revB/linker_scripts/gcc/8KB_Bootloader/flash_64KB.ld rename to variants/Generic_xx1G/linker_scripts/gcc/8KB_Bootloader/flash_64KB.ld index 1c36f57e1..3b999367f 100644 --- a/variants/MT_D21E_revB/linker_scripts/gcc/8KB_Bootloader/flash_64KB.ld +++ b/variants/Generic_xx1G/linker_scripts/gcc/8KB_Bootloader/flash_64KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00010000-0x2000 /* First 8KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00002000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x2000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00010000-0x2000 /* First 8KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00002000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x2000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Xeno_Mini/linker_scripts/gcc/8KB_Bootloader/flash_m4f_256KB.ld b/variants/Generic_xx1G/linker_scripts/gcc/8KB_Bootloader/flash_m4f_256KB.ld similarity index 95% rename from variants/Xeno_Mini/linker_scripts/gcc/8KB_Bootloader/flash_m4f_256KB.ld rename to variants/Generic_xx1G/linker_scripts/gcc/8KB_Bootloader/flash_m4f_256KB.ld index 6a1504ce3..31ec8580e 100644 --- a/variants/Xeno_Mini/linker_scripts/gcc/8KB_Bootloader/flash_m4f_256KB.ld +++ b/variants/Generic_xx1G/linker_scripts/gcc/8KB_Bootloader/flash_m4f_256KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00040000-0x2000 /* First 8KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00020000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x2000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00040000-0x2000 /* First 8KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00020000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x2000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Xeno/linker_scripts/gcc/8KB_Bootloader/flash_m4f_512KB.ld b/variants/Generic_xx1G/linker_scripts/gcc/8KB_Bootloader/flash_m4f_512KB.ld similarity index 95% rename from variants/Xeno/linker_scripts/gcc/8KB_Bootloader/flash_m4f_512KB.ld rename to variants/Generic_xx1G/linker_scripts/gcc/8KB_Bootloader/flash_m4f_512KB.ld index ab041e7dd..e2cbcadc2 100644 --- a/variants/Xeno/linker_scripts/gcc/8KB_Bootloader/flash_m4f_512KB.ld +++ b/variants/Generic_xx1G/linker_scripts/gcc/8KB_Bootloader/flash_m4f_512KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00080000-0x2000 /* First 8KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00030000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x2000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00080000-0x2000 /* First 8KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00030000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x2000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/MT_D21E_revB/linker_scripts/gcc/No_Bootloader/flash_128KB.ld b/variants/Generic_xx1G/linker_scripts/gcc/No_Bootloader/flash_128KB.ld similarity index 95% rename from variants/MT_D21E_revB/linker_scripts/gcc/No_Bootloader/flash_128KB.ld rename to variants/Generic_xx1G/linker_scripts/gcc/No_Bootloader/flash_128KB.ld index 941e0adee..f8ecfac5e 100644 --- a/variants/MT_D21E_revB/linker_scripts/gcc/No_Bootloader/flash_128KB.ld +++ b/variants/Generic_xx1G/linker_scripts/gcc/No_Bootloader/flash_128KB.ld @@ -1,214 +1,214 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00020000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00004000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - * __ram_end__ - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00020000 + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00004000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + * __ram_end__ + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/MT_D21E_revB/linker_scripts/gcc/No_Bootloader/flash_256KB.ld b/variants/Generic_xx1G/linker_scripts/gcc/No_Bootloader/flash_256KB.ld similarity index 95% rename from variants/MT_D21E_revB/linker_scripts/gcc/No_Bootloader/flash_256KB.ld rename to variants/Generic_xx1G/linker_scripts/gcc/No_Bootloader/flash_256KB.ld index 865514cbb..4bb2f0121 100644 --- a/variants/MT_D21E_revB/linker_scripts/gcc/No_Bootloader/flash_256KB.ld +++ b/variants/Generic_xx1G/linker_scripts/gcc/No_Bootloader/flash_256KB.ld @@ -1,214 +1,214 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - * __ram_end__ - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000 + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + * __ram_end__ + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/MT_D21E/linker_scripts/gcc/No_Bootloader/flash_32KB.ld b/variants/Generic_xx1G/linker_scripts/gcc/No_Bootloader/flash_32KB.ld similarity index 95% rename from variants/MT_D21E/linker_scripts/gcc/No_Bootloader/flash_32KB.ld rename to variants/Generic_xx1G/linker_scripts/gcc/No_Bootloader/flash_32KB.ld index eb557284d..805682b86 100644 --- a/variants/MT_D21E/linker_scripts/gcc/No_Bootloader/flash_32KB.ld +++ b/variants/Generic_xx1G/linker_scripts/gcc/No_Bootloader/flash_32KB.ld @@ -1,215 +1,214 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00008000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - * __ram_end__ - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00008000 + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + * __ram_end__ + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/MT_D21E_revB/linker_scripts/gcc/No_Bootloader/flash_64KB.ld b/variants/Generic_xx1G/linker_scripts/gcc/No_Bootloader/flash_64KB.ld similarity index 95% rename from variants/MT_D21E_revB/linker_scripts/gcc/No_Bootloader/flash_64KB.ld rename to variants/Generic_xx1G/linker_scripts/gcc/No_Bootloader/flash_64KB.ld index 6f3d4d3e8..e1d7956f4 100644 --- a/variants/MT_D21E_revB/linker_scripts/gcc/No_Bootloader/flash_64KB.ld +++ b/variants/Generic_xx1G/linker_scripts/gcc/No_Bootloader/flash_64KB.ld @@ -1,214 +1,214 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00010000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00002000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - * __ram_end__ - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00010000 + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00002000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + * __ram_end__ + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Xeno_Mini/linker_scripts/gcc/No_Bootloader/flash_m4f_256KB.ld b/variants/Generic_xx1G/linker_scripts/gcc/No_Bootloader/flash_m4f_256KB.ld similarity index 95% rename from variants/Xeno_Mini/linker_scripts/gcc/No_Bootloader/flash_m4f_256KB.ld rename to variants/Generic_xx1G/linker_scripts/gcc/No_Bootloader/flash_m4f_256KB.ld index 6c42fe70f..21cabbc46 100644 --- a/variants/Xeno_Mini/linker_scripts/gcc/No_Bootloader/flash_m4f_256KB.ld +++ b/variants/Generic_xx1G/linker_scripts/gcc/No_Bootloader/flash_m4f_256KB.ld @@ -1,214 +1,214 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00020000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - * __ram_end__ - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000 + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00020000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + * __ram_end__ + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Xeno/linker_scripts/gcc/No_Bootloader/flash_m4f_512KB.ld b/variants/Generic_xx1G/linker_scripts/gcc/No_Bootloader/flash_m4f_512KB.ld similarity index 95% rename from variants/Xeno/linker_scripts/gcc/No_Bootloader/flash_m4f_512KB.ld rename to variants/Generic_xx1G/linker_scripts/gcc/No_Bootloader/flash_m4f_512KB.ld index 11c2ad812..8379fbb7c 100644 --- a/variants/Xeno/linker_scripts/gcc/No_Bootloader/flash_m4f_512KB.ld +++ b/variants/Generic_xx1G/linker_scripts/gcc/No_Bootloader/flash_m4f_512KB.ld @@ -1,214 +1,214 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00080000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00030000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - * __ram_end__ - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00080000 + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00030000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + * __ram_end__ + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Xeno_Mini/openocd_scripts/SAMC21G15A.cfg b/variants/Generic_xx1G/openocd_scripts/SAMC21G15A.cfg similarity index 92% rename from variants/Xeno_Mini/openocd_scripts/SAMC21G15A.cfg rename to variants/Generic_xx1G/openocd_scripts/SAMC21G15A.cfg index 10c51c4db..af3d1e7e2 100644 --- a/variants/Xeno_Mini/openocd_scripts/SAMC21G15A.cfg +++ b/variants/Generic_xx1G/openocd_scripts/SAMC21G15A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samc21g15 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samcXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samc21g15 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samcXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/Xeno_Mini/openocd_scripts/SAMC21G16A.cfg b/variants/Generic_xx1G/openocd_scripts/SAMC21G16A.cfg similarity index 92% rename from variants/Xeno_Mini/openocd_scripts/SAMC21G16A.cfg rename to variants/Generic_xx1G/openocd_scripts/SAMC21G16A.cfg index ffb0146b7..bfda61376 100644 --- a/variants/Xeno_Mini/openocd_scripts/SAMC21G16A.cfg +++ b/variants/Generic_xx1G/openocd_scripts/SAMC21G16A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samc21g16 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samcXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samc21g16 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samcXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/Xeno_Mini/openocd_scripts/SAMC21G17A.cfg b/variants/Generic_xx1G/openocd_scripts/SAMC21G17A.cfg similarity index 92% rename from variants/Xeno_Mini/openocd_scripts/SAMC21G17A.cfg rename to variants/Generic_xx1G/openocd_scripts/SAMC21G17A.cfg index 5066d74c6..55a0d25f3 100644 --- a/variants/Xeno_Mini/openocd_scripts/SAMC21G17A.cfg +++ b/variants/Generic_xx1G/openocd_scripts/SAMC21G17A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samc21g17 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samcXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samc21g17 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samcXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/Xeno_Mini/openocd_scripts/SAMC21G18A.cfg b/variants/Generic_xx1G/openocd_scripts/SAMC21G18A.cfg similarity index 92% rename from variants/Xeno_Mini/openocd_scripts/SAMC21G18A.cfg rename to variants/Generic_xx1G/openocd_scripts/SAMC21G18A.cfg index 2946d9391..e05b8ced6 100644 --- a/variants/Xeno_Mini/openocd_scripts/SAMC21G18A.cfg +++ b/variants/Generic_xx1G/openocd_scripts/SAMC21G18A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samc21g18 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samcXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samc21g18 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samcXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/Xeno_Mini/openocd_scripts/SAMD21G15A.cfg b/variants/Generic_xx1G/openocd_scripts/SAMD21G15A.cfg similarity index 92% rename from variants/Xeno_Mini/openocd_scripts/SAMD21G15A.cfg rename to variants/Generic_xx1G/openocd_scripts/SAMD21G15A.cfg index e5d7eb8bb..05376d7a5 100644 --- a/variants/Xeno_Mini/openocd_scripts/SAMD21G15A.cfg +++ b/variants/Generic_xx1G/openocd_scripts/SAMD21G15A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samd21g15 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samdXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samd21g15 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samdXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/Xeno_Mini/openocd_scripts/SAMD21G16A.cfg b/variants/Generic_xx1G/openocd_scripts/SAMD21G16A.cfg similarity index 92% rename from variants/Xeno_Mini/openocd_scripts/SAMD21G16A.cfg rename to variants/Generic_xx1G/openocd_scripts/SAMD21G16A.cfg index 677c80012..5bb93dfe9 100644 --- a/variants/Xeno_Mini/openocd_scripts/SAMD21G16A.cfg +++ b/variants/Generic_xx1G/openocd_scripts/SAMD21G16A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samd21g16 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samdXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samd21g16 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samdXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/Xeno_Mini/openocd_scripts/SAMD21G17A.cfg b/variants/Generic_xx1G/openocd_scripts/SAMD21G17A.cfg similarity index 92% rename from variants/Xeno_Mini/openocd_scripts/SAMD21G17A.cfg rename to variants/Generic_xx1G/openocd_scripts/SAMD21G17A.cfg index 68641e118..48340cf57 100644 --- a/variants/Xeno_Mini/openocd_scripts/SAMD21G17A.cfg +++ b/variants/Generic_xx1G/openocd_scripts/SAMD21G17A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samd21g17 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samdXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samd21g17 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samdXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/Xeno_Mini/openocd_scripts/SAMD21G18A.cfg b/variants/Generic_xx1G/openocd_scripts/SAMD21G18A.cfg similarity index 92% rename from variants/Xeno_Mini/openocd_scripts/SAMD21G18A.cfg rename to variants/Generic_xx1G/openocd_scripts/SAMD21G18A.cfg index 36c65c32d..414a4d105 100644 --- a/variants/Xeno_Mini/openocd_scripts/SAMD21G18A.cfg +++ b/variants/Generic_xx1G/openocd_scripts/SAMD21G18A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samd21g18 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samdXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samd21g18 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samdXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/Xeno_Mini/openocd_scripts/SAMD51G18A.cfg b/variants/Generic_xx1G/openocd_scripts/SAMD51G18A.cfg similarity index 92% rename from variants/Xeno_Mini/openocd_scripts/SAMD51G18A.cfg rename to variants/Generic_xx1G/openocd_scripts/SAMD51G18A.cfg index 7e57910f6..d3b384a2b 100644 --- a/variants/Xeno_Mini/openocd_scripts/SAMD51G18A.cfg +++ b/variants/Generic_xx1G/openocd_scripts/SAMD51G18A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samd51g18 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samdXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samd51g18 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samdXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/Xeno_Mini/openocd_scripts/SAMD51G19A.cfg b/variants/Generic_xx1G/openocd_scripts/SAMD51G19A.cfg similarity index 92% rename from variants/Xeno_Mini/openocd_scripts/SAMD51G19A.cfg rename to variants/Generic_xx1G/openocd_scripts/SAMD51G19A.cfg index f23a883c6..6ab148837 100644 --- a/variants/Xeno_Mini/openocd_scripts/SAMD51G19A.cfg +++ b/variants/Generic_xx1G/openocd_scripts/SAMD51G19A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samd51g19 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samdXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samd51g19 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samdXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/Xeno_Mini/openocd_scripts/SAML21G16B.cfg b/variants/Generic_xx1G/openocd_scripts/SAML21G16B.cfg similarity index 92% rename from variants/Xeno_Mini/openocd_scripts/SAML21G16B.cfg rename to variants/Generic_xx1G/openocd_scripts/SAML21G16B.cfg index c5ef10770..1b102d3c6 100644 --- a/variants/Xeno_Mini/openocd_scripts/SAML21G16B.cfg +++ b/variants/Generic_xx1G/openocd_scripts/SAML21G16B.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91saml21g16 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samlXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91saml21g16 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samlXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/Xeno_Mini/openocd_scripts/SAML21G17B.cfg b/variants/Generic_xx1G/openocd_scripts/SAML21G17B.cfg similarity index 92% rename from variants/Xeno_Mini/openocd_scripts/SAML21G17B.cfg rename to variants/Generic_xx1G/openocd_scripts/SAML21G17B.cfg index 48ad58a4d..863a8cf9c 100644 --- a/variants/Xeno_Mini/openocd_scripts/SAML21G17B.cfg +++ b/variants/Generic_xx1G/openocd_scripts/SAML21G17B.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91saml21g17 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samlXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91saml21g17 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samlXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/Xeno_Mini/openocd_scripts/SAML21G18B.cfg b/variants/Generic_xx1G/openocd_scripts/SAML21G18B.cfg similarity index 92% rename from variants/Xeno_Mini/openocd_scripts/SAML21G18B.cfg rename to variants/Generic_xx1G/openocd_scripts/SAML21G18B.cfg index 0a162e7f5..2d6f0ebec 100644 --- a/variants/Xeno_Mini/openocd_scripts/SAML21G18B.cfg +++ b/variants/Generic_xx1G/openocd_scripts/SAML21G18B.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91saml21g18 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samlXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91saml21g18 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samlXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/MT_D21E_revB/pins_arduino.h b/variants/Generic_xx1G/pins_arduino.h similarity index 97% rename from variants/MT_D21E_revB/pins_arduino.h rename to variants/Generic_xx1G/pins_arduino.h index db0e40c3d..36ab06c77 100644 --- a/variants/MT_D21E_revB/pins_arduino.h +++ b/variants/Generic_xx1G/pins_arduino.h @@ -1,21 +1,21 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -// API compatibility -#include "variant.h" - +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" + diff --git a/variants/Xeno_Mini/variant.cpp b/variants/Generic_xx1G/variant.cpp similarity index 98% rename from variants/Xeno_Mini/variant.cpp rename to variants/Generic_xx1G/variant.cpp index 81c246086..09aab1e7a 100644 --- a/variants/Xeno_Mini/variant.cpp +++ b/variants/Generic_xx1G/variant.cpp @@ -1,365 +1,365 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* - * Modified 3 February 2018 by Justin Mattair - * for MattairTech boards (www.mattairtech.com) - * - * See README.md for documentation and pin mapping information - */ - - -#include "variant.h" - -/* - * Pins descriptions - */ -const PinDescription g_APinDescription[]= -{ -#if (SAMD51) - // 0..11 - Analog capable pins - { PORTB, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_8, GCLK_CCL_NONE }, - { PORTB, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_9, GCLK_CCL_NONE }, - { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 4, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC0_CH0, ADC_Channel4, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 5, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC0_CH1, ADC_Channel5, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, -#if defined (VIN_5V_REGULATOR_INSTALLED) - { PORTA, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_INPUT|PIN_ATTR_INPUT_PULLUP|PIN_ATTR_INPUT_PULLDOWN|PIN_ATTR_TIMER), TC1_CH0, ADC_Channel6, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, -#else - { PORTA, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC1_CH0, ADC_Channel6, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, -#endif - { PORTA, 7, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC1_CH1, ADC_Channel7, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel2, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel3, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel10, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel11, EXTERNAL_INT_11, GCLK_CCL_NONE }, - - // 12..23 - Digital functions - { PORTA, 12, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT2|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC1_CH2, No_ADC_Channel, EXTERNAL_INT_12, GCLK_CCL_NONE }, - { PORTA, 13, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT2|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC1_CH3, No_ADC_Channel, EXTERNAL_INT_13, GCLK_CCL_NONE }, - { PORTB, 10, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_10, GCLK_CCL_NONE }, - { PORTB, 11, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_15, GCLK_CCL_NONE }, - { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC2_CH0, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, - { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC2_CH1, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, -#if defined (BATTERY_CHARGER_INSTALLED) - { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_INPUT|PIN_ATTR_INPUT_PULLUP|PIN_ATTR_INPUT_PULLDOWN|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC3_CH0, No_ADC_Channel, EXTERNAL_INT_2, GCLK_CCL_NONE }, -#else - { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC3_CH0, No_ADC_Channel, EXTERNAL_INT_2, GCLK_CCL_NONE }, -#endif - { PORTA, 19, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC3_CH1, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, - { PORTA, 20, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT2|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH0, No_ADC_Channel, EXTERNAL_INT_4, GCLK_CCL_NONE }, - { PORTA, 21, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT2|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH1, No_ADC_Channel, EXTERNAL_INT_5, GCLK_CCL_NONE }, - { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT2|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC0_CH2, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT2|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC0_CH3, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - - // 24..26 - USB_NEGATIVE and USB_POSITIVE, pin 26 does not exist - { PORTA, 24, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM - { PORTA, 25, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 27..29 - Digital functions - { PORTA, 27, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 30..31 - Digital functions / Debug interface (SWD CLK and SWD IO) - { PORTA, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD CLK - { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD IO - - // 32..35 - Digital functions -#if defined (IMU_INSTALLED) - { PORTB, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_INPUT|PIN_ATTR_INPUT_PULLUP|PIN_ATTR_INPUT_PULLDOWN|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, // 32 -#else - { PORTB, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, // 32 -#endif - { PORTB, 23, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_7, GCLK_CCL_NONE }, // 33 - { PORTB, 2, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC2_CH2, ADC_Channel14, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // 34, LED - { PORTB, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel15, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // 35 - -#elif (SAMD21) - // 0..11 - Analog capable pins - { PORTB, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC4_CH0, ADC_Channel2, EXTERNAL_INT_8, GCLK_CCL_NONE }, - { PORTB, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC4_CH1, ADC_Channel3, EXTERNAL_INT_9, GCLK_CCL_NONE }, - { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 4, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel4, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 5, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel5, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, -#if defined (VIN_5V_REGULATOR_INSTALLED) - { PORTA, 6, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_INPUT|PIN_ATTR_INPUT_PULLUP|PIN_ATTR_INPUT_PULLDOWN), NOT_ON_TIMER, ADC_Channel6, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, -#else - { PORTA, 6, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel6, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, -#endif - { PORTA, 7, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel7, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel16, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel17, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_COM), NOT_ON_TIMER, ADC_Channel18, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), NOT_ON_TIMER, ADC_Channel19, EXTERNAL_INT_11, GCLK_CCL_NONE }, - - // 12..23 - Digital functions - { PORTA, 12, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_12, GCLK_CCL_NONE }, - { PORTA, 13, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_13, GCLK_CCL_NONE }, - { PORTB, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TC5_CH0, No_ADC_Channel, EXTERNAL_INT_10, GCLK_CCL_NONE }, - { PORTB, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC5_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, - { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, -#if defined (BATTERY_CHARGER_INSTALLED) - { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_INPUT|PIN_ATTR_INPUT_PULLUP|PIN_ATTR_INPUT_PULLDOWN|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC3_CH0, No_ADC_Channel, EXTERNAL_INT_2, GCLK_CCL_NONE }, -#else - { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC3_CH0, No_ADC_Channel, EXTERNAL_INT_2, GCLK_CCL_NONE }, -#endif - { PORTA, 19, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_COM|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC3_CH1, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, - { PORTA, 20, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), TCC0_CH6, No_ADC_Channel, EXTERNAL_INT_4, GCLK_CCL_NONE }, - { PORTA, 21, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_COM|PIN_ATTR_EXTINT), TCC0_CH7, No_ADC_Channel, EXTERNAL_INT_5, GCLK_CCL_NONE }, - { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC0_CH4, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC0_CH5, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - - // 24..26 - USB_NEGATIVE and USB_POSITIVE, pin 26 does not exist - { PORTA, 24, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM - { PORTA, 25, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 27..29 - Digital functions - { PORTA, 27, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 28, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 30..31 - Digital functions / Debug interface (SWD CLK and SWD IO) - { PORTA, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC1_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD CLK - { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC1_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD IO - - // 32..35 - Digital functions -#if defined (IMU_INSTALLED) - { PORTB, 22, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_INPUT|PIN_ATTR_INPUT_PULLUP|PIN_ATTR_INPUT_PULLDOWN|PIN_ATTR_EXTINT|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, // 32 -#else - { PORTB, 22, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, // 32 -#endif - { PORTB, 23, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_7, GCLK_CCL_NONE }, // 33 - { PORTB, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel10, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // 34, LED - { PORTB, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel11, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // 35 - -#elif (SAML21) - // 0..11 - Analog capable pins - { PORTB, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC0_CH0, ADC_Channel2, EXTERNAL_INT_8, GCLK_CCL_NONE }, - { PORTB, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC0_CH1, ADC_Channel3, EXTERNAL_INT_9, GCLK_CCL_NONE }, - { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 4, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel4, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 5, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel5, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, -#if defined (VIN_5V_REGULATOR_INSTALLED) - { PORTA, 6, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_INPUT|PIN_ATTR_INPUT_PULLUP|PIN_ATTR_INPUT_PULLDOWN), NOT_ON_TIMER, ADC_Channel6, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, -#else - { PORTA, 6, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel6, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, -#endif - { PORTA, 7, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel7, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel16, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel17, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel18, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel19, EXTERNAL_INT_11, GCLK_CCL_NONE }, - - // 12..23 - Digital functions - { PORTA, 12, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_12, GCLK_CCL_NONE }, - { PORTA, 13, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_13, GCLK_CCL_NONE }, - { PORTB, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TC1_CH0, No_ADC_Channel, EXTERNAL_INT_10, GCLK_CCL_NONE }, - { PORTB, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC1_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, - { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, -#if defined (BATTERY_CHARGER_INSTALLED) - { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_INPUT|PIN_ATTR_INPUT_PULLUP|PIN_ATTR_INPUT_PULLDOWN|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_2, GCLK_CCL_NONE }, -#else - { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_2, GCLK_CCL_NONE }, -#endif - { PORTA, 19, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, - { PORTA, 20, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH6, No_ADC_Channel, EXTERNAL_INT_4, GCLK_CCL_NONE }, - { PORTA, 21, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH7, No_ADC_Channel, EXTERNAL_INT_5, GCLK_CCL_NONE }, - { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC0_CH4, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC0_CH5, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - - // 24..26 - USB_NEGATIVE and USB_POSITIVE, pin 26 does not exist - { PORTA, 24, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM - { PORTA, 25, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 27..29 - Digital functions - { PORTA, 27, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 30..31 - Digital functions / Debug interface (SWD CLK and SWD IO) - { PORTA, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC1_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD CLK - { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC1_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD IO - - // 32..35 - Digital functions -#if defined (IMU_INSTALLED) - { PORTB, 22, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_INPUT|PIN_ATTR_INPUT_PULLUP|PIN_ATTR_INPUT_PULLDOWN|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, // 32 -#else - { PORTB, 22, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, // 32 -#endif - { PORTB, 23, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_7, GCLK_CCL_NONE }, // 33 - { PORTB, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel10, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // 34, LED - { PORTB, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel11, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // 35 - -#elif (SAMC21) - // 0..11 - Analog capable pins - { PORTB, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_ADC_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC0_CH0, ADC_Channel4, EXTERNAL_INT_8, GCLK_CCL_NONE }, - { PORTB, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_ADC_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC0_CH1, ADC_Channel5, EXTERNAL_INT_9, GCLK_CCL_NONE }, - { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 4, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel4, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 5, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel5, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, -#if defined (VIN_5V_REGULATOR_INSTALLED) - { PORTA, 6, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_INPUT|PIN_ATTR_INPUT_PULLUP|PIN_ATTR_INPUT_PULLDOWN), NOT_ON_TIMER, ADC_Channel6, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, -#else - { PORTA, 6, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel6, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, -#endif - { PORTA, 7, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel7, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel10, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel11, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel10, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel11, EXTERNAL_INT_11, GCLK_CCL_NONE }, - - // 12..23 - Digital functions - { PORTA, 12, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_12, GCLK_CCL_NONE }, - { PORTA, 13, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_13, GCLK_CCL_NONE }, - { PORTB, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT|PIN_ATTR_COM), TC1_CH0, No_ADC_Channel, EXTERNAL_INT_10, GCLK_CCL_NONE }, - { PORTB, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_COM), TC1_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, - { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, -#if defined (BATTERY_CHARGER_INSTALLED) - { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_INPUT|PIN_ATTR_INPUT_PULLUP|PIN_ATTR_INPUT_PULLDOWN|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC4_CH0, No_ADC_Channel, EXTERNAL_INT_2, GCLK_CCL_NONE }, -#else - { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC4_CH0, No_ADC_Channel, EXTERNAL_INT_2, GCLK_CCL_NONE }, -#endif - { PORTA, 19, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC4_CH1, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, - { PORTA, 20, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH6, No_ADC_Channel, EXTERNAL_INT_4, GCLK_CCL_NONE }, - { PORTA, 21, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH7, No_ADC_Channel, EXTERNAL_INT_5, GCLK_CCL_NONE }, - { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC0_CH4, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC0_CH5, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - - // 24..26 - USB_NEGATIVE and USB_POSITIVE, pin 26 does not exist - { PORTA, 24, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM - { PORTA, 25, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 27..29 - Digital functions - { PORTA, 27, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 28, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 30..31 - Digital functions / Debug interface (SWD CLK and SWD IO) - { PORTA, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC1_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD CLK - { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC1_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD IO - - // 32..35 - Digital functions -#if defined (IMU_INSTALLED) - { PORTB, 22, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_INPUT|PIN_ATTR_INPUT_PULLUP|PIN_ATTR_INPUT_PULLDOWN|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, // 32 -#else - { PORTB, 22, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, // 32 -#endif - { PORTB, 23, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_7, GCLK_CCL_NONE }, // 33 - { PORTB, 2, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel2, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // 34, LED - { PORTB, 3, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel3, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // 35 - -#else - #error "variant.cpp: Unsupported chip" -#endif -} ; - -#if (SAMD21) -const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TCC1, TCC2, TC3, TC4, TC5 } ; -#elif (SAML21) -const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TCC1, TCC2, TC0, TC1, TC4 } ; -#elif (SAMC21) -const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TCC1, TCC2, TC0, TC1, TC2, TC3, TC4 } ; -#elif (SAMD51) -const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TCC1, TCC2, TC0, TC1, TC2, TC3 } ; -#endif - -// Multi-serial objects instantiation -SERCOM sercom0( SERCOM0 ) ; -SERCOM sercom1( SERCOM1 ) ; -SERCOM sercom2( SERCOM2 ) ; -SERCOM sercom3( SERCOM3 ) ; -SERCOM sercom4( SERCOM4 ) ; -SERCOM sercom5( SERCOM5 ) ; - -#if defined(ONE_UART) || defined(TWO_UART) || defined(THREE_UART) -Uart Serial1( SERCOM_INSTANCE_SERIAL1, PIN_SERIAL1_RX, PIN_SERIAL1_TX, PAD_SERIAL1_RX, PAD_SERIAL1_TX ) ; - - #if (SAMD51) - void SERCOM4_0_Handler(void) { - Serial1.dataRegisterEmptyHandler(); - } - - void SERCOM4_2_Handler(void) { - Serial1.availableDataHandler(); - } - - void SERCOM4_3_Handler(void) { - Serial1.errorHandler(); - } - #else - void SERCOM4_Handler() { - Serial1.IrqHandler(); - } - #endif -#endif - -#if defined(TWO_UART) || defined(THREE_UART) -Uart Serial2( SERCOM_INSTANCE_SERIAL2, PIN_SERIAL2_RX, PIN_SERIAL2_TX, PAD_SERIAL2_RX, PAD_SERIAL2_TX ) ; - - #if (SAMD51) - void SERCOM2_0_Handler(void) { - Serial2.dataRegisterEmptyHandler(); - } - - void SERCOM2_2_Handler(void) { - Serial2.availableDataHandler(); - } - - void SERCOM2_3_Handler(void) { - Serial2.errorHandler(); - } - #else - void SERCOM2_Handler() { - Serial2.IrqHandler(); - } - #endif -#endif - -#if defined(THREE_UART) -Uart Serial3( SERCOM_INSTANCE_SERIAL3, PIN_SERIAL3_RX, PIN_SERIAL3_TX, PAD_SERIAL3_RX, PAD_SERIAL3_TX ) ; - - #if (SAMD51) - void SERCOM3_0_Handler(void) { - Serial3.dataRegisterEmptyHandler(); - } - - void SERCOM3_2_Handler(void) { - Serial3.availableDataHandler(); - } - - void SERCOM3_3_Handler(void) { - Serial3.errorHandler(); - } - #else - void SERCOM3_Handler() { - Serial3.IrqHandler(); - } - #endif -#endif +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* + * Modified 3 February 2018 by Justin Mattair + * for MattairTech boards (www.mattairtech.com) + * + * See README.md for documentation and pin mapping information + */ + + +#include "variant.h" + +/* + * Pins descriptions + */ +const PinDescription g_APinDescription[]= +{ +#if (SAMD51) + // 0..11 - Analog capable pins + { PORTB, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_8, GCLK_CCL_NONE }, + { PORTB, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_9, GCLK_CCL_NONE }, + { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 4, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC0_CH0, ADC_Channel4, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 5, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC0_CH1, ADC_Channel5, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, +#if defined (VIN_5V_REGULATOR_INSTALLED) + { PORTA, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_INPUT|PIN_ATTR_INPUT_PULLUP|PIN_ATTR_INPUT_PULLDOWN|PIN_ATTR_TIMER), TC1_CH0, ADC_Channel6, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, +#else + { PORTA, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC1_CH0, ADC_Channel6, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, +#endif + { PORTA, 7, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC1_CH1, ADC_Channel7, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel2, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel3, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel10, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel11, EXTERNAL_INT_11, GCLK_CCL_NONE }, + + // 12..23 - Digital functions + { PORTA, 12, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT2|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC1_CH2, No_ADC_Channel, EXTERNAL_INT_12, GCLK_CCL_NONE }, + { PORTA, 13, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT2|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC1_CH3, No_ADC_Channel, EXTERNAL_INT_13, GCLK_CCL_NONE }, + { PORTB, 10, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_10, GCLK_CCL_NONE }, + { PORTB, 11, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_15, GCLK_CCL_NONE }, + { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC2_CH0, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, + { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC2_CH1, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, +#if defined (BATTERY_CHARGER_INSTALLED) + { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_INPUT|PIN_ATTR_INPUT_PULLUP|PIN_ATTR_INPUT_PULLDOWN|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC3_CH0, No_ADC_Channel, EXTERNAL_INT_2, GCLK_CCL_NONE }, +#else + { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC3_CH0, No_ADC_Channel, EXTERNAL_INT_2, GCLK_CCL_NONE }, +#endif + { PORTA, 19, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC3_CH1, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, + { PORTA, 20, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT2|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH0, No_ADC_Channel, EXTERNAL_INT_4, GCLK_CCL_NONE }, + { PORTA, 21, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT2|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH1, No_ADC_Channel, EXTERNAL_INT_5, GCLK_CCL_NONE }, + { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT2|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC0_CH2, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT2|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC0_CH3, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + + // 24..26 - USB_NEGATIVE and USB_POSITIVE, pin 26 does not exist + { PORTA, 24, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM + { PORTA, 25, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + + // 27..29 - Digital functions + { PORTA, 27, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + + // 30..31 - Digital functions / Debug interface (SWD CLK and SWD IO) + { PORTA, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD CLK + { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD IO + + // 32..35 - Digital functions +#if defined (IMU_INSTALLED) + { PORTB, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_INPUT|PIN_ATTR_INPUT_PULLUP|PIN_ATTR_INPUT_PULLDOWN|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, // 32 +#else + { PORTB, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, // 32 +#endif + { PORTB, 23, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_7, GCLK_CCL_NONE }, // 33 + { PORTB, 2, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC2_CH2, ADC_Channel14, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // 34, LED + { PORTB, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel15, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // 35 + +#elif (SAMD21) + // 0..11 - Analog capable pins + { PORTB, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC4_CH0, ADC_Channel2, EXTERNAL_INT_8, GCLK_CCL_NONE }, + { PORTB, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC4_CH1, ADC_Channel3, EXTERNAL_INT_9, GCLK_CCL_NONE }, + { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 4, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel4, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 5, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel5, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, +#if defined (VIN_5V_REGULATOR_INSTALLED) + { PORTA, 6, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_INPUT|PIN_ATTR_INPUT_PULLUP|PIN_ATTR_INPUT_PULLDOWN), NOT_ON_TIMER, ADC_Channel6, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, +#else + { PORTA, 6, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel6, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, +#endif + { PORTA, 7, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel7, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel16, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel17, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_COM), NOT_ON_TIMER, ADC_Channel18, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), NOT_ON_TIMER, ADC_Channel19, EXTERNAL_INT_11, GCLK_CCL_NONE }, + + // 12..23 - Digital functions + { PORTA, 12, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_12, GCLK_CCL_NONE }, + { PORTA, 13, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_13, GCLK_CCL_NONE }, + { PORTB, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TC5_CH0, No_ADC_Channel, EXTERNAL_INT_10, GCLK_CCL_NONE }, + { PORTB, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC5_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, + { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, +#if defined (BATTERY_CHARGER_INSTALLED) + { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_INPUT|PIN_ATTR_INPUT_PULLUP|PIN_ATTR_INPUT_PULLDOWN|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC3_CH0, No_ADC_Channel, EXTERNAL_INT_2, GCLK_CCL_NONE }, +#else + { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC3_CH0, No_ADC_Channel, EXTERNAL_INT_2, GCLK_CCL_NONE }, +#endif + { PORTA, 19, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_COM|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC3_CH1, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, + { PORTA, 20, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), TCC0_CH6, No_ADC_Channel, EXTERNAL_INT_4, GCLK_CCL_NONE }, + { PORTA, 21, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_COM|PIN_ATTR_EXTINT), TCC0_CH7, No_ADC_Channel, EXTERNAL_INT_5, GCLK_CCL_NONE }, + { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC0_CH4, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC0_CH5, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + + // 24..26 - USB_NEGATIVE and USB_POSITIVE, pin 26 does not exist + { PORTA, 24, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM + { PORTA, 25, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + + // 27..29 - Digital functions + { PORTA, 27, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 28, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + + // 30..31 - Digital functions / Debug interface (SWD CLK and SWD IO) + { PORTA, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC1_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD CLK + { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC1_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD IO + + // 32..35 - Digital functions +#if defined (IMU_INSTALLED) + { PORTB, 22, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_INPUT|PIN_ATTR_INPUT_PULLUP|PIN_ATTR_INPUT_PULLDOWN|PIN_ATTR_EXTINT|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, // 32 +#else + { PORTB, 22, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, // 32 +#endif + { PORTB, 23, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_7, GCLK_CCL_NONE }, // 33 + { PORTB, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel10, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // 34, LED + { PORTB, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel11, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // 35 + +#elif (SAML21) + // 0..11 - Analog capable pins + { PORTB, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC0_CH0, ADC_Channel2, EXTERNAL_INT_8, GCLK_CCL_NONE }, + { PORTB, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC0_CH1, ADC_Channel3, EXTERNAL_INT_9, GCLK_CCL_NONE }, + { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 4, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel4, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 5, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel5, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, +#if defined (VIN_5V_REGULATOR_INSTALLED) + { PORTA, 6, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_INPUT|PIN_ATTR_INPUT_PULLUP|PIN_ATTR_INPUT_PULLDOWN), NOT_ON_TIMER, ADC_Channel6, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, +#else + { PORTA, 6, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel6, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, +#endif + { PORTA, 7, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel7, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel16, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel17, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel18, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel19, EXTERNAL_INT_11, GCLK_CCL_NONE }, + + // 12..23 - Digital functions + { PORTA, 12, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_12, GCLK_CCL_NONE }, + { PORTA, 13, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_13, GCLK_CCL_NONE }, + { PORTB, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TC1_CH0, No_ADC_Channel, EXTERNAL_INT_10, GCLK_CCL_NONE }, + { PORTB, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC1_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, + { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, +#if defined (BATTERY_CHARGER_INSTALLED) + { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_INPUT|PIN_ATTR_INPUT_PULLUP|PIN_ATTR_INPUT_PULLDOWN|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_2, GCLK_CCL_NONE }, +#else + { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_2, GCLK_CCL_NONE }, +#endif + { PORTA, 19, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, + { PORTA, 20, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH6, No_ADC_Channel, EXTERNAL_INT_4, GCLK_CCL_NONE }, + { PORTA, 21, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH7, No_ADC_Channel, EXTERNAL_INT_5, GCLK_CCL_NONE }, + { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC0_CH4, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC0_CH5, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + + // 24..26 - USB_NEGATIVE and USB_POSITIVE, pin 26 does not exist + { PORTA, 24, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM + { PORTA, 25, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + + // 27..29 - Digital functions + { PORTA, 27, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + + // 30..31 - Digital functions / Debug interface (SWD CLK and SWD IO) + { PORTA, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC1_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD CLK + { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC1_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD IO + + // 32..35 - Digital functions +#if defined (IMU_INSTALLED) + { PORTB, 22, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_INPUT|PIN_ATTR_INPUT_PULLUP|PIN_ATTR_INPUT_PULLDOWN|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, // 32 +#else + { PORTB, 22, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, // 32 +#endif + { PORTB, 23, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_7, GCLK_CCL_NONE }, // 33 + { PORTB, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel10, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // 34, LED + { PORTB, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel11, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // 35 + +#elif (SAMC21) + // 0..11 - Analog capable pins + { PORTB, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_ADC_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC0_CH0, ADC_Channel4, EXTERNAL_INT_8, GCLK_CCL_NONE }, + { PORTB, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_ADC_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC0_CH1, ADC_Channel5, EXTERNAL_INT_9, GCLK_CCL_NONE }, + { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 4, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel4, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 5, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel5, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, +#if defined (VIN_5V_REGULATOR_INSTALLED) + { PORTA, 6, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_INPUT|PIN_ATTR_INPUT_PULLUP|PIN_ATTR_INPUT_PULLDOWN), NOT_ON_TIMER, ADC_Channel6, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, +#else + { PORTA, 6, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel6, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, +#endif + { PORTA, 7, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel7, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel10, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel11, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel10, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel11, EXTERNAL_INT_11, GCLK_CCL_NONE }, + + // 12..23 - Digital functions + { PORTA, 12, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_12, GCLK_CCL_NONE }, + { PORTA, 13, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_13, GCLK_CCL_NONE }, + { PORTB, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT|PIN_ATTR_COM), TC1_CH0, No_ADC_Channel, EXTERNAL_INT_10, GCLK_CCL_NONE }, + { PORTB, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_COM), TC1_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, + { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, +#if defined (BATTERY_CHARGER_INSTALLED) + { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_INPUT|PIN_ATTR_INPUT_PULLUP|PIN_ATTR_INPUT_PULLDOWN|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC4_CH0, No_ADC_Channel, EXTERNAL_INT_2, GCLK_CCL_NONE }, +#else + { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC4_CH0, No_ADC_Channel, EXTERNAL_INT_2, GCLK_CCL_NONE }, +#endif + { PORTA, 19, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC4_CH1, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, + { PORTA, 20, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH6, No_ADC_Channel, EXTERNAL_INT_4, GCLK_CCL_NONE }, + { PORTA, 21, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH7, No_ADC_Channel, EXTERNAL_INT_5, GCLK_CCL_NONE }, + { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC0_CH4, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC0_CH5, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + + // 24..26 - USB_NEGATIVE and USB_POSITIVE, pin 26 does not exist + { PORTA, 24, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM + { PORTA, 25, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + + // 27..29 - Digital functions + { PORTA, 27, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 28, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + + // 30..31 - Digital functions / Debug interface (SWD CLK and SWD IO) + { PORTA, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC1_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD CLK + { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC1_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD IO + + // 32..35 - Digital functions +#if defined (IMU_INSTALLED) + { PORTB, 22, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_INPUT|PIN_ATTR_INPUT_PULLUP|PIN_ATTR_INPUT_PULLDOWN|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, // 32 +#else + { PORTB, 22, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, // 32 +#endif + { PORTB, 23, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_7, GCLK_CCL_NONE }, // 33 + { PORTB, 2, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel2, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // 34, LED + { PORTB, 3, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel3, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // 35 + +#else + #error "variant.cpp: Unsupported chip" +#endif +} ; + +#if (SAMD21) +const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TCC1, TCC2, TC3, TC4, TC5 } ; +#elif (SAML21) +const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TCC1, TCC2, TC0, TC1, TC4 } ; +#elif (SAMC21) +const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TCC1, TCC2, TC0, TC1, TC2, TC3, TC4 } ; +#elif (SAMD51) +const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TCC1, TCC2, TC0, TC1, TC2, TC3 } ; +#endif + +// Multi-serial objects instantiation +SERCOM sercom0( SERCOM0 ) ; +SERCOM sercom1( SERCOM1 ) ; +SERCOM sercom2( SERCOM2 ) ; +SERCOM sercom3( SERCOM3 ) ; +SERCOM sercom4( SERCOM4 ) ; +SERCOM sercom5( SERCOM5 ) ; + +#if defined(ONE_UART) || defined(TWO_UART) || defined(THREE_UART) +Uart Serial1( SERCOM_INSTANCE_SERIAL1, PIN_SERIAL1_RX, PIN_SERIAL1_TX, PAD_SERIAL1_RX, PAD_SERIAL1_TX ) ; + + #if (SAMD51) + void SERCOM4_0_Handler(void) { + Serial1.dataRegisterEmptyHandler(); + } + + void SERCOM4_2_Handler(void) { + Serial1.availableDataHandler(); + } + + void SERCOM4_3_Handler(void) { + Serial1.errorHandler(); + } + #else + void SERCOM4_Handler() { + Serial1.IrqHandler(); + } + #endif +#endif + +#if defined(TWO_UART) || defined(THREE_UART) +Uart Serial2( SERCOM_INSTANCE_SERIAL2, PIN_SERIAL2_RX, PIN_SERIAL2_TX, PAD_SERIAL2_RX, PAD_SERIAL2_TX ) ; + + #if (SAMD51) + void SERCOM2_0_Handler(void) { + Serial2.dataRegisterEmptyHandler(); + } + + void SERCOM2_2_Handler(void) { + Serial2.availableDataHandler(); + } + + void SERCOM2_3_Handler(void) { + Serial2.errorHandler(); + } + #else + void SERCOM2_Handler() { + Serial2.IrqHandler(); + } + #endif +#endif + +#if defined(THREE_UART) +Uart Serial3( SERCOM_INSTANCE_SERIAL3, PIN_SERIAL3_RX, PIN_SERIAL3_TX, PAD_SERIAL3_RX, PAD_SERIAL3_TX ) ; + + #if (SAMD51) + void SERCOM3_0_Handler(void) { + Serial3.dataRegisterEmptyHandler(); + } + + void SERCOM3_2_Handler(void) { + Serial3.availableDataHandler(); + } + + void SERCOM3_3_Handler(void) { + Serial3.errorHandler(); + } + #else + void SERCOM3_Handler() { + Serial3.IrqHandler(); + } + #endif +#endif diff --git a/variants/Xeno_Mini/variant.h b/variants/Generic_xx1G/variant.h similarity index 96% rename from variants/Xeno_Mini/variant.h rename to variants/Generic_xx1G/variant.h index dcd71ff06..8e60381c0 100644 --- a/variants/Xeno_Mini/variant.h +++ b/variants/Generic_xx1G/variant.h @@ -1,477 +1,477 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* - * Modified 29 January 2018 by Justin Mattair - * for MattairTech boards (www.mattairtech.com) - * - * See README.md for documentation and pin mapping information - */ - -#ifndef _VARIANT_MATTAIRTECH_XENO_MINI_ -#define _VARIANT_MATTAIRTECH_XENO_MINI_ - -/* The definitions here need the MattairTech SAMD core >=1.6.8. - * The format is different than the stock Arduino SAMD core, - * which uses ARDUINO_SAMD_VARIANT_COMPLIANCE instead. - */ -#define MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE 10608 - -/*---------------------------------------------------------------------------- - * Board/Clock Configuration - *----------------------------------------------------------------------------*/ - -/* Master clock frequency (also Fcpu frequency). With the D51, this can be - * either 120000000ul or 48000000ul (selected in the menu). See README.md. - */ -#define VARIANT_MCK (F_CPU) - -/* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ - * must also be defined with the external crystal frequency in Hertz. - */ -#define HS_CRYSTAL_FREQUENCY_HERTZ 24000000UL - -/* If the PLL is used (CLOCKCONFIG_32768HZ_CRYSTAL, or CLOCKCONFIG_HS_CRYSTAL - * defined), then PLL_FRACTIONAL_ENABLED can be defined, which will result in - * a more accurate 48MHz output frequency at the expense of increased jitter. - */ -//#define PLL_FRACTIONAL_ENABLED - -/* If both PLL_FAST_STARTUP and CLOCKCONFIG_HS_CRYSTAL are defined, the crystal - * will be divided down to 1MHz - 2MHz, rather than 32KHz - 64KHz, before being - * multiplied by the PLL. This will result in a faster lock time for the PLL, - * however, it will also result in a less accurate PLL output frequency if the - * crystal is not divisible (without remainder) by 1MHz. In this case, define - * PLL_FRACTIONAL_ENABLED as well. - */ -//#define PLL_FAST_STARTUP - -/* The fine calibration value for DFLL open-loop mode is defined here. - * The coarse calibration value is loaded from NVM OTP (factory calibration values). - */ -#define NVM_SW_CALIB_DFLL48M_FINE_VAL (512) - -/* Define CORTEX_M_CACHE_ENABLED to enable the Cortex M cache (D51 only). - */ -#define CORTEX_M_CACHE_ENABLED - -/* When the battery charger (CHG) is installed, the charge status is available on pin 18 (A18, STA), - * which drives low (open-drain) when the battery is charging. Defining BATTERY_CHARGER_INSTALLED - * will prevent pin A18 from being configured as an output, thus avoiding contention. - */ -#define BATTERY_CHARGER_INSTALLED - -/* When the accelerometer/gyroscope/magnetometer (IMU) is installed, all three interrupt outputs - * are tied together and connected to pin 32 (B22, INT), which by default drives low in a push-pull, - * active-high configuration until it is configured otherwise (to open-drain, active-low for example). - * Defining IMU_INSTALLED will prevent pin B22 from being configured as an output, thus avoiding - * contention. - */ -#define IMU_INSTALLED - -/* When the Vin regulator (5V) is installed, an analog comparator (Rev B only) is used to drive the Vbus - * ideal diode enable pin (EN) low, which disconnects Vbus from VccH. The Vbus voltage divider, which is - * available on pin 6 (A6, VU), is also connected to the same enable pin. Defining VIN_5V_REGULATOR_INSTALLED - * will prevent pin A6 from being configured as an output, thus avoiding contention. - */ -#define VIN_5V_REGULATOR_INSTALLED - - -/*---------------------------------------------------------------------------- - * Headers - *----------------------------------------------------------------------------*/ - -#include "WVariant.h" -#include "sam.h" - -#ifdef __cplusplus -#include "SERCOM.h" -#include "Uart.h" -#endif // __cplusplus - -#ifdef __cplusplus -extern "C" -{ -#endif // __cplusplus - -/*---------------------------------------------------------------------------- - * Pins - *----------------------------------------------------------------------------*/ - -// Number of pins defined in PinDescription array -#define NUM_PIN_DESCRIPTION_ENTRIES (36u) - -#define PINS_COUNT NUM_PIN_DESCRIPTION_ENTRIES -#define NUM_DIGITAL_PINS PINS_COUNT -#define NUM_ANALOG_INPUTS (14u) - -#if (SAMD21 || SAMC21) -#define NUM_ANALOG_OUTPUTS (1u) -#elif (SAMD51 || SAML21) -#define NUM_ANALOG_OUTPUTS (2u) -#else -#error "variant.h: Unsupported chip" -#endif - -#define analogInputToDigitalPin(p) (p) - -#define digitalPinToPort(P) ( &(PORT->Group[g_APinDescription[P].ulPort]) ) -#define digitalPinToBitMask(P) ( 1 << g_APinDescription[P].ulPin ) -//#define analogInPinToBit(P) ( ) -#define portOutputRegister(port) ( &(port->OUT.reg) ) -#define portInputRegister(port) ( &(port->IN.reg) ) -#define portModeRegister(port) ( &(port->DIR.reg) ) -#define digitalPinHasPWM(P) ( (g_APinDescription[P].ulPinAttribute & PIN_ATTR_TIMER_PWM) == PIN_ATTR_TIMER_PWM ) - -/* - * digitalPinToTimer(..) is AVR-specific and is not defined for SAMD - * architecture. If you need to check if a pin supports PWM you must - * use digitalPinHasPWM(..). - * - * https://github.com/arduino/Arduino/issues/1833 - */ -// #define digitalPinToTimer(P) - -/* LEDs - * None of these defines are currently used by the core. - * The Xeno Mini onboard LED is on pin 34. - * The RX and TX LEDs are not present. - * You may optionally add them to any free pins. - */ -#define PIN_LED_13 (34u) -#define PIN_LED_RXL (20u) -#define PIN_LED_TXL (21u) -#define PIN_LED PIN_LED_13 -#define PIN_LED2 PIN_LED_RXL -#define PIN_LED3 PIN_LED_TXL -#define LED_BUILTIN PIN_LED_13 - - -/* - * Analog pins - */ -#define PIN_A0 (0ul) -#define PIN_A1 (1ul) -#define PIN_A2 (2ul) -#define PIN_A3 (3ul) -#define PIN_A4 (4ul) -#define PIN_A5 (5ul) -#define PIN_A6 (6ul) -#define PIN_A7 (7ul) -#define PIN_A8 (8ul) -#define PIN_A9 (9ul) -#define PIN_A10 (10ul) -#define PIN_A11 (11ul) -#define PIN_A34 (34ul) -#define PIN_A35 (35ul) -#define PIN_DAC0 (2ul) -#if (SAMD51 || SAML21) -#define PIN_DAC1 (5ul) -#endif - -static const uint8_t A0 = PIN_A0; -static const uint8_t A1 = PIN_A1; -static const uint8_t A2 = PIN_A2; -static const uint8_t A3 = PIN_A3; -static const uint8_t A4 = PIN_A4; -static const uint8_t A5 = PIN_A5; -static const uint8_t A6 = PIN_A6; -static const uint8_t A7 = PIN_A7; -static const uint8_t A8 = PIN_A8; -static const uint8_t A9 = PIN_A9; -static const uint8_t A10 = PIN_A10; -static const uint8_t A11 = PIN_A11; -static const uint8_t A34 = PIN_A34; -static const uint8_t A35 = PIN_A35; -static const uint8_t DAC0 = PIN_DAC0; -#if (SAMD51 || SAML21) -static const uint8_t DAC1 = PIN_DAC1; -#endif - -#define ADC_RESOLUTION 12 - -// #define REMAP_ANALOG_PIN_ID(pin) if ( pin < A0 ) pin += A0 - -/* Set default analog voltage reference */ -#define VARIANT_AR_DEFAULT AR_DEFAULT - -/* Reference voltage pins (define even if not enabled with PIN_ATTR_REF in the PinDescription table) */ -#define REFA_PIN (3ul) -#define REFB_PIN (4ul) -#if (SAMD51) -#define REFC_PIN (6ul) -#endif - - -// The ATN pin may be used in the future as the first SPI chip select. -// On boards that do not have the Arduino physical form factor, it can to set to any free pin. -#define PIN_ATN (27ul) -static const uint8_t ATN = PIN_ATN; - - -/* - * Serial interfaces - */ -#if (defined(THREE_UART) && SAMD51) - #error "variant.h: Only two UARTs are available with the D51. Please choose a TWO_UART_* option" -#endif - -// Serial1 -#define PIN_SERIAL1_TX (0ul) -#define PIN_SERIAL1_RX (1ul) -#define PAD_SERIAL1_TX (UART_TX_PAD_0) -#define PAD_SERIAL1_RX (SERCOM_RX_PAD_1) - -#define SERCOM_INSTANCE_SERIAL1 &sercom4 - -// Serial2 -#define PIN_SERIAL2_TX (12u) -#define PIN_SERIAL2_RX (13u) -#define PAD_SERIAL2_TX (UART_TX_PAD_0) -#define PAD_SERIAL2_RX (SERCOM_RX_PAD_1) - -#define SERCOM_INSTANCE_SERIAL2 &sercom2 - -// Serial3 (a third serial is not available with the D51 on this board) -#define PIN_SERIAL3_TX (18ul) -#define PIN_SERIAL3_RX (19ul) -#define PAD_SERIAL3_TX (UART_TX_PAD_2) -#define PAD_SERIAL3_RX (SERCOM_RX_PAD_3) - -#define SERCOM_INSTANCE_SERIAL3 &sercom3 - - -/* - * SPI Interfaces - */ -#if defined(TWO_SPI) -#define SPI_INTERFACES_COUNT 2 -#elif defined(THREE_SPI) -#define SPI_INTERFACES_COUNT 3 -#else -#define SPI_INTERFACES_COUNT 1 -#endif - -#define PIN_SPI_MISO (9u) -#define PIN_SPI_MOSI (8u) -#define PIN_SPI_SCK (11u) -#define PIN_SPI_SS (10u) -#define PERIPH_SPI sercom0 -#define PAD_SPI_TX SPI_PAD_0_SCK_3 -#define PAD_SPI_RX SERCOM_RX_PAD_1 - -static const uint8_t SS = PIN_SPI_SS ; // The SERCOM SS PAD is available on this pin but HW SS isn't used. Set here only for reference. -static const uint8_t MOSI = PIN_SPI_MOSI ; -static const uint8_t MISO = PIN_SPI_MISO ; -static const uint8_t SCK = PIN_SPI_SCK ; - -#if (SAMD51) -#define PIN_SPI1_MISO (21u) -#define PIN_SPI1_MOSI (23u) -#define PIN_SPI1_SCK (22u) -#define PIN_SPI1_SS (20u) -#define PAD_SPI1_TX SPI_PAD_0_SCK_1 -#define PAD_SPI1_RX SERCOM_RX_PAD_3 -#else -#define PIN_SPI1_MISO (21u) -#define PIN_SPI1_MOSI (22u) -#define PIN_SPI1_SCK (23u) -#define PIN_SPI1_SS (20u) -#define PAD_SPI1_TX SPI_PAD_0_SCK_1 -#define PAD_SPI1_RX SERCOM_RX_PAD_3 -#endif -#define PERIPH_SPI1 sercom5 - -static const uint8_t SS1 = PIN_SPI1_SS ; // The SERCOM SS PAD is available on this pin but HW SS isn't used. Set here only for reference. -static const uint8_t MOSI1 = PIN_SPI1_MOSI ; -static const uint8_t MISO1 = PIN_SPI1_MISO ; -static const uint8_t SCK1 = PIN_SPI1_SCK ; - - -/* - * Wire Interfaces - */ -#if defined(TWO_WIRE) -#define WIRE_INTERFACES_COUNT 2 -#elif defined(THREE_WIRE) -#define WIRE_INTERFACES_COUNT 3 -#else -#define WIRE_INTERFACES_COUNT 1 -#endif - -#define PIN_WIRE_SDA (16u) -#define PIN_WIRE_SCL (17u) -#define PERIPH_WIRE sercom1 -#if (SAMD51) - #define WIRE_STOP_DETECTED_HANDLER SERCOM1_0_Handler - #define WIRE_ADDRESS_MATCH_HANDLER SERCOM1_1_Handler - #define WIRE_DATA_READY_HANDLER SERCOM1_2_Handler -#else - #define WIRE_IT_HANDLER SERCOM1_Handler -#endif - -static const uint8_t SDA = PIN_WIRE_SDA; -static const uint8_t SCL = PIN_WIRE_SCL; - -#define PIN_WIRE1_SDA (22u) -#define PIN_WIRE1_SCL (23u) -#define PERIPH_WIRE1 sercom5 -#if (SAMD51) - #define WIRE1_STOP_DETECTED_HANDLER SERCOM5_0_Handler - #define WIRE1_ADDRESS_MATCH_HANDLER SERCOM5_1_Handler - #define WIRE1_DATA_READY_HANDLER SERCOM5_2_Handler -#else - #define WIRE1_IT_HANDLER SERCOM5_Handler -#endif - -static const uint8_t SDA1 = PIN_WIRE1_SDA; -static const uint8_t SCL1 = PIN_WIRE1_SCL; - - -/* - * USB - Define PIN_USB_HOST_ENABLE to assert the defined pin to - * PIN_USB_HOST_ENABLE_VALUE during startup. Leave undefined to disable this pin. - */ -#define PIN_USB_DM (24ul) -#define PIN_USB_DP (25ul) -//#define PIN_USB_HOST_ENABLE (19ul) -#define PIN_USB_HOST_ENABLE_VALUE 0 - -/* - * I2S Interfaces - * SAMD51, PDM, and MCLK support will be added hopefully March 2018 - */ - -#if (SAMD51) -// On the SAMD51, device 0 is TX only using SDO (PIN_I2S_SD), and device 1 is RX only using SDI (PIN_I2S1_SD) -#define I2S_INTERFACES_COUNT 2 -#define I2S_DEVICE 0 -#define I2S1_DEVICE 1 -#define I2S_CLOCK_GENERATOR 7 -#define I2S1_CLOCK_GENERATOR 7 -// TX -#define PIN_I2S_MCK (8u) -#define PIN_I2S_SCK (10u) -#define PIN_I2S_FS (9u) -#define PIN_I2S_SD (11u) // SDO (TX) -// RX (must use clock 0) -#define PIN_I2S1_MCK (8u) -#define PIN_I2S1_SCK (10u) -#define PIN_I2S1_FS (9u) -#define PIN_I2S1_SD (14u) // SDI (RX) - -#else -#define I2S_INTERFACES_COUNT 1 -#define I2S_DEVICE 0 -//#define I2S1_DEVICE 1 -#define I2S_CLOCK_GENERATOR 7 -//#define I2S1_CLOCK_GENERATOR 8 -//#define PIN_I2S_MCK (9u) -#define PIN_I2S_SCK (20u) -#define PIN_I2S_FS (21u) -#define PIN_I2S_SD (19u) -//#define PIN_I2S1_MCK (10u) -//#define PIN_I2S1_SCK (11u) -//#define PIN_I2S1_SD (8u) -#endif - -#ifdef __cplusplus -} -#endif - - -/*---------------------------------------------------------------------------- - * Arduino objects - C++ only - *----------------------------------------------------------------------------*/ - -#ifdef __cplusplus - -/* ========================= - * ===== SERCOM DEFINITION - * ========================= -*/ -extern SERCOM sercom0; -extern SERCOM sercom1; -extern SERCOM sercom2; -extern SERCOM sercom3; -extern SERCOM sercom4; -extern SERCOM sercom5; - -extern Uart Serial1; -extern Uart Serial2; -#if (SAMD21 || SAMC21 || SAML21) -extern Uart Serial3; -#endif - -#endif - -// These serial port names are intended to allow libraries and architecture-neutral -// sketches to automatically default to the correct port name for a particular type -// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, -// the first hardware serial port whose RX/TX pins are not dedicated to another use. -// -// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor -// -// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial -// -// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library -// -// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. -// -// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX -// pins are NOT connected to anything by default. -#if (!SAMC21) - #define SERIAL_PORT_USBVIRTUAL SerialUSB -#endif -// SERIAL_PORT_MONITOR seems to be used only by the USB Host library (as of 1.6.5). -// It normally allows debugging output on the USB programming port, while the USB host uses the USB native port. -// The programming port is connected to a hardware UART through a USB-Serial bridge (EDBG chip) on the Zero. -// Boards that do not have the EDBG chip will have to connect a USB-TTL serial adapter to 'Serial' to get -// the USB Host debugging output. -#if (SAMC21) - #define SERIAL_PORT_MONITOR Serial2 -#else - #define SERIAL_PORT_MONITOR Serial1 -#endif - -// Serial has no physical pins broken out, so it's not listed as HARDWARE port -#if (SAMC21) - #define SERIAL_PORT_HARDWARE Serial2 - #define SERIAL_PORT_HARDWARE_OPEN Serial2 -#else - #define SERIAL_PORT_HARDWARE Serial1 - #define SERIAL_PORT_HARDWARE_OPEN Serial1 -#endif - -// The Xeno does not have the EDBG support chip, which provides a USB-UART bridge -// accessible using Serial (the Arduino serial monitor is normally connected to this). -// So, the USB virtual serial port (SerialUSB) must be used to communicate with the host. -// Because most sketches use Serial to print to the monitor, it is aliased to SerialUSB. -// Remember to use while(!Serial); to wait for a connection before Serial printing. -#if (SAMC21) - #define Serial Serial1 -#else - // When USB CDC is enabled, Serial refers to SerialUSB, otherwise it refers to Serial1. - #if defined(CDC_ONLY) || defined(CDC_HID) || defined(WITH_CDC) - #define Serial SerialUSB - #else - #define Serial Serial1 - #endif -#endif - -#endif /* _VARIANT_MATTAIRTECH_XENO_MINI_ */ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* + * Modified 29 January 2018 by Justin Mattair + * for MattairTech boards (www.mattairtech.com) + * + * See README.md for documentation and pin mapping information + */ + +#ifndef _VARIANT_GENERIC_XX1G_ +#define _VARIANT_GENERIC_XX1G_ + +/* The definitions here need the MattairTech SAMD core >=1.6.8. + * The format is different than the stock Arduino SAMD core, + * which uses ARDUINO_SAMD_VARIANT_COMPLIANCE instead. + */ +#define MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE 10608 + +/*---------------------------------------------------------------------------- + * Board/Clock Configuration + *----------------------------------------------------------------------------*/ + +/* Master clock frequency (also Fcpu frequency). With the D51, this can be + * either 120000000ul or 48000000ul (selected in the menu). See README.md. + */ +#define VARIANT_MCK (F_CPU) + +/* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ + * must also be defined with the external crystal frequency in Hertz. + */ +#define HS_CRYSTAL_FREQUENCY_HERTZ 24000000UL + +/* If the PLL is used (CLOCKCONFIG_32768HZ_CRYSTAL, or CLOCKCONFIG_HS_CRYSTAL + * defined), then PLL_FRACTIONAL_ENABLED can be defined, which will result in + * a more accurate 48MHz output frequency at the expense of increased jitter. + */ +//#define PLL_FRACTIONAL_ENABLED + +/* If both PLL_FAST_STARTUP and CLOCKCONFIG_HS_CRYSTAL are defined, the crystal + * will be divided down to 1MHz - 2MHz, rather than 32KHz - 64KHz, before being + * multiplied by the PLL. This will result in a faster lock time for the PLL, + * however, it will also result in a less accurate PLL output frequency if the + * crystal is not divisible (without remainder) by 1MHz. In this case, define + * PLL_FRACTIONAL_ENABLED as well. + */ +//#define PLL_FAST_STARTUP + +/* The fine calibration value for DFLL open-loop mode is defined here. + * The coarse calibration value is loaded from NVM OTP (factory calibration values). + */ +#define NVM_SW_CALIB_DFLL48M_FINE_VAL (512) + +/* Define CORTEX_M_CACHE_ENABLED to enable the Cortex M cache (D51 only). + */ +#define CORTEX_M_CACHE_ENABLED + +/* When the battery charger (CHG) is installed, the charge status is available on pin 18 (A18, STA), + * which drives low (open-drain) when the battery is charging. Defining BATTERY_CHARGER_INSTALLED + * will prevent pin A18 from being configured as an output, thus avoiding contention. + */ +#define BATTERY_CHARGER_INSTALLED + +/* When the accelerometer/gyroscope/magnetometer (IMU) is installed, all three interrupt outputs + * are tied together and connected to pin 32 (B22, INT), which by default drives low in a push-pull, + * active-high configuration until it is configured otherwise (to open-drain, active-low for example). + * Defining IMU_INSTALLED will prevent pin B22 from being configured as an output, thus avoiding + * contention. + */ +#define IMU_INSTALLED + +/* When the Vin regulator (5V) is installed, an analog comparator (Rev B only) is used to drive the Vbus + * ideal diode enable pin (EN) low, which disconnects Vbus from VccH. The Vbus voltage divider, which is + * available on pin 6 (A6, VU), is also connected to the same enable pin. Defining VIN_5V_REGULATOR_INSTALLED + * will prevent pin A6 from being configured as an output, thus avoiding contention. + */ +#define VIN_5V_REGULATOR_INSTALLED + + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" +#include "sam.h" + +#ifdef __cplusplus +#include "SERCOM.h" +#include "Uart.h" +#endif // __cplusplus + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +/*---------------------------------------------------------------------------- + * Pins + *----------------------------------------------------------------------------*/ + +// Number of pins defined in PinDescription array +#define NUM_PIN_DESCRIPTION_ENTRIES (36u) + +#define PINS_COUNT NUM_PIN_DESCRIPTION_ENTRIES +#define NUM_DIGITAL_PINS PINS_COUNT +#define NUM_ANALOG_INPUTS (14u) + +#if (SAMD21 || SAMC21) +#define NUM_ANALOG_OUTPUTS (1u) +#elif (SAMD51 || SAML21) +#define NUM_ANALOG_OUTPUTS (2u) +#else +#error "variant.h: Unsupported chip" +#endif + +#define analogInputToDigitalPin(p) (p) + +#define digitalPinToPort(P) ( &(PORT->Group[g_APinDescription[P].ulPort]) ) +#define digitalPinToBitMask(P) ( 1 << g_APinDescription[P].ulPin ) +//#define analogInPinToBit(P) ( ) +#define portOutputRegister(port) ( &(port->OUT.reg) ) +#define portInputRegister(port) ( &(port->IN.reg) ) +#define portModeRegister(port) ( &(port->DIR.reg) ) +#define digitalPinHasPWM(P) ( (g_APinDescription[P].ulPinAttribute & PIN_ATTR_TIMER_PWM) == PIN_ATTR_TIMER_PWM ) + +/* + * digitalPinToTimer(..) is AVR-specific and is not defined for SAMD + * architecture. If you need to check if a pin supports PWM you must + * use digitalPinHasPWM(..). + * + * https://github.com/arduino/Arduino/issues/1833 + */ +// #define digitalPinToTimer(P) + +/* LEDs + * None of these defines are currently used by the core. + * The Xeno Mini onboard LED is on pin 34. + * The RX and TX LEDs are not present. + * You may optionally add them to any free pins. + */ +#define PIN_LED_13 (34u) +#define PIN_LED_RXL (20u) +#define PIN_LED_TXL (21u) +#define PIN_LED PIN_LED_13 +#define PIN_LED2 PIN_LED_RXL +#define PIN_LED3 PIN_LED_TXL +#define LED_BUILTIN PIN_LED_13 + + +/* + * Analog pins + */ +#define PIN_A0 (0ul) +#define PIN_A1 (1ul) +#define PIN_A2 (2ul) +#define PIN_A3 (3ul) +#define PIN_A4 (4ul) +#define PIN_A5 (5ul) +#define PIN_A6 (6ul) +#define PIN_A7 (7ul) +#define PIN_A8 (8ul) +#define PIN_A9 (9ul) +#define PIN_A10 (10ul) +#define PIN_A11 (11ul) +#define PIN_A34 (34ul) +#define PIN_A35 (35ul) +#define PIN_DAC0 (2ul) +#if (SAMD51 || SAML21) +#define PIN_DAC1 (5ul) +#endif + +static const uint8_t A0 = PIN_A0; +static const uint8_t A1 = PIN_A1; +static const uint8_t A2 = PIN_A2; +static const uint8_t A3 = PIN_A3; +static const uint8_t A4 = PIN_A4; +static const uint8_t A5 = PIN_A5; +static const uint8_t A6 = PIN_A6; +static const uint8_t A7 = PIN_A7; +static const uint8_t A8 = PIN_A8; +static const uint8_t A9 = PIN_A9; +static const uint8_t A10 = PIN_A10; +static const uint8_t A11 = PIN_A11; +static const uint8_t A34 = PIN_A34; +static const uint8_t A35 = PIN_A35; +static const uint8_t DAC0 = PIN_DAC0; +#if (SAMD51 || SAML21) +static const uint8_t DAC1 = PIN_DAC1; +#endif + +#define ADC_RESOLUTION 12 + +// #define REMAP_ANALOG_PIN_ID(pin) if ( pin < A0 ) pin += A0 + +/* Set default analog voltage reference */ +#define VARIANT_AR_DEFAULT AR_DEFAULT + +/* Reference voltage pins (define even if not enabled with PIN_ATTR_REF in the PinDescription table) */ +#define REFA_PIN (3ul) +#define REFB_PIN (4ul) +#if (SAMD51) +#define REFC_PIN (6ul) +#endif + + +// The ATN pin may be used in the future as the first SPI chip select. +// On boards that do not have the Arduino physical form factor, it can to set to any free pin. +#define PIN_ATN (27ul) +static const uint8_t ATN = PIN_ATN; + + +/* + * Serial interfaces + */ +#if (defined(THREE_UART) && SAMD51) + #error "variant.h: Only two UARTs are available with the D51. Please choose a TWO_UART_* option" +#endif + +// Serial1 +#define PIN_SERIAL1_TX (0ul) +#define PIN_SERIAL1_RX (1ul) +#define PAD_SERIAL1_TX (UART_TX_PAD_0) +#define PAD_SERIAL1_RX (SERCOM_RX_PAD_1) + +#define SERCOM_INSTANCE_SERIAL1 &sercom4 + +// Serial2 +#define PIN_SERIAL2_TX (12u) +#define PIN_SERIAL2_RX (13u) +#define PAD_SERIAL2_TX (UART_TX_PAD_0) +#define PAD_SERIAL2_RX (SERCOM_RX_PAD_1) + +#define SERCOM_INSTANCE_SERIAL2 &sercom2 + +// Serial3 (a third serial is not available with the D51 on this board) +#define PIN_SERIAL3_TX (18ul) +#define PIN_SERIAL3_RX (19ul) +#define PAD_SERIAL3_TX (UART_TX_PAD_2) +#define PAD_SERIAL3_RX (SERCOM_RX_PAD_3) + +#define SERCOM_INSTANCE_SERIAL3 &sercom3 + + +/* + * SPI Interfaces + */ +#if defined(TWO_SPI) +#define SPI_INTERFACES_COUNT 2 +#elif defined(THREE_SPI) +#define SPI_INTERFACES_COUNT 3 +#else +#define SPI_INTERFACES_COUNT 1 +#endif + +#define PIN_SPI_MISO (9u) +#define PIN_SPI_MOSI (8u) +#define PIN_SPI_SCK (11u) +#define PIN_SPI_SS (10u) +#define PERIPH_SPI sercom0 +#define PAD_SPI_TX SPI_PAD_0_SCK_3 +#define PAD_SPI_RX SERCOM_RX_PAD_1 + +static const uint8_t SS = PIN_SPI_SS ; // The SERCOM SS PAD is available on this pin but HW SS isn't used. Set here only for reference. +static const uint8_t MOSI = PIN_SPI_MOSI ; +static const uint8_t MISO = PIN_SPI_MISO ; +static const uint8_t SCK = PIN_SPI_SCK ; + +#if (SAMD51) +#define PIN_SPI1_MISO (21u) +#define PIN_SPI1_MOSI (23u) +#define PIN_SPI1_SCK (22u) +#define PIN_SPI1_SS (20u) +#define PAD_SPI1_TX SPI_PAD_0_SCK_1 +#define PAD_SPI1_RX SERCOM_RX_PAD_3 +#else +#define PIN_SPI1_MISO (21u) +#define PIN_SPI1_MOSI (22u) +#define PIN_SPI1_SCK (23u) +#define PIN_SPI1_SS (20u) +#define PAD_SPI1_TX SPI_PAD_0_SCK_1 +#define PAD_SPI1_RX SERCOM_RX_PAD_3 +#endif +#define PERIPH_SPI1 sercom5 + +static const uint8_t SS1 = PIN_SPI1_SS ; // The SERCOM SS PAD is available on this pin but HW SS isn't used. Set here only for reference. +static const uint8_t MOSI1 = PIN_SPI1_MOSI ; +static const uint8_t MISO1 = PIN_SPI1_MISO ; +static const uint8_t SCK1 = PIN_SPI1_SCK ; + + +/* + * Wire Interfaces + */ +#if defined(TWO_WIRE) +#define WIRE_INTERFACES_COUNT 2 +#elif defined(THREE_WIRE) +#define WIRE_INTERFACES_COUNT 3 +#else +#define WIRE_INTERFACES_COUNT 1 +#endif + +#define PIN_WIRE_SDA (16u) +#define PIN_WIRE_SCL (17u) +#define PERIPH_WIRE sercom1 +#if (SAMD51) + #define WIRE_STOP_DETECTED_HANDLER SERCOM1_0_Handler + #define WIRE_ADDRESS_MATCH_HANDLER SERCOM1_1_Handler + #define WIRE_DATA_READY_HANDLER SERCOM1_2_Handler +#else + #define WIRE_IT_HANDLER SERCOM1_Handler +#endif + +static const uint8_t SDA = PIN_WIRE_SDA; +static const uint8_t SCL = PIN_WIRE_SCL; + +#define PIN_WIRE1_SDA (22u) +#define PIN_WIRE1_SCL (23u) +#define PERIPH_WIRE1 sercom5 +#if (SAMD51) + #define WIRE1_STOP_DETECTED_HANDLER SERCOM5_0_Handler + #define WIRE1_ADDRESS_MATCH_HANDLER SERCOM5_1_Handler + #define WIRE1_DATA_READY_HANDLER SERCOM5_2_Handler +#else + #define WIRE1_IT_HANDLER SERCOM5_Handler +#endif + +static const uint8_t SDA1 = PIN_WIRE1_SDA; +static const uint8_t SCL1 = PIN_WIRE1_SCL; + + +/* + * USB - Define PIN_USB_HOST_ENABLE to assert the defined pin to + * PIN_USB_HOST_ENABLE_VALUE during startup. Leave undefined to disable this pin. + */ +#define PIN_USB_DM (24ul) +#define PIN_USB_DP (25ul) +//#define PIN_USB_HOST_ENABLE (19ul) +#define PIN_USB_HOST_ENABLE_VALUE 0 + +/* + * I2S Interfaces + * SAMD51, PDM, and MCLK support will be added hopefully March 2018 + */ + +#if (SAMD51) +// On the SAMD51, device 0 is TX only using SDO (PIN_I2S_SD), and device 1 is RX only using SDI (PIN_I2S1_SD) +#define I2S_INTERFACES_COUNT 2 +#define I2S_DEVICE 0 +#define I2S1_DEVICE 1 +#define I2S_CLOCK_GENERATOR 7 +#define I2S1_CLOCK_GENERATOR 7 +// TX +#define PIN_I2S_MCK (8u) +#define PIN_I2S_SCK (10u) +#define PIN_I2S_FS (9u) +#define PIN_I2S_SD (11u) // SDO (TX) +// RX (must use clock 0) +#define PIN_I2S1_MCK (8u) +#define PIN_I2S1_SCK (10u) +#define PIN_I2S1_FS (9u) +#define PIN_I2S1_SD (14u) // SDI (RX) + +#else +#define I2S_INTERFACES_COUNT 1 +#define I2S_DEVICE 0 +//#define I2S1_DEVICE 1 +#define I2S_CLOCK_GENERATOR 7 +//#define I2S1_CLOCK_GENERATOR 8 +//#define PIN_I2S_MCK (9u) +#define PIN_I2S_SCK (20u) +#define PIN_I2S_FS (21u) +#define PIN_I2S_SD (19u) +//#define PIN_I2S1_MCK (10u) +//#define PIN_I2S1_SCK (11u) +//#define PIN_I2S1_SD (8u) +#endif + +#ifdef __cplusplus +} +#endif + + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#ifdef __cplusplus + +/* ========================= + * ===== SERCOM DEFINITION + * ========================= +*/ +extern SERCOM sercom0; +extern SERCOM sercom1; +extern SERCOM sercom2; +extern SERCOM sercom3; +extern SERCOM sercom4; +extern SERCOM sercom5; + +extern Uart Serial1; +extern Uart Serial2; +#if (SAMD21 || SAMC21 || SAML21) +extern Uart Serial3; +#endif + +#endif + +// These serial port names are intended to allow libraries and architecture-neutral +// sketches to automatically default to the correct port name for a particular type +// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, +// the first hardware serial port whose RX/TX pins are not dedicated to another use. +// +// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor +// +// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial +// +// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library +// +// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. +// +// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX +// pins are NOT connected to anything by default. +#if (!SAMC21) + #define SERIAL_PORT_USBVIRTUAL SerialUSB +#endif +// SERIAL_PORT_MONITOR seems to be used only by the USB Host library (as of 1.6.5). +// It normally allows debugging output on the USB programming port, while the USB host uses the USB native port. +// The programming port is connected to a hardware UART through a USB-Serial bridge (EDBG chip) on the Zero. +// Boards that do not have the EDBG chip will have to connect a USB-TTL serial adapter to 'Serial' to get +// the USB Host debugging output. +#if (SAMC21) + #define SERIAL_PORT_MONITOR Serial2 +#else + #define SERIAL_PORT_MONITOR Serial1 +#endif + +// Serial has no physical pins broken out, so it's not listed as HARDWARE port +#if (SAMC21) + #define SERIAL_PORT_HARDWARE Serial2 + #define SERIAL_PORT_HARDWARE_OPEN Serial2 +#else + #define SERIAL_PORT_HARDWARE Serial1 + #define SERIAL_PORT_HARDWARE_OPEN Serial1 +#endif + +// The Xeno does not have the EDBG support chip, which provides a USB-UART bridge +// accessible using Serial (the Arduino serial monitor is normally connected to this). +// So, the USB virtual serial port (SerialUSB) must be used to communicate with the host. +// Because most sketches use Serial to print to the monitor, it is aliased to SerialUSB. +// Remember to use while(!Serial); to wait for a connection before Serial printing. +#if (SAMC21) + #define Serial Serial1 +#else + // When USB CDC is enabled, Serial refers to SerialUSB, otherwise it refers to Serial1. + #if defined(CDC_ONLY) || defined(CDC_HID) || defined(WITH_CDC) + #define Serial SerialUSB + #else + #define Serial Serial1 + #endif +#endif + +#endif /* _VARIANT_GENERIC_XX1G_ */ diff --git a/variants/Xeno/README.md b/variants/Generic_xx1J/README.md similarity index 98% rename from variants/Xeno/README.md rename to variants/Generic_xx1J/README.md index 68dc7c217..13325052a 100644 --- a/variants/Xeno/README.md +++ b/variants/Generic_xx1J/README.md @@ -1,263 +1,263 @@ -# MattairTech Xeno (ATSAMD51J/ATSAMD21J/ATSAML21J/ATSAMC21J) - -``` -============== MattairTech Xeno (ATSAMD51J/ATSAMD21J/ATSAML21J/ATSAMC21J) =============== -Alt COM PWM Analog INT Arduino* Arduino* INT Analog PWM COM Alt -========================================================================================= - ------------------- -INT1: | no / B3 | 49 I O VBAT / SDCD+ (SD) -MOTOR_ERROR/IMU_INT/AUX_SW_ERROR | external --- B5 | 48 I INT1+ - | pin \ B4 | 47 3SEN+ (3.3Vsw) -XBDS (XBEE) O 0 | B0 RST | BOOT -MECS+ (MEM) O 1 | B1 A31 | 31 RX1 IO (PROG) / XBDO+ (XBEE) -DAC0 O I 2 | A2 A30 | 30 CLK+ (PROG) -REFA* O 3 | A3 A28(D21/C21)| 28 SHCS (SPI) -3SVO (3.3Vsw) / REFB O 4 | A4 A27 | 27 I INT2 (XBEE, I2C) -DAC1* O 5 | A5 X34 (B2)| 34 O TC~ LED+ / XBRT (XBEE) -CMVO (CUR) O 6 | B6 X33(B16)| 33 I INT0+ / BTN -ASEN+ (HOST) O 7 | B7 X32(B17)| 32 I TC~ MOPS+ (MOTOR) - TX3 O I 8 | B8 A23 | 23 TC~ - RX3 O I 9 | B9 A22 | 22 TC~ -VHDV (VccH) MOSI1 O I 10 | A10 A21 | 21 TC~ -VBDV+ (Vbus) SCK1 O I 11 | A11 A20 | 20 I TC~ -XBCT (XBEE) SDA1/MISO1 TCC~ I 12 | A12 A19 | 19 TC~ CMRI (CUR) - SCL1/SS1 TCC~ I 13 | A13 A18 | 18 TC~ TX1 XBDI+ (XBEE) -HSEN (HOST) TC~ I 14 | B14 A17 | 17 SCL SCL+ (I2C) -BKFS+ (BUCK) TC~ 15 | B15 A16 | 16 SDA SDA+ (I2C) - | Vaux 3.3V | -USB D- (+) / CAN TX | A24 _____ VccL | ! VccL is 3.3V by default. -USB D+ (+) / CAN RX | A25 | | VccH | DO NOT exceed 3.6V on VccL or - | Gnd | USB | Gnd | any IO pin with the D51, D21, - USB: D51/D21/L21 only ------------------- or L21 installed. 5V allowed - CAN: D51/C21 only ONLY with the C21 installed. - 1------------------- By default, VccH is 5V. -MISO+ (SD, MEM, SPI) 43 (S43) | B30 Vcon | -SCK+ (SD, MEM, SPI) 44 (S44) | B23 SPI B22 | 45 (S45) MOSI+ (SD, MEM, SPI) -SHCS(SPI) / SDCS+(SD) 28/46 (S46) | A28(B31) Gnd | - ------------------- - - 1------------------- -L0+ (LVL) TX2 O I 35 (L35) | A6 A7 | 36 (L36) I O RX2 L1+ (LVL) -L2+ (LVL) TCC~ O NMI 37 (L37) | A8 LEVEL A9 | 38 (L38) O TCC~ L3+ (LVL) - | VccH SHIFT VccH | - | Gnd Gnd | -B1+ (MOTOR) TCC~ 39 (M39) | B10 B11 | 40 (M40) TCC~ B2+ (MOTOR) -A1+ (MOTOR) TCC~ 41 (M41) | B12 MOTOR B13 | 42 (M42) TCC~ A2+ (MOTOR) - | Vmotor Gnd | - ------------------- - -* Most pins can be used for more than one function. The same port pin number printed on - the board is also used in Arduino (without the 'A') for all of the Arduino functions. - DAC1 is present only on the D51 and L21. With the D51, REFA should be tied to VccL. - -+ This alternate function is enabled by default if installed. Thus, the associated header - pin cannot be used unless a solder jumper is available to disable the function. - -~ D21/L21/C21: 3 TCC (4,2,2 ch.), 5 TC (2 ch.). D51: 5 TCC (6,4,3,2,2 ch.), 6 TC (2 ch.). - The D51 adds timers to pins A10, A11, A30, A31, B30, B31, A6, A7, A16, A17, B8, and B9, - however, the timer on pin B17 is not present. - -I For the D51, the interrupt on pin A27 is moved to pin B15. - -* The D51 SERCOM configuration is different for UART and SPI. Third UART not available. - TX1=8, RX1=9, TX2=4, RX2=5, MOSI=23, MISO=21, SCK=22, MOSI1=38, MISO1=11, SCK1=37. - -Silkscreen Legend: - Top: A circle around pin is analog function, '~' is timer, small 'I' is interrupt - Bottom: A box around pin means 'Other' function enabled by default depending on variant -``` - - -## Board Configuration Notes - -* **Crystals** - * Either the 32.768KHz crystal or the 16MHz crystal can be used. These pins do not route to headers. - * The bootloader does not use an external crystal by default. Double-tap the reset button to enter manually. - -* **LED (LED_BUILTIN)** - * Bring the pin HIGH to turn the LED on. - * The LED is enabled (solder jumper) by default. - -* **Button (BUTTON_BUILTIN)** - * Button is connected to the Reset pin by default, but can be connected to pin 33 (B16) via solder jumper J2. - * Pressing the button will bring the pin LOW. The pullup must be enabled first. - * A debouncing capacitor is connected, so delay reading the pin at least 10ms after turning on the pullup. - -* **GPIO** - * All pins (including analog) support INPUT, OUTPUT, INPUT_PULLUP, and INPUT_PULLDOWN. - * When PER_ATTR_DRIVE_STRONG is set for the pin (enabled by default), each pin can source or sink a maximum of: - * **D21:** 7mA high, 10mA low - * **L21:** 5mA high, 6mA low (8 high drive pins: 10mA high, 12mA low) - * **C21:** 6mA high, 10mA low (2 high drive pins (A10, A11): 12mA high, 20mA low) - * **D51:** 8mA high, 8mA low - * Internal pull-up and pull-down resistors of 20-60 Kohms (40Kohm typ., disconnected by default). - -* **Analog Inputs** - * Up to 18 pins can be configured as ADC analog inputs. - * Each pin measures from ground to 3.3 volts by default. - * Each pin provides 10 bits of resolution (1024 values) by default. - * 12-bit resolution supported by using the analogReadResolution() function. - * The upper end of the measurement range can be changed using the analogReference() function. - * A reference voltage can be connected to REFA. In this case, the capacitors should be enabled via solder jumper J33. - -* **DAC** - * D21/C21: One 10-bit 350Ksps analog output is available on pin 2. - * L21/D51: Two 12-bit 1Msps analog outputs are available on pins 2 and 5. - -* **PWM** - * Up to 18 pins can be configured as PWM outputs (29 for D51). - * Each pin provides 8 bits of resolution (256 values) by default. - * 12-bit resolution supported by using the analogWriteResolution() function. - -* **External Interrupts** - * Up to 16 pins can be configured with external interrupts. - -* **SERCOM** - * 6 SERCOM are available. - * Up to 3 UART instances (two for D51). More in a future release. - * Up to 2 SPI instances. - * Up to 2 WIRE (I2C) instances. - * The WIRE pullup resistors are enabled by default. - -* **Special Notes for D51** - * Due to errata with the D51 DAC, VccL must be routed to the REFA pin with an external jumper wire. - * In order to use the SPI bus (Micro SD, optional memory device, SPI mode of Xbee radio): - * Needed because SERCOM5 on the D51 must use IOSET2. - * Solder a jumper wire between A21 and B30 (S43, pin 1 of the SPI header, MISO). - * Solder a jumper wire between A23 and B22 (S45, pin 4 of the SPI header, MOSI). - * Solder a jumper wire between A22 and B23 (S44, pin 3 of the SPI header, SCK). - * B22, B23, and B30 cannot be used for other purposes (leave floating) - - * In order to use the Xbee radio UART interface (use SPI mode to avoid this fix): - * Needed because D51 UART transmit data pinout options (TXPO) do not include TX on pad 2. - * Solder a jumper wire between B8 (SERCOM4, TX pad 0) and A18 (XBDI). Solder a jumper wire between B9 (SERCOM4, RX pad 1) and A31 (XBDO). - * A18 and A31 cannot be used for other purposes (leave floating) - - - -## PinDescription table format - -### Note that in 1.6.18-beta-b1 a new compact table format was added. -The standard PinDescription table uses 12 bytes per pin. Define PIN_DESCRIPTION_TABLE_SIMPLE -to use a more compact format that uses only 4 bytes per pin (currently only available -for the D11 chips). In this case, the PinType, PinAttribute, and GCLKCCL columns are not used -(they are not required). Additionally, the SetPortPin() and SetExtIntADC() macros are used to -pack Port and Pin into the PortPin column, and ExtInt and ADCChannelNumber into the ExtIntADC -column. Note that external libraries that reference the PinDescription table directly (uncommon) -will no longer work. This define can be combined with the PIN_MAP_COMPACT define, which -is available in variant.h of the D11 variants. This can save from 10's to over 200 bytes. - -### Note that a new column (GCLKCCL) was added for 1.6.8-beta-b0. -MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE in variant.h is used to track versions. -If using board variant files with the old format, the new core will still read the -table the old way, losing any new features introduced by the new column. Additionally, -new definitions have been added for D51, L21, and C21 support. - -### Each pin can have multiple functions. -The PinDescription table describes how each of the pins can be used by the Arduino -core. Each pin can have multiple functions (ie: ADC input, digital output, PWM, -communications, etc.), and the PinDescription table configures which functions can -be used for each pin. This table is mainly accessed by the pinPeripheral function in -wiring_private.c, which is used to attach a pin to a particular peripheral function. -The communications drivers (ie: SPI, I2C, and UART), analogRead(), analogWrite(), -analogReference(), attachInterrupt(), and pinMode() all call pinPeripheral() to -verify that the pin can perform the function requested, and to configure the pin for -that function. Most of the contents of pinMode() are now in pinPeripheral(). - -### Pin Mapping -There are different ways that pins can be mapped. Typically, there is no relation -between the arduino pin number used, and the actual port pin designator. Thus, the -pcb must be printed with the arduino numbering, otherwise, if the port pin is printed, -a cross reference table is needed to find the arduino pin number. However, this results -in the least amount of space used by the table. Another method, used by default by the -MT-D21E and MT-D11, maps Arduino pin numbers to the actual port pin number (ie: Arduino -pin 28 = Port A28). This works well when there is only one port (or if the PORTB pins -are used for onboard functions and not broken out). PIO_NOT_A_PIN entries must be added -for pins that are used for other purposes or for pins that do not exist (especially the -D11), so some FLASH space may be wasted. For an example of both types, see variant.cpp -from the MT-D11 variant. The Xeno combines both methods, using the actual port pin -designators from both PORTA and PORTB for arduino numbers 0-31 (ie: B1=1, A2=2), then -using arduino numbering only above 31. For 0-31 only one pin from PORTA or PORTB can be -used, leaving the other pin for some number above 31. - -**See [WVariant.h](https://github.com/mattairtech/ArduinoCore-samd/tree/master/cores/arduino/WVariant.h) for the definitions used in the table.** - -### Port -This is the port (ie: PORTA). Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### Pin -This is the pin (bit) within the port. Valid values are 0-31. Not used with -PIN_DESCRIPTION_TABLE_SIMPLE. - -### SetPortPin() -When PIN_DESCRIPTION_TABLE_SIMPLE is defined, Port and Pin are combined into one column -using the SetPortPin() packing macro: SetPortPin(PORTA, 2). If the pin is not usable, -use SetPortPin(NOT_A_PORT, 0). - -### PinType -This indicates what peripheral function the pin can be attached to. In most cases, -this is PIO_MULTI, which means that the pin can be anything listed in the PinAttribute -field. It can also be set to a specific peripheral. In this case, any attempt to -configure the pin (using pinPeripheral or pinMode) as anything else will fail (and -pinPeripheral will return -1). This can be used to prevent accidental re-configuration -of a pin that is configured for only one function (ie: USB D- and D+ pins). If a pin -is not used or does not exist, PIO_NOT_A_PIN must be entered in this field. See -WVariant.h for valid entries. These entries are also used as a parameter to -pinPeripheral() with the exception of PIO_NOT_A_PIN and PIO_MULTI. The pinMode function -now calls pinPeripheral() with the desired mode. Note that this field is not used to -select between the different peripherals possible with each of the SERCOM and TIMER -functions. PeripheralAttribute is now used for this. When PIN_DESCRIPTION_TABLE_SIMPLE -is defined, PinType is not used (the pin is treated as PIO_MULTI). - -### PeripheralAttribute -This is an 8-bit bitfield used for various peripheral configuration. It is primarily -used to select between the different peripherals possible with each of the SERCOM and -TIMER functions. TIMER pins are individual, while SERCOM uses a group of two to four -pins. This group of pins can span both peripherals. For example, pin 19 (SPI1 SCK) on -the MT-D21E uses PER_ATTR_SERCOM_ALT while pin 22 (SPI1 MISO) uses PER_ATTR_SERCOM_STD. -Both TIMER and SERCOM can exist for each pin. This bitfield is also used to set the -pin drive strength and the input buffer configuration (ie: totem-pole, open-drain, -buskeeper, etc.). Starting with 1.6.8, the ADC instance on the D51 and C21 (there are -two) is also selected here. Note that the D51 adds a third timer attribute and -requires consultation of the datasheet IOSET tables. See WVariant.h for valid entries. - -### PinAttribute -This is a 32-bit bitfield used to list all of the valid peripheral functions that a -pin can attach to. This includes GPIO functions like PIN_ATTR_OUTPUT. Certain -attributes are shorthand for a combination of other attributes. PIN_ATTR_DIGITAL -includes all of the GPIO functions, while PIN_ATTR_TIMER includes both -PIN_ATTR_TIMER_PWM and PIN_ATTR_TIMER_CAPTURE (capture is not used yet). -PIN_ATTR_ANALOG is an alias to PIN_ATTR_ANALOG_ADC. This bitfield is useful for -limiting a pin to only input related functions or output functions. This allows a pin -to have a more flexible configuration, while restricting the direction (ie: to avoid -contention). See WVariant.h for valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### TCChannel -This is the TC/TCC channel (if any) assigned to the pin. Some TC channels are available -on multiple pins. In general, only one pin should be configured in the pinDescription -table per TC channel. Starting with 1.6.8, the timer type is now encoded in this column -to support the D51, L21 and C21, which use TC numbers starting at 0 (rather than 3 as on -the D21). See WVariant.h for valid entries. - -### ADCChannelNumber -This is the ADC channel (if any) assigned to the pin. The D51 and C21 each have two ADC -instances, which are selected in the PeripheralAttribute column. See WVariant.h for -valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### ExtInt -This is the interrupt (if any) assigned to the pin. Some interrupt numbers are -available on multiple pins. In general, only one pin should be configured in the -pinDescription table per interrupt number. Thus, for example, if an interrupt was -needed on pin 2, EXTERNAL_INT_2 can be moved from pin 18. See WVariant.h for valid -entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### SetExtIntADC() -When PIN_DESCRIPTION_TABLE_SIMPLE is defined, ExtInt and ADCChannelNumber are combined -into one column using the SetExtIntADC() packing macro: SetExtIntADC(EXTERNAL_INT_4, -ADC_Channel2). If the pin is not usable, use SetExtIntADC(EXTERNAL_INT_NONE, No_ADC_Channel). - -### GCLKCCL -This column was added in 1.6.8-beta-b0. It is not yet used. It will eventually support -the Analog Comparators (AC), the Configurable Custom Logic (CCL) peripherals of the D51, -L21 and C21, and the GCLK outputs (inputs) of all of the MCUs. Not used with -PIN_DESCRIPTION_TABLE_SIMPLE. +# MattairTech Xeno (ATSAMD51J/ATSAMD21J/ATSAML21J/ATSAMC21J) + +``` +============== MattairTech Xeno (ATSAMD51J/ATSAMD21J/ATSAML21J/ATSAMC21J) =============== +Alt COM PWM Analog INT Arduino* Arduino* INT Analog PWM COM Alt +========================================================================================= + ------------------- +INT1: | no / B3 | 49 I O VBAT / SDCD+ (SD) +MOTOR_ERROR/IMU_INT/AUX_SW_ERROR | external --- B5 | 48 I INT1+ + | pin \ B4 | 47 3SEN+ (3.3Vsw) +XBDS (XBEE) O 0 | B0 RST | BOOT +MECS+ (MEM) O 1 | B1 A31 | 31 RX1 IO (PROG) / XBDO+ (XBEE) +DAC0 O I 2 | A2 A30 | 30 CLK+ (PROG) +REFA* O 3 | A3 A28(D21/C21)| 28 SHCS (SPI) +3SVO (3.3Vsw) / REFB O 4 | A4 A27 | 27 I INT2 (XBEE, I2C) +DAC1* O 5 | A5 X34 (B2)| 34 O TC~ LED+ / XBRT (XBEE) +CMVO (CUR) O 6 | B6 X33(B16)| 33 I INT0+ / BTN +ASEN+ (HOST) O 7 | B7 X32(B17)| 32 I TC~ MOPS+ (MOTOR) + TX3 O I 8 | B8 A23 | 23 TC~ + RX3 O I 9 | B9 A22 | 22 TC~ +VHDV (VccH) MOSI1 O I 10 | A10 A21 | 21 TC~ +VBDV+ (Vbus) SCK1 O I 11 | A11 A20 | 20 I TC~ +XBCT (XBEE) SDA1/MISO1 TCC~ I 12 | A12 A19 | 19 TC~ CMRI (CUR) + SCL1/SS1 TCC~ I 13 | A13 A18 | 18 TC~ TX1 XBDI+ (XBEE) +HSEN (HOST) TC~ I 14 | B14 A17 | 17 SCL SCL+ (I2C) +BKFS+ (BUCK) TC~ 15 | B15 A16 | 16 SDA SDA+ (I2C) + | Vaux 3.3V | +USB D- (+) / CAN TX | A24 _____ VccL | ! VccL is 3.3V by default. +USB D+ (+) / CAN RX | A25 | | VccH | DO NOT exceed 3.6V on VccL or + | Gnd | USB | Gnd | any IO pin with the D51, D21, + USB: D51/D21/L21 only ------------------- or L21 installed. 5V allowed + CAN: D51/C21 only ONLY with the C21 installed. + 1------------------- By default, VccH is 5V. +MISO+ (SD, MEM, SPI) 43 (S43) | B30 Vcon | +SCK+ (SD, MEM, SPI) 44 (S44) | B23 SPI B22 | 45 (S45) MOSI+ (SD, MEM, SPI) +SHCS(SPI) / SDCS+(SD) 28/46 (S46) | A28(B31) Gnd | + ------------------- + + 1------------------- +L0+ (LVL) TX2 O I 35 (L35) | A6 A7 | 36 (L36) I O RX2 L1+ (LVL) +L2+ (LVL) TCC~ O NMI 37 (L37) | A8 LEVEL A9 | 38 (L38) O TCC~ L3+ (LVL) + | VccH SHIFT VccH | + | Gnd Gnd | +B1+ (MOTOR) TCC~ 39 (M39) | B10 B11 | 40 (M40) TCC~ B2+ (MOTOR) +A1+ (MOTOR) TCC~ 41 (M41) | B12 MOTOR B13 | 42 (M42) TCC~ A2+ (MOTOR) + | Vmotor Gnd | + ------------------- + +* Most pins can be used for more than one function. The same port pin number printed on + the board is also used in Arduino (without the 'A') for all of the Arduino functions. + DAC1 is present only on the D51 and L21. With the D51, REFA should be tied to VccL. + ++ This alternate function is enabled by default if installed. Thus, the associated header + pin cannot be used unless a solder jumper is available to disable the function. + +~ D21/L21/C21: 3 TCC (4,2,2 ch.), 5 TC (2 ch.). D51: 5 TCC (6,4,3,2,2 ch.), 6 TC (2 ch.). + The D51 adds timers to pins A10, A11, A30, A31, B30, B31, A6, A7, A16, A17, B8, and B9, + however, the timer on pin B17 is not present. + +I For the D51, the interrupt on pin A27 is moved to pin B15. + +* The D51 SERCOM configuration is different for UART and SPI. Third UART not available. + TX1=8, RX1=9, TX2=4, RX2=5, MOSI=23, MISO=21, SCK=22, MOSI1=38, MISO1=11, SCK1=37. + +Silkscreen Legend: + Top: A circle around pin is analog function, '~' is timer, small 'I' is interrupt + Bottom: A box around pin means 'Other' function enabled by default depending on variant +``` + + +## Board Configuration Notes + +* **Crystals** + * Either the 32.768KHz crystal or the 16MHz crystal can be used. These pins do not route to headers. + * The bootloader does not use an external crystal by default. Double-tap the reset button to enter manually. + +* **LED (LED_BUILTIN)** + * Bring the pin HIGH to turn the LED on. + * The LED is enabled (solder jumper) by default. + +* **Button (BUTTON_BUILTIN)** + * Button is connected to the Reset pin by default, but can be connected to pin 33 (B16) via solder jumper J2. + * Pressing the button will bring the pin LOW. The pullup must be enabled first. + * A debouncing capacitor is connected, so delay reading the pin at least 10ms after turning on the pullup. + +* **GPIO** + * All pins (including analog) support INPUT, OUTPUT, INPUT_PULLUP, and INPUT_PULLDOWN. + * When PER_ATTR_DRIVE_STRONG is set for the pin (enabled by default), each pin can source or sink a maximum of: + * **D21:** 7mA high, 10mA low + * **L21:** 5mA high, 6mA low (8 high drive pins: 10mA high, 12mA low) + * **C21:** 6mA high, 10mA low (2 high drive pins (A10, A11): 12mA high, 20mA low) + * **D51:** 8mA high, 8mA low + * Internal pull-up and pull-down resistors of 20-60 Kohms (40Kohm typ., disconnected by default). + +* **Analog Inputs** + * Up to 18 pins can be configured as ADC analog inputs. + * Each pin measures from ground to 3.3 volts by default. + * Each pin provides 10 bits of resolution (1024 values) by default. + * 12-bit resolution supported by using the analogReadResolution() function. + * The upper end of the measurement range can be changed using the analogReference() function. + * A reference voltage can be connected to REFA. In this case, the capacitors should be enabled via solder jumper J33. + +* **DAC** + * D21/C21: One 10-bit 350Ksps analog output is available on pin 2. + * L21/D51: Two 12-bit 1Msps analog outputs are available on pins 2 and 5. + +* **PWM** + * Up to 18 pins can be configured as PWM outputs (29 for D51). + * Each pin provides 8 bits of resolution (256 values) by default. + * 12-bit resolution supported by using the analogWriteResolution() function. + +* **External Interrupts** + * Up to 16 pins can be configured with external interrupts. + +* **SERCOM** + * 6 SERCOM are available. + * Up to 3 UART instances (two for D51). More in a future release. + * Up to 2 SPI instances. + * Up to 2 WIRE (I2C) instances. + * The WIRE pullup resistors are enabled by default. + +* **Special Notes for D51** + * Due to errata with the D51 DAC, VccL must be routed to the REFA pin with an external jumper wire. + * In order to use the SPI bus (Micro SD, optional memory device, SPI mode of Xbee radio): + * Needed because SERCOM5 on the D51 must use IOSET2. + * Solder a jumper wire between A21 and B30 (S43, pin 1 of the SPI header, MISO). + * Solder a jumper wire between A23 and B22 (S45, pin 4 of the SPI header, MOSI). + * Solder a jumper wire between A22 and B23 (S44, pin 3 of the SPI header, SCK). + * B22, B23, and B30 cannot be used for other purposes (leave floating) + + * In order to use the Xbee radio UART interface (use SPI mode to avoid this fix): + * Needed because D51 UART transmit data pinout options (TXPO) do not include TX on pad 2. + * Solder a jumper wire between B8 (SERCOM4, TX pad 0) and A18 (XBDI). Solder a jumper wire between B9 (SERCOM4, RX pad 1) and A31 (XBDO). + * A18 and A31 cannot be used for other purposes (leave floating) + + + +## PinDescription table format + +### Note that in 1.6.18-beta-b1 a new compact table format was added. +The standard PinDescription table uses 12 bytes per pin. Define PIN_DESCRIPTION_TABLE_SIMPLE +to use a more compact format that uses only 4 bytes per pin (currently only available +for the D11 chips). In this case, the PinType, PinAttribute, and GCLKCCL columns are not used +(they are not required). Additionally, the SetPortPin() and SetExtIntADC() macros are used to +pack Port and Pin into the PortPin column, and ExtInt and ADCChannelNumber into the ExtIntADC +column. Note that external libraries that reference the PinDescription table directly (uncommon) +will no longer work. This define can be combined with the PIN_MAP_COMPACT define, which +is available in variant.h of the D11 variants. This can save from 10's to over 200 bytes. + +### Note that a new column (GCLKCCL) was added for 1.6.8-beta-b0. +MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE in variant.h is used to track versions. +If using board variant files with the old format, the new core will still read the +table the old way, losing any new features introduced by the new column. Additionally, +new definitions have been added for D51, L21, and C21 support. + +### Each pin can have multiple functions. +The PinDescription table describes how each of the pins can be used by the Arduino +core. Each pin can have multiple functions (ie: ADC input, digital output, PWM, +communications, etc.), and the PinDescription table configures which functions can +be used for each pin. This table is mainly accessed by the pinPeripheral function in +wiring_private.c, which is used to attach a pin to a particular peripheral function. +The communications drivers (ie: SPI, I2C, and UART), analogRead(), analogWrite(), +analogReference(), attachInterrupt(), and pinMode() all call pinPeripheral() to +verify that the pin can perform the function requested, and to configure the pin for +that function. Most of the contents of pinMode() are now in pinPeripheral(). + +### Pin Mapping +There are different ways that pins can be mapped. Typically, there is no relation +between the arduino pin number used, and the actual port pin designator. Thus, the +pcb must be printed with the arduino numbering, otherwise, if the port pin is printed, +a cross reference table is needed to find the arduino pin number. However, this results +in the least amount of space used by the table. Another method, used by default by the +MT-D21E and MT-D11, maps Arduino pin numbers to the actual port pin number (ie: Arduino +pin 28 = Port A28). This works well when there is only one port (or if the PORTB pins +are used for onboard functions and not broken out). PIO_NOT_A_PIN entries must be added +for pins that are used for other purposes or for pins that do not exist (especially the +D11), so some FLASH space may be wasted. For an example of both types, see variant.cpp +from the MT-D11 variant. The Xeno combines both methods, using the actual port pin +designators from both PORTA and PORTB for arduino numbers 0-31 (ie: B1=1, A2=2), then +using arduino numbering only above 31. For 0-31 only one pin from PORTA or PORTB can be +used, leaving the other pin for some number above 31. + +**See [WVariant.h](https://github.com/mattairtech/ArduinoCore-samd/tree/master/cores/arduino/WVariant.h) for the definitions used in the table.** + +### Port +This is the port (ie: PORTA). Not used with PIN_DESCRIPTION_TABLE_SIMPLE. + +### Pin +This is the pin (bit) within the port. Valid values are 0-31. Not used with +PIN_DESCRIPTION_TABLE_SIMPLE. + +### SetPortPin() +When PIN_DESCRIPTION_TABLE_SIMPLE is defined, Port and Pin are combined into one column +using the SetPortPin() packing macro: SetPortPin(PORTA, 2). If the pin is not usable, +use SetPortPin(NOT_A_PORT, 0). + +### PinType +This indicates what peripheral function the pin can be attached to. In most cases, +this is PIO_MULTI, which means that the pin can be anything listed in the PinAttribute +field. It can also be set to a specific peripheral. In this case, any attempt to +configure the pin (using pinPeripheral or pinMode) as anything else will fail (and +pinPeripheral will return -1). This can be used to prevent accidental re-configuration +of a pin that is configured for only one function (ie: USB D- and D+ pins). If a pin +is not used or does not exist, PIO_NOT_A_PIN must be entered in this field. See +WVariant.h for valid entries. These entries are also used as a parameter to +pinPeripheral() with the exception of PIO_NOT_A_PIN and PIO_MULTI. The pinMode function +now calls pinPeripheral() with the desired mode. Note that this field is not used to +select between the different peripherals possible with each of the SERCOM and TIMER +functions. PeripheralAttribute is now used for this. When PIN_DESCRIPTION_TABLE_SIMPLE +is defined, PinType is not used (the pin is treated as PIO_MULTI). + +### PeripheralAttribute +This is an 8-bit bitfield used for various peripheral configuration. It is primarily +used to select between the different peripherals possible with each of the SERCOM and +TIMER functions. TIMER pins are individual, while SERCOM uses a group of two to four +pins. This group of pins can span both peripherals. For example, pin 19 (SPI1 SCK) on +the MT-D21E uses PER_ATTR_SERCOM_ALT while pin 22 (SPI1 MISO) uses PER_ATTR_SERCOM_STD. +Both TIMER and SERCOM can exist for each pin. This bitfield is also used to set the +pin drive strength and the input buffer configuration (ie: totem-pole, open-drain, +buskeeper, etc.). Starting with 1.6.8, the ADC instance on the D51 and C21 (there are +two) is also selected here. Note that the D51 adds a third timer attribute and +requires consultation of the datasheet IOSET tables. See WVariant.h for valid entries. + +### PinAttribute +This is a 32-bit bitfield used to list all of the valid peripheral functions that a +pin can attach to. This includes GPIO functions like PIN_ATTR_OUTPUT. Certain +attributes are shorthand for a combination of other attributes. PIN_ATTR_DIGITAL +includes all of the GPIO functions, while PIN_ATTR_TIMER includes both +PIN_ATTR_TIMER_PWM and PIN_ATTR_TIMER_CAPTURE (capture is not used yet). +PIN_ATTR_ANALOG is an alias to PIN_ATTR_ANALOG_ADC. This bitfield is useful for +limiting a pin to only input related functions or output functions. This allows a pin +to have a more flexible configuration, while restricting the direction (ie: to avoid +contention). See WVariant.h for valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. + +### TCChannel +This is the TC/TCC channel (if any) assigned to the pin. Some TC channels are available +on multiple pins. In general, only one pin should be configured in the pinDescription +table per TC channel. Starting with 1.6.8, the timer type is now encoded in this column +to support the D51, L21 and C21, which use TC numbers starting at 0 (rather than 3 as on +the D21). See WVariant.h for valid entries. + +### ADCChannelNumber +This is the ADC channel (if any) assigned to the pin. The D51 and C21 each have two ADC +instances, which are selected in the PeripheralAttribute column. See WVariant.h for +valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. + +### ExtInt +This is the interrupt (if any) assigned to the pin. Some interrupt numbers are +available on multiple pins. In general, only one pin should be configured in the +pinDescription table per interrupt number. Thus, for example, if an interrupt was +needed on pin 2, EXTERNAL_INT_2 can be moved from pin 18. See WVariant.h for valid +entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. + +### SetExtIntADC() +When PIN_DESCRIPTION_TABLE_SIMPLE is defined, ExtInt and ADCChannelNumber are combined +into one column using the SetExtIntADC() packing macro: SetExtIntADC(EXTERNAL_INT_4, +ADC_Channel2). If the pin is not usable, use SetExtIntADC(EXTERNAL_INT_NONE, No_ADC_Channel). + +### GCLKCCL +This column was added in 1.6.8-beta-b0. It is not yet used. It will eventually support +the Analog Comparators (AC), the Configurable Custom Logic (CCL) peripherals of the D51, +L21 and C21, and the GCLK outputs (inputs) of all of the MCUs. Not used with +PIN_DESCRIPTION_TABLE_SIMPLE. diff --git a/variants/Xeno/debug_scripts/SAMC21J15A.gdb b/variants/Generic_xx1J/debug_scripts/SAMC21J15A.gdb similarity index 97% rename from variants/Xeno/debug_scripts/SAMC21J15A.gdb rename to variants/Generic_xx1J/debug_scripts/SAMC21J15A.gdb index e26cd21fb..f24fcc094 100644 --- a/variants/Xeno/debug_scripts/SAMC21J15A.gdb +++ b/variants/Generic_xx1J/debug_scripts/SAMC21J15A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21j15" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21j15" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/Xeno/debug_scripts/SAMC21J16A.gdb b/variants/Generic_xx1J/debug_scripts/SAMC21J16A.gdb similarity index 97% rename from variants/Xeno/debug_scripts/SAMC21J16A.gdb rename to variants/Generic_xx1J/debug_scripts/SAMC21J16A.gdb index 6851f6b22..2f3ae4e2e 100644 --- a/variants/Xeno/debug_scripts/SAMC21J16A.gdb +++ b/variants/Generic_xx1J/debug_scripts/SAMC21J16A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21j16" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21j16" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/Xeno/debug_scripts/SAMC21J17A.gdb b/variants/Generic_xx1J/debug_scripts/SAMC21J17A.gdb similarity index 97% rename from variants/Xeno/debug_scripts/SAMC21J17A.gdb rename to variants/Generic_xx1J/debug_scripts/SAMC21J17A.gdb index 13dc5c5ed..d3973c1e9 100644 --- a/variants/Xeno/debug_scripts/SAMC21J17A.gdb +++ b/variants/Generic_xx1J/debug_scripts/SAMC21J17A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21j17" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21j17" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/Xeno/debug_scripts/SAMC21J18A.gdb b/variants/Generic_xx1J/debug_scripts/SAMC21J18A.gdb similarity index 97% rename from variants/Xeno/debug_scripts/SAMC21J18A.gdb rename to variants/Generic_xx1J/debug_scripts/SAMC21J18A.gdb index 81ea4cca2..5ac5ede3b 100644 --- a/variants/Xeno/debug_scripts/SAMC21J18A.gdb +++ b/variants/Generic_xx1J/debug_scripts/SAMC21J18A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21j18" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21j18" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/Xeno/debug_scripts/SAMD21J15A.gdb b/variants/Generic_xx1J/debug_scripts/SAMD21J15A.gdb similarity index 97% rename from variants/Xeno/debug_scripts/SAMD21J15A.gdb rename to variants/Generic_xx1J/debug_scripts/SAMD21J15A.gdb index 3e2147946..398b3f7fb 100644 --- a/variants/Xeno/debug_scripts/SAMD21J15A.gdb +++ b/variants/Generic_xx1J/debug_scripts/SAMD21J15A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21j15" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21j15" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/Xeno/debug_scripts/SAMD21J16A.gdb b/variants/Generic_xx1J/debug_scripts/SAMD21J16A.gdb similarity index 97% rename from variants/Xeno/debug_scripts/SAMD21J16A.gdb rename to variants/Generic_xx1J/debug_scripts/SAMD21J16A.gdb index 45b07adf8..7f6ec62f8 100644 --- a/variants/Xeno/debug_scripts/SAMD21J16A.gdb +++ b/variants/Generic_xx1J/debug_scripts/SAMD21J16A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21j16" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21j16" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/Xeno/debug_scripts/SAMD21J17A.gdb b/variants/Generic_xx1J/debug_scripts/SAMD21J17A.gdb similarity index 97% rename from variants/Xeno/debug_scripts/SAMD21J17A.gdb rename to variants/Generic_xx1J/debug_scripts/SAMD21J17A.gdb index bad81e6a4..43d597c33 100644 --- a/variants/Xeno/debug_scripts/SAMD21J17A.gdb +++ b/variants/Generic_xx1J/debug_scripts/SAMD21J17A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21j17" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21j17" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/Xeno/debug_scripts/SAMD21J18A.gdb b/variants/Generic_xx1J/debug_scripts/SAMD21J18A.gdb similarity index 97% rename from variants/Xeno/debug_scripts/SAMD21J18A.gdb rename to variants/Generic_xx1J/debug_scripts/SAMD21J18A.gdb index 12fd6a422..7a7cc3a36 100644 --- a/variants/Xeno/debug_scripts/SAMD21J18A.gdb +++ b/variants/Generic_xx1J/debug_scripts/SAMD21J18A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21j18" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21j18" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/Xeno/debug_scripts/SAMD51J18A.gdb b/variants/Generic_xx1J/debug_scripts/SAMD51J18A.gdb similarity index 97% rename from variants/Xeno/debug_scripts/SAMD51J18A.gdb rename to variants/Generic_xx1J/debug_scripts/SAMD51J18A.gdb index f62cc56d1..27e79bcc6 100644 --- a/variants/Xeno/debug_scripts/SAMD51J18A.gdb +++ b/variants/Generic_xx1J/debug_scripts/SAMD51J18A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd51j18" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd51j18" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/Xeno/debug_scripts/SAMD51J19A.gdb b/variants/Generic_xx1J/debug_scripts/SAMD51J19A.gdb similarity index 97% rename from variants/Xeno/debug_scripts/SAMD51J19A.gdb rename to variants/Generic_xx1J/debug_scripts/SAMD51J19A.gdb index 6d4b6057f..ecc334955 100644 --- a/variants/Xeno/debug_scripts/SAMD51J19A.gdb +++ b/variants/Generic_xx1J/debug_scripts/SAMD51J19A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd51j19" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd51j19" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/Xeno/debug_scripts/SAMD51J20A.gdb b/variants/Generic_xx1J/debug_scripts/SAMD51J20A.gdb similarity index 97% rename from variants/Xeno/debug_scripts/SAMD51J20A.gdb rename to variants/Generic_xx1J/debug_scripts/SAMD51J20A.gdb index d5e4e596b..d693f22e2 100644 --- a/variants/Xeno/debug_scripts/SAMD51J20A.gdb +++ b/variants/Generic_xx1J/debug_scripts/SAMD51J20A.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd51j20" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd51j20" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/Xeno/debug_scripts/SAML21J16B.gdb b/variants/Generic_xx1J/debug_scripts/SAML21J16B.gdb similarity index 97% rename from variants/Xeno/debug_scripts/SAML21J16B.gdb rename to variants/Generic_xx1J/debug_scripts/SAML21J16B.gdb index 063110e68..efcfa87ec 100644 --- a/variants/Xeno/debug_scripts/SAML21J16B.gdb +++ b/variants/Generic_xx1J/debug_scripts/SAML21J16B.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91saml21j16" -f target/at91samlXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91saml21j16" -f target/at91samlXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/Xeno/debug_scripts/SAML21J17B.gdb b/variants/Generic_xx1J/debug_scripts/SAML21J17B.gdb similarity index 97% rename from variants/Xeno/debug_scripts/SAML21J17B.gdb rename to variants/Generic_xx1J/debug_scripts/SAML21J17B.gdb index d400b5be5..bcfbb4629 100644 --- a/variants/Xeno/debug_scripts/SAML21J17B.gdb +++ b/variants/Generic_xx1J/debug_scripts/SAML21J17B.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91saml21j17" -f target/at91samlXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91saml21j17" -f target/at91samlXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/Xeno/debug_scripts/SAML21J18B.gdb b/variants/Generic_xx1J/debug_scripts/SAML21J18B.gdb similarity index 97% rename from variants/Xeno/debug_scripts/SAML21J18B.gdb rename to variants/Generic_xx1J/debug_scripts/SAML21J18B.gdb index 2eb86f9f3..4dc17da41 100644 --- a/variants/Xeno/debug_scripts/SAML21J18B.gdb +++ b/variants/Generic_xx1J/debug_scripts/SAML21J18B.gdb @@ -1,31 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91saml21j18" -f target/at91samlXX.cfg -c "gdb_port pipe; log_output openocd.log" +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +# Define 'reset' command +define reset + +info reg + +break main + +# End of 'reset' command +end + +target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91saml21j18" -f target/at91samlXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/Xeno/linker_scripts/gcc/16KB_Bootloader/flash_128KB.ld b/variants/Generic_xx1J/linker_scripts/gcc/16KB_Bootloader/flash_128KB.ld similarity index 95% rename from variants/Xeno/linker_scripts/gcc/16KB_Bootloader/flash_128KB.ld rename to variants/Generic_xx1J/linker_scripts/gcc/16KB_Bootloader/flash_128KB.ld index c541d8cd0..90d7f473d 100644 --- a/variants/Xeno/linker_scripts/gcc/16KB_Bootloader/flash_128KB.ld +++ b/variants/Generic_xx1J/linker_scripts/gcc/16KB_Bootloader/flash_128KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00020000-0x4000 /* First 16KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00004000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x4000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00020000-0x4000 /* First 16KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00004000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x4000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/MT_D21E/linker_scripts/gcc/16KB_Bootloader/flash_256KB.ld b/variants/Generic_xx1J/linker_scripts/gcc/16KB_Bootloader/flash_256KB.ld similarity index 95% rename from variants/MT_D21E/linker_scripts/gcc/16KB_Bootloader/flash_256KB.ld rename to variants/Generic_xx1J/linker_scripts/gcc/16KB_Bootloader/flash_256KB.ld index a0b9f951f..74b6b298c 100644 --- a/variants/MT_D21E/linker_scripts/gcc/16KB_Bootloader/flash_256KB.ld +++ b/variants/Generic_xx1J/linker_scripts/gcc/16KB_Bootloader/flash_256KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00040000-0x4000 /* First 16KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x4000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00040000-0x4000 /* First 16KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x4000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Xeno/linker_scripts/gcc/16KB_Bootloader/flash_32KB.ld b/variants/Generic_xx1J/linker_scripts/gcc/16KB_Bootloader/flash_32KB.ld similarity index 95% rename from variants/Xeno/linker_scripts/gcc/16KB_Bootloader/flash_32KB.ld rename to variants/Generic_xx1J/linker_scripts/gcc/16KB_Bootloader/flash_32KB.ld index 5d8d047a9..9030f5437 100644 --- a/variants/Xeno/linker_scripts/gcc/16KB_Bootloader/flash_32KB.ld +++ b/variants/Generic_xx1J/linker_scripts/gcc/16KB_Bootloader/flash_32KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00008000-0x4000 /* First 16KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x4000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00008000-0x4000 /* First 16KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x4000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Xeno/linker_scripts/gcc/16KB_Bootloader/flash_64KB.ld b/variants/Generic_xx1J/linker_scripts/gcc/16KB_Bootloader/flash_64KB.ld similarity index 95% rename from variants/Xeno/linker_scripts/gcc/16KB_Bootloader/flash_64KB.ld rename to variants/Generic_xx1J/linker_scripts/gcc/16KB_Bootloader/flash_64KB.ld index 3f7223790..3f276ac1d 100644 --- a/variants/Xeno/linker_scripts/gcc/16KB_Bootloader/flash_64KB.ld +++ b/variants/Generic_xx1J/linker_scripts/gcc/16KB_Bootloader/flash_64KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00010000-0x4000 /* First 16KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00002000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x4000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00010000-0x4000 /* First 16KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00002000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x4000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Xeno/linker_scripts/gcc/16KB_Bootloader/flash_m4f_1MB.ld b/variants/Generic_xx1J/linker_scripts/gcc/16KB_Bootloader/flash_m4f_1MB.ld similarity index 95% rename from variants/Xeno/linker_scripts/gcc/16KB_Bootloader/flash_m4f_1MB.ld rename to variants/Generic_xx1J/linker_scripts/gcc/16KB_Bootloader/flash_m4f_1MB.ld index 93f85ccf1..cdfaf8470 100644 --- a/variants/Xeno/linker_scripts/gcc/16KB_Bootloader/flash_m4f_1MB.ld +++ b/variants/Generic_xx1J/linker_scripts/gcc/16KB_Bootloader/flash_m4f_1MB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00100000-0x4000 /* First 16KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00040000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x4000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00100000-0x4000 /* First 16KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00040000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x4000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Xeno/linker_scripts/gcc/16KB_Bootloader/flash_m4f_256KB.ld b/variants/Generic_xx1J/linker_scripts/gcc/16KB_Bootloader/flash_m4f_256KB.ld similarity index 95% rename from variants/Xeno/linker_scripts/gcc/16KB_Bootloader/flash_m4f_256KB.ld rename to variants/Generic_xx1J/linker_scripts/gcc/16KB_Bootloader/flash_m4f_256KB.ld index b541a7a7c..73ff15c35 100644 --- a/variants/Xeno/linker_scripts/gcc/16KB_Bootloader/flash_m4f_256KB.ld +++ b/variants/Generic_xx1J/linker_scripts/gcc/16KB_Bootloader/flash_m4f_256KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00040000-0x4000 /* First 16KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00020000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x4000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00040000-0x4000 /* First 16KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00020000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x4000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Xeno_Mini/linker_scripts/gcc/16KB_Bootloader/flash_m4f_512KB.ld b/variants/Generic_xx1J/linker_scripts/gcc/16KB_Bootloader/flash_m4f_512KB.ld similarity index 95% rename from variants/Xeno_Mini/linker_scripts/gcc/16KB_Bootloader/flash_m4f_512KB.ld rename to variants/Generic_xx1J/linker_scripts/gcc/16KB_Bootloader/flash_m4f_512KB.ld index e773c4011..4f7c9f2e5 100644 --- a/variants/Xeno_Mini/linker_scripts/gcc/16KB_Bootloader/flash_m4f_512KB.ld +++ b/variants/Generic_xx1J/linker_scripts/gcc/16KB_Bootloader/flash_m4f_512KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00080000-0x4000 /* First 16KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00030000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x4000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00080000-0x4000 /* First 16KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00030000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x4000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/MT_D21E_revB/linker_scripts/gcc/8KB_Bootloader/flash_128KB.ld b/variants/Generic_xx1J/linker_scripts/gcc/8KB_Bootloader/flash_128KB.ld similarity index 95% rename from variants/MT_D21E_revB/linker_scripts/gcc/8KB_Bootloader/flash_128KB.ld rename to variants/Generic_xx1J/linker_scripts/gcc/8KB_Bootloader/flash_128KB.ld index 07940acbd..4b2f64bca 100644 --- a/variants/MT_D21E_revB/linker_scripts/gcc/8KB_Bootloader/flash_128KB.ld +++ b/variants/Generic_xx1J/linker_scripts/gcc/8KB_Bootloader/flash_128KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00020000-0x2000 /* First 8KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00004000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x2000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00020000-0x2000 /* First 8KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00004000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x2000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Xeno/linker_scripts/gcc/8KB_Bootloader/flash_256KB.ld b/variants/Generic_xx1J/linker_scripts/gcc/8KB_Bootloader/flash_256KB.ld similarity index 95% rename from variants/Xeno/linker_scripts/gcc/8KB_Bootloader/flash_256KB.ld rename to variants/Generic_xx1J/linker_scripts/gcc/8KB_Bootloader/flash_256KB.ld index 825aee666..b446667fd 100644 --- a/variants/Xeno/linker_scripts/gcc/8KB_Bootloader/flash_256KB.ld +++ b/variants/Generic_xx1J/linker_scripts/gcc/8KB_Bootloader/flash_256KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00040000-0x2000 /* First 8KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x2000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00040000-0x2000 /* First 8KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x2000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Xeno_Mini/linker_scripts/gcc/8KB_Bootloader/flash_32KB.ld b/variants/Generic_xx1J/linker_scripts/gcc/8KB_Bootloader/flash_32KB.ld similarity index 95% rename from variants/Xeno_Mini/linker_scripts/gcc/8KB_Bootloader/flash_32KB.ld rename to variants/Generic_xx1J/linker_scripts/gcc/8KB_Bootloader/flash_32KB.ld index 0d3aaf7a9..f60a390ee 100644 --- a/variants/Xeno_Mini/linker_scripts/gcc/8KB_Bootloader/flash_32KB.ld +++ b/variants/Generic_xx1J/linker_scripts/gcc/8KB_Bootloader/flash_32KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00008000-0x2000 /* First 8KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x2000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00008000-0x2000 /* First 8KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x2000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Xeno/linker_scripts/gcc/8KB_Bootloader/flash_64KB.ld b/variants/Generic_xx1J/linker_scripts/gcc/8KB_Bootloader/flash_64KB.ld similarity index 95% rename from variants/Xeno/linker_scripts/gcc/8KB_Bootloader/flash_64KB.ld rename to variants/Generic_xx1J/linker_scripts/gcc/8KB_Bootloader/flash_64KB.ld index 1c36f57e1..3b999367f 100644 --- a/variants/Xeno/linker_scripts/gcc/8KB_Bootloader/flash_64KB.ld +++ b/variants/Generic_xx1J/linker_scripts/gcc/8KB_Bootloader/flash_64KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00010000-0x2000 /* First 8KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00002000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x2000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00010000-0x2000 /* First 8KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00002000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x2000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Xeno/linker_scripts/gcc/8KB_Bootloader/flash_m4f_1MB.ld b/variants/Generic_xx1J/linker_scripts/gcc/8KB_Bootloader/flash_m4f_1MB.ld similarity index 95% rename from variants/Xeno/linker_scripts/gcc/8KB_Bootloader/flash_m4f_1MB.ld rename to variants/Generic_xx1J/linker_scripts/gcc/8KB_Bootloader/flash_m4f_1MB.ld index 6c8a50c79..105d2866e 100644 --- a/variants/Xeno/linker_scripts/gcc/8KB_Bootloader/flash_m4f_1MB.ld +++ b/variants/Generic_xx1J/linker_scripts/gcc/8KB_Bootloader/flash_m4f_1MB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00100000-0x2000 /* First 8KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00040000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x2000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00100000-0x2000 /* First 8KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00040000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x2000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Xeno/linker_scripts/gcc/8KB_Bootloader/flash_m4f_256KB.ld b/variants/Generic_xx1J/linker_scripts/gcc/8KB_Bootloader/flash_m4f_256KB.ld similarity index 95% rename from variants/Xeno/linker_scripts/gcc/8KB_Bootloader/flash_m4f_256KB.ld rename to variants/Generic_xx1J/linker_scripts/gcc/8KB_Bootloader/flash_m4f_256KB.ld index 6a1504ce3..31ec8580e 100644 --- a/variants/Xeno/linker_scripts/gcc/8KB_Bootloader/flash_m4f_256KB.ld +++ b/variants/Generic_xx1J/linker_scripts/gcc/8KB_Bootloader/flash_m4f_256KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00040000-0x2000 /* First 8KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00020000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x2000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00040000-0x2000 /* First 8KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00020000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x2000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Xeno_Mini/linker_scripts/gcc/8KB_Bootloader/flash_m4f_512KB.ld b/variants/Generic_xx1J/linker_scripts/gcc/8KB_Bootloader/flash_m4f_512KB.ld similarity index 95% rename from variants/Xeno_Mini/linker_scripts/gcc/8KB_Bootloader/flash_m4f_512KB.ld rename to variants/Generic_xx1J/linker_scripts/gcc/8KB_Bootloader/flash_m4f_512KB.ld index ab041e7dd..e2cbcadc2 100644 --- a/variants/Xeno_Mini/linker_scripts/gcc/8KB_Bootloader/flash_m4f_512KB.ld +++ b/variants/Generic_xx1J/linker_scripts/gcc/8KB_Bootloader/flash_m4f_512KB.ld @@ -1,217 +1,217 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00080000-0x2000 /* First 8KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00030000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x2000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00080000-0x2000 /* First 8KB used by bootloader */ + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00030000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + + KEEP(*(.sketch_boot)) + + . = ALIGN(0x2000); + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Xeno/linker_scripts/gcc/No_Bootloader/flash_128KB.ld b/variants/Generic_xx1J/linker_scripts/gcc/No_Bootloader/flash_128KB.ld similarity index 95% rename from variants/Xeno/linker_scripts/gcc/No_Bootloader/flash_128KB.ld rename to variants/Generic_xx1J/linker_scripts/gcc/No_Bootloader/flash_128KB.ld index 941e0adee..f8ecfac5e 100644 --- a/variants/Xeno/linker_scripts/gcc/No_Bootloader/flash_128KB.ld +++ b/variants/Generic_xx1J/linker_scripts/gcc/No_Bootloader/flash_128KB.ld @@ -1,214 +1,214 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00020000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00004000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - * __ram_end__ - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00020000 + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00004000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + * __ram_end__ + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Xeno/linker_scripts/gcc/No_Bootloader/flash_256KB.ld b/variants/Generic_xx1J/linker_scripts/gcc/No_Bootloader/flash_256KB.ld similarity index 95% rename from variants/Xeno/linker_scripts/gcc/No_Bootloader/flash_256KB.ld rename to variants/Generic_xx1J/linker_scripts/gcc/No_Bootloader/flash_256KB.ld index 865514cbb..4bb2f0121 100644 --- a/variants/Xeno/linker_scripts/gcc/No_Bootloader/flash_256KB.ld +++ b/variants/Generic_xx1J/linker_scripts/gcc/No_Bootloader/flash_256KB.ld @@ -1,214 +1,214 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - * __ram_end__ - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000 + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + * __ram_end__ + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/MT_D21E_revB/linker_scripts/gcc/No_Bootloader/flash_32KB.ld b/variants/Generic_xx1J/linker_scripts/gcc/No_Bootloader/flash_32KB.ld similarity index 95% rename from variants/MT_D21E_revB/linker_scripts/gcc/No_Bootloader/flash_32KB.ld rename to variants/Generic_xx1J/linker_scripts/gcc/No_Bootloader/flash_32KB.ld index 407777c80..805682b86 100644 --- a/variants/MT_D21E_revB/linker_scripts/gcc/No_Bootloader/flash_32KB.ld +++ b/variants/Generic_xx1J/linker_scripts/gcc/No_Bootloader/flash_32KB.ld @@ -1,214 +1,214 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00008000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - * __ram_end__ - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00008000 + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + * __ram_end__ + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/MT_D21E/linker_scripts/gcc/No_Bootloader/flash_64KB.ld b/variants/Generic_xx1J/linker_scripts/gcc/No_Bootloader/flash_64KB.ld similarity index 95% rename from variants/MT_D21E/linker_scripts/gcc/No_Bootloader/flash_64KB.ld rename to variants/Generic_xx1J/linker_scripts/gcc/No_Bootloader/flash_64KB.ld index c053d998b..e1d7956f4 100644 --- a/variants/MT_D21E/linker_scripts/gcc/No_Bootloader/flash_64KB.ld +++ b/variants/Generic_xx1J/linker_scripts/gcc/No_Bootloader/flash_64KB.ld @@ -1,215 +1,214 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00010000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00002000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - * __ram_end__ - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00010000 + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00002000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + * __ram_end__ + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Xeno/linker_scripts/gcc/No_Bootloader/flash_m4f_1MB.ld b/variants/Generic_xx1J/linker_scripts/gcc/No_Bootloader/flash_m4f_1MB.ld similarity index 95% rename from variants/Xeno/linker_scripts/gcc/No_Bootloader/flash_m4f_1MB.ld rename to variants/Generic_xx1J/linker_scripts/gcc/No_Bootloader/flash_m4f_1MB.ld index 9afa3cabc..39b6b1204 100644 --- a/variants/Xeno/linker_scripts/gcc/No_Bootloader/flash_m4f_1MB.ld +++ b/variants/Generic_xx1J/linker_scripts/gcc/No_Bootloader/flash_m4f_1MB.ld @@ -1,214 +1,214 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00100000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00040000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - * __ram_end__ - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00100000 + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00040000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + * __ram_end__ + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Xeno/linker_scripts/gcc/No_Bootloader/flash_m4f_256KB.ld b/variants/Generic_xx1J/linker_scripts/gcc/No_Bootloader/flash_m4f_256KB.ld similarity index 95% rename from variants/Xeno/linker_scripts/gcc/No_Bootloader/flash_m4f_256KB.ld rename to variants/Generic_xx1J/linker_scripts/gcc/No_Bootloader/flash_m4f_256KB.ld index 6c42fe70f..21cabbc46 100644 --- a/variants/Xeno/linker_scripts/gcc/No_Bootloader/flash_m4f_256KB.ld +++ b/variants/Generic_xx1J/linker_scripts/gcc/No_Bootloader/flash_m4f_256KB.ld @@ -1,214 +1,214 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00020000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - * __ram_end__ - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000 + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00020000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + * __ram_end__ + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Xeno_Mini/linker_scripts/gcc/No_Bootloader/flash_m4f_512KB.ld b/variants/Generic_xx1J/linker_scripts/gcc/No_Bootloader/flash_m4f_512KB.ld similarity index 95% rename from variants/Xeno_Mini/linker_scripts/gcc/No_Bootloader/flash_m4f_512KB.ld rename to variants/Generic_xx1J/linker_scripts/gcc/No_Bootloader/flash_m4f_512KB.ld index 11c2ad812..8379fbb7c 100644 --- a/variants/Xeno_Mini/linker_scripts/gcc/No_Bootloader/flash_m4f_512KB.ld +++ b/variants/Generic_xx1J/linker_scripts/gcc/No_Bootloader/flash_m4f_512KB.ld @@ -1,214 +1,214 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00080000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00030000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - * __ram_end__ - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Linker script to configure memory regions. + * Need modifying for a specific board. + * FLASH.ORIGIN: starting address of flash + * FLASH.LENGTH: length of flash + * RAM.ORIGIN: starting address of RAM bank 0 + * RAM.LENGTH: length of RAM bank 0 + */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00080000 + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00030000 +} + +/* Linker script to place sections and symbol values. Should be used together + * with other linker script that defines memory regions FLASH and RAM. + * It references following symbols, which must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines following symbols, which code can use without definition: + * __exidx_start + * __exidx_end + * __copy_table_start__ + * __copy_table_end__ + * __zero_table_start__ + * __zero_table_end__ + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + * __ram_end__ + */ +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + __text_start__ = .; + KEEP(*(.isr_vector)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* To copy multiple ROM to RAM sections, + * uncomment .copy.table section and, + * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ + /* + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + LONG (__etext) + LONG (__data_start__) + LONG (__data_end__ - __data_start__) + LONG (__etext2) + LONG (__data2_start__) + LONG (__data2_end__ - __data2_start__) + __copy_table_end__ = .; + } > FLASH + */ + + /* To clear multiple BSS sections, + * uncomment .zero.table section and, + * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ + /* + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + LONG (__bss_start__) + LONG (__bss_end__ - __bss_start__) + LONG (__bss2_start__) + LONG (__bss2_end__ - __bss2_start__) + __zero_table_end__ = .; + } > FLASH + */ + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.ramfunc*) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(16); + /* All data end */ + __data_end__ = .; + + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + PROVIDE(end = .); + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM + + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") +} diff --git a/variants/Xeno/openocd_scripts/SAMC21J15A.cfg b/variants/Generic_xx1J/openocd_scripts/SAMC21J15A.cfg similarity index 92% rename from variants/Xeno/openocd_scripts/SAMC21J15A.cfg rename to variants/Generic_xx1J/openocd_scripts/SAMC21J15A.cfg index 1627bc1d1..ad5659ba3 100644 --- a/variants/Xeno/openocd_scripts/SAMC21J15A.cfg +++ b/variants/Generic_xx1J/openocd_scripts/SAMC21J15A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samc21j15 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samcXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samc21j15 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samcXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/Xeno/openocd_scripts/SAMC21J16A.cfg b/variants/Generic_xx1J/openocd_scripts/SAMC21J16A.cfg similarity index 92% rename from variants/Xeno/openocd_scripts/SAMC21J16A.cfg rename to variants/Generic_xx1J/openocd_scripts/SAMC21J16A.cfg index f023da3f7..5ec605772 100644 --- a/variants/Xeno/openocd_scripts/SAMC21J16A.cfg +++ b/variants/Generic_xx1J/openocd_scripts/SAMC21J16A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samc21j16 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samcXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samc21j16 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samcXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/Xeno/openocd_scripts/SAMC21J17A.cfg b/variants/Generic_xx1J/openocd_scripts/SAMC21J17A.cfg similarity index 92% rename from variants/Xeno/openocd_scripts/SAMC21J17A.cfg rename to variants/Generic_xx1J/openocd_scripts/SAMC21J17A.cfg index ab42301f6..29c3aa951 100644 --- a/variants/Xeno/openocd_scripts/SAMC21J17A.cfg +++ b/variants/Generic_xx1J/openocd_scripts/SAMC21J17A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samc21j17 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samcXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samc21j17 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samcXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/Xeno/openocd_scripts/SAMC21J18A.cfg b/variants/Generic_xx1J/openocd_scripts/SAMC21J18A.cfg similarity index 92% rename from variants/Xeno/openocd_scripts/SAMC21J18A.cfg rename to variants/Generic_xx1J/openocd_scripts/SAMC21J18A.cfg index 6405303fe..2c325ae14 100644 --- a/variants/Xeno/openocd_scripts/SAMC21J18A.cfg +++ b/variants/Generic_xx1J/openocd_scripts/SAMC21J18A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samc21j18 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samcXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samc21j18 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samcXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/Xeno/openocd_scripts/SAMD21J15A.cfg b/variants/Generic_xx1J/openocd_scripts/SAMD21J15A.cfg similarity index 92% rename from variants/Xeno/openocd_scripts/SAMD21J15A.cfg rename to variants/Generic_xx1J/openocd_scripts/SAMD21J15A.cfg index 62eaa7f81..300a9ec68 100644 --- a/variants/Xeno/openocd_scripts/SAMD21J15A.cfg +++ b/variants/Generic_xx1J/openocd_scripts/SAMD21J15A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samd21j15 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samdXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samd21j15 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samdXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/Xeno/openocd_scripts/SAMD21J16A.cfg b/variants/Generic_xx1J/openocd_scripts/SAMD21J16A.cfg similarity index 92% rename from variants/Xeno/openocd_scripts/SAMD21J16A.cfg rename to variants/Generic_xx1J/openocd_scripts/SAMD21J16A.cfg index 8126a24ba..1f263b016 100644 --- a/variants/Xeno/openocd_scripts/SAMD21J16A.cfg +++ b/variants/Generic_xx1J/openocd_scripts/SAMD21J16A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samd21j16 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samdXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samd21j16 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samdXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/Xeno/openocd_scripts/SAMD21J17A.cfg b/variants/Generic_xx1J/openocd_scripts/SAMD21J17A.cfg similarity index 92% rename from variants/Xeno/openocd_scripts/SAMD21J17A.cfg rename to variants/Generic_xx1J/openocd_scripts/SAMD21J17A.cfg index 4888424cf..ec50fd472 100644 --- a/variants/Xeno/openocd_scripts/SAMD21J17A.cfg +++ b/variants/Generic_xx1J/openocd_scripts/SAMD21J17A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samd21j17 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samdXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samd21j17 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samdXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/Xeno/openocd_scripts/SAMD21J18A.cfg b/variants/Generic_xx1J/openocd_scripts/SAMD21J18A.cfg similarity index 92% rename from variants/Xeno/openocd_scripts/SAMD21J18A.cfg rename to variants/Generic_xx1J/openocd_scripts/SAMD21J18A.cfg index 083166bd0..7b29af39e 100644 --- a/variants/Xeno/openocd_scripts/SAMD21J18A.cfg +++ b/variants/Generic_xx1J/openocd_scripts/SAMD21J18A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samd21j18 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samdXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samd21j18 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samdXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/Xeno/openocd_scripts/SAMD51J18A.cfg b/variants/Generic_xx1J/openocd_scripts/SAMD51J18A.cfg similarity index 92% rename from variants/Xeno/openocd_scripts/SAMD51J18A.cfg rename to variants/Generic_xx1J/openocd_scripts/SAMD51J18A.cfg index ba41ff29e..005594f4c 100644 --- a/variants/Xeno/openocd_scripts/SAMD51J18A.cfg +++ b/variants/Generic_xx1J/openocd_scripts/SAMD51J18A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samd51j18 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samdXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samd51j18 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samdXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/Xeno/openocd_scripts/SAMD51J19A.cfg b/variants/Generic_xx1J/openocd_scripts/SAMD51J19A.cfg similarity index 92% rename from variants/Xeno/openocd_scripts/SAMD51J19A.cfg rename to variants/Generic_xx1J/openocd_scripts/SAMD51J19A.cfg index 9824ace30..1f3feda9d 100644 --- a/variants/Xeno/openocd_scripts/SAMD51J19A.cfg +++ b/variants/Generic_xx1J/openocd_scripts/SAMD51J19A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samd51j19 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samdXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samd51j19 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samdXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/Xeno/openocd_scripts/SAMD51J20A.cfg b/variants/Generic_xx1J/openocd_scripts/SAMD51J20A.cfg similarity index 92% rename from variants/Xeno/openocd_scripts/SAMD51J20A.cfg rename to variants/Generic_xx1J/openocd_scripts/SAMD51J20A.cfg index f816759e1..92c1632e6 100644 --- a/variants/Xeno/openocd_scripts/SAMD51J20A.cfg +++ b/variants/Generic_xx1J/openocd_scripts/SAMD51J20A.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samd51j20 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samdXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samd51j20 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samdXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/Xeno/openocd_scripts/SAML21J16B.cfg b/variants/Generic_xx1J/openocd_scripts/SAML21J16B.cfg similarity index 92% rename from variants/Xeno/openocd_scripts/SAML21J16B.cfg rename to variants/Generic_xx1J/openocd_scripts/SAML21J16B.cfg index 9d2a32500..d421aa756 100644 --- a/variants/Xeno/openocd_scripts/SAML21J16B.cfg +++ b/variants/Generic_xx1J/openocd_scripts/SAML21J16B.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91saml21j16 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samlXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91saml21j16 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samlXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/Xeno/openocd_scripts/SAML21J17B.cfg b/variants/Generic_xx1J/openocd_scripts/SAML21J17B.cfg similarity index 92% rename from variants/Xeno/openocd_scripts/SAML21J17B.cfg rename to variants/Generic_xx1J/openocd_scripts/SAML21J17B.cfg index 9791acb19..74c5bfc75 100644 --- a/variants/Xeno/openocd_scripts/SAML21J17B.cfg +++ b/variants/Generic_xx1J/openocd_scripts/SAML21J17B.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91saml21j17 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samlXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91saml21j17 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samlXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/Xeno/openocd_scripts/SAML21J18B.cfg b/variants/Generic_xx1J/openocd_scripts/SAML21J18B.cfg similarity index 92% rename from variants/Xeno/openocd_scripts/SAML21J18B.cfg rename to variants/Generic_xx1J/openocd_scripts/SAML21J18B.cfg index acf8883a6..783bb363a 100644 --- a/variants/Xeno/openocd_scripts/SAML21J18B.cfg +++ b/variants/Generic_xx1J/openocd_scripts/SAML21J18B.cfg @@ -1,30 +1,31 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91saml21j18 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samlXX.cfg] +# +# Arduino Zero OpenOCD script. +# +# Copyright (c) 2014-2015 Arduino LLC. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91saml21j18 +set ENDIAN little + +# choose a port here +set telnet_port 0 + +source [find target/at91samlXX.cfg] +reset_config srst_nogate connect_assert_srst diff --git a/variants/Xeno/pins_arduino.h b/variants/Generic_xx1J/pins_arduino.h similarity index 97% rename from variants/Xeno/pins_arduino.h rename to variants/Generic_xx1J/pins_arduino.h index db0e40c3d..36ab06c77 100644 --- a/variants/Xeno/pins_arduino.h +++ b/variants/Generic_xx1J/pins_arduino.h @@ -1,21 +1,21 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -// API compatibility -#include "variant.h" - +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +// API compatibility +#include "variant.h" + diff --git a/variants/Xeno/variant.cpp b/variants/Generic_xx1J/variant.cpp similarity index 99% rename from variants/Xeno/variant.cpp rename to variants/Generic_xx1J/variant.cpp index d55a91aa3..063a887b2 100644 --- a/variants/Xeno/variant.cpp +++ b/variants/Generic_xx1J/variant.cpp @@ -1,403 +1,403 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* - * Modified 29 January 2018 by Justin Mattair - * for MattairTech boards (www.mattairtech.com) - * - * See README.md for documentation and pin mapping information - */ - - -#include "variant.h" - -/* - * Pins descriptions - */ -const PinDescription g_APinDescription[]= -{ -#if (SAMD51) - // 0..11 - Analog capable pins - { PORTB, 0, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel12, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTB, 1, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel13, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_2, GCLK_CCL_NONE }, - { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 4, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel4, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 5, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel5, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTB, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel8, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTB, 7, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel9, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTB, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC4_CH0, ADC_Channel0, EXTERNAL_INT_8, GCLK_CCL_NONE }, - { PORTB, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC4_CH1, ADC_Channel1, EXTERNAL_INT_9, GCLK_CCL_NONE }, - { PORTA, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH2, ADC_Channel10, EXTERNAL_INT_10, GCLK_CCL_NONE }, - { PORTA, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH3, ADC_Channel11, EXTERNAL_INT_11, GCLK_CCL_NONE }, - - // 12..Digital functions - { PORTA, 12, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH6, No_ADC_Channel, EXTERNAL_INT_12, GCLK_CCL_NONE }, - { PORTA, 13, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH7, No_ADC_Channel, EXTERNAL_INT_13, GCLK_CCL_NONE }, - { PORTB, 14, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TC5_CH0, No_ADC_Channel, EXTERNAL_INT_14, GCLK_CCL_NONE }, - { PORTB, 15, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TC5_CH1, No_ADC_Channel, EXTERNAL_INT_15, GCLK_CCL_NONE }, - { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC2_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC2_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC3_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 19, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC3_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 20, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC1_CH4, No_ADC_Channel, EXTERNAL_INT_4, GCLK_CCL_NONE }, - { PORTA, 21, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC1_CH5, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC1_CH6, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC1_CH7, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - - // 24..26 - USB_NEGATIVE and USB_POSITIVE, pin 26 does not exist - { PORTA, 24, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM - { PORTA, 25, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 27..29 - Digital functions - { PORTA, 27, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 30..31 Digital functions / Debug interface (SWD CLK and SWD IO) - { PORTA, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD CLK - { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD IO - - // 32..34 - X pins - { PORTB, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, // X32 - { PORTB, 16, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, // X33 - { PORTB, 2, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC2_CH2, ADC_Channel14, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // X34, LED - - // 35..38 - Level Shifter Header - { PORTA, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TC1_CH0, ADC_Channel6, EXTERNAL_INT_6, GCLK_CCL_NONE }, // L35 - { PORTA, 7, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TC1_CH1, ADC_Channel7, EXTERNAL_INT_7, GCLK_CCL_NONE }, // L36 - { PORTA, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC0_CH0, ADC_Channel2, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, // L37 - { PORTA, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC0_CH1, ADC_Channel3, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // L38 - - // 39..42 - Motor Controller Header - { PORTB, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH4, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M39 - { PORTB, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH5, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M40 - { PORTB, 12, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC3_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M41 - { PORTB, 13, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC3_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M42 - - // 43..46 - SPI Header - { PORTB, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC4_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S43 - { PORTB, 23, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S44 - { PORTB, 22, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S45 - { PORTB, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC4_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S46 - - // 47..49 - No header pins - { PORTB, 4, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // 47 - { PORTB, 5, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_5, GCLK_CCL_NONE }, // 48 - { PORTB, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel15, EXTERNAL_INT_3, GCLK_CCL_NONE }, // 49 - -#elif (SAMD21) - // 0..11 - Analog capable pins - { PORTB, 0, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel8, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTB, 1, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel9, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_2, GCLK_CCL_NONE }, - { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 4, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel4, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 5, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel5, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTB, 6, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel14, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTB, 7, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel15, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTB, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel2, EXTERNAL_INT_8, GCLK_CCL_NONE }, - { PORTB, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel3, EXTERNAL_INT_9, GCLK_CCL_NONE }, - { PORTA, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), NOT_ON_TIMER, ADC_Channel18, EXTERNAL_INT_10, GCLK_CCL_NONE }, - { PORTA, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), NOT_ON_TIMER, ADC_Channel19, EXTERNAL_INT_11, GCLK_CCL_NONE }, - - // 12..Digital functions - { PORTA, 12, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_12, GCLK_CCL_NONE }, - { PORTA, 13, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_13, GCLK_CCL_NONE }, - { PORTB, 14, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC5_CH0, No_ADC_Channel, EXTERNAL_INT_14, GCLK_CCL_NONE }, - { PORTB, 15, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC5_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC3_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 19, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_COM), TC3_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 20, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), TC7_CH0, No_ADC_Channel, EXTERNAL_INT_4, GCLK_CCL_NONE }, - { PORTA, 21, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_COM), TC7_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC4_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC4_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - - // 24..26 - USB_NEGATIVE and USB_POSITIVE, pin 26 does not exist - { PORTA, 24, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM - { PORTA, 25, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 27..29 - Digital functions - { PORTA, 27, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_15, GCLK_CCL_NONE }, - { PORTA, 28, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 30..31 Digital functions / Debug interface (SWD CLK and SWD IO) - { PORTA, 30, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD CLK - { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD IO - - // 32..34 - X pins - { PORTB, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT|PIN_ATTR_COM), TC6_CH1, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, // X32 - { PORTB, 16, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, // X33 - { PORTB, 2, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC6_CH0, ADC_Channel10, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // X34, LED - - // 35..38 - Level Shifter Header - { PORTA, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel6, EXTERNAL_INT_6, GCLK_CCL_NONE }, // L35 - { PORTA, 7, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), NOT_ON_TIMER, ADC_Channel7, EXTERNAL_INT_7, GCLK_CCL_NONE }, // L36 - { PORTA, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), TCC1_CH2, ADC_Channel16, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, // L37 - { PORTA, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_COM), TCC1_CH3, ADC_Channel17, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // L38 - - // 39..42 - Motor Controller Header - { PORTB, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH4, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M39 - { PORTB, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH5, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M40 - { PORTB, 12, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH6, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M41 - { PORTB, 13, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH7, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M42 - - // 43..46 - SPI Header - { PORTB, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S43 - { PORTB, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S44 - { PORTB, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S45 - { PORTB, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S46 - - // 47..49 - No header pins - { PORTB, 4, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // 47 - { PORTB, 5, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_5, GCLK_CCL_NONE }, // 48 - { PORTB, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel11, EXTERNAL_INT_3, GCLK_CCL_NONE }, // 49 - -#elif (SAML21) - // 0..11 - Analog capable pins - { PORTB, 0, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel8, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTB, 1, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel9, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_2, GCLK_CCL_NONE }, - { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 4, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel4, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 5, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel5, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTB, 6, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel14, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTB, 7, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel15, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTB, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel2, EXTERNAL_INT_8, GCLK_CCL_NONE }, - { PORTB, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel3, EXTERNAL_INT_9, GCLK_CCL_NONE }, - { PORTA, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel18, EXTERNAL_INT_10, GCLK_CCL_NONE }, - { PORTA, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel19, EXTERNAL_INT_11, GCLK_CCL_NONE }, - - // 12..Digital functions - { PORTA, 12, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_12, GCLK_CCL_NONE }, - { PORTA, 13, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_13, GCLK_CCL_NONE }, - { PORTB, 14, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC1_CH0, No_ADC_Channel, EXTERNAL_INT_14, GCLK_CCL_NONE }, - { PORTB, 15, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC1_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC4_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 19, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC4_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 20, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC3_CH0, No_ADC_Channel, EXTERNAL_INT_4, GCLK_CCL_NONE }, - { PORTA, 21, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC3_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC0_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC0_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - - // 24..26 - USB_NEGATIVE and USB_POSITIVE, pin 26 does not exist - { PORTA, 24, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM - { PORTA, 25, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 27..29 - Digital functions - { PORTA, 27, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_15, GCLK_CCL_NONE }, - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 30..31 Digital functions / Debug interface (SWD CLK and SWD IO) - { PORTA, 30, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD CLK - { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD IO - - // 32..34 - X pins - { PORTB, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TC2_CH1, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, // X32 - { PORTB, 16, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, // X33 - { PORTB, 2, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC2_CH0, ADC_Channel10, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // X34, LED - - // 35..38 - Level Shifter Header - { PORTA, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel6, EXTERNAL_INT_6, GCLK_CCL_NONE }, // L35 - { PORTA, 7, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel7, EXTERNAL_INT_7, GCLK_CCL_NONE }, // L36 - { PORTA, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC1_CH2, ADC_Channel16, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, // L37 - { PORTA, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC1_CH3, ADC_Channel17, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // L38 - - // 39..42 - Motor Controller Header - { PORTB, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH4, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M39 - { PORTB, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH5, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M40 - { PORTB, 12, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH6, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M41 - { PORTB, 13, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH7, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M42 - - // 43..46 - SPI Header - { PORTB, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S43 - { PORTB, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S44 - { PORTB, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S45 - { PORTB, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S46 - - // 47..49 - No header pins - { PORTB, 4, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // 47 - { PORTB, 5, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_5, GCLK_CCL_NONE }, // 48 - { PORTB, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel11, EXTERNAL_INT_3, GCLK_CCL_NONE }, // 49 - -#elif (SAMC21) - // 0..11 - Analog capable pins - { PORTB, 0, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTB, 1, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_2, GCLK_CCL_NONE }, - { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 4, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel4, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 5, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel5, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTB, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel8, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTB, 7, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel9, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTB, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel4, EXTERNAL_INT_8, GCLK_CCL_NONE }, - { PORTB, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel5, EXTERNAL_INT_9, GCLK_CCL_NONE }, - { PORTA, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel10, EXTERNAL_INT_10, GCLK_CCL_NONE }, - { PORTA, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel11, EXTERNAL_INT_11, GCLK_CCL_NONE }, - - // 12..Digital functions - { PORTA, 12, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_12, GCLK_CCL_NONE }, - { PORTA, 13, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_13, GCLK_CCL_NONE }, - { PORTB, 14, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), TC1_CH0, No_ADC_Channel, EXTERNAL_INT_14, GCLK_CCL_NONE }, - { PORTB, 15, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_COM), TC1_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC4_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 19, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC4_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 20, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC3_CH0, No_ADC_Channel, EXTERNAL_INT_4, GCLK_CCL_NONE }, - { PORTA, 21, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC3_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC0_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC0_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - - // 24..26 - USB_NEGATIVE and USB_POSITIVE, pin 26 does not exist - { PORTA, 24, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM - { PORTA, 25, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 27..29 - Digital functions - { PORTA, 27, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_15, GCLK_CCL_NONE }, - { PORTA, 28, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 30..31 Digital functions / Debug interface (SWD CLK and SWD IO) - { PORTA, 30, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD CLK - { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD IO - - // 32..34 - X pins - { PORTB, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TC2_CH1, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, // X32 - { PORTB, 16, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, // X33 - { PORTB, 2, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_ADC_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC2_CH0, ADC_Channel2, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // X34, LED - - // 35..38 - Level Shifter Header - { PORTA, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel6, EXTERNAL_INT_6, GCLK_CCL_NONE }, // L35 - { PORTA, 7, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel7, EXTERNAL_INT_7, GCLK_CCL_NONE }, // L36 - { PORTA, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD|PER_ATTR_ADC_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC1_CH2, ADC_Channel10, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, // L37 - { PORTA, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD|PER_ATTR_ADC_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC1_CH3, ADC_Channel11, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // L38 - - // 39..42 - Motor Controller Header - { PORTB, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH4, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M39 - { PORTB, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH5, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M40 - { PORTB, 12, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH6, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M41 - { PORTB, 13, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH7, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M42 - - // 43..46 - SPI Header - { PORTB, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S43 - { PORTB, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S44 - { PORTB, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S45 - { PORTB, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S46 - - // 47..49 - No header pins - { PORTB, 4, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // 47 - { PORTB, 5, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_5, GCLK_CCL_NONE }, // 48 - { PORTB, 3, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel3, EXTERNAL_INT_3, GCLK_CCL_NONE }, // 49 - -#else - #error "variant.cpp: Unsupported chip" -#endif -} ; - -#if (SAMD21) -const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TCC1, TCC2, TC3, TC4, TC5, TC6, TC7 } ; -#elif (SAMC21 || SAML21) -const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TCC1, TCC2, TC0, TC1, TC2, TC3, TC4 } ; -#elif (SAMD51) -const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TCC1, TCC2, TCC3, TCC4, TC0, TC1, TC2, TC3, TC4, TC5 } ; -#endif - -// Multi-serial objects instantiation -SERCOM sercom0( SERCOM0 ) ; -SERCOM sercom1( SERCOM1 ) ; -SERCOM sercom2( SERCOM2 ) ; -SERCOM sercom3( SERCOM3 ) ; -SERCOM sercom4( SERCOM4 ) ; -SERCOM sercom5( SERCOM5 ) ; - -#if defined(ONE_UART) || defined(TWO_UART) || defined(THREE_UART) -Uart Serial1( SERCOM_INSTANCE_SERIAL1, PIN_SERIAL1_RX, PIN_SERIAL1_TX, PAD_SERIAL1_RX, PAD_SERIAL1_TX ) ; - - #if (SAMD51) - void SERCOM4_0_Handler(void) { - Serial1.dataRegisterEmptyHandler(); - } - - void SERCOM4_2_Handler(void) { - Serial1.availableDataHandler(); - } - - void SERCOM4_3_Handler(void) { - Serial1.errorHandler(); - } - #else - void SERCOM1_Handler() { - Serial1.IrqHandler(); - } - #endif -#endif - -#if defined(TWO_UART) || defined(THREE_UART) -Uart Serial2( SERCOM_INSTANCE_SERIAL2, PIN_SERIAL2_RX, PIN_SERIAL2_TX, PAD_SERIAL2_RX, PAD_SERIAL2_TX ) ; - - #if (SAMD51) - void SERCOM0_0_Handler(void) { - Serial2.dataRegisterEmptyHandler(); - } - - void SERCOM0_2_Handler(void) { - Serial2.availableDataHandler(); - } - - void SERCOM0_3_Handler(void) { - Serial2.errorHandler(); - } - #else - void SERCOM0_Handler() { - Serial2.IrqHandler(); - } - #endif -#endif - -#if defined(THREE_UART) -Uart Serial3( SERCOM_INSTANCE_SERIAL3, PIN_SERIAL3_RX, PIN_SERIAL3_TX, PAD_SERIAL3_RX, PAD_SERIAL3_TX ) ; - - #if (SAMD51) - void SERCOM4_0_Handler(void) { - Serial3.dataRegisterEmptyHandler(); - } - - void SERCOM4_2_Handler(void) { - Serial3.availableDataHandler(); - } - - void SERCOM4_3_Handler(void) { - Serial3.errorHandler(); - } - #else - void SERCOM4_Handler() { - Serial3.IrqHandler(); - } - #endif -#endif +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* + * Modified 29 January 2018 by Justin Mattair + * for MattairTech boards (www.mattairtech.com) + * + * See README.md for documentation and pin mapping information + */ + + +#include "variant.h" + +/* + * Pins descriptions + */ +const PinDescription g_APinDescription[]= +{ +#if (SAMD51) + // 0..11 - Analog capable pins + { PORTB, 0, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel12, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTB, 1, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel13, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_2, GCLK_CCL_NONE }, + { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 4, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel4, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 5, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, ADC_Channel5, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTB, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel8, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTB, 7, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel9, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTB, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC4_CH0, ADC_Channel0, EXTERNAL_INT_8, GCLK_CCL_NONE }, + { PORTB, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC4_CH1, ADC_Channel1, EXTERNAL_INT_9, GCLK_CCL_NONE }, + { PORTA, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH2, ADC_Channel10, EXTERNAL_INT_10, GCLK_CCL_NONE }, + { PORTA, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH3, ADC_Channel11, EXTERNAL_INT_11, GCLK_CCL_NONE }, + + // 12..Digital functions + { PORTA, 12, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH6, No_ADC_Channel, EXTERNAL_INT_12, GCLK_CCL_NONE }, + { PORTA, 13, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH7, No_ADC_Channel, EXTERNAL_INT_13, GCLK_CCL_NONE }, + { PORTB, 14, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TC5_CH0, No_ADC_Channel, EXTERNAL_INT_14, GCLK_CCL_NONE }, + { PORTB, 15, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TC5_CH1, No_ADC_Channel, EXTERNAL_INT_15, GCLK_CCL_NONE }, + { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC2_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC2_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC3_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 19, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC3_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 20, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC1_CH4, No_ADC_Channel, EXTERNAL_INT_4, GCLK_CCL_NONE }, + { PORTA, 21, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC1_CH5, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC1_CH6, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC1_CH7, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + + // 24..26 - USB_NEGATIVE and USB_POSITIVE, pin 26 does not exist + { PORTA, 24, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM + { PORTA, 25, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + + // 27..29 - Digital functions + { PORTA, 27, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + + // 30..31 Digital functions / Debug interface (SWD CLK and SWD IO) + { PORTA, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD CLK + { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD IO + + // 32..34 - X pins + { PORTB, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, // X32 + { PORTB, 16, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, // X33 + { PORTB, 2, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC2_CH2, ADC_Channel14, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // X34, LED + + // 35..38 - Level Shifter Header + { PORTA, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TC1_CH0, ADC_Channel6, EXTERNAL_INT_6, GCLK_CCL_NONE }, // L35 + { PORTA, 7, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TC1_CH1, ADC_Channel7, EXTERNAL_INT_7, GCLK_CCL_NONE }, // L36 + { PORTA, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC0_CH0, ADC_Channel2, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, // L37 + { PORTA, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC0_CH1, ADC_Channel3, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // L38 + + // 39..42 - Motor Controller Header + { PORTB, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH4, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M39 + { PORTB, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH5, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M40 + { PORTB, 12, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC3_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M41 + { PORTB, 13, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC3_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M42 + + // 43..46 - SPI Header + { PORTB, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC4_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S43 + { PORTB, 23, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S44 + { PORTB, 22, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S45 + { PORTB, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC4_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S46 + + // 47..49 - No header pins + { PORTB, 4, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // 47 + { PORTB, 5, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_5, GCLK_CCL_NONE }, // 48 + { PORTB, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel15, EXTERNAL_INT_3, GCLK_CCL_NONE }, // 49 + +#elif (SAMD21) + // 0..11 - Analog capable pins + { PORTB, 0, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel8, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTB, 1, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel9, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_2, GCLK_CCL_NONE }, + { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 4, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel4, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 5, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel5, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTB, 6, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel14, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTB, 7, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel15, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTB, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel2, EXTERNAL_INT_8, GCLK_CCL_NONE }, + { PORTB, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel3, EXTERNAL_INT_9, GCLK_CCL_NONE }, + { PORTA, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), NOT_ON_TIMER, ADC_Channel18, EXTERNAL_INT_10, GCLK_CCL_NONE }, + { PORTA, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), NOT_ON_TIMER, ADC_Channel19, EXTERNAL_INT_11, GCLK_CCL_NONE }, + + // 12..Digital functions + { PORTA, 12, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_12, GCLK_CCL_NONE }, + { PORTA, 13, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_13, GCLK_CCL_NONE }, + { PORTB, 14, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC5_CH0, No_ADC_Channel, EXTERNAL_INT_14, GCLK_CCL_NONE }, + { PORTB, 15, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC5_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC3_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 19, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_COM), TC3_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 20, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), TC7_CH0, No_ADC_Channel, EXTERNAL_INT_4, GCLK_CCL_NONE }, + { PORTA, 21, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_COM), TC7_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC4_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC4_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + + // 24..26 - USB_NEGATIVE and USB_POSITIVE, pin 26 does not exist + { PORTA, 24, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM + { PORTA, 25, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + + // 27..29 - Digital functions + { PORTA, 27, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_15, GCLK_CCL_NONE }, + { PORTA, 28, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + + // 30..31 Digital functions / Debug interface (SWD CLK and SWD IO) + { PORTA, 30, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD CLK + { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD IO + + // 32..34 - X pins + { PORTB, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT|PIN_ATTR_COM), TC6_CH1, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, // X32 + { PORTB, 16, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, // X33 + { PORTB, 2, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC6_CH0, ADC_Channel10, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // X34, LED + + // 35..38 - Level Shifter Header + { PORTA, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel6, EXTERNAL_INT_6, GCLK_CCL_NONE }, // L35 + { PORTA, 7, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), NOT_ON_TIMER, ADC_Channel7, EXTERNAL_INT_7, GCLK_CCL_NONE }, // L36 + { PORTA, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), TCC1_CH2, ADC_Channel16, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, // L37 + { PORTA, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_COM), TCC1_CH3, ADC_Channel17, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // L38 + + // 39..42 - Motor Controller Header + { PORTB, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH4, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M39 + { PORTB, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH5, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M40 + { PORTB, 12, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH6, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M41 + { PORTB, 13, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH7, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M42 + + // 43..46 - SPI Header + { PORTB, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S43 + { PORTB, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S44 + { PORTB, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S45 + { PORTB, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S46 + + // 47..49 - No header pins + { PORTB, 4, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // 47 + { PORTB, 5, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_5, GCLK_CCL_NONE }, // 48 + { PORTB, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel11, EXTERNAL_INT_3, GCLK_CCL_NONE }, // 49 + +#elif (SAML21) + // 0..11 - Analog capable pins + { PORTB, 0, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel8, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTB, 1, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel9, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_2, GCLK_CCL_NONE }, + { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 4, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel4, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 5, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel5, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTB, 6, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel14, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTB, 7, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel15, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTB, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel2, EXTERNAL_INT_8, GCLK_CCL_NONE }, + { PORTB, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel3, EXTERNAL_INT_9, GCLK_CCL_NONE }, + { PORTA, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel18, EXTERNAL_INT_10, GCLK_CCL_NONE }, + { PORTA, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel19, EXTERNAL_INT_11, GCLK_CCL_NONE }, + + // 12..Digital functions + { PORTA, 12, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_12, GCLK_CCL_NONE }, + { PORTA, 13, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_13, GCLK_CCL_NONE }, + { PORTB, 14, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC1_CH0, No_ADC_Channel, EXTERNAL_INT_14, GCLK_CCL_NONE }, + { PORTB, 15, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC1_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC4_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 19, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC4_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 20, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC3_CH0, No_ADC_Channel, EXTERNAL_INT_4, GCLK_CCL_NONE }, + { PORTA, 21, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC3_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC0_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC0_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + + // 24..26 - USB_NEGATIVE and USB_POSITIVE, pin 26 does not exist + { PORTA, 24, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM + { PORTA, 25, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + + // 27..29 - Digital functions + { PORTA, 27, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_15, GCLK_CCL_NONE }, + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + + // 30..31 Digital functions / Debug interface (SWD CLK and SWD IO) + { PORTA, 30, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD CLK + { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD IO + + // 32..34 - X pins + { PORTB, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TC2_CH1, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, // X32 + { PORTB, 16, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, // X33 + { PORTB, 2, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC2_CH0, ADC_Channel10, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // X34, LED + + // 35..38 - Level Shifter Header + { PORTA, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel6, EXTERNAL_INT_6, GCLK_CCL_NONE }, // L35 + { PORTA, 7, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel7, EXTERNAL_INT_7, GCLK_CCL_NONE }, // L36 + { PORTA, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC1_CH2, ADC_Channel16, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, // L37 + { PORTA, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC1_CH3, ADC_Channel17, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // L38 + + // 39..42 - Motor Controller Header + { PORTB, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH4, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M39 + { PORTB, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH5, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M40 + { PORTB, 12, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH6, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M41 + { PORTB, 13, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH7, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M42 + + // 43..46 - SPI Header + { PORTB, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S43 + { PORTB, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S44 + { PORTB, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S45 + { PORTB, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S46 + + // 47..49 - No header pins + { PORTB, 4, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // 47 + { PORTB, 5, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_5, GCLK_CCL_NONE }, // 48 + { PORTB, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel11, EXTERNAL_INT_3, GCLK_CCL_NONE }, // 49 + +#elif (SAMC21) + // 0..11 - Analog capable pins + { PORTB, 0, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTB, 1, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_2, GCLK_CCL_NONE }, + { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 4, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel4, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 5, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel5, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTB, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel8, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTB, 7, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel9, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTB, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel4, EXTERNAL_INT_8, GCLK_CCL_NONE }, + { PORTB, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel5, EXTERNAL_INT_9, GCLK_CCL_NONE }, + { PORTA, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel10, EXTERNAL_INT_10, GCLK_CCL_NONE }, + { PORTA, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel11, EXTERNAL_INT_11, GCLK_CCL_NONE }, + + // 12..Digital functions + { PORTA, 12, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_12, GCLK_CCL_NONE }, + { PORTA, 13, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_13, GCLK_CCL_NONE }, + { PORTB, 14, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), TC1_CH0, No_ADC_Channel, EXTERNAL_INT_14, GCLK_CCL_NONE }, + { PORTB, 15, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_COM), TC1_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC4_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 19, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC4_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 20, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC3_CH0, No_ADC_Channel, EXTERNAL_INT_4, GCLK_CCL_NONE }, + { PORTA, 21, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC3_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC0_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC0_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + + // 24..26 - USB_NEGATIVE and USB_POSITIVE, pin 26 does not exist + { PORTA, 24, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM + { PORTA, 25, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + + // 27..29 - Digital functions + { PORTA, 27, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_15, GCLK_CCL_NONE }, + { PORTA, 28, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, + { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused + + // 30..31 Digital functions / Debug interface (SWD CLK and SWD IO) + { PORTA, 30, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD CLK + { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SWD IO + + // 32..34 - X pins + { PORTB, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TC2_CH1, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, // X32 + { PORTB, 16, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, // X33 + { PORTB, 2, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_ADC_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TC2_CH0, ADC_Channel2, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // X34, LED + + // 35..38 - Level Shifter Header + { PORTA, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel6, EXTERNAL_INT_6, GCLK_CCL_NONE }, // L35 + { PORTA, 7, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel7, EXTERNAL_INT_7, GCLK_CCL_NONE }, // L36 + { PORTA, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD|PER_ATTR_ADC_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC1_CH2, ADC_Channel10, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, // L37 + { PORTA, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD|PER_ATTR_ADC_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC1_CH3, ADC_Channel11, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // L38 + + // 39..42 - Motor Controller Header + { PORTB, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH4, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M39 + { PORTB, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH5, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M40 + { PORTB, 12, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH6, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M41 + { PORTB, 13, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC0_CH7, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // M42 + + // 43..46 - SPI Header + { PORTB, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S43 + { PORTB, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S44 + { PORTB, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S45 + { PORTB, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // S46 + + // 47..49 - No header pins + { PORTB, 4, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // 47 + { PORTB, 5, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_5, GCLK_CCL_NONE }, // 48 + { PORTB, 3, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_ADC_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel3, EXTERNAL_INT_3, GCLK_CCL_NONE }, // 49 + +#else + #error "variant.cpp: Unsupported chip" +#endif +} ; + +#if (SAMD21) +const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TCC1, TCC2, TC3, TC4, TC5, TC6, TC7 } ; +#elif (SAMC21 || SAML21) +const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TCC1, TCC2, TC0, TC1, TC2, TC3, TC4 } ; +#elif (SAMD51) +const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TCC1, TCC2, TCC3, TCC4, TC0, TC1, TC2, TC3, TC4, TC5 } ; +#endif + +// Multi-serial objects instantiation +SERCOM sercom0( SERCOM0 ) ; +SERCOM sercom1( SERCOM1 ) ; +SERCOM sercom2( SERCOM2 ) ; +SERCOM sercom3( SERCOM3 ) ; +SERCOM sercom4( SERCOM4 ) ; +SERCOM sercom5( SERCOM5 ) ; + +#if defined(ONE_UART) || defined(TWO_UART) || defined(THREE_UART) +Uart Serial1( SERCOM_INSTANCE_SERIAL1, PIN_SERIAL1_RX, PIN_SERIAL1_TX, PAD_SERIAL1_RX, PAD_SERIAL1_TX ) ; + + #if (SAMD51) + void SERCOM4_0_Handler(void) { + Serial1.dataRegisterEmptyHandler(); + } + + void SERCOM4_2_Handler(void) { + Serial1.availableDataHandler(); + } + + void SERCOM4_3_Handler(void) { + Serial1.errorHandler(); + } + #else + void SERCOM1_Handler() { + Serial1.IrqHandler(); + } + #endif +#endif + +#if defined(TWO_UART) || defined(THREE_UART) +Uart Serial2( SERCOM_INSTANCE_SERIAL2, PIN_SERIAL2_RX, PIN_SERIAL2_TX, PAD_SERIAL2_RX, PAD_SERIAL2_TX ) ; + + #if (SAMD51) + void SERCOM0_0_Handler(void) { + Serial2.dataRegisterEmptyHandler(); + } + + void SERCOM0_2_Handler(void) { + Serial2.availableDataHandler(); + } + + void SERCOM0_3_Handler(void) { + Serial2.errorHandler(); + } + #else + void SERCOM0_Handler() { + Serial2.IrqHandler(); + } + #endif +#endif + +#if defined(THREE_UART) +Uart Serial3( SERCOM_INSTANCE_SERIAL3, PIN_SERIAL3_RX, PIN_SERIAL3_TX, PAD_SERIAL3_RX, PAD_SERIAL3_TX ) ; + + #if (SAMD51) + void SERCOM4_0_Handler(void) { + Serial3.dataRegisterEmptyHandler(); + } + + void SERCOM4_2_Handler(void) { + Serial3.availableDataHandler(); + } + + void SERCOM4_3_Handler(void) { + Serial3.errorHandler(); + } + #else + void SERCOM4_Handler() { + Serial3.IrqHandler(); + } + #endif +#endif diff --git a/variants/Xeno/variant.h b/variants/Generic_xx1J/variant.h similarity index 96% rename from variants/Xeno/variant.h rename to variants/Generic_xx1J/variant.h index 6344c0663..fb70d5f72 100644 --- a/variants/Xeno/variant.h +++ b/variants/Generic_xx1J/variant.h @@ -1,501 +1,501 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* - * Modified 29 January 2018 by Justin Mattair - * for MattairTech boards (www.mattairtech.com) - * - * See README.md for documentation and pin mapping information - */ - -#ifndef _VARIANT_MATTAIRTECH_XENO_ -#define _VARIANT_MATTAIRTECH_XENO_ - -/* The definitions here need the MattairTech SAMD core >=1.6.8. - * The format is different than the stock Arduino SAMD core, - * which uses ARDUINO_SAMD_VARIANT_COMPLIANCE instead. - */ -#define MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE 10608 - -/*---------------------------------------------------------------------------- - * Clock Configuration - *----------------------------------------------------------------------------*/ - -/* Master clock frequency (also Fcpu frequency). With the D51, this can be - * either 120000000ul or 48000000ul (selected in the menu). See README.md. - */ -#define VARIANT_MCK (F_CPU) - -/* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ - * must also be defined with the external crystal frequency in Hertz. - */ -#define HS_CRYSTAL_FREQUENCY_HERTZ 16000000UL - -/* If the PLL is used (CLOCKCONFIG_32768HZ_CRYSTAL, or CLOCKCONFIG_HS_CRYSTAL - * defined), then PLL_FRACTIONAL_ENABLED can be defined, which will result in - * a more accurate 48MHz output frequency at the expense of increased jitter. - */ -//#define PLL_FRACTIONAL_ENABLED - -/* If both PLL_FAST_STARTUP and CLOCKCONFIG_HS_CRYSTAL are defined, the crystal - * will be divided down to 1MHz - 2MHz, rather than 32KHz - 64KHz, before being - * multiplied by the PLL. This will result in a faster lock time for the PLL, - * however, it will also result in a less accurate PLL output frequency if the - * crystal is not divisible (without remainder) by 1MHz. In this case, define - * PLL_FRACTIONAL_ENABLED as well. - */ -//#define PLL_FAST_STARTUP - -/* The fine calibration value for DFLL open-loop mode is defined here. - * The coarse calibration value is loaded from NVM OTP (factory calibration values). - */ -#define NVM_SW_CALIB_DFLL48M_FINE_VAL (512) - -/* Define CORTEX_M_CACHE_ENABLED to enable the Cortex M cache (D51 only). - */ -#define CORTEX_M_CACHE_ENABLED - -/*---------------------------------------------------------------------------- - * Headers - *----------------------------------------------------------------------------*/ - -#include "WVariant.h" -#include "sam.h" - -#ifdef __cplusplus -#include "SERCOM.h" -#include "Uart.h" -#endif // __cplusplus - -#ifdef __cplusplus -extern "C" -{ -#endif // __cplusplus - -/*---------------------------------------------------------------------------- - * Pins - *----------------------------------------------------------------------------*/ - -// Number of pins defined in PinDescription array -#define NUM_PIN_DESCRIPTION_ENTRIES (50u) - -#define PINS_COUNT NUM_PIN_DESCRIPTION_ENTRIES -#define NUM_DIGITAL_PINS PINS_COUNT -#define NUM_ANALOG_INPUTS (18u) - -#if (SAMD21 || SAMC21) -#define NUM_ANALOG_OUTPUTS (1u) -#elif (SAMD51 || SAML21) -#define NUM_ANALOG_OUTPUTS (2u) -#else -#error "variant.h: Unsupported chip" -#endif - -#define analogInputToDigitalPin(p) (p) - -#define digitalPinToPort(P) ( &(PORT->Group[g_APinDescription[P].ulPort]) ) -#define digitalPinToBitMask(P) ( 1 << g_APinDescription[P].ulPin ) -//#define analogInPinToBit(P) ( ) -#define portOutputRegister(port) ( &(port->OUT.reg) ) -#define portInputRegister(port) ( &(port->IN.reg) ) -#define portModeRegister(port) ( &(port->DIR.reg) ) -#define digitalPinHasPWM(P) ( (g_APinDescription[P].ulPinAttribute & PIN_ATTR_TIMER_PWM) == PIN_ATTR_TIMER_PWM ) - -/* - * digitalPinToTimer(..) is AVR-specific and is not defined for SAMD - * architecture. If you need to check if a pin supports PWM you must - * use digitalPinHasPWM(..). - * - * https://github.com/arduino/Arduino/issues/1833 - */ -// #define digitalPinToTimer(P) - -/* LEDs - * None of these defines are currently used by the core. - * The Xeno onboard LED is on pin 34. - * The RX and TX LEDs are not present. - * You may optionally add them to any free pins. - */ -#define PIN_LED_13 (34u) -#define PIN_LED_RXL (22u) -#define PIN_LED_TXL (23u) -#define PIN_LED PIN_LED_13 -#define PIN_LED2 PIN_LED_RXL -#define PIN_LED3 PIN_LED_TXL -#define LED_BUILTIN PIN_LED_13 - -/* Buttons - * Note that Button is connected to Reset by default. - * A solder jumper can be changed to route Button B to pin 33 instead. - * There is a debouncing capacitor connected, so delay reading the pin for - * at least 45ms after turning on the pullup to allow the capacitor to charge. - */ -#define BUTTON (33u) -#define BUTTON_BUILTIN BUTTON - - -/* - * Analog pins - */ -#define PIN_A0 (0ul) -#define PIN_A1 (1ul) -#define PIN_A2 (2ul) -#define PIN_A3 (3ul) -#define PIN_A4 (4ul) -#define PIN_A5 (5ul) -#define PIN_A6 (6ul) -#define PIN_A7 (7ul) -#define PIN_A8 (8ul) -#define PIN_A9 (9ul) -#define PIN_A10 (10ul) -#define PIN_A11 (11ul) -#define PIN_A34 (34ul) -#define PIN_A35 (35ul) -#define PIN_A36 (36ul) -#define PIN_A37 (37ul) -#define PIN_A38 (38ul) -#define PIN_A49 (49ul) -#define PIN_DAC0 (2ul) -#if (SAMD51 || SAML21) -#define PIN_DAC1 (5ul) -#endif - -static const uint8_t A0 = PIN_A0; -static const uint8_t A1 = PIN_A1; -static const uint8_t A2 = PIN_A2; -static const uint8_t A3 = PIN_A3; -static const uint8_t A4 = PIN_A4; -static const uint8_t A5 = PIN_A5; -static const uint8_t A6 = PIN_A6; -static const uint8_t A7 = PIN_A7; -static const uint8_t A8 = PIN_A8; -static const uint8_t A9 = PIN_A9; -static const uint8_t A10 = PIN_A10; -static const uint8_t A11 = PIN_A11; -static const uint8_t A34 = PIN_A34; -static const uint8_t A35 = PIN_A35; -static const uint8_t A36 = PIN_A36; -static const uint8_t A37 = PIN_A37; -static const uint8_t A38 = PIN_A38; -static const uint8_t A49 = PIN_A49; -static const uint8_t DAC0 = PIN_DAC0; -#if (SAMD51 || SAML21) -static const uint8_t DAC1 = PIN_DAC1; -#endif - -#define ADC_RESOLUTION 12 - -// #define REMAP_ANALOG_PIN_ID(pin) if ( pin < A0 ) pin += A0 - -/* Set default analog voltage reference */ -#define VARIANT_AR_DEFAULT AR_DEFAULT - -/* Reference voltage pins (define even if not enabled with PIN_ATTR_REF in the PinDescription table) */ -#define REFA_PIN (3ul) -#define REFB_PIN (4ul) -#if (SAMD51) -#define REFC_PIN (35ul) -#endif - - -// The ATN pin may be used in the future as the first SPI chip select. -// On boards that do not have the Arduino physical form factor, it can to set to any free pin. -#if (SAMD21 || SAMC21) -#define PIN_ATN (28ul) -#elif (SAMD51 || SAML21) -#define PIN_ATN (21ul) -#endif -static const uint8_t ATN = PIN_ATN; - - -/* - * Serial interfaces - */ -#if (defined(THREE_UART) && SAMD51) - #error "variant.h: Only two UARTs are available with the D51. Please choose a TWO_UART_* option" -#endif - -// Serial1 -#if (SAMD51) - #define PIN_SERIAL1_RX (9ul) - #define PIN_SERIAL1_TX (8ul) - #define PAD_SERIAL1_TX (UART_TX_PAD_0) - #define PAD_SERIAL1_RX (SERCOM_RX_PAD_1) - #define SERCOM_INSTANCE_SERIAL1 &sercom4 -#else - #define PIN_SERIAL1_RX (31ul) - #define PIN_SERIAL1_TX (18ul) - #define PAD_SERIAL1_TX (UART_TX_PAD_2) - #define PAD_SERIAL1_RX (SERCOM_RX_PAD_3) - #define SERCOM_INSTANCE_SERIAL1 &sercom1 -#endif - -// Serial2 -#if (SAMD51) - #define PIN_SERIAL2_RX (5ul) - #define PIN_SERIAL2_TX (4ul) - #define PAD_SERIAL2_TX (UART_TX_PAD_0) - #define PAD_SERIAL2_RX (SERCOM_RX_PAD_1) - #define SERCOM_INSTANCE_SERIAL2 &sercom0 -#else - #define PIN_SERIAL2_RX (36ul) - #define PIN_SERIAL2_TX (35ul) - #define PAD_SERIAL2_TX (UART_TX_PAD_2) - #define PAD_SERIAL2_RX (SERCOM_RX_PAD_3) - #define SERCOM_INSTANCE_SERIAL2 &sercom0 -#endif - -// Serial3 (a third serial is not available with the D51 on this board) -#define PIN_SERIAL3_RX (9ul) -#define PIN_SERIAL3_TX (8ul) -#define PAD_SERIAL3_TX (UART_TX_PAD_0) -#define PAD_SERIAL3_RX (SERCOM_RX_PAD_1) - -#define SERCOM_INSTANCE_SERIAL3 &sercom4 - - -/* - * SPI Interfaces - */ -#if defined(TWO_SPI) -#define SPI_INTERFACES_COUNT 2 -#elif defined(THREE_SPI) -#define SPI_INTERFACES_COUNT 3 -#else -#define SPI_INTERFACES_COUNT 1 -#endif - -#if (SAMD51) -#define PIN_SPI_MISO (21u) -#define PIN_SPI_MOSI (23u) -#define PIN_SPI_SCK (22u) -#define PIN_SPI_SS (20u) -#define PAD_SPI_TX SPI_PAD_0_SCK_1 -#define PAD_SPI_RX SERCOM_RX_PAD_3 -#else -#define PIN_SPI_MISO (43u) -#define PIN_SPI_MOSI (45u) -#define PIN_SPI_SCK (44u) -#define PIN_SPI_SS (46u) -#define PAD_SPI_TX SPI_PAD_2_SCK_3 -#define PAD_SPI_RX SERCOM_RX_PAD_0 -#endif -#define PERIPH_SPI sercom5 - -static const uint8_t SS = PIN_SPI_SS ; // The SERCOM SS PAD is available on this pin but HW SS isn't used. Set here only for reference. -static const uint8_t MOSI = PIN_SPI_MOSI ; -static const uint8_t MISO = PIN_SPI_MISO ; -static const uint8_t SCK = PIN_SPI_SCK ; - -#if (SAMD51) -#define PIN_SPI1_MISO (11u) -#define PIN_SPI1_MOSI (38u) -#define PIN_SPI1_SCK (37u) -#define PIN_SPI1_SS (10u) -#define PAD_SPI1_TX SPI_PAD_0_SCK_1 -#define PAD_SPI1_RX SERCOM_RX_PAD_3 -#else -#define PIN_SPI1_MISO (12u) -#define PIN_SPI1_MOSI (10u) -#define PIN_SPI1_SCK (11u) -#define PIN_SPI1_SS (13u) -#define PAD_SPI1_TX SPI_PAD_2_SCK_3 -#define PAD_SPI1_RX SERCOM_RX_PAD_0 -#endif -#define PERIPH_SPI1 sercom2 - -static const uint8_t SS1 = PIN_SPI1_SS ; // The SERCOM SS PAD is available on this pin but HW SS isn't used. Set here only for reference. -static const uint8_t MOSI1 = PIN_SPI1_MOSI ; -static const uint8_t MISO1 = PIN_SPI1_MISO ; -static const uint8_t SCK1 = PIN_SPI1_SCK ; - - -/* - * Wire Interfaces - */ -#if defined(TWO_WIRE) -#define WIRE_INTERFACES_COUNT 2 -#elif defined(THREE_WIRE) -#define WIRE_INTERFACES_COUNT 3 -#else -#define WIRE_INTERFACES_COUNT 1 -#endif - -#define PIN_WIRE_SDA (16u) -#define PIN_WIRE_SCL (17u) -#if (SAMD51) - #define PERIPH_WIRE sercom1 - #define WIRE_STOP_DETECTED_HANDLER SERCOM1_0_Handler - #define WIRE_ADDRESS_MATCH_HANDLER SERCOM1_1_Handler - #define WIRE_DATA_READY_HANDLER SERCOM1_2_Handler -#else - #define PERIPH_WIRE sercom3 - #define WIRE_IT_HANDLER SERCOM3_Handler -#endif - -static const uint8_t SDA = PIN_WIRE_SDA; -static const uint8_t SCL = PIN_WIRE_SCL; - -#define PIN_WIRE1_SDA (12u) -#define PIN_WIRE1_SCL (13u) -#define PERIPH_WIRE1 sercom2 -#if (SAMD51) - #define WIRE1_STOP_DETECTED_HANDLER SERCOM2_0_Handler - #define WIRE1_ADDRESS_MATCH_HANDLER SERCOM2_1_Handler - #define WIRE1_DATA_READY_HANDLER SERCOM2_2_Handler -#else - #define WIRE1_IT_HANDLER SERCOM2_Handler -#endif - -static const uint8_t SDA1 = PIN_WIRE1_SDA; -static const uint8_t SCL1 = PIN_WIRE1_SCL; - - -/* - * USB - Define PIN_USB_HOST_ENABLE to assert the defined pin to - * PIN_USB_HOST_ENABLE_VALUE during startup. Leave undefined to disable this pin. - */ -#define PIN_USB_DM (24ul) -#define PIN_USB_DP (25ul) -//#define PIN_USB_HOST_ENABLE (14ul) -#define PIN_USB_HOST_ENABLE_VALUE 0 - -/* - * I2S Interfaces - * SAMD51, PDM, and MCLK support will be added hopefully March 2018 - */ - -#if (SAMD51) -// On the SAMD51, device 0 is TX only using SDO (PIN_I2S_SD), and device 1 is RX only using SDI (PIN_I2S1_SD) -#define I2S_INTERFACES_COUNT 2 -#define I2S_DEVICE 0 -#define I2S1_DEVICE 1 -#define I2S_CLOCK_GENERATOR 7 -#define I2S1_CLOCK_GENERATOR 7 -// TX -#define PIN_I2S_MCK (32u) -#define PIN_I2S_SCK (33u) -#define PIN_I2S_FS (20u) -#define PIN_I2S_SD (21u) // SDO (TX) -// RX (must use clock 0) -#define PIN_I2S1_MCK (32u) -#define PIN_I2S1_SCK (33u) -#define PIN_I2S1_FS (20u) -#define PIN_I2S1_SD (22u) // SDI (RX) - -#else -#define I2S_INTERFACES_COUNT 1 -#define I2S_DEVICE 0 -//#define I2S1_DEVICE 1 -#define I2S_CLOCK_GENERATOR 7 -//#define I2S1_CLOCK_GENERATOR 8 -//#define PIN_I2S_MCK (32u) -#define PIN_I2S_SCK (20u) -#define PIN_I2S_FS (21u) -#define PIN_I2S_SD (19u) -//#define PIN_I2S1_MCK (39u) -//#define PIN_I2S1_SCK (40u) -//#define PIN_I2S1_FS (41u) -//#define PIN_I2S1_SD (33u) -#endif - -#ifdef __cplusplus -} -#endif - - -/*---------------------------------------------------------------------------- - * Arduino objects - C++ only - *----------------------------------------------------------------------------*/ - -#ifdef __cplusplus - -/* ========================= - * ===== SERCOM DEFINITION - * ========================= -*/ -extern SERCOM sercom0; -extern SERCOM sercom1; -extern SERCOM sercom2; -extern SERCOM sercom3; -extern SERCOM sercom4; -extern SERCOM sercom5; - -extern Uart Serial1; -extern Uart Serial2; -#if (SAMD21 || SAMC21 || SAML21) -extern Uart Serial3; -#endif - -#endif - -// These serial port names are intended to allow libraries and architecture-neutral -// sketches to automatically default to the correct port name for a particular type -// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, -// the first hardware serial port whose RX/TX pins are not dedicated to another use. -// -// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor -// -// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial -// -// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library -// -// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. -// -// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX -// pins are NOT connected to anything by default. -#if (!SAMC21) - #define SERIAL_PORT_USBVIRTUAL SerialUSB -#endif -// SERIAL_PORT_MONITOR seems to be used only by the USB Host library (as of 1.6.5). -// It normally allows debugging output on the USB programming port, while the USB host uses the USB native port. -// The programming port is connected to a hardware UART through a USB-Serial bridge (EDBG chip) on the Zero. -// Boards that do not have the EDBG chip will have to connect a USB-TTL serial adapter to 'Serial' to get -// the USB Host debugging output. -#if (SAMC21) - #define SERIAL_PORT_MONITOR Serial2 -#else - #define SERIAL_PORT_MONITOR Serial1 -#endif - -// Serial has no physical pins broken out, so it's not listed as HARDWARE port -#if (SAMC21) - #define SERIAL_PORT_HARDWARE Serial2 - #define SERIAL_PORT_HARDWARE_OPEN Serial2 -#else - #define SERIAL_PORT_HARDWARE Serial1 - #define SERIAL_PORT_HARDWARE_OPEN Serial1 -#endif - -// The Xeno does not have the EDBG support chip, which provides a USB-UART bridge -// accessible using Serial (the Arduino serial monitor is normally connected to this). -// So, the USB virtual serial port (SerialUSB) must be used to communicate with the host. -// Because most sketches use Serial to print to the monitor, it is aliased to SerialUSB. -// Remember to use while(!Serial); to wait for a connection before Serial printing. -#if (SAMC21) - #define Serial Serial1 -#else - // When USB CDC is enabled, Serial refers to SerialUSB, otherwise it refers to Serial1. - #if defined(CDC_ONLY) || defined(CDC_HID) || defined(WITH_CDC) - #define Serial SerialUSB - #else - #define Serial Serial1 - #endif -#endif - -#endif /* _VARIANT_MATTAIRTECH_XENO_ */ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* + * Modified 29 January 2018 by Justin Mattair + * for MattairTech boards (www.mattairtech.com) + * + * See README.md for documentation and pin mapping information + */ + +#ifndef _VARIANT_GENERIC_XX1J_ +#define _VARIANT_GENERIC_XX1J_ + +/* The definitions here need the MattairTech SAMD core >=1.6.8. + * The format is different than the stock Arduino SAMD core, + * which uses ARDUINO_SAMD_VARIANT_COMPLIANCE instead. + */ +#define MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE 10608 + +/*---------------------------------------------------------------------------- + * Clock Configuration + *----------------------------------------------------------------------------*/ + +/* Master clock frequency (also Fcpu frequency). With the D51, this can be + * either 120000000ul or 48000000ul (selected in the menu). See README.md. + */ +#define VARIANT_MCK (F_CPU) + +/* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ + * must also be defined with the external crystal frequency in Hertz. + */ +#define HS_CRYSTAL_FREQUENCY_HERTZ 16000000UL + +/* If the PLL is used (CLOCKCONFIG_32768HZ_CRYSTAL, or CLOCKCONFIG_HS_CRYSTAL + * defined), then PLL_FRACTIONAL_ENABLED can be defined, which will result in + * a more accurate 48MHz output frequency at the expense of increased jitter. + */ +//#define PLL_FRACTIONAL_ENABLED + +/* If both PLL_FAST_STARTUP and CLOCKCONFIG_HS_CRYSTAL are defined, the crystal + * will be divided down to 1MHz - 2MHz, rather than 32KHz - 64KHz, before being + * multiplied by the PLL. This will result in a faster lock time for the PLL, + * however, it will also result in a less accurate PLL output frequency if the + * crystal is not divisible (without remainder) by 1MHz. In this case, define + * PLL_FRACTIONAL_ENABLED as well. + */ +//#define PLL_FAST_STARTUP + +/* The fine calibration value for DFLL open-loop mode is defined here. + * The coarse calibration value is loaded from NVM OTP (factory calibration values). + */ +#define NVM_SW_CALIB_DFLL48M_FINE_VAL (512) + +/* Define CORTEX_M_CACHE_ENABLED to enable the Cortex M cache (D51 only). + */ +#define CORTEX_M_CACHE_ENABLED + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" +#include "sam.h" + +#ifdef __cplusplus +#include "SERCOM.h" +#include "Uart.h" +#endif // __cplusplus + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +/*---------------------------------------------------------------------------- + * Pins + *----------------------------------------------------------------------------*/ + +// Number of pins defined in PinDescription array +#define NUM_PIN_DESCRIPTION_ENTRIES (50u) + +#define PINS_COUNT NUM_PIN_DESCRIPTION_ENTRIES +#define NUM_DIGITAL_PINS PINS_COUNT +#define NUM_ANALOG_INPUTS (18u) + +#if (SAMD21 || SAMC21) +#define NUM_ANALOG_OUTPUTS (1u) +#elif (SAMD51 || SAML21) +#define NUM_ANALOG_OUTPUTS (2u) +#else +#error "variant.h: Unsupported chip" +#endif + +#define analogInputToDigitalPin(p) (p) + +#define digitalPinToPort(P) ( &(PORT->Group[g_APinDescription[P].ulPort]) ) +#define digitalPinToBitMask(P) ( 1 << g_APinDescription[P].ulPin ) +//#define analogInPinToBit(P) ( ) +#define portOutputRegister(port) ( &(port->OUT.reg) ) +#define portInputRegister(port) ( &(port->IN.reg) ) +#define portModeRegister(port) ( &(port->DIR.reg) ) +#define digitalPinHasPWM(P) ( (g_APinDescription[P].ulPinAttribute & PIN_ATTR_TIMER_PWM) == PIN_ATTR_TIMER_PWM ) + +/* + * digitalPinToTimer(..) is AVR-specific and is not defined for SAMD + * architecture. If you need to check if a pin supports PWM you must + * use digitalPinHasPWM(..). + * + * https://github.com/arduino/Arduino/issues/1833 + */ +// #define digitalPinToTimer(P) + +/* LEDs + * None of these defines are currently used by the core. + * The Xeno onboard LED is on pin 34. + * The RX and TX LEDs are not present. + * You may optionally add them to any free pins. + */ +#define PIN_LED_13 (34u) +#define PIN_LED_RXL (22u) +#define PIN_LED_TXL (23u) +#define PIN_LED PIN_LED_13 +#define PIN_LED2 PIN_LED_RXL +#define PIN_LED3 PIN_LED_TXL +#define LED_BUILTIN PIN_LED_13 + +/* Buttons + * Note that Button is connected to Reset by default. + * A solder jumper can be changed to route Button B to pin 33 instead. + * There is a debouncing capacitor connected, so delay reading the pin for + * at least 45ms after turning on the pullup to allow the capacitor to charge. + */ +#define BUTTON (33u) +#define BUTTON_BUILTIN BUTTON + + +/* + * Analog pins + */ +#define PIN_A0 (0ul) +#define PIN_A1 (1ul) +#define PIN_A2 (2ul) +#define PIN_A3 (3ul) +#define PIN_A4 (4ul) +#define PIN_A5 (5ul) +#define PIN_A6 (6ul) +#define PIN_A7 (7ul) +#define PIN_A8 (8ul) +#define PIN_A9 (9ul) +#define PIN_A10 (10ul) +#define PIN_A11 (11ul) +#define PIN_A34 (34ul) +#define PIN_A35 (35ul) +#define PIN_A36 (36ul) +#define PIN_A37 (37ul) +#define PIN_A38 (38ul) +#define PIN_A49 (49ul) +#define PIN_DAC0 (2ul) +#if (SAMD51 || SAML21) +#define PIN_DAC1 (5ul) +#endif + +static const uint8_t A0 = PIN_A0; +static const uint8_t A1 = PIN_A1; +static const uint8_t A2 = PIN_A2; +static const uint8_t A3 = PIN_A3; +static const uint8_t A4 = PIN_A4; +static const uint8_t A5 = PIN_A5; +static const uint8_t A6 = PIN_A6; +static const uint8_t A7 = PIN_A7; +static const uint8_t A8 = PIN_A8; +static const uint8_t A9 = PIN_A9; +static const uint8_t A10 = PIN_A10; +static const uint8_t A11 = PIN_A11; +static const uint8_t A34 = PIN_A34; +static const uint8_t A35 = PIN_A35; +static const uint8_t A36 = PIN_A36; +static const uint8_t A37 = PIN_A37; +static const uint8_t A38 = PIN_A38; +static const uint8_t A49 = PIN_A49; +static const uint8_t DAC0 = PIN_DAC0; +#if (SAMD51 || SAML21) +static const uint8_t DAC1 = PIN_DAC1; +#endif + +#define ADC_RESOLUTION 12 + +// #define REMAP_ANALOG_PIN_ID(pin) if ( pin < A0 ) pin += A0 + +/* Set default analog voltage reference */ +#define VARIANT_AR_DEFAULT AR_DEFAULT + +/* Reference voltage pins (define even if not enabled with PIN_ATTR_REF in the PinDescription table) */ +#define REFA_PIN (3ul) +#define REFB_PIN (4ul) +#if (SAMD51) +#define REFC_PIN (35ul) +#endif + + +// The ATN pin may be used in the future as the first SPI chip select. +// On boards that do not have the Arduino physical form factor, it can to set to any free pin. +#if (SAMD21 || SAMC21) +#define PIN_ATN (28ul) +#elif (SAMD51 || SAML21) +#define PIN_ATN (21ul) +#endif +static const uint8_t ATN = PIN_ATN; + + +/* + * Serial interfaces + */ +#if (defined(THREE_UART) && SAMD51) + #error "variant.h: Only two UARTs are available with the D51. Please choose a TWO_UART_* option" +#endif + +// Serial1 +#if (SAMD51) + #define PIN_SERIAL1_RX (9ul) + #define PIN_SERIAL1_TX (8ul) + #define PAD_SERIAL1_TX (UART_TX_PAD_0) + #define PAD_SERIAL1_RX (SERCOM_RX_PAD_1) + #define SERCOM_INSTANCE_SERIAL1 &sercom4 +#else + #define PIN_SERIAL1_RX (31ul) + #define PIN_SERIAL1_TX (18ul) + #define PAD_SERIAL1_TX (UART_TX_PAD_2) + #define PAD_SERIAL1_RX (SERCOM_RX_PAD_3) + #define SERCOM_INSTANCE_SERIAL1 &sercom1 +#endif + +// Serial2 +#if (SAMD51) + #define PIN_SERIAL2_RX (5ul) + #define PIN_SERIAL2_TX (4ul) + #define PAD_SERIAL2_TX (UART_TX_PAD_0) + #define PAD_SERIAL2_RX (SERCOM_RX_PAD_1) + #define SERCOM_INSTANCE_SERIAL2 &sercom0 +#else + #define PIN_SERIAL2_RX (36ul) + #define PIN_SERIAL2_TX (35ul) + #define PAD_SERIAL2_TX (UART_TX_PAD_2) + #define PAD_SERIAL2_RX (SERCOM_RX_PAD_3) + #define SERCOM_INSTANCE_SERIAL2 &sercom0 +#endif + +// Serial3 (a third serial is not available with the D51 on this board) +#define PIN_SERIAL3_RX (9ul) +#define PIN_SERIAL3_TX (8ul) +#define PAD_SERIAL3_TX (UART_TX_PAD_0) +#define PAD_SERIAL3_RX (SERCOM_RX_PAD_1) + +#define SERCOM_INSTANCE_SERIAL3 &sercom4 + + +/* + * SPI Interfaces + */ +#if defined(TWO_SPI) +#define SPI_INTERFACES_COUNT 2 +#elif defined(THREE_SPI) +#define SPI_INTERFACES_COUNT 3 +#else +#define SPI_INTERFACES_COUNT 1 +#endif + +#if (SAMD51) +#define PIN_SPI_MISO (21u) +#define PIN_SPI_MOSI (23u) +#define PIN_SPI_SCK (22u) +#define PIN_SPI_SS (20u) +#define PAD_SPI_TX SPI_PAD_0_SCK_1 +#define PAD_SPI_RX SERCOM_RX_PAD_3 +#else +#define PIN_SPI_MISO (43u) +#define PIN_SPI_MOSI (45u) +#define PIN_SPI_SCK (44u) +#define PIN_SPI_SS (46u) +#define PAD_SPI_TX SPI_PAD_2_SCK_3 +#define PAD_SPI_RX SERCOM_RX_PAD_0 +#endif +#define PERIPH_SPI sercom5 + +static const uint8_t SS = PIN_SPI_SS ; // The SERCOM SS PAD is available on this pin but HW SS isn't used. Set here only for reference. +static const uint8_t MOSI = PIN_SPI_MOSI ; +static const uint8_t MISO = PIN_SPI_MISO ; +static const uint8_t SCK = PIN_SPI_SCK ; + +#if (SAMD51) +#define PIN_SPI1_MISO (11u) +#define PIN_SPI1_MOSI (38u) +#define PIN_SPI1_SCK (37u) +#define PIN_SPI1_SS (10u) +#define PAD_SPI1_TX SPI_PAD_0_SCK_1 +#define PAD_SPI1_RX SERCOM_RX_PAD_3 +#else +#define PIN_SPI1_MISO (12u) +#define PIN_SPI1_MOSI (10u) +#define PIN_SPI1_SCK (11u) +#define PIN_SPI1_SS (13u) +#define PAD_SPI1_TX SPI_PAD_2_SCK_3 +#define PAD_SPI1_RX SERCOM_RX_PAD_0 +#endif +#define PERIPH_SPI1 sercom2 + +static const uint8_t SS1 = PIN_SPI1_SS ; // The SERCOM SS PAD is available on this pin but HW SS isn't used. Set here only for reference. +static const uint8_t MOSI1 = PIN_SPI1_MOSI ; +static const uint8_t MISO1 = PIN_SPI1_MISO ; +static const uint8_t SCK1 = PIN_SPI1_SCK ; + + +/* + * Wire Interfaces + */ +#if defined(TWO_WIRE) +#define WIRE_INTERFACES_COUNT 2 +#elif defined(THREE_WIRE) +#define WIRE_INTERFACES_COUNT 3 +#else +#define WIRE_INTERFACES_COUNT 1 +#endif + +#define PIN_WIRE_SDA (16u) +#define PIN_WIRE_SCL (17u) +#if (SAMD51) + #define PERIPH_WIRE sercom1 + #define WIRE_STOP_DETECTED_HANDLER SERCOM1_0_Handler + #define WIRE_ADDRESS_MATCH_HANDLER SERCOM1_1_Handler + #define WIRE_DATA_READY_HANDLER SERCOM1_2_Handler +#else + #define PERIPH_WIRE sercom3 + #define WIRE_IT_HANDLER SERCOM3_Handler +#endif + +static const uint8_t SDA = PIN_WIRE_SDA; +static const uint8_t SCL = PIN_WIRE_SCL; + +#define PIN_WIRE1_SDA (12u) +#define PIN_WIRE1_SCL (13u) +#define PERIPH_WIRE1 sercom2 +#if (SAMD51) + #define WIRE1_STOP_DETECTED_HANDLER SERCOM2_0_Handler + #define WIRE1_ADDRESS_MATCH_HANDLER SERCOM2_1_Handler + #define WIRE1_DATA_READY_HANDLER SERCOM2_2_Handler +#else + #define WIRE1_IT_HANDLER SERCOM2_Handler +#endif + +static const uint8_t SDA1 = PIN_WIRE1_SDA; +static const uint8_t SCL1 = PIN_WIRE1_SCL; + + +/* + * USB - Define PIN_USB_HOST_ENABLE to assert the defined pin to + * PIN_USB_HOST_ENABLE_VALUE during startup. Leave undefined to disable this pin. + */ +#define PIN_USB_DM (24ul) +#define PIN_USB_DP (25ul) +//#define PIN_USB_HOST_ENABLE (14ul) +#define PIN_USB_HOST_ENABLE_VALUE 0 + +/* + * I2S Interfaces + * SAMD51, PDM, and MCLK support will be added hopefully March 2018 + */ + +#if (SAMD51) +// On the SAMD51, device 0 is TX only using SDO (PIN_I2S_SD), and device 1 is RX only using SDI (PIN_I2S1_SD) +#define I2S_INTERFACES_COUNT 2 +#define I2S_DEVICE 0 +#define I2S1_DEVICE 1 +#define I2S_CLOCK_GENERATOR 7 +#define I2S1_CLOCK_GENERATOR 7 +// TX +#define PIN_I2S_MCK (32u) +#define PIN_I2S_SCK (33u) +#define PIN_I2S_FS (20u) +#define PIN_I2S_SD (21u) // SDO (TX) +// RX (must use clock 0) +#define PIN_I2S1_MCK (32u) +#define PIN_I2S1_SCK (33u) +#define PIN_I2S1_FS (20u) +#define PIN_I2S1_SD (22u) // SDI (RX) + +#else +#define I2S_INTERFACES_COUNT 1 +#define I2S_DEVICE 0 +//#define I2S1_DEVICE 1 +#define I2S_CLOCK_GENERATOR 7 +//#define I2S1_CLOCK_GENERATOR 8 +//#define PIN_I2S_MCK (32u) +#define PIN_I2S_SCK (20u) +#define PIN_I2S_FS (21u) +#define PIN_I2S_SD (19u) +//#define PIN_I2S1_MCK (39u) +//#define PIN_I2S1_SCK (40u) +//#define PIN_I2S1_FS (41u) +//#define PIN_I2S1_SD (33u) +#endif + +#ifdef __cplusplus +} +#endif + + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#ifdef __cplusplus + +/* ========================= + * ===== SERCOM DEFINITION + * ========================= +*/ +extern SERCOM sercom0; +extern SERCOM sercom1; +extern SERCOM sercom2; +extern SERCOM sercom3; +extern SERCOM sercom4; +extern SERCOM sercom5; + +extern Uart Serial1; +extern Uart Serial2; +#if (SAMD21 || SAMC21 || SAML21) +extern Uart Serial3; +#endif + +#endif + +// These serial port names are intended to allow libraries and architecture-neutral +// sketches to automatically default to the correct port name for a particular type +// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, +// the first hardware serial port whose RX/TX pins are not dedicated to another use. +// +// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor +// +// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial +// +// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library +// +// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. +// +// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX +// pins are NOT connected to anything by default. +#if (!SAMC21) + #define SERIAL_PORT_USBVIRTUAL SerialUSB +#endif +// SERIAL_PORT_MONITOR seems to be used only by the USB Host library (as of 1.6.5). +// It normally allows debugging output on the USB programming port, while the USB host uses the USB native port. +// The programming port is connected to a hardware UART through a USB-Serial bridge (EDBG chip) on the Zero. +// Boards that do not have the EDBG chip will have to connect a USB-TTL serial adapter to 'Serial' to get +// the USB Host debugging output. +#if (SAMC21) + #define SERIAL_PORT_MONITOR Serial2 +#else + #define SERIAL_PORT_MONITOR Serial1 +#endif + +// Serial has no physical pins broken out, so it's not listed as HARDWARE port +#if (SAMC21) + #define SERIAL_PORT_HARDWARE Serial2 + #define SERIAL_PORT_HARDWARE_OPEN Serial2 +#else + #define SERIAL_PORT_HARDWARE Serial1 + #define SERIAL_PORT_HARDWARE_OPEN Serial1 +#endif + +// The Xeno does not have the EDBG support chip, which provides a USB-UART bridge +// accessible using Serial (the Arduino serial monitor is normally connected to this). +// So, the USB virtual serial port (SerialUSB) must be used to communicate with the host. +// Because most sketches use Serial to print to the monitor, it is aliased to SerialUSB. +// Remember to use while(!Serial); to wait for a connection before Serial printing. +#if (SAMC21) + #define Serial Serial1 +#else + // When USB CDC is enabled, Serial refers to SerialUSB, otherwise it refers to Serial1. + #if defined(CDC_ONLY) || defined(CDC_HID) || defined(WITH_CDC) + #define Serial SerialUSB + #else + #define Serial Serial1 + #endif +#endif + +#endif /* _VARIANT_GENERIC_XX1J_ */ diff --git a/variants/MT_D21E/debug_scripts/SAMC21E15A.gdb b/variants/MT_D21E/debug_scripts/SAMC21E15A.gdb deleted file mode 100644 index 070351956..000000000 --- a/variants/MT_D21E/debug_scripts/SAMC21E15A.gdb +++ /dev/null @@ -1,31 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21e15" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/MT_D21E/debug_scripts/SAMC21E16A.gdb b/variants/MT_D21E/debug_scripts/SAMC21E16A.gdb deleted file mode 100644 index acabddd1d..000000000 --- a/variants/MT_D21E/debug_scripts/SAMC21E16A.gdb +++ /dev/null @@ -1,31 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21e16" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/MT_D21E/debug_scripts/SAMC21E18A.gdb b/variants/MT_D21E/debug_scripts/SAMC21E18A.gdb deleted file mode 100644 index 2ca3b2cdc..000000000 --- a/variants/MT_D21E/debug_scripts/SAMC21E18A.gdb +++ /dev/null @@ -1,31 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21e18" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/MT_D21E/linker_scripts/gcc/8KB_Bootloader/flash_256KB.ld b/variants/MT_D21E/linker_scripts/gcc/8KB_Bootloader/flash_256KB.ld deleted file mode 100644 index 39944cffc..000000000 --- a/variants/MT_D21E/linker_scripts/gcc/8KB_Bootloader/flash_256KB.ld +++ /dev/null @@ -1,217 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00040000-0x2000 /* First 8KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x2000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} diff --git a/variants/MT_D21E/linker_scripts/gcc/8KB_Bootloader/flash_32KB.ld b/variants/MT_D21E/linker_scripts/gcc/8KB_Bootloader/flash_32KB.ld deleted file mode 100644 index 0d3aaf7a9..000000000 --- a/variants/MT_D21E/linker_scripts/gcc/8KB_Bootloader/flash_32KB.ld +++ /dev/null @@ -1,217 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00008000-0x2000 /* First 8KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x2000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} diff --git a/variants/MT_D21E/linker_scripts/gcc/No_Bootloader/flash_128KB.ld b/variants/MT_D21E/linker_scripts/gcc/No_Bootloader/flash_128KB.ld deleted file mode 100644 index 74945d7da..000000000 --- a/variants/MT_D21E/linker_scripts/gcc/No_Bootloader/flash_128KB.ld +++ /dev/null @@ -1,215 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00020000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00004000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - * __ram_end__ - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} diff --git a/variants/MT_D21E/linker_scripts/gcc/No_Bootloader/flash_256KB.ld b/variants/MT_D21E/linker_scripts/gcc/No_Bootloader/flash_256KB.ld deleted file mode 100644 index 81adfe22d..000000000 --- a/variants/MT_D21E/linker_scripts/gcc/No_Bootloader/flash_256KB.ld +++ /dev/null @@ -1,215 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - * __ram_end__ - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} diff --git a/variants/MT_D21E/openocd_scripts/SAMC21E16A.cfg b/variants/MT_D21E/openocd_scripts/SAMC21E16A.cfg deleted file mode 100644 index 613b357da..000000000 --- a/variants/MT_D21E/openocd_scripts/SAMC21E16A.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samc21e16 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samcXX.cfg] diff --git a/variants/MT_D21E/openocd_scripts/SAMC21E17A.cfg b/variants/MT_D21E/openocd_scripts/SAMC21E17A.cfg deleted file mode 100644 index c687b08f0..000000000 --- a/variants/MT_D21E/openocd_scripts/SAMC21E17A.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samc21e17 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samcXX.cfg] diff --git a/variants/MT_D21E/openocd_scripts/SAMC21E18A.cfg b/variants/MT_D21E/openocd_scripts/SAMC21E18A.cfg deleted file mode 100644 index b87fb0116..000000000 --- a/variants/MT_D21E/openocd_scripts/SAMC21E18A.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samc21e18 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samcXX.cfg] diff --git a/variants/MT_D21E/openocd_scripts/SAMD21E16A.cfg b/variants/MT_D21E/openocd_scripts/SAMD21E16A.cfg deleted file mode 100644 index 4eaf7acfc..000000000 --- a/variants/MT_D21E/openocd_scripts/SAMD21E16A.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samd21e16 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samdXX.cfg] diff --git a/variants/MT_D21E/openocd_scripts/SAMD21E17A.cfg b/variants/MT_D21E/openocd_scripts/SAMD21E17A.cfg deleted file mode 100644 index 6b5641483..000000000 --- a/variants/MT_D21E/openocd_scripts/SAMD21E17A.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samd21e17 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samdXX.cfg] diff --git a/variants/MT_D21E/openocd_scripts/SAMD21E18A.cfg b/variants/MT_D21E/openocd_scripts/SAMD21E18A.cfg deleted file mode 100644 index b99d610ef..000000000 --- a/variants/MT_D21E/openocd_scripts/SAMD21E18A.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samd21e18 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samdXX.cfg] diff --git a/variants/MT_D21E/openocd_scripts/SAML21E16B.cfg b/variants/MT_D21E/openocd_scripts/SAML21E16B.cfg deleted file mode 100644 index c74f6102a..000000000 --- a/variants/MT_D21E/openocd_scripts/SAML21E16B.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91saml21e16 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samlXX.cfg] diff --git a/variants/MT_D21E/openocd_scripts/SAML21E17B.cfg b/variants/MT_D21E/openocd_scripts/SAML21E17B.cfg deleted file mode 100644 index 3b844e436..000000000 --- a/variants/MT_D21E/openocd_scripts/SAML21E17B.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91saml21e17 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samlXX.cfg] diff --git a/variants/MT_D21E/openocd_scripts/SAML21E18B.cfg b/variants/MT_D21E/openocd_scripts/SAML21E18B.cfg deleted file mode 100644 index 4e7a27fde..000000000 --- a/variants/MT_D21E/openocd_scripts/SAML21E18B.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91saml21e18 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samlXX.cfg] diff --git a/variants/MT_D21E_revB/README.md b/variants/MT_D21E_revB/README.md deleted file mode 100644 index 2b510eb59..000000000 --- a/variants/MT_D21E_revB/README.md +++ /dev/null @@ -1,337 +0,0 @@ -# MattairTech MT-D21E (rev B) (ATSAMx21Exxx) - -``` -========================== MattairTech MT-D21E rev B (ATSAMx21Exxx) ===================== -Other COM PWM Analog INT Arduino* Arduino* INT PWM COM Other -========================================================================================= - ------------------- -XI32(+) | A0 RST | BOOT(+) -XO32(+) | A1 Gnd | -DAC * 2 | A2 Vbat | -REFA * 3 | A3 A31 | 31 * RX3 IO/B(+) -REFB * * 4 | A4 A30 | 30 * TX3 CLK(+) -DAC1(L) * * 5 | A5 NC | -LED(+) TCC10 * 6 | A6 A28 (D/C)| 28 * -VM TCC11 * 7 | A7 A27 | 27 * A/CS(+M) - SDA1/MISO1 TCC00 * NMI 8 | A8 A23 | 23 * TC41/TC01~ SS - SCL1/SS1 TCC01 * * 9 | A9 A22 | 22 * TC40/TC00~ MISO(+M) - TX1 TCC02 * 10 | A10 A19 | 19 * SCK(+M) - RX1 TCC03 * 11 | A11 A18 | 18 * MOSI(+M) - TX2/MOSI1 TC30/TC40~ * 14 | A14 A17 | 17 * TCC21 SCL/RX4(+) - RX2/SCK1 TC31/TC41~ 15 | A15 A16 | 16 * TCC20 SDA/TX4(+) - | NC NC | - M=Memory device installed | NC NC | ! Vcc is 3.3V by default. - | Vbus 3.3V| DO NOT exceed 3.6V on Vcc or -USB D- (D/L)(+), CAN TX (C) TC50 24 | A24 _____ Vcc | any IO pin with the D21 or -USB D+ (D/L)(+), CAN RX (C) TC51 25 | A25 | | Vin | L21 installed. 5V is allowed - | Gnd | USB | Gnd | ONLY with the C21 installed. - Chip Variant: ------------------- - D=D21, L=L21, C=C21 - -* Most pins can be used for more than one function. The port pin number printed - on the board is also used in Arduino (but without the 'A') for all of the supported - functions (ie: digitalRead(), analogRead(), analogWrite(), attachInterrupt(), etc.). -* When USB CDC is enabled, Serial refers to SerialUSB, otherwise it refers to Serial1. -* Leave pin A30 floating (or use external pullup) during reset. -* Tone available on TC5. - -+ This alternate function is enabled by default (+M functions enabled only when a memory - device is installed). Thus, the associated header pin cannot be used. Solder jumpers - can be used to enable or disable the alternate onboard function. - -~ When two timers are shown, the second is for L21/C21. TC5 is TC1 on the L21/C21. - -Silkscreen Legend: - Top: A circled pin means analog function and '*' means alternate function (see + above) - Bottom: A circled pin means analog function -``` - -## COM Arrangement When Using "L21 Only" Options - -The following applies only to the L21 and only when using menu options with (L21 only). -If using the L21 with the other options, use the above ASCII diagram. - -The additional options are: - -* FOUR_UART_ONE_WIRE_ONE_SPI -* FIVE_UART_NO_WIRE_ONE_SPI -* FIVE_UART_ONE_WIRE_NO_SPI -* SIX_UART_NO_WIRE_NO_SPI - -``` - ------------------- - | A0 RST | - | A1 Gnd | - | A2 Vbat | - | A3 A31 | - | A4 A30 | - | A5 NC | - | A6 NC | - | A7 A27 | CS (MEM) -TX3 | A8 A23 | SS/RX5 -RX3 | A9 A22 | MISO/TX5 -TX1 | A10 A19 | SCK -RX1 | A11 A18 | MOSI -TX2 | A14 A17 | SCL/RX5/RX6 -RX2 | A15 A16 | SDA/TX5/TX6 - | NC NC | - | NC NC | - | Vbus 3.3V| -USB/TX4 | A24 _____ Vcc | -USB/RX4 | A25 | | Vin | - | Gnd | USB | Gnd | - ------------------- - -* If the memory device is installed, it is connected to SPI (A18, A19, and A22). - If selecting an option without SPI, then A22 will become TX5. Be sure to keep the - memory device CS pin high. You can disconnect A27 from CS by desoldering J13. -* Serial4 is shared with the USB pins. Thus, USB cannot be used is using Serial4. Be - sure to disconnect the USB connector D- and D+ pins by desoldering J4 and J7. -* It is not necessary to use all serial instances, and they can be skipped. For - example, with the FIVE_UART_NO_WIRE_ONE_SPI option, USB can still be used by NOT - calling Serial4.begin(), thus not enabling the Serial4 peripheral. However, Serial5 - can still be used. -* Serial5 can be located either on pins A16/A17 or A22/A23. If SPI is enabled, then - Serial5 is on pins A16/A17, otherwise it is on pins A22/A23. -* SERCOM5 has low-power capabilities and can run in power domain PD0, at the expense - of DMA support and a few other features (see core README.md). It is available in two - locations only, A24/A25 and A22/A23. If SPI is enabled, then SERCOM5 is connected to - Serial4 on A24/A25 (must disable USB), otherwise, it uses Serial5 on A22/A23. -* When USB CDC is enabled, Serial refers to SerialUSB, otherwise it refers to Serial1. -``` - - -## Pins descriptions for the MattairTech MT-D21E (rev B) -``` -============================================================================================================================================ -Arduino | Silk | Port | Alternate Function | Comments (! means not used with this peripheral assignment) ---------|-------|-------|-----------------------|------------------------------------------------------------------------------------------- -0 | A0 | PA00 | Xin32 | Xin32 -1 | A1 | PA01 | Xout32 | Xout32 -2 | A2 | PA02 | DAC0 | !EIC/EXTINT[2] ADC/AIN[0] PTC/Y[0] DAC/VOUT -3 | A3 | PA03 | REFA | !EIC/EXTINT[3] REF/ADC/VREFA REF/DAC/VREFA ADC/AIN[1] PTC/Y[1] -4 | A4 | PA04 | REFB | EIC/EXTINT[4] REF/ADC/VREFB ADC/AIN[4] AC/AIN[0] PTC/Y[2] !SERCOM0/PAD[0] !TCC0/WO[0] -5 | A5 | PA05 | DAC1(L21) | EIC/EXTINT[5] ADC/AIN[5] AC/AIN[1] PTC/Y[3] !SERCOM0/PAD[1] !TCC0/WO[1] DAC1(L21) -6 | A6 | PA06 | LED | !EIC/EXTINT[6] ADC/AIN[6] AC/AIN[2] PTC/Y[4] !SERCOM0/PAD[2] !TCC1/WO[0] LED -7 | A7 | PA07 | Voltage Measurement | !EIC/EXTINT[7] ADC/AIN[7] AC/AIN[3] PTC/Y[5] !SERCOM0/PAD[3] !TCC1/WO[1] -8 | A8 | PA08 | SDA1/MISO1 | EIC/NMI ADC/AIN[16] PTC/X[0] !SERCOM0/PAD[0] SERCOM2/PAD[0] TCC0/WO[0] !TCC1/WO[2] -9 | A9 | PA09 | SCL1/SS1 | EIC/EXTINT[9] ADC/AIN[17] PTC/X[1] !SERCOM0/PAD[1] SERCOM2/PAD[1] TCC0/WO[1] !TCC1/WO[3] -10 | A10 | PA10 | TX1 | !EIC/EXTINT[10] ADC/AIN[18] PTC/X[2] SERCOM0/PAD[2] !SERCOM2/PAD[2] !TCC1/WO[0] TCC0/WO[2] -11 | A11 | PA11 | RX1 | !EIC/EXTINT[11] ADC/AIN[19] PTC/X[3] SERCOM0/PAD[3] !SERCOM2/PAD[3] !TCC1/WO[1] TCC0/WO[3] -12 | --- | ---- | NOT A PIN | NOT A PIN -13 | --- | ---- | NOT A PIN | NOT A PIN -14 | A14 | PA14 | Xin, TX2/MOSI1 | EIC/EXTINT[14] SERCOM2/PAD[2] TC3/WO[0] !TCC0/WO[4] Xin, HOST_ENABLE -15 | A15 | PA15 | Xout, RX2/SCK1 | !EIC/EXTINT[15] SERCOM2/PAD[3] TC3/WO[1] !TCC0/WO[5] Xout -16 | A16 | PA16 | SDA/TX4 w/pullup | EIC/EXTINT[0] PTC/X[4] SERCOM1/PAD[0] SERCOM3/PAD[0] TCC2/WO[0] !TCC0/WO[6] -17 | A17 | PA17 | SCL/RX4 w/pullup | EIC/EXTINT[1] PTC/X[5] SERCOM1/PAD[1] SERCOM3/PAD[1] TCC2/WO[1] !TCC0/WO[7] -18 | A18 | PA18 | MOSI | EIC/EXTINT[2] PTC/X[6] !SERCOM1/PAD[2] SERCOM3/PAD[2] !TC3/WO[0] !TCC0/WO[2] -19 | A19 | PA19 | SCK | EIC/EXTINT[3] PTC/X[7] !SERCOM1/PAD[3] SERCOM3/PAD[3] !TC3/WO[1] !TCC0/WO[3] -20 | --- | ---- | NOT A PIN | NOT A PIN -21 | --- | ---- | NOT A PIN | NOT A PIN -22 | A22 | PA22 | MISO | EIC/EXTINT[6] PTC/X[10] SERCOM3/PAD[0] TC4/WO[0] !TCC0/WO[4] -23 | A23 | PA23 | SS | EIC/EXTINT[7] PTC/X[11] SERCOM3/PAD[1] TC4/WO[1] !TCC0/WO[5] -24 | A24- | PA24 | USB_NEGATIVE | USB/DM TC5/WO[0] -25 | A25+ | PA25 | USB_POSITIVE | USB/DP TC5/WO[1] -26 | --- | ---- | NOT A PIN | NOT A PIN -27 | A27 | PA27 | A/CS | EIC/EXTINT[15] A/CS (Jumper A / memory device chip select) -28 | A28 | PA28 | | EIC/EXTINT[8] -29 | --- | ---- | NOT A PIN | NOT A PIN -30 | A30 | PA30 | SWDCLK / TX3 | EIC/EXTINT[10] SERCOM1/PAD[2] TCC1/WO[0] SWD CLK, leave floating during boot -31 | A31 | PA31 | Button B / SWDIO / RX3| EIC/EXTINT[11] SERCOM1/PAD[3] TCC1/WO[1] Button B SWD IO --- | RST | ---- | | Reset, BOOT (double tap bootloader entry) -============================================================================================================================================ - -* Most pins can be used for more than one function. The port pin number printed - on the board is also used in Arduino (but without the 'A') for all of the supported - functions (ie: digitalRead(), analogRead(), analogWrite(), attachInterrupt(), etc.). -* The following Arduino pin numbers are not mapped to a physical pin: 12, 13, 20, 21, 26, and 29. -* Pins 24 and 25 are by default in use by USB (USB_NEGATIVE and USB_POSITIVE). -* TC5(D21) is available on these pins otherwise. The tone library uses TC5. -* A0 and A1 are by default connected to the 32.768KHz crystal. -* Leave pin A30 floating (or use external pullup) during reset. -* This table does not list "L21 Only" COM configurations. -``` - - -## Board Configuration Notes - -* **Crystals** - * Either the 32.768KHz crystal or the 16MHz crystal can be used. Be sure to set the correct solder jumpers. - * The bootloader does not use an external crystal by default. Double-tap the reset button to enter manually. - -* **LED (LED_BUILTIN)** - * Bring the pin HIGH to turn the LED on. - * The LED is enabled (solder jumper) by default. - -* **Button (BUTTON_BUILTIN)** - * Button (B) is connected to the Reset pin by default, but can be connected to pin 31 via the solder jumper. - * Pressing the button will bring the pin LOW. The pullup must be enabled first. - * If the debouncing capacitor is connected, delay reading the pin at least 6ms after turning on the pullup. - -* **Jumper** - * Jumper (A) is connected (solder jumper) to pin 27 by default. - * Since this pin is shared with the optional memory device CD pin, **leave the jumper off** when a memory device is installed. - -* **GPIO** - * All pins (including analog) support INPUT, OUTPUT, INPUT_PULLUP, and INPUT_PULLDOWN. - * When PER_ATTR_DRIVE_STRONG is set for the pin (enabled by default), each pin can source or sink a maximum of: - * **D21:** 7mA high, 10mA low - * **L21:** 5mA high, 6mA low (8 high drive pins: 10mA high, 12mA low) - * **C21:** 6mA high, 10mA low (2 high drive pins (A10, A11): 12mA high, 20mA low) - * Internal pull-up and pull-down resistors of 20-60 Kohms (40Kohm typ., disconnected by default). - -* **Analog Inputs** - * 10 pins can be configured as ADC analog inputs. - * Each pin measures from ground to 3.3 volts by default. - * Each pin provides 10 bits of resolution (1024 values) by default. - * 12-bit resolution supported by using the analogReadResolution() function. - * The upper end of the measurement range can be changed using the analogReference() function. - * A reference voltage can be connected to REFA or REFB. In these cases, the capacitors should be enabled via the solder jumpers. - -* **DAC** - * D21/C21: One 10-bit 350Ksps analog output is available on pin 2. - * L21: Two 12-bit 1Msps analog outputs are available on pins 2 and 5. - -* **PWM** - * 12 pins can be configured as PWM outputs. - * Each pin provides 8 bits of resolution (256 values) by default. - * 12-bit resolution supported by using the analogWriteResolution() function. - -* **External Interrupts** - * 14 pins can be configured with external interrupts. - -* **SERCOM** - * 4 SERCOM are available (6 on the L21E). - * Up to 4 UART instances (6 on the L21E). - * Up to 2 SPI instances. - * Up to 2 WIRE (I2C) instances. - * The WIRE pullup resistors are enabled by default. - - - -## PinDescription table format - -### Note that in 1.6.18-beta-b1 a new compact table format was added. -The standard PinDescription table uses 12 bytes per pin. Define PIN_DESCRIPTION_TABLE_SIMPLE -to use a more compact format that uses only 4 bytes per pin (currently only available -for the D11 chips). In this case, the PinType, PinAttribute, and GCLKCCL columns are not used -(they are not required). Additionally, the SetPortPin() and SetExtIntADC() macros are used to -pack Port and Pin into the PortPin column, and ExtInt and ADCChannelNumber into the ExtIntADC -column. Note that external libraries that reference the PinDescription table directly (uncommon) -will no longer work. This define can be combined with the PIN_MAP_COMPACT define, which -is available in variant.h of the D11 variants. This can save from 10's to over 200 bytes. - -### Note that a new column (GCLKCCL) was added for 1.6.8-beta-b0. -MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE in variant.h is used to track versions. -If using board variant files with the old format, the new core will still read the -table the old way, losing any new features introduced by the new column. Additionally, -new definitions have been added for D51, L21, and C21 support. - -### Each pin can have multiple functions. -The PinDescription table describes how each of the pins can be used by the Arduino -core. Each pin can have multiple functions (ie: ADC input, digital output, PWM, -communications, etc.), and the PinDescription table configures which functions can -be used for each pin. This table is mainly accessed by the pinPeripheral function in -wiring_private.c, which is used to attach a pin to a particular peripheral function. -The communications drivers (ie: SPI, I2C, and UART), analogRead(), analogWrite(), -analogReference(), attachInterrupt(), and pinMode() all call pinPeripheral() to -verify that the pin can perform the function requested, and to configure the pin for -that function. Most of the contents of pinMode() are now in pinPeripheral(). - -### Pin Mapping -There are different ways that pins can be mapped. Typically, there is no relation -between the arduino pin number used, and the actual port pin designator. Thus, the -pcb must be printed with the arduino numbering, otherwise, if the port pin is printed, -a cross reference table is needed to find the arduino pin number. However, this results -in the least amount of space used by the table. Another method, used by default by the -MT-D21E and MT-D11, maps Arduino pin numbers to the actual port pin number (ie: Arduino -pin 28 = Port A28). This works well when there is only one port (or if the PORTB pins -are used for onboard functions and not broken out). PIO_NOT_A_PIN entries must be added -for pins that are used for other purposes or for pins that do not exist (especially the -D11), so some FLASH space may be wasted. For an example of both types, see variant.cpp -from the MT-D11 variant. The Xeno combines both methods, using the actual port pin -designators from both PORTA and PORTB for arduino numbers 0-31 (ie: B1=1, A2=2), then -using arduino numbering only above 31. For 0-31 only one pin from PORTA or PORTB can be -used, leaving the other pin for some number above 31. - -**See [WVariant.h](https://github.com/mattairtech/ArduinoCore-samd/tree/master/cores/arduino/WVariant.h) for the definitions used in the table.** - -### Port -This is the port (ie: PORTA). Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### Pin -This is the pin (bit) within the port. Valid values are 0-31. Not used with -PIN_DESCRIPTION_TABLE_SIMPLE. - -### SetPortPin() -When PIN_DESCRIPTION_TABLE_SIMPLE is defined, Port and Pin are combined into one column -using the SetPortPin() packing macro: SetPortPin(PORTA, 2). If the pin is not usable, -use SetPortPin(NOT_A_PORT, 0). - -### PinType -This indicates what peripheral function the pin can be attached to. In most cases, -this is PIO_MULTI, which means that the pin can be anything listed in the PinAttribute -field. It can also be set to a specific peripheral. In this case, any attempt to -configure the pin (using pinPeripheral or pinMode) as anything else will fail (and -pinPeripheral will return -1). This can be used to prevent accidental re-configuration -of a pin that is configured for only one function (ie: USB D- and D+ pins). If a pin -is not used or does not exist, PIO_NOT_A_PIN must be entered in this field. See -WVariant.h for valid entries. These entries are also used as a parameter to -pinPeripheral() with the exception of PIO_NOT_A_PIN and PIO_MULTI. The pinMode function -now calls pinPeripheral() with the desired mode. Note that this field is not used to -select between the different peripherals possible with each of the SERCOM and TIMER -functions. PeripheralAttribute is now used for this. When PIN_DESCRIPTION_TABLE_SIMPLE -is defined, PinType is not used (the pin is treated as PIO_MULTI). - -### PeripheralAttribute -This is an 8-bit bitfield used for various peripheral configuration. It is primarily -used to select between the different peripherals possible with each of the SERCOM and -TIMER functions. TIMER pins are individual, while SERCOM uses a group of two to four -pins. This group of pins can span both peripherals. For example, pin 19 (SPI1 SCK) on -the MT-D21E uses PER_ATTR_SERCOM_ALT while pin 22 (SPI1 MISO) uses PER_ATTR_SERCOM_STD. -Both TIMER and SERCOM can exist for each pin. This bitfield is also used to set the -pin drive strength and the input buffer configuration (ie: totem-pole, open-drain, -buskeeper, etc.). Starting with 1.6.8, the ADC instance on the D51 and C21 (there are -two) is also selected here. Note that the D51 adds a third timer attribute and -requires consultation of the datasheet IOSET tables. See WVariant.h for valid entries. - -### PinAttribute -This is a 32-bit bitfield used to list all of the valid peripheral functions that a -pin can attach to. This includes GPIO functions like PIN_ATTR_OUTPUT. Certain -attributes are shorthand for a combination of other attributes. PIN_ATTR_DIGITAL -includes all of the GPIO functions, while PIN_ATTR_TIMER includes both -PIN_ATTR_TIMER_PWM and PIN_ATTR_TIMER_CAPTURE (capture is not used yet). -PIN_ATTR_ANALOG is an alias to PIN_ATTR_ANALOG_ADC. This bitfield is useful for -limiting a pin to only input related functions or output functions. This allows a pin -to have a more flexible configuration, while restricting the direction (ie: to avoid -contention). See WVariant.h for valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### TCChannel -This is the TC/TCC channel (if any) assigned to the pin. Some TC channels are available -on multiple pins. In general, only one pin should be configured in the pinDescription -table per TC channel. Starting with 1.6.8, the timer type is now encoded in this column -to support the D51, L21 and C21, which use TC numbers starting at 0 (rather than 3 as on -the D21). See WVariant.h for valid entries. - -### ADCChannelNumber -This is the ADC channel (if any) assigned to the pin. The D51 and C21 each have two ADC -instances, which are selected in the PeripheralAttribute column. See WVariant.h for -valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### ExtInt -This is the interrupt (if any) assigned to the pin. Some interrupt numbers are -available on multiple pins. In general, only one pin should be configured in the -pinDescription table per interrupt number. Thus, for example, if an interrupt was -needed on pin 2, EXTERNAL_INT_2 can be moved from pin 18. See WVariant.h for valid -entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### SetExtIntADC() -When PIN_DESCRIPTION_TABLE_SIMPLE is defined, ExtInt and ADCChannelNumber are combined -into one column using the SetExtIntADC() packing macro: SetExtIntADC(EXTERNAL_INT_4, -ADC_Channel2). If the pin is not usable, use SetExtIntADC(EXTERNAL_INT_NONE, No_ADC_Channel). - -### GCLKCCL -This column was added in 1.6.8-beta-b0. It is not yet used. It will eventually support -the Analog Comparators (AC), the Configurable Custom Logic (CCL) peripherals of the D51, -L21 and C21, and the GCLK outputs (inputs) of all of the MCUs. Not used with -PIN_DESCRIPTION_TABLE_SIMPLE. diff --git a/variants/MT_D21E_revB/debug_scripts/SAMC21E17A.gdb b/variants/MT_D21E_revB/debug_scripts/SAMC21E17A.gdb deleted file mode 100644 index 4ae2dd669..000000000 --- a/variants/MT_D21E_revB/debug_scripts/SAMC21E17A.gdb +++ /dev/null @@ -1,31 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21e17" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/MT_D21E_revB/debug_scripts/SAMD21E15A.gdb b/variants/MT_D21E_revB/debug_scripts/SAMD21E15A.gdb deleted file mode 100644 index 4ae3c04f0..000000000 --- a/variants/MT_D21E_revB/debug_scripts/SAMD21E15A.gdb +++ /dev/null @@ -1,31 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21e15" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/MT_D21E_revB/debug_scripts/SAMD21E16A.gdb b/variants/MT_D21E_revB/debug_scripts/SAMD21E16A.gdb deleted file mode 100644 index eb114b493..000000000 --- a/variants/MT_D21E_revB/debug_scripts/SAMD21E16A.gdb +++ /dev/null @@ -1,31 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21e16" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/MT_D21E_revB/debug_scripts/SAMD21E17A.gdb b/variants/MT_D21E_revB/debug_scripts/SAMD21E17A.gdb deleted file mode 100644 index cb1c7c44e..000000000 --- a/variants/MT_D21E_revB/debug_scripts/SAMD21E17A.gdb +++ /dev/null @@ -1,31 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21e17" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/MT_D21E_revB/debug_scripts/SAMD21E18A.gdb b/variants/MT_D21E_revB/debug_scripts/SAMD21E18A.gdb deleted file mode 100644 index 13ee2a173..000000000 --- a/variants/MT_D21E_revB/debug_scripts/SAMD21E18A.gdb +++ /dev/null @@ -1,31 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21e18" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/MT_D21E_revB/debug_scripts/SAML21E15B.gdb b/variants/MT_D21E_revB/debug_scripts/SAML21E15B.gdb deleted file mode 100644 index f4cdf835f..000000000 --- a/variants/MT_D21E_revB/debug_scripts/SAML21E15B.gdb +++ /dev/null @@ -1,31 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91saml21e15" -f target/at91samlXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/MT_D21E_revB/debug_scripts/SAML21E16B.gdb b/variants/MT_D21E_revB/debug_scripts/SAML21E16B.gdb deleted file mode 100644 index 50e424551..000000000 --- a/variants/MT_D21E_revB/debug_scripts/SAML21E16B.gdb +++ /dev/null @@ -1,31 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91saml21e16" -f target/at91samlXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/MT_D21E_revB/debug_scripts/SAML21E17B.gdb b/variants/MT_D21E_revB/debug_scripts/SAML21E17B.gdb deleted file mode 100644 index 29323011f..000000000 --- a/variants/MT_D21E_revB/debug_scripts/SAML21E17B.gdb +++ /dev/null @@ -1,31 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91saml21e17" -f target/at91samlXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/MT_D21E_revB/debug_scripts/SAML21E18B.gdb b/variants/MT_D21E_revB/debug_scripts/SAML21E18B.gdb deleted file mode 100644 index b48a48445..000000000 --- a/variants/MT_D21E_revB/debug_scripts/SAML21E18B.gdb +++ /dev/null @@ -1,31 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91saml21e18" -f target/at91samlXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/MT_D21E_revB/openocd_scripts/SAMC21E15A.cfg b/variants/MT_D21E_revB/openocd_scripts/SAMC21E15A.cfg deleted file mode 100644 index b6b72ccda..000000000 --- a/variants/MT_D21E_revB/openocd_scripts/SAMC21E15A.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samc21e15 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samcXX.cfg] diff --git a/variants/MT_D21E_revB/openocd_scripts/SAMD21E15A.cfg b/variants/MT_D21E_revB/openocd_scripts/SAMD21E15A.cfg deleted file mode 100644 index 0355cc401..000000000 --- a/variants/MT_D21E_revB/openocd_scripts/SAMD21E15A.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samd21e15 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samdXX.cfg] diff --git a/variants/MT_D21E_revB/openocd_scripts/SAML21E15B.cfg b/variants/MT_D21E_revB/openocd_scripts/SAML21E15B.cfg deleted file mode 100644 index 82fbb0650..000000000 --- a/variants/MT_D21E_revB/openocd_scripts/SAML21E15B.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91saml21e15 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samlXX.cfg] diff --git a/variants/MT_D21E_revB/variant.cpp b/variants/MT_D21E_revB/variant.cpp deleted file mode 100644 index 371225065..000000000 --- a/variants/MT_D21E_revB/variant.cpp +++ /dev/null @@ -1,350 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* - * Modified 3 February 2018 by Justin Mattair - * for MattairTech boards (www.mattairtech.com) - * - * See README.md for documentation and pin mapping information - */ - - -#include "variant.h" - -/* - * Pins descriptions - */ -const PinDescription g_APinDescription[]= -{ -#if (SAMD21) - // 0..1 are unused by default (pins in use by 32.768KHz crystal, which is used by the Arduino core) - { PORTA, 0, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 1, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - - // 2..9 - Analog capable pins (DAC available on 2) - { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // DAC - { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 4, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel4, EXTERNAL_INT_4, GCLK_CCL_NONE }, - { PORTA, 5, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel5, EXTERNAL_INT_5, GCLK_CCL_NONE }, - { PORTA, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC1_CH0, ADC_Channel6, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // LED - { PORTA, 7, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_COM), TCC1_CH1, ADC_Channel7, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), TCC0_CH0, ADC_Channel16, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, - { PORTA, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), TCC0_CH1, ADC_Channel17, EXTERNAL_INT_9, GCLK_CCL_NONE }, - - // 10..11 - SERCOM/UART (Serial1) or Analog or Digital functions - { PORTA, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_COM), TCC0_CH2, ADC_Channel18, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_COM), TCC0_CH3, ADC_Channel19, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - - // 12..13 pins don't exist - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 14..15 - SERCOM/UART (Serial2) or Digital functions - { PORTA, 14, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC3_CH0, No_ADC_Channel, EXTERNAL_INT_14, GCLK_CCL_NONE }, // HOST_ENABLE - { PORTA, 15, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC3_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // ATN - - // 16..17 SERCOM/I2C (Wire) or Serial4 or Digital functions -#if (defined(FOUR_UART) && !defined(USE_SIX_SERCOM)) - { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, - { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, -#else - { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, - { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, -#endif - - // 18..23 - SERCOM/SPI (SPI) or Digital functions (pins 20..21 do not exist) - { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_2, GCLK_CCL_NONE }, - { PORTA, 19, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC4_CH0, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, - { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), TC4_CH1, No_ADC_Channel, EXTERNAL_INT_7, GCLK_CCL_NONE }, - - // 24..26 - USB_NEGATIVE and USB_POSITIVE, pin 26 does not exist - { PORTA, 24, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_COM), TC5_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM - { PORTA, 25, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_COM), TC5_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 27..29 Digital functions / A/CS (pin 29 does not exist) - { PORTA, 27, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_15, GCLK_CCL_NONE }, // A/CS - { PORTA, 28, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_8, GCLK_CCL_NONE }, // - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 30..31 Digital functions / Debug interface (SWD CLK and SWD IO) - { PORTA, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_10, GCLK_CCL_NONE }, // SWD CLK - { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_11, GCLK_CCL_NONE }, // SWD IO - -#elif (SAML21) - // 0..1 are unused by default (pins in use by 32.768KHz crystal, which is used by the Arduino core) - { PORTA, 0, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 1, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - - // 2..9 - Analog capable pins (DAC available on 2) - { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // DAC - { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 4, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel4, EXTERNAL_INT_4, GCLK_CCL_NONE }, - { PORTA, 5, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel5, EXTERNAL_INT_5, GCLK_CCL_NONE }, - { PORTA, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC1_CH0, ADC_Channel6, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // LED - { PORTA, 7, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC1_CH1, ADC_Channel7, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - #if defined(USE_SIX_SERCOM) - { PORTA, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH0, ADC_Channel16, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, - { PORTA, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH1, ADC_Channel17, EXTERNAL_INT_9, GCLK_CCL_NONE }, - #else - { PORTA, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH0, ADC_Channel16, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, - { PORTA, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH1, ADC_Channel17, EXTERNAL_INT_9, GCLK_CCL_NONE }, - #endif - - // 10..11 - SERCOM/UART (Serial1) or Analog or Digital functions - #if defined(USE_SIX_SERCOM) - { PORTA, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC0_CH2, ADC_Channel18, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC0_CH3, ADC_Channel19, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - #else - { PORTA, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC0_CH2, ADC_Channel18, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC0_CH3, ADC_Channel19, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - #endif - - // 12..13 pins don't exist - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 14..15 - SERCOM/UART (Serial2) or Digital functions - #if defined(USE_SIX_SERCOM) - { PORTA, 14, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC4_CH0, No_ADC_Channel, EXTERNAL_INT_14, GCLK_CCL_NONE }, // HOST_ENABLE - { PORTA, 15, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC4_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // ATN - #else - { PORTA, 14, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC4_CH0, No_ADC_Channel, EXTERNAL_INT_14, GCLK_CCL_NONE }, // HOST_ENABLE - { PORTA, 15, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC4_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // ATN - #endif - - // 16..17 SERCOM/I2C (Wire) or Serial4 or Digital functions -#if (defined(FOUR_UART) && !defined(USE_SIX_SERCOM)) - { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, - { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, -#else - { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, - { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, -#endif - - // 18..23 - SERCOM/SPI (SPI) or Digital functions (pins 20..21 do not exist) - { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_2, GCLK_CCL_NONE }, - { PORTA, 19, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - #if (defined(USE_SIX_SERCOM) && !defined(ONE_SPI)) - { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC0_CH0, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, - { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC0_CH1, No_ADC_Channel, EXTERNAL_INT_7, GCLK_CCL_NONE }, - #else - { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC0_CH0, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, - { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC0_CH1, No_ADC_Channel, EXTERNAL_INT_7, GCLK_CCL_NONE }, - #endif - - // 24..26 - USB_NEGATIVE and USB_POSITIVE, pin 26 does not exist - #if defined(USE_SIX_SERCOM) - #if defined(ONE_SPI) - { PORTA, 24, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_COM), TC1_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM - { PORTA, 25, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_COM), TC1_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP - #else - { PORTA, 24, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_COM), TC1_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM - { PORTA, 25, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_COM), TC1_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP - #endif - #else - { PORTA, 24, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_COM), TC1_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM - { PORTA, 25, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_COM), TC1_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP - #endif - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 27..29 Digital functions / A/CS (pin 29 does not exist) - { PORTA, 27, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_15, GCLK_CCL_NONE }, // A/CS - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 30..31 Digital functions / Debug interface (SWD CLK and SWD IO) - { PORTA, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_10, GCLK_CCL_NONE }, // SWD CLK - { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_11, GCLK_CCL_NONE }, // SWD IO - -#elif (SAMC21) - // 0..1 are unused by default (pins in use by 32.768KHz crystal, which is used by the Arduino core) - { PORTA, 0, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 1, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - - // 2..9 - Analog capable pins (DAC available on 2) - { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // DAC - { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 4, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel4, EXTERNAL_INT_4, GCLK_CCL_NONE }, - { PORTA, 5, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel5, EXTERNAL_INT_5, GCLK_CCL_NONE }, - { PORTA, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC1_CH0, ADC_Channel6, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // LED - { PORTA, 7, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC1_CH1, ADC_Channel7, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT|PER_ATTR_ADC_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH0, ADC_Channel10, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, - { PORTA, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT|PER_ATTR_ADC_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC0_CH1, ADC_Channel11, EXTERNAL_INT_9, GCLK_CCL_NONE }, - - // 10..11 - SERCOM/UART (Serial1) or Analog or Digital functions - { PORTA, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC0_CH2, ADC_Channel10, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - { PORTA, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TCC0_CH3, ADC_Channel11, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, - - // 12..13 pins don't exist - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 14..15 - SERCOM/UART (Serial2) or Digital functions - { PORTA, 14, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC4_CH0, No_ADC_Channel, EXTERNAL_INT_14, GCLK_CCL_NONE }, // HOST_ENABLE - { PORTA, 15, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM), TC4_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // ATN - - // 16..17 SERCOM/I2C (Wire) or Serial4 or Digital functions -#if (defined(FOUR_UART) && !defined(USE_SIX_SERCOM)) - { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, - { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, -#else - { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, - { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, -#endif - - // 18..23 - SERCOM/SPI (SPI) or Digital functions (pins 20..21 do not exist) - { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_2, GCLK_CCL_NONE }, - { PORTA, 19, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC0_CH0, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, - { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC0_CH1, No_ADC_Channel, EXTERNAL_INT_7, GCLK_CCL_NONE }, - - // 24..26 - USB_NEGATIVE and USB_POSITIVE, pin 26 does not exist - { PORTA, 24, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_COM), TC1_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM - { PORTA, 25, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_COM), TC1_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 27..29 Digital functions / A/CS (pin 29 does not exist) - { PORTA, 27, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_15, GCLK_CCL_NONE }, // A/CS - { PORTA, 28, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_8, GCLK_CCL_NONE }, // - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 30..31 Digital functions / Debug interface (SWD CLK and SWD IO) - { PORTA, 30, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_10, GCLK_CCL_NONE }, // SWD CLK - { PORTA, 31, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_11, GCLK_CCL_NONE }, // SWD IO - -#endif -} ; - -#if (SAMD21) -const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TCC1, TCC2, TC3, TC4, TC5 } ; -#else -const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TCC1, TCC2, TC0, TC1, TC4 } ; -#endif - -// Multi-serial objects instantiation -SERCOM sercom0( SERCOM0 ) ; -SERCOM sercom1( SERCOM1 ) ; -SERCOM sercom2( SERCOM2 ) ; -SERCOM sercom3( SERCOM3 ) ; -#if (SAML21) -SERCOM sercom4( SERCOM4 ) ; -SERCOM sercom5( SERCOM5 ) ; -#endif - -// All microcontrollers support configurations with four SERCOM -#if !defined(USE_SIX_SERCOM) -#if defined(ONE_UART) || defined(TWO_UART) || defined(THREE_UART) || defined(FOUR_UART) -Uart Serial1( SERCOM_INSTANCE_SERIAL1, PIN_SERIAL1_RX, PIN_SERIAL1_TX, PAD_SERIAL1_RX, PAD_SERIAL1_TX ) ; - -void SERCOM0_Handler() -{ - Serial1.IrqHandler(); -} -#endif - -#if defined(TWO_UART) || defined(THREE_UART) || defined(FOUR_UART) -Uart Serial2( SERCOM_INSTANCE_SERIAL2, PIN_SERIAL2_RX, PIN_SERIAL2_TX, PAD_SERIAL2_RX, PAD_SERIAL2_TX ) ; - -void SERCOM2_Handler() -{ - Serial2.IrqHandler(); -} -#endif - -#if defined(THREE_UART) || defined(FOUR_UART) -Uart Serial3( SERCOM_INSTANCE_SERIAL3, PIN_SERIAL3_RX, PIN_SERIAL3_TX, PAD_SERIAL3_RX, PAD_SERIAL3_TX ) ; - -void SERCOM1_Handler() -{ - Serial3.IrqHandler(); -} -#endif - -#if defined(FOUR_UART) -Uart Serial4( SERCOM_INSTANCE_SERIAL4, PIN_SERIAL4_RX, PIN_SERIAL4_TX, PAD_SERIAL4_RX, PAD_SERIAL4_TX ) ; - -void SERCOM3_Handler() -{ - Serial4.IrqHandler(); -} -#endif - -// In addition to the configurations using four SERCOMs, the L21E supports USE_SIX_SERCOM -#else -Uart Serial1( SERCOM_INSTANCE_SERIAL1, PIN_SERIAL1_RX, PIN_SERIAL1_TX, PAD_SERIAL1_RX, PAD_SERIAL1_TX ) ; - -void SERCOM2_Handler() -{ - Serial1.IrqHandler(); -} - -Uart Serial2( SERCOM_INSTANCE_SERIAL2, PIN_SERIAL2_RX, PIN_SERIAL2_TX, PAD_SERIAL2_RX, PAD_SERIAL2_TX ) ; - -void SERCOM4_Handler() -{ - Serial2.IrqHandler(); -} - -Uart Serial3( SERCOM_INSTANCE_SERIAL3, PIN_SERIAL3_RX, PIN_SERIAL3_TX, PAD_SERIAL3_RX, PAD_SERIAL3_TX ) ; - -void SERCOM0_Handler() -{ - Serial3.IrqHandler(); -} - -Uart Serial4( SERCOM_INSTANCE_SERIAL4, PIN_SERIAL4_RX, PIN_SERIAL4_TX, PAD_SERIAL4_RX, PAD_SERIAL4_TX ) ; - -#if defined(ONE_SPI) -void SERCOM5_Handler() -#else -void SERCOM3_Handler() -#endif -{ - Serial4.IrqHandler(); -} - -#if defined(FIVE_UART) || defined(SIX_UART) -Uart Serial5( SERCOM_INSTANCE_SERIAL5, PIN_SERIAL5_RX, PIN_SERIAL5_TX, PAD_SERIAL5_RX, PAD_SERIAL5_TX ) ; - -#if defined(ONE_SPI) -void SERCOM1_Handler() -#else -void SERCOM5_Handler() -#endif -{ - Serial5.IrqHandler(); -} -#endif - -#if defined(SIX_UART) -Uart Serial6( SERCOM_INSTANCE_SERIAL6, PIN_SERIAL6_RX, PIN_SERIAL6_TX, PAD_SERIAL6_RX, PAD_SERIAL6_TX ) ; - -void SERCOM1_Handler() -{ - Serial6.IrqHandler(); -} -#endif -#endif diff --git a/variants/MT_D21E_revB/variant.h b/variants/MT_D21E_revB/variant.h deleted file mode 100644 index 4fda4281d..000000000 --- a/variants/MT_D21E_revB/variant.h +++ /dev/null @@ -1,484 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* - * Modified 9 December 2016 by Justin Mattair - * for MattairTech boards (www.mattairtech.com) - * - * See README.md for documentation and pin mapping information - */ - -#ifndef _VARIANT_MATTAIRTECH_MT_D21E_REVB_ -#define _VARIANT_MATTAIRTECH_MT_D21E_REVB_ - -/* The definitions here need the MattairTech SAMD core >=1.6.8. - * The format is different than the stock Arduino SAMD core, - * which uses ARDUINO_SAMD_VARIANT_COMPLIANCE instead. - */ -#define MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE 10608 - -/*---------------------------------------------------------------------------- - * Clock Configuration - *----------------------------------------------------------------------------*/ - -/** Master clock frequency (also Fcpu frequency) */ -#define VARIANT_MCK (48000000ul) - -/* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ - * must also be defined with the external crystal frequency in Hertz. - */ -#define HS_CRYSTAL_FREQUENCY_HERTZ 16000000UL - -/* If the PLL is used (CLOCKCONFIG_32768HZ_CRYSTAL, or CLOCKCONFIG_HS_CRYSTAL - * defined), then PLL_FRACTIONAL_ENABLED can be defined, which will result in - * a more accurate 48MHz output frequency at the expense of increased jitter. - */ -//#define PLL_FRACTIONAL_ENABLED - -/* If both PLL_FAST_STARTUP and CLOCKCONFIG_HS_CRYSTAL are defined, the crystal - * will be divided down to 1MHz - 2MHz, rather than 32KHz - 64KHz, before being - * multiplied by the PLL. This will result in a faster lock time for the PLL, - * however, it will also result in a less accurate PLL output frequency if the - * crystal is not divisible (without remainder) by 1MHz. In this case, define - * PLL_FRACTIONAL_ENABLED as well. - */ -//#define PLL_FAST_STARTUP - -/* The fine calibration value for DFLL open-loop mode is defined here. - * The coarse calibration value is loaded from NVM OTP (factory calibration values). - */ -#define NVM_SW_CALIB_DFLL48M_FINE_VAL (512) - -/*---------------------------------------------------------------------------- - * Headers - *----------------------------------------------------------------------------*/ - -#include "WVariant.h" -#include "sam.h" - -#ifdef __cplusplus -#include "SERCOM.h" -#include "Uart.h" -#endif // __cplusplus - -#ifdef __cplusplus -extern "C" -{ -#endif // __cplusplus - -/*---------------------------------------------------------------------------- - * Pins - *----------------------------------------------------------------------------*/ - -// Number of pins defined in PinDescription array -#define NUM_PIN_DESCRIPTION_ENTRIES (32u) - -#define PINS_COUNT NUM_PIN_DESCRIPTION_ENTRIES -#define NUM_DIGITAL_PINS PINS_COUNT -#define NUM_ANALOG_INPUTS (10u) - -#if (SAMD || SAMC) -#define NUM_ANALOG_OUTPUTS (1u) -#elif (SAML) -#define NUM_ANALOG_OUTPUTS (2u) -#else -#error "variant.h: Unsupported chip" -#endif - -#define analogInputToDigitalPin(p) (p) - -#define digitalPinToPort(P) ( &(PORT->Group[g_APinDescription[P].ulPort]) ) -#define digitalPinToBitMask(P) ( 1 << g_APinDescription[P].ulPin ) -//#define analogInPinToBit(P) ( ) -#define portOutputRegister(port) ( &(port->OUT.reg) ) -#define portInputRegister(port) ( &(port->IN.reg) ) -#define portModeRegister(port) ( &(port->DIR.reg) ) -#define digitalPinHasPWM(P) ( (g_APinDescription[P].ulPinAttribute & PIN_ATTR_TIMER_PWM) == PIN_ATTR_TIMER_PWM ) - -/* - * digitalPinToTimer(..) is AVR-specific and is not defined for SAMD - * architecture. If you need to check if a pin supports PWM you must - * use digitalPinHasPWM(..). - * - * https://github.com/arduino/Arduino/issues/1833 - */ -// #define digitalPinToTimer(P) - -/* LEDs - * None of these defines are currently used by the core. - * The MT-D21E (rev B) onboard LED is on pin 6. - * The RX and TX LEDs are not present. - * You may optionally add them to any free pins. - */ -#define PIN_LED_13 (6u) -#define PIN_LED_RXL (30u) -#define PIN_LED_TXL (31u) -#define PIN_LED PIN_LED_13 -#define PIN_LED2 PIN_LED_RXL -#define PIN_LED3 PIN_LED_TXL -#define LED_BUILTIN PIN_LED_13 - -/* Buttons - * Note that Button B is connected to Reset by default. - * A solder jumper can be changed to route Button B to pin 31 instead. - * There is a debouncing capacitor connected, so delay reading the pin for - * at least 45ms after turning on the pullup to allow the capacitor to charge. - */ -#define JUMPER_A (27u) -#define BUTTON_B (31u) -#define BUTTON_BUILTIN BUTTON_B - - -/* - * Analog pins - */ -#define PIN_A2 (2ul) -#define PIN_A3 (3ul) -#define PIN_A4 (4ul) -#define PIN_A5 (5ul) -#define PIN_A6 (6ul) -#define PIN_A7 (7ul) -#define PIN_A8 (8ul) -#define PIN_A9 (9ul) -#define PIN_A10 (10ul) -#define PIN_A11 (11ul) -#define PIN_DAC0 (2ul) -#if (SAML) -#define PIN_DAC1 (5ul) -#endif - -static const uint8_t A2 = PIN_A2; -static const uint8_t A3 = PIN_A3; -static const uint8_t A4 = PIN_A4; -static const uint8_t A5 = PIN_A5; -static const uint8_t A6 = PIN_A6; -static const uint8_t A7 = PIN_A7; -static const uint8_t A8 = PIN_A8; -static const uint8_t A9 = PIN_A9; -static const uint8_t A10 = PIN_A10; -static const uint8_t A11 = PIN_A11; -static const uint8_t DAC0 = PIN_DAC0; -#if (SAML) -static const uint8_t DAC1 = PIN_DAC1; -#endif - -#define ADC_RESOLUTION 12 - -// #define REMAP_ANALOG_PIN_ID(pin) if ( pin < A0 ) pin += A0 - -/* Set default analog voltage reference */ -#define VARIANT_AR_DEFAULT AR_DEFAULT - -/* Reference voltage pins (define even if not enabled with PIN_ATTR_REF in the PinDescription table) */ -#define REFA_PIN (3ul) -#define REFB_PIN (4ul) - - -// The ATN pin may be used in the future as the first SPI chip select. -// On boards that do not have the Arduino physical form factor, it can to set to any free pin. -#define PIN_ATN (15ul) -static const uint8_t ATN = PIN_ATN; - - -/* - * Serial interfaces - */ -#if ((defined(FOUR_UART) && (defined(ONE_SPI) || defined(ONE_WIRE))) || defined(FIVE_UART) || defined(SIX_UART)) - #if (SAML) - #define USE_SIX_SERCOM - #else - #error "variant.h: Only the L21E supports configurations with six SERCOM" - #endif -#endif - -// All microcontrollers support configurations with four SERCOM -#if !defined(USE_SIX_SERCOM) - -// Serial1 -#define PIN_SERIAL1_RX (11ul) -#define PIN_SERIAL1_TX (10ul) -#define PAD_SERIAL1_TX (UART_TX_PAD_2) -#define PAD_SERIAL1_RX (SERCOM_RX_PAD_3) - -#define SERCOM_INSTANCE_SERIAL1 &sercom0 - -// Serial2 -#define PIN_SERIAL2_RX (15ul) -#define PIN_SERIAL2_TX (14ul) -#define PAD_SERIAL2_TX (UART_TX_PAD_2) -#define PAD_SERIAL2_RX (SERCOM_RX_PAD_3) - -#define SERCOM_INSTANCE_SERIAL2 &sercom2 - -// Serial3 -#define PIN_SERIAL3_RX (31ul) -#define PIN_SERIAL3_TX (30ul) -#define PAD_SERIAL3_TX (UART_TX_PAD_2) -#define PAD_SERIAL3_RX (SERCOM_RX_PAD_3) - -#define SERCOM_INSTANCE_SERIAL3 &sercom1 - -// Serial4 -#define PIN_SERIAL4_RX (17ul) -#define PIN_SERIAL4_TX (16ul) -#define PAD_SERIAL4_TX (UART_TX_PAD_0) -#define PAD_SERIAL4_RX (SERCOM_RX_PAD_1) - -#define SERCOM_INSTANCE_SERIAL4 &sercom3 - -// In addition to the configurations using four SERCOMs, the L21E supports USE_SIX_SERCOM -#else - -// Serial1 -#define PIN_SERIAL1_RX (11ul) -#define PIN_SERIAL1_TX (10ul) -#define PAD_SERIAL1_TX (UART_TX_PAD_2) -#define PAD_SERIAL1_RX (SERCOM_RX_PAD_3) - -#define SERCOM_INSTANCE_SERIAL1 &sercom2 - -// Serial2 -#define PIN_SERIAL2_RX (15ul) -#define PIN_SERIAL2_TX (14ul) -#define PAD_SERIAL2_TX (UART_TX_PAD_2) -#define PAD_SERIAL2_RX (SERCOM_RX_PAD_3) - -#define SERCOM_INSTANCE_SERIAL2 &sercom4 - -// Serial3 -#define PIN_SERIAL3_RX (9ul) -#define PIN_SERIAL3_TX (8ul) -#define PAD_SERIAL3_TX (UART_TX_PAD_0) -#define PAD_SERIAL3_RX (SERCOM_RX_PAD_1) - -#define SERCOM_INSTANCE_SERIAL3 &sercom0 - -// Serial4 -#define PIN_SERIAL4_RX (25ul) -#define PIN_SERIAL4_TX (24ul) -#define PAD_SERIAL4_TX (UART_TX_PAD_2) -#define PAD_SERIAL4_RX (SERCOM_RX_PAD_3) - -#if defined(ONE_SPI) - #define SERCOM_INSTANCE_SERIAL4 &sercom5 -#else - #define SERCOM_INSTANCE_SERIAL4 &sercom3 -#endif - -// Serial5 (L21 only) -#if defined(ONE_SPI) - #define PIN_SERIAL5_RX (17ul) - #define PIN_SERIAL5_TX (16ul) - #define PAD_SERIAL5_TX (UART_TX_PAD_0) - #define PAD_SERIAL5_RX (SERCOM_RX_PAD_1) - #define SERCOM_INSTANCE_SERIAL5 &sercom1 -#else - #define PIN_SERIAL5_RX (23ul) - #define PIN_SERIAL5_TX (22ul) - #define PAD_SERIAL5_TX (UART_TX_PAD_0) - #define PAD_SERIAL5_RX (SERCOM_RX_PAD_1) - #define SERCOM_INSTANCE_SERIAL5 &sercom5 -#endif - -// Serial6 (L21 only) -#define PIN_SERIAL6_RX (17ul) -#define PIN_SERIAL6_TX (16ul) -#define PAD_SERIAL6_TX (UART_TX_PAD_0) -#define PAD_SERIAL6_RX (SERCOM_RX_PAD_1) - -#define SERCOM_INSTANCE_SERIAL6 &sercom1 -#endif - - -/* - * SPI Interfaces - */ -#if defined(TWO_SPI) -#define SPI_INTERFACES_COUNT 2 -#else -#define SPI_INTERFACES_COUNT 1 -#endif - -#define PIN_SPI_MISO (22u) -#define PIN_SPI_MOSI (18u) -#define PIN_SPI_SCK (19u) -#define PIN_SPI_SS (23u) -#define PERIPH_SPI sercom3 -#define PAD_SPI_TX SPI_PAD_2_SCK_3 -#define PAD_SPI_RX SERCOM_RX_PAD_0 - -static const uint8_t SS = PIN_SPI_SS ; // The SERCOM SS PAD is available on this pin but HW SS isn't used. Set here only for reference. -static const uint8_t MOSI = PIN_SPI_MOSI ; -static const uint8_t MISO = PIN_SPI_MISO ; -static const uint8_t SCK = PIN_SPI_SCK ; - -#define PIN_SPI1_MISO (8u) -#define PIN_SPI1_MOSI (14u) -#define PIN_SPI1_SCK (15u) -#define PIN_SPI1_SS (9u) -#define PERIPH_SPI1 sercom2 -#define PAD_SPI1_TX SPI_PAD_2_SCK_3 -#define PAD_SPI1_RX SERCOM_RX_PAD_0 - -static const uint8_t SS1 = PIN_SPI1_SS ; // The SERCOM SS PAD is available on this pin but HW SS isn't used. Set here only for reference. -static const uint8_t MOSI1 = PIN_SPI1_MOSI ; -static const uint8_t MISO1 = PIN_SPI1_MISO ; -static const uint8_t SCK1 = PIN_SPI1_SCK ; - - -/* - * Wire Interfaces - */ -#if defined(TWO_WIRE) -#define WIRE_INTERFACES_COUNT 2 -#else -#define WIRE_INTERFACES_COUNT 1 -#endif - -#define PIN_WIRE_SDA (16u) -#define PIN_WIRE_SCL (17u) -#if defined(THREE_UART) && defined(ONE_WIRE) && defined(NO_SPI) - #define PERIPH_WIRE sercom3 - #define WIRE_IT_HANDLER SERCOM3_Handler -#else - #define PERIPH_WIRE sercom1 - #define WIRE_IT_HANDLER SERCOM1_Handler -#endif - -static const uint8_t SDA = PIN_WIRE_SDA; -static const uint8_t SCL = PIN_WIRE_SCL; - -#define PIN_WIRE1_SDA (8u) -#define PIN_WIRE1_SCL (9u) -#define PERIPH_WIRE1 sercom2 -#define WIRE1_IT_HANDLER SERCOM2_Handler - -static const uint8_t SDA1 = PIN_WIRE1_SDA; -static const uint8_t SCL1 = PIN_WIRE1_SCL; - - -/* - * USB - Define PIN_USB_HOST_ENABLE to assert the defined pin to - * PIN_USB_HOST_ENABLE_VALUE during startup. Leave undefined to disable this pin. - */ -#define PIN_USB_DM (24ul) -#define PIN_USB_DP (25ul) -//#define PIN_USB_HOST_ENABLE (14ul) -#define PIN_USB_HOST_ENABLE_VALUE HIGH - -/* - * I2S Interfaces - */ -#define I2S_INTERFACES_COUNT 1 - -#define I2S_DEVICE 0 -#define I2S_CLOCK_GENERATOR 3 -#define PIN_I2S_SD (7u) -#define PIN_I2S_SCK (10u) -#define PIN_I2S_FS (11u) - -#ifdef __cplusplus -} -#endif - - -/*---------------------------------------------------------------------------- - * Arduino objects - C++ only - *----------------------------------------------------------------------------*/ - -#ifdef __cplusplus - -/* ========================= - * ===== SERCOM DEFINITION - * ========================= -*/ -extern SERCOM sercom0; -extern SERCOM sercom1; -extern SERCOM sercom2; -extern SERCOM sercom3; -#if (SAML) -extern SERCOM sercom4; -extern SERCOM sercom5; -#endif - -extern Uart Serial1; -extern Uart Serial2; -extern Uart Serial3; -extern Uart Serial4; -#if (SAML) -extern Uart Serial5; -extern Uart Serial6; -#endif - -#endif - -// These serial port names are intended to allow libraries and architecture-neutral -// sketches to automatically default to the correct port name for a particular type -// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, -// the first hardware serial port whose RX/TX pins are not dedicated to another use. -// -// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor -// -// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial -// -// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library -// -// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. -// -// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX -// pins are NOT connected to anything by default. -#if (!SAMC) - #define SERIAL_PORT_USBVIRTUAL SerialUSB -#endif -// SERIAL_PORT_MONITOR seems to be used only by the USB Host library (as of 1.6.5). -// It normally allows debugging output on the USB programming port, while the USB host uses the USB native port. -// The programming port is connected to a hardware UART through a USB-Serial bridge (EDBG chip) on the Zero. -// Boards that do not have the EDBG chip will have to connect a USB-TTL serial adapter to 'Serial' to get -// the USB Host debugging output. -#if (SAMC) - #define SERIAL_PORT_MONITOR Serial2 -#else - #define SERIAL_PORT_MONITOR Serial1 -#endif - -// Serial has no physical pins broken out, so it's not listed as HARDWARE port -#if (SAMC) - #define SERIAL_PORT_HARDWARE Serial2 - #define SERIAL_PORT_HARDWARE_OPEN Serial2 -#else - #define SERIAL_PORT_HARDWARE Serial1 - #define SERIAL_PORT_HARDWARE_OPEN Serial1 -#endif - -// The MT-D21E does not have the EDBG support chip, which provides a USB-UART bridge -// accessible using Serial (the Arduino serial monitor is normally connected to this). -// So, the USB virtual serial port (SerialUSB) must be used to communicate with the host. -// Because most sketches use Serial to print to the monitor, it is aliased to SerialUSB. -// Remember to use while(!Serial); to wait for a connection before Serial printing. -#if (SAMC) - #define Serial Serial1 -#else - // When USB CDC is enabled, Serial refers to SerialUSB, otherwise it refers to Serial1. - #if defined(CDC_ONLY) || defined(CDC_HID) || defined(WITH_CDC) - #define Serial SerialUSB - #else - #define Serial Serial1 - #endif -#endif - -#endif /* _VARIANT_MATTAIRTECH_MT_D21E_REVB_ */ diff --git a/variants/Xeno/linker_scripts/gcc/No_Bootloader/flash_32KB.ld b/variants/Xeno/linker_scripts/gcc/No_Bootloader/flash_32KB.ld deleted file mode 100644 index 407777c80..000000000 --- a/variants/Xeno/linker_scripts/gcc/No_Bootloader/flash_32KB.ld +++ /dev/null @@ -1,214 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00008000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - * __ram_end__ - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} diff --git a/variants/Xeno/linker_scripts/gcc/No_Bootloader/flash_64KB.ld b/variants/Xeno/linker_scripts/gcc/No_Bootloader/flash_64KB.ld deleted file mode 100644 index 6f3d4d3e8..000000000 --- a/variants/Xeno/linker_scripts/gcc/No_Bootloader/flash_64KB.ld +++ /dev/null @@ -1,214 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00010000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00002000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - * __ram_end__ - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} diff --git a/variants/Xeno_Mini/linker_scripts/gcc/16KB_Bootloader/flash_128KB.ld b/variants/Xeno_Mini/linker_scripts/gcc/16KB_Bootloader/flash_128KB.ld deleted file mode 100644 index c541d8cd0..000000000 --- a/variants/Xeno_Mini/linker_scripts/gcc/16KB_Bootloader/flash_128KB.ld +++ /dev/null @@ -1,217 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00020000-0x4000 /* First 16KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00004000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x4000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} diff --git a/variants/Xeno_Mini/linker_scripts/gcc/16KB_Bootloader/flash_256KB.ld b/variants/Xeno_Mini/linker_scripts/gcc/16KB_Bootloader/flash_256KB.ld deleted file mode 100644 index a0b9f951f..000000000 --- a/variants/Xeno_Mini/linker_scripts/gcc/16KB_Bootloader/flash_256KB.ld +++ /dev/null @@ -1,217 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00040000-0x4000 /* First 16KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x4000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} diff --git a/variants/Xeno_Mini/linker_scripts/gcc/16KB_Bootloader/flash_32KB.ld b/variants/Xeno_Mini/linker_scripts/gcc/16KB_Bootloader/flash_32KB.ld deleted file mode 100644 index 5d8d047a9..000000000 --- a/variants/Xeno_Mini/linker_scripts/gcc/16KB_Bootloader/flash_32KB.ld +++ /dev/null @@ -1,217 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00008000-0x4000 /* First 16KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x4000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} diff --git a/variants/Xeno_Mini/linker_scripts/gcc/16KB_Bootloader/flash_64KB.ld b/variants/Xeno_Mini/linker_scripts/gcc/16KB_Bootloader/flash_64KB.ld deleted file mode 100644 index 3f7223790..000000000 --- a/variants/Xeno_Mini/linker_scripts/gcc/16KB_Bootloader/flash_64KB.ld +++ /dev/null @@ -1,217 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00010000-0x4000 /* First 16KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00002000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x4000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} diff --git a/variants/Xeno_Mini/linker_scripts/gcc/8KB_Bootloader/flash_128KB.ld b/variants/Xeno_Mini/linker_scripts/gcc/8KB_Bootloader/flash_128KB.ld deleted file mode 100644 index 07940acbd..000000000 --- a/variants/Xeno_Mini/linker_scripts/gcc/8KB_Bootloader/flash_128KB.ld +++ /dev/null @@ -1,217 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00020000-0x2000 /* First 8KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00004000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x2000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} diff --git a/variants/Xeno_Mini/linker_scripts/gcc/8KB_Bootloader/flash_256KB.ld b/variants/Xeno_Mini/linker_scripts/gcc/8KB_Bootloader/flash_256KB.ld deleted file mode 100644 index 825aee666..000000000 --- a/variants/Xeno_Mini/linker_scripts/gcc/8KB_Bootloader/flash_256KB.ld +++ /dev/null @@ -1,217 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00040000-0x2000 /* First 8KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x2000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} diff --git a/variants/Xeno_Mini/linker_scripts/gcc/8KB_Bootloader/flash_64KB.ld b/variants/Xeno_Mini/linker_scripts/gcc/8KB_Bootloader/flash_64KB.ld deleted file mode 100644 index 1c36f57e1..000000000 --- a/variants/Xeno_Mini/linker_scripts/gcc/8KB_Bootloader/flash_64KB.ld +++ /dev/null @@ -1,217 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00010000-0x2000 /* First 8KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00002000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x2000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} diff --git a/variants/Xeno_Mini/linker_scripts/gcc/No_Bootloader/flash_128KB.ld b/variants/Xeno_Mini/linker_scripts/gcc/No_Bootloader/flash_128KB.ld deleted file mode 100644 index 941e0adee..000000000 --- a/variants/Xeno_Mini/linker_scripts/gcc/No_Bootloader/flash_128KB.ld +++ /dev/null @@ -1,214 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00020000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00004000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - * __ram_end__ - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} diff --git a/variants/Xeno_Mini/linker_scripts/gcc/No_Bootloader/flash_256KB.ld b/variants/Xeno_Mini/linker_scripts/gcc/No_Bootloader/flash_256KB.ld deleted file mode 100644 index 865514cbb..000000000 --- a/variants/Xeno_Mini/linker_scripts/gcc/No_Bootloader/flash_256KB.ld +++ /dev/null @@ -1,214 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - * __ram_end__ - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} diff --git a/variants/Xeno_Mini/linker_scripts/gcc/No_Bootloader/flash_32KB.ld b/variants/Xeno_Mini/linker_scripts/gcc/No_Bootloader/flash_32KB.ld deleted file mode 100644 index 407777c80..000000000 --- a/variants/Xeno_Mini/linker_scripts/gcc/No_Bootloader/flash_32KB.ld +++ /dev/null @@ -1,214 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00008000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - * __ram_end__ - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} diff --git a/variants/Xeno_Mini/linker_scripts/gcc/No_Bootloader/flash_64KB.ld b/variants/Xeno_Mini/linker_scripts/gcc/No_Bootloader/flash_64KB.ld deleted file mode 100644 index 6f3d4d3e8..000000000 --- a/variants/Xeno_Mini/linker_scripts/gcc/No_Bootloader/flash_64KB.ld +++ /dev/null @@ -1,214 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00010000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00002000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - * __ram_end__ - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} diff --git a/variants/Xeno_Mini/pins_arduino.h b/variants/Xeno_Mini/pins_arduino.h deleted file mode 100644 index db0e40c3d..000000000 --- a/variants/Xeno_Mini/pins_arduino.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -// API compatibility -#include "variant.h" - diff --git a/variants/arduino_mzero/README.md b/variants/arduino_mzero/README.md deleted file mode 100644 index 776da4eda..000000000 --- a/variants/arduino_mzero/README.md +++ /dev/null @@ -1,214 +0,0 @@ -# Pins descriptions for the Arduino M0 / M0 Pro - -``` -/* - * - * + Pin number + ZERO Board pin | PIN | Label/Name | Comments (* is for default peripheral in use) - * +------------+------------------+--------+-----------------+------------------------------ - * | | Digital Low | | | - * +------------+------------------+--------+-----------------+------------------------------ - * | 0 | 0 -> RX | PA11 | | EIC/EXTINT[11] ADC/AIN[19] PTC/X[3] *SERCOM0/PAD[3] SERCOM2/PAD[3] TCC1/WO[1] TCC0/WO[3] - * | 1 | 1 <- TX | PA10 | | EIC/EXTINT[10] ADC/AIN[18] PTC/X[2] *SERCOM0/PAD[2] TCC1/WO[0] TCC0/WO[2] - * | 2 | ~2 | PA08 | | EIC/NMI ADC/AIN[16] PTC/X[0] SERCOM0/PAD[0] SERCOM2/PAD[0] *TCC0/WO[0] TCC1/WO[2] - * | 3 | ~3 | PA09 | | EIC/EXTINT[9] ADC/AIN[17] PTC/X[1] SERCOM0/PAD[1] SERCOM2/PAD[1] *TCC0/WO[1] TCC1/WO[3] - * | 4 | ~4 | PA14 | | EIC/EXTINT[14] SERCOM2/PAD[2] SERCOM4/PAD[2] TC3/WO[0] *TCC0/WO[4] - * | 5 | ~5 | PA15 | | EIC/EXTINT[15] SERCOM2/PAD[3] SERCOM4/PAD[3] TC3/WO[1] *TCC0/WO[5] - * | 6 | ~6 | PA20 | | EIC/EXTINT[4] PTC/X[8] SERCOM5/PAD[2] SERCOM3/PAD[2] TC7/WO[0] *TCC0/WO[6] - * | 7 | ~7 | PA21 | | EIC/EXTINT[5] PTC/X[9] SERCOM5/PAD[3] SERCOM3/PAD[3] TC7/WO[1] *TCC0/WO[7] - * +------------+------------------+--------+-----------------+------------------------------ - * | | Digital High | | | - * +------------+------------------+--------+-----------------+------------------------------ - * | 8 | ~8 | PA06 | | EIC/EXTINT[6] PTC/Y[4] ADC/AIN[6] AC/AIN[2] SERCOM0/PAD[2] *TCC1/WO[0] - * | 9 | ~9 | PA07 | | EIC/EXTINT[7] PTC/Y[5] DC/AIN[7] AC/AIN[3] SERCOM0/PAD[3] *TCC1/WO[1] - * | 10 | ~10 | PA18 | | EIC/EXTINT[2] PTC/X[6] SERCOM1/PAD[2] SERCOM3/PAD[2] *TC3/WO[0] TCC0/WO[2] - * | 11 | ~11 | PA16 | | EIC/EXTINT[0] PTC/X[4] SERCOM1/PAD[0] SERCOM3/PAD[0] *TCC2/WO[0] TCC0/WO[6] - * | 12 | ~12 | PA19 | | EIC/EXTINT[3] PTC/X[7] SERCOM1/PAD[3] SERCOM3/PAD[3] *TC3/WO[1] TCC0/WO[3] - * | 13 | ~13 | PA17 | LED | EIC/EXTINT[1] PTC/X[5] SERCOM1/PAD[1] SERCOM3/PAD[1] *TCC2/WO[1] TCC0/WO[7] - * | 14 | GND | | | - * | 15 | AREF | PA03 | | *DAC/VREFP PTC/Y[1] - * | 16 | SDA | PA22 | | EIC/EXTINT[6] PTC/X[10] *SERCOM3/PAD[0] SERCOM5/PAD[0] TC4/WO[0] TCC0/WO[4] - * | 17 | SCL | PA23 | | EIC/EXTINT[7] PTC/X[11] *SERCOM3/PAD[1] SERCOM5/PAD[1] TC4/WO[1] TCC0/WO[5] - * +------------+------------------+--------+-----------------+------------------------------ - * | |SPI (Legacy ICSP) | | | - * +------------+------------------+--------+-----------------+------------------------------ - * | 18 | 1 | PA12 | MISO | EIC/EXTINT[12] SERCOM2/PAD[0] *SERCOM4/PAD[0] TCC2/WO[0] TCC0/WO[6] - * | 19 | 2 | | 5V0 | - * | 20 | 3 | PB11 | SCK | EIC/EXTINT[11] *SERCOM4/PAD[3] TC5/WO[1] TCC0/WO[5] - * | 21 | 4 | PB10 | MOSI | EIC/EXTINT[10] *SERCOM4/PAD[2] TC5/WO[0] TCC0/WO[4] - * | 22 | 5 | | RESET | - * | 23 | 6 | | GND | - * +------------+------------------+--------+-----------------+------------------------------ - * | | Analog Connector | | | - * +------------+------------------+--------+-----------------+------------------------------ - * | 24 | A0 | PA02 | | EIC/EXTINT[2] *ADC/AIN[0] PTC/Y[0] DAC/VOUT - * | 25 | A1 | PB08 | | EIC/EXTINT[8] *ADC/AIN[2] PTC/Y[14] SERCOM4/PAD[0] TC4/WO[0] - * | 26 | A2 | PB09 | | EIC/EXTINT[9] *ADC/AIN[3] PTC/Y[15] SERCOM4/PAD[1] TC4/WO[1] - * | 27 | A3 | PA04 | | EIC/EXTINT[4] *ADC/AIN[4] AC/AIN[0] PTC/Y[2] SERCOM0/PAD[0] TCC0/WO[0] - * | 28 | A4 | PA05 | | EIC/EXTINT[5] *ADC/AIN[5] AC/AIN[1] PTC/Y[5] SERCOM0/PAD[1] TCC0/WO[1] - * | 29 | A5 | PB02 | | EIC/EXTINT[2] *ADC/AIN[10] PTC/Y[8] SERCOM5/PAD[0] TC6/WO[0] - * +------------+------------------+--------+-----------------+------------------------------ - * | | LEDs | | | - * +------------+------------------+--------+-----------------+------------------------------ - * | 30 | | PB03 | RX | - * | 31 | | PA27 | TX | - * +------------+------------------+--------+-----------------+------------------------------ - * | | USB | | | - * +------------+------------------+--------+-----------------+------------------------------ - * | 32 | | PA28 | USB HOST ENABLE | - * | 33 | | PA24 | USB_NEGATIVE | USB/DM - * | 34 | | PA25 | USB_POSITIVE | USB/DP - * +------------+------------------+--------+-----------------+------------------------------ - * | | EDBG | | | - * +------------+------------------+--------+-----------------+------------------------------ - * | 35 | | PB22 | EDBG_UART TX | SERCOM5/PAD[2] - * | 36 | | PB23 | EDBG_UART RX | SERCOM5/PAD[3] - * +------------+------------------+--------+-----------------+------------------------------ - * | 37 | | PA22 | EDBG_SDA | SERCOM3/PAD[0] - * | 38 | | PA23 | EDBG_SCL | SERCOM3/PAD[1] - * +------------+------------------+--------+-----------------+------------------------------ - * | 39 | | PA19 | EDBG_MISO | SERCOM1/PAD[3] - * | 40 | | PA16 | EDBG_MOSI | SERCOM1/PAD[0] - * | 41 | | PA18 | EDBG_SS | SERCOM1/PAD[2] - * | 42 | | PA17 | EDBG_SCK | SERCOM1/PAD[1] - * +------------+------------------+--------+-----------------+------------------------------ - * | 43 | | PA13 | EDBG_GPIO0 | EIC/EXTINT[13] *TCC2/WO[1] TCC0/WO[7] - * | 44 | | PA21 | EDBG_GPIO1 | Pin 7 - * | 45 | | PA06 | EDBG_GPIO2 | Pin 8 - * | 46 | | PA07 | EDBG_GPIO3 | Pin 9 - * +------------+------------------+--------+-----------------+------------------------------ - * | |32.768KHz Crystal | | | - * +------------+------------------+--------+-----------------+------------------------------ - * | | | PA00 | XIN32 | EXTINT[0] SERCOM1/PAD[0] TCC2/WO[0] - * | | | PA01 | XOUT32 | EXTINT[1] SERCOM1/PAD[1] TCC2/WO[1] - * +------------+------------------+--------+-----------------+------------------------------ - */ -``` - - - -## PinDescription table format - -### Note that in 1.6.18-beta-b1 a new compact table format was added. -The standard PinDescription table uses 12 bytes per pin. Define PIN_DESCRIPTION_TABLE_SIMPLE -to use a more compact format that uses only 4 bytes per pin (currently only available -for the D11 chips). In this case, the PinType, PinAttribute, and GCLKCCL columns are not used -(they are not required). Additionally, the SetPortPin() and SetExtIntADC() macros are used to -pack Port and Pin into the PortPin column, and ExtInt and ADCChannelNumber into the ExtIntADC -column. Note that external libraries that reference the PinDescription table directly (uncommon) -will no longer work. This define can be combined with the PIN_MAP_COMPACT define, which -is available in variant.h of the D11 variants. This can save from 10's to over 200 bytes. - -### Note that a new column (GCLKCCL) was added for 1.6.8-beta-b0. -MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE in variant.h is used to track versions. -If using board variant files with the old format, the new core will still read the -table the old way, losing any new features introduced by the new column. Additionally, -new definitions have been added for D51, L21, and C21 support. - -### Each pin can have multiple functions. -The PinDescription table describes how each of the pins can be used by the Arduino -core. Each pin can have multiple functions (ie: ADC input, digital output, PWM, -communications, etc.), and the PinDescription table configures which functions can -be used for each pin. This table is mainly accessed by the pinPeripheral function in -wiring_private.c, which is used to attach a pin to a particular peripheral function. -The communications drivers (ie: SPI, I2C, and UART), analogRead(), analogWrite(), -analogReference(), attachInterrupt(), and pinMode() all call pinPeripheral() to -verify that the pin can perform the function requested, and to configure the pin for -that function. Most of the contents of pinMode() are now in pinPeripheral(). - -### Pin Mapping -There are different ways that pins can be mapped. Typically, there is no relation -between the arduino pin number used, and the actual port pin designator. Thus, the -pcb must be printed with the arduino numbering, otherwise, if the port pin is printed, -a cross reference table is needed to find the arduino pin number. However, this results -in the least amount of space used by the table. Another method, used by default by the -MT-D21E and MT-D11, maps Arduino pin numbers to the actual port pin number (ie: Arduino -pin 28 = Port A28). This works well when there is only one port (or if the PORTB pins -are used for onboard functions and not broken out). PIO_NOT_A_PIN entries must be added -for pins that are used for other purposes or for pins that do not exist (especially the -D11), so some FLASH space may be wasted. For an example of both types, see variant.cpp -from the MT-D11 variant. The Xeno combines both methods, using the actual port pin -designators from both PORTA and PORTB for arduino numbers 0-31 (ie: B1=1, A2=2), then -using arduino numbering only above 31. For 0-31 only one pin from PORTA or PORTB can be -used, leaving the other pin for some number above 31. - -**See [WVariant.h](https://github.com/mattairtech/ArduinoCore-samd/tree/master/cores/arduino/WVariant.h) for the definitions used in the table.** - -### Port -This is the port (ie: PORTA). Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### Pin -This is the pin (bit) within the port. Valid values are 0-31. Not used with -PIN_DESCRIPTION_TABLE_SIMPLE. - -### SetPortPin() -When PIN_DESCRIPTION_TABLE_SIMPLE is defined, Port and Pin are combined into one column -using the SetPortPin() packing macro: SetPortPin(PORTA, 2). If the pin is not usable, -use SetPortPin(NOT_A_PORT, 0). - -### PinType -This indicates what peripheral function the pin can be attached to. In most cases, -this is PIO_MULTI, which means that the pin can be anything listed in the PinAttribute -field. It can also be set to a specific peripheral. In this case, any attempt to -configure the pin (using pinPeripheral or pinMode) as anything else will fail (and -pinPeripheral will return -1). This can be used to prevent accidental re-configuration -of a pin that is configured for only one function (ie: USB D- and D+ pins). If a pin -is not used or does not exist, PIO_NOT_A_PIN must be entered in this field. See -WVariant.h for valid entries. These entries are also used as a parameter to -pinPeripheral() with the exception of PIO_NOT_A_PIN and PIO_MULTI. The pinMode function -now calls pinPeripheral() with the desired mode. Note that this field is not used to -select between the different peripherals possible with each of the SERCOM and TIMER -functions. PeripheralAttribute is now used for this. When PIN_DESCRIPTION_TABLE_SIMPLE -is defined, PinType is not used (the pin is treated as PIO_MULTI). - -### PeripheralAttribute -This is an 8-bit bitfield used for various peripheral configuration. It is primarily -used to select between the different peripherals possible with each of the SERCOM and -TIMER functions. TIMER pins are individual, while SERCOM uses a group of two to four -pins. This group of pins can span both peripherals. For example, pin 19 (SPI1 SCK) on -the MT-D21E uses PER_ATTR_SERCOM_ALT while pin 22 (SPI1 MISO) uses PER_ATTR_SERCOM_STD. -Both TIMER and SERCOM can exist for each pin. This bitfield is also used to set the -pin drive strength and the input buffer configuration (ie: totem-pole, open-drain, -buskeeper, etc.). Starting with 1.6.8, the ADC instance on the D51 and C21 (there are -two) is also selected here. Note that the D51 adds a third timer attribute and -requires consultation of the datasheet IOSET tables. See WVariant.h for valid entries. - -### PinAttribute -This is a 32-bit bitfield used to list all of the valid peripheral functions that a -pin can attach to. This includes GPIO functions like PIN_ATTR_OUTPUT. Certain -attributes are shorthand for a combination of other attributes. PIN_ATTR_DIGITAL -includes all of the GPIO functions, while PIN_ATTR_TIMER includes both -PIN_ATTR_TIMER_PWM and PIN_ATTR_TIMER_CAPTURE (capture is not used yet). -PIN_ATTR_ANALOG is an alias to PIN_ATTR_ANALOG_ADC. This bitfield is useful for -limiting a pin to only input related functions or output functions. This allows a pin -to have a more flexible configuration, while restricting the direction (ie: to avoid -contention). See WVariant.h for valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### TCChannel -This is the TC/TCC channel (if any) assigned to the pin. Some TC channels are available -on multiple pins. In general, only one pin should be configured in the pinDescription -table per TC channel. Starting with 1.6.8, the timer type is now encoded in this column -to support the D51, L21 and C21, which use TC numbers starting at 0 (rather than 3 as on -the D21). See WVariant.h for valid entries. - -### ADCChannelNumber -This is the ADC channel (if any) assigned to the pin. The D51 and C21 each have two ADC -instances, which are selected in the PeripheralAttribute column. See WVariant.h for -valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### ExtInt -This is the interrupt (if any) assigned to the pin. Some interrupt numbers are -available on multiple pins. In general, only one pin should be configured in the -pinDescription table per interrupt number. Thus, for example, if an interrupt was -needed on pin 2, EXTERNAL_INT_2 can be moved from pin 18. See WVariant.h for valid -entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### SetExtIntADC() -When PIN_DESCRIPTION_TABLE_SIMPLE is defined, ExtInt and ADCChannelNumber are combined -into one column using the SetExtIntADC() packing macro: SetExtIntADC(EXTERNAL_INT_4, -ADC_Channel2). If the pin is not usable, use SetExtIntADC(EXTERNAL_INT_NONE, No_ADC_Channel). - -### GCLKCCL -This column was added in 1.6.8-beta-b0. It is not yet used. It will eventually support -the Analog Comparators (AC), the Configurable Custom Logic (CCL) peripherals of the D51, -L21 and C21, and the GCLK outputs (inputs) of all of the MCUs. Not used with -PIN_DESCRIPTION_TABLE_SIMPLE. diff --git a/variants/arduino_mzero/debug_scripts/SAMD21G18A.gdb b/variants/arduino_mzero/debug_scripts/SAMD21G18A.gdb deleted file mode 100644 index 3c37ffde2..000000000 --- a/variants/arduino_mzero/debug_scripts/SAMD21G18A.gdb +++ /dev/null @@ -1,31 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21g18" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/arduino_mzero/linker_scripts/gcc/16KB_Bootloader/flash_256KB.ld b/variants/arduino_mzero/linker_scripts/gcc/16KB_Bootloader/flash_256KB.ld deleted file mode 100644 index 7d36dfd4c..000000000 --- a/variants/arduino_mzero/linker_scripts/gcc/16KB_Bootloader/flash_256KB.ld +++ /dev/null @@ -1,214 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00040000-0x4000 /* First 16KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} diff --git a/variants/arduino_mzero/openocd_scripts/SAMD21G18A.cfg b/variants/arduino_mzero/openocd_scripts/SAMD21G18A.cfg deleted file mode 100644 index 36c65c32d..000000000 --- a/variants/arduino_mzero/openocd_scripts/SAMD21G18A.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samd21g18 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samdXX.cfg] diff --git a/variants/arduino_mzero/pins_arduino.h b/variants/arduino_mzero/pins_arduino.h deleted file mode 100755 index db0e40c3d..000000000 --- a/variants/arduino_mzero/pins_arduino.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -// API compatibility -#include "variant.h" - diff --git a/variants/arduino_mzero/variant.cpp b/variants/arduino_mzero/variant.cpp deleted file mode 100644 index c641f07af..000000000 --- a/variants/arduino_mzero/variant.cpp +++ /dev/null @@ -1,154 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* - * Modified 9 December 2016 by Justin Mattair - * for MattairTech boards (www.mattairtech.com) - * - * See README.md for documentation and pin mapping information - */ - - -#include "variant.h" - -/* - * Pins descriptions - */ -const PinDescription g_APinDescription[]= -{ - // 0..13 - Digital pins - // ---------------------- - // 0/1 - SERCOM/UART (Serial1) - { PORTA, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), NOT_ON_TIMER, ADC_Channel19, EXTERNAL_INT_11, GCLK_CCL_NONE }, // RX: SERCOM0/PAD[3] - { PORTA, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), NOT_ON_TIMER, ADC_Channel18, EXTERNAL_INT_10, GCLK_CCL_NONE }, // TX: SERCOM0/PAD[2] - - // 2..12 - // Digital Low - { PORTA, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), TCC0_CH0, ADC_Channel16, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, // TCC0/WO[0] SDA: SERCOM2/PAD[0] - { PORTA, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), TCC0_CH1, ADC_Channel17, EXTERNAL_INT_9, GCLK_CCL_NONE }, // TCC0/WO[1] SCL: SERCOM2/PAD[1] - { PORTA, 14, PIO_MULTI, (PER_ATTR_DRIVE_STRONG), (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_14, GCLK_CCL_NONE }, - { PORTA, 15, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TC3_CH1, No_ADC_Channel, EXTERNAL_INT_15, GCLK_CCL_NONE }, // TC3/WO[1] - { PORTA, 20, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT|PIN_ATTR_COM), TCC0_CH6, No_ADC_Channel, EXTERNAL_INT_4, GCLK_CCL_NONE }, // TCC0/WO[6] - { PORTA, 21, PIO_MULTI, (PER_ATTR_DRIVE_STRONG), (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_5, GCLK_CCL_NONE }, - - // Digital High - { PORTA, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC1_CH0, ADC_Channel6, EXTERNAL_INT_6, GCLK_CCL_NONE }, // TCC1/WO[0] ADC/AIN[6] - { PORTA, 7, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_COM), TCC1_CH1, ADC_Channel7, EXTERNAL_INT_7, GCLK_CCL_NONE }, // TCC1/WO[1] ADC/AIN[7] - { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC3_CH0, No_ADC_Channel, EXTERNAL_INT_2, GCLK_CCL_NONE }, // TC3/WO[0] SS: SERCOM1/PAD[2] - { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, // TCC2/WO[0] MOSI: SERCOM1/PAD[0] - { PORTA, 19, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), TCC0_CH3, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, // TCC0/WO[3] MISO: SERCOM1/PAD[3] - - // 13 (LED) - { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, // TCC2/WO[1] SCK: SERCOM1/PAD[1] - - // 14 (GND) - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 15 (AREF) - { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // VREF ADC/AIN[1] - - // 16..17 I2C pins (SDA/SCL and also EDBG:SDA/SCL) - // ---------------------- - { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC4_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SDA: SERCOM3/PAD[0] - { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC4_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SCL: SERCOM3/PAD[1] - - // 18..23 - SPI pins (ICSP:MISO,SCK,MOSI) - // ---------------------- - { PORTA, 12, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_12, GCLK_CCL_NONE }, // MISO: SERCOM4/PAD[0] - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { PORTB, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_COM), TC5_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SCK: SERCOM4/PAD[3] - { PORTB, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_COM), TC5_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // MOSI: SERCOM4/PAD[2] - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - { NOT_A_PORT, 0, PIO_NOT_A_PIN, PER_ATTR_NONE, PIN_ATTR_NONE, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // Unused - - // 24..29 - Analog pins - // -------------------- - { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // ADC/AIN[0] / DAC - { PORTB, 8, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel2, EXTERNAL_INT_8, GCLK_CCL_NONE }, // ADC/AIN[2] - { PORTB, 9, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel3, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // ADC/AIN[3] - { PORTA, 4, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel4, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // ADC/AIN[4] - { PORTA, 5, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel5, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // ADC/AIN[5] - { PORTB, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel10, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // ADC/AIN[10] - - // 30..31 - RX/TX LEDS (PB03/PA27) - // -------------------- - { PORTB, 3, PIO_OUTPUT, PER_ATTR_DRIVE_STRONG, PIN_ATTR_OUTPUT, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // used as output only - { PORTA, 27, PIO_OUTPUT, PER_ATTR_DRIVE_STRONG, PIN_ATTR_OUTPUT, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // used as output only - - // 32..34 - USB - // -------------------- - { PORTA, 28, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB Host enable - { PORTA, 24, PIO_COM, PER_ATTR_NONE, PIN_ATTR_COM, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM - { PORTA, 25, PIO_COM, PER_ATTR_NONE, PIN_ATTR_COM, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP - - // 35..46 - EDBG - // ---------------------- - // 35/36 - EDBG/UART - { PORTB, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // TX: SERCOM5/PAD[2] - { PORTB, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // RX: SERCOM5/PAD[3] - - // 37/38 I2C (SDA/SCL and also EDBG:SDA/SCL). These are duplicate entries of pins 16 and 17 - { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC4_CH0, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, // SDA: SERCOM3/PAD[0] - { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC4_CH1, No_ADC_Channel, EXTERNAL_INT_7, GCLK_CCL_NONE }, // SCL: SERCOM3/PAD[1] - - // 39..42 - EDBG/SPI. These are duplicate entries of pins 12, 11, 10, and 13. - { PORTA, 19, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), TCC0_CH3, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, // MISO: SERCOM1/PAD[3] - { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, // MOSI: SERCOM1/PAD[0] - { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC3_CH0, No_ADC_Channel, EXTERNAL_INT_2, GCLK_CCL_NONE }, // SS: SERCOM1/PAD[2] - { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, // SCK: SERCOM1/PAD[1] - - // 43..46 - EDBG/Digital - { PORTA, 13, PIO_MULTI, (PER_ATTR_DRIVE_STRONG), (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_13, GCLK_CCL_NONE }, // EIC/EXTINT[13] PIN_ATN - - // 44..46 These are duplicate entries of pins 7, 8, and 9 - { PORTA, 21, PIO_MULTI, (PER_ATTR_DRIVE_STRONG), (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_5, GCLK_CCL_NONE }, - { PORTA, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC1_CH0, ADC_Channel6, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // TCC1/WO[0] ADC/AIN[6] - { PORTA, 7, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_COM), TCC1_CH1, ADC_Channel7, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // TCC1/WO[1] ADC/AIN[7] - - // 47 - Alternate use of A0 (DAC output). This is a duplicate entry of pin 24 - { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // ADC/AIN[0] / DAC -} ; - -const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TCC1, TCC2, TC3, TC4, TC5 } ; - -// Multi-serial objects instantiation -SERCOM sercom0( SERCOM0 ) ; -SERCOM sercom1( SERCOM1 ) ; -SERCOM sercom2( SERCOM2 ) ; -SERCOM sercom3( SERCOM3 ) ; -SERCOM sercom4( SERCOM4 ) ; -SERCOM sercom5( SERCOM5 ) ; - -#if defined(ONE_UART) || defined(TWO_UART) -Uart Serial( SERCOM_INSTANCE_SERIAL, PIN_SERIAL_RX, PIN_SERIAL_TX, PAD_SERIAL_RX, PAD_SERIAL_TX ) ; - -void SERCOM5_Handler() -{ - Serial.IrqHandler(); -} -#endif - -#if defined(TWO_UART) -Uart Serial1( SERCOM_INSTANCE_SERIAL1, PIN_SERIAL1_RX, PIN_SERIAL1_TX, PAD_SERIAL1_RX, PAD_SERIAL1_TX ) ; - -void SERCOM0_Handler() -{ - Serial1.IrqHandler(); -} -#endif - diff --git a/variants/arduino_mzero/variant.h b/variants/arduino_mzero/variant.h deleted file mode 100644 index b85c2525f..000000000 --- a/variants/arduino_mzero/variant.h +++ /dev/null @@ -1,288 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#ifndef _VARIANT_ARDUINO_MZERO_ -#define _VARIANT_ARDUINO_MZERO_ - -/* The definitions here need the MattairTech SAMD core >=1.6.8. - * The format is different than the stock Arduino SAMD core, - * which uses ARDUINO_SAMD_VARIANT_COMPLIANCE instead. - */ -#define MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE 10608 - -/*---------------------------------------------------------------------------- - * Clock Configuration - *----------------------------------------------------------------------------*/ - -/** Master clock frequency (also Fcpu frequency) */ -#define VARIANT_MCK (48000000ul) - -/* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ - * must also be defined with the external crystal frequency in Hertz. - */ -//#define HS_CRYSTAL_FREQUENCY_HERTZ 16000000UL - -/* If the PLL is used (CLOCKCONFIG_32768HZ_CRYSTAL, or CLOCKCONFIG_HS_CRYSTAL - * defined), then PLL_FRACTIONAL_ENABLED can be defined, which will result in - * a more accurate 48MHz output frequency at the expense of increased jitter. - */ -//#define PLL_FRACTIONAL_ENABLED - -/* If both PLL_FAST_STARTUP and CLOCKCONFIG_HS_CRYSTAL are defined, the crystal - * will be divided down to 1MHz - 2MHz, rather than 32KHz - 64KHz, before being - * multiplied by the PLL. This will result in a faster lock time for the PLL, - * however, it will also result in a less accurate PLL output frequency if the - * crystal is not divisible (without remainder) by 1MHz. In this case, define - * PLL_FRACTIONAL_ENABLED as well. - */ -//#define PLL_FAST_STARTUP - -/* The fine calibration value for DFLL open-loop mode is defined here. - * The coarse calibration value is loaded from NVM OTP (factory calibration values). - */ -#define NVM_SW_CALIB_DFLL48M_FINE_VAL (512) - -/*---------------------------------------------------------------------------- - * Headers - *----------------------------------------------------------------------------*/ - -#include "WVariant.h" -#include "sam.h" - -#ifdef __cplusplus -#include "SERCOM.h" -#include "Uart.h" -#endif // __cplusplus - -#ifdef __cplusplus -extern "C" -{ -#endif // __cplusplus - -/*---------------------------------------------------------------------------- - * Pins - *----------------------------------------------------------------------------*/ - -// Number of pins defined in PinDescription array -#define NUM_PIN_DESCRIPTION_ENTRIES (48u) - -#define PINS_COUNT (34u) -#define NUM_DIGITAL_PINS (19u) -#define NUM_ANALOG_INPUTS (6u) -#define NUM_ANALOG_OUTPUTS (1u) -#define analogInputToDigitalPin(p) ((p < 6u) ? (p) + 24u : -1) - -#define digitalPinToPort(P) ( &(PORT->Group[g_APinDescription[P].ulPort]) ) -#define digitalPinToBitMask(P) ( 1 << g_APinDescription[P].ulPin ) -//#define analogInPinToBit(P) ( ) -#define portOutputRegister(port) ( &(port->OUT.reg) ) -#define portInputRegister(port) ( &(port->IN.reg) ) -#define portModeRegister(port) ( &(port->DIR.reg) ) -#define digitalPinHasPWM(P) ( (g_APinDescription[P].ulPinAttribute & PIN_ATTR_TIMER_PWM) == PIN_ATTR_TIMER_PWM ) - -/* - * digitalPinToTimer(..) is AVR-specific and is not defined for SAMD - * architecture. If you need to check if a pin supports PWM you must - * use digitalPinHasPWM(..). - * - * https://github.com/arduino/Arduino/issues/1833 - */ -// #define digitalPinToTimer(P) - -// LEDs -#define PIN_LED_13 (13u) -#define PIN_LED_RXL (30u) -#define PIN_LED_TXL (31u) -#define PIN_LED PIN_LED_13 -#define PIN_LED2 PIN_LED_RXL -#define PIN_LED3 PIN_LED_TXL -#define LED_BUILTIN PIN_LED_13 - -/* - * Analog pins - */ -#define PIN_A0 (24ul) -#define PIN_A1 (25ul) -#define PIN_A2 (26ul) -#define PIN_A3 (27ul) -#define PIN_A4 (28ul) -#define PIN_A5 (29ul) -#define PIN_DAC0 (24ul) - -static const uint8_t A0 = PIN_A0; -static const uint8_t A1 = PIN_A1; -static const uint8_t A2 = PIN_A2; -static const uint8_t A3 = PIN_A3; -static const uint8_t A4 = PIN_A4; -static const uint8_t A5 = PIN_A5; -static const uint8_t DAC0 = PIN_DAC0; -#define ADC_RESOLUTION 12 - -#define REMAP_ANALOG_PIN_ID(pin) if ( pin < A0 ) pin += A0 - -/* Set default analog voltage reference */ -#define VARIANT_AR_DEFAULT AR_DEFAULT - -/* Reference voltage pins (define even if not enabled with PIN_ATTR_REF in the PinDescription table) */ -#define REFA_PIN (15ul) -#define REFB_PIN (27ul) - -/* - * Serial interfaces - */ -// Serial (EDBG) -#define PIN_SERIAL_RX (36ul) -#define PIN_SERIAL_TX (35ul) -#define PAD_SERIAL_TX (UART_TX_PAD_2) -#define PAD_SERIAL_RX (SERCOM_RX_PAD_3) - -#define SERCOM_INSTANCE_SERIAL &sercom5 - -// Serial1 -#define PIN_SERIAL1_RX (0ul) -#define PIN_SERIAL1_TX (1ul) -#define PAD_SERIAL1_TX (UART_TX_PAD_2) -#define PAD_SERIAL1_RX (SERCOM_RX_PAD_3) - -#define SERCOM_INSTANCE_SERIAL1 &sercom0 - -/* - * SPI Interfaces - */ -#if defined(TWO_SPI) -#define SPI_INTERFACES_COUNT 2 -#elif defined(THREE_SPI) -#define SPI_INTERFACES_COUNT 3 -#else -#define SPI_INTERFACES_COUNT 1 -#endif - -#define PIN_SPI_MOSI (21u) -#define PIN_SPI_MISO (18u) -#define PIN_SPI_SCK (20u) -#define PERIPH_SPI sercom4 -#define PAD_SPI_TX SPI_PAD_2_SCK_3 -#define PAD_SPI_RX SERCOM_RX_PAD_0 - -static const uint8_t SS = 14 ; // Gnd -static const uint8_t MOSI = PIN_SPI_MOSI ; -static const uint8_t MISO = PIN_SPI_MISO ; -static const uint8_t SCK = PIN_SPI_SCK ; - -#define PIN_SPI1_MISO (29u) -#define PIN_SPI1_MOSI (26u) -#define PIN_SPI1_SCK (27u) -#define PERIPH_SPI1 sercom1 -#define PAD_SPI1_TX SPI_PAD_2_SCK_3 -#define PAD_SPI1_RX SERCOM_RX_PAD_0 - -/* - * Wire Interfaces - */ -#if defined(TWO_WIRE) -#define WIRE_INTERFACES_COUNT 2 -#elif defined(THREE_WIRE) -#define WIRE_INTERFACES_COUNT 3 -#else -#define WIRE_INTERFACES_COUNT 1 -#endif - -#define PIN_WIRE_SDA (16u) -#define PIN_WIRE_SCL (17u) -#define PERIPH_WIRE sercom3 -#define WIRE_IT_HANDLER SERCOM3_Handler - -#define PIN_WIRE1_SDA (2u) -#define PIN_WIRE1_SCL (3u) -#define PERIPH_WIRE1 sercom2 -#define WIRE1_IT_HANDLER SERCOM2_Handler - -static const uint8_t SDA = PIN_WIRE_SDA; -static const uint8_t SCL = PIN_WIRE_SCL; - -/* - * USB - Define PIN_USB_HOST_ENABLE to assert the defined pin to - * PIN_USB_HOST_ENABLE_VALUE during startup. Leave undefined to disable this pin. - */ -#define PIN_USB_DM (33ul) -#define PIN_USB_DP (34ul) -#define PIN_USB_HOST_ENABLE (32ul) -#define PIN_USB_HOST_ENABLE_VALUE 1 - -/* - * I2S Interfaces - */ -#define I2S_INTERFACES_COUNT 1 - -#define I2S_DEVICE 0 -#define I2S_CLOCK_GENERATOR 3 -#define PIN_I2S_SD (9u) -#define PIN_I2S_SCK (1u) -#define PIN_I2S_FS (0u) - -#ifdef __cplusplus -} -#endif - -/*---------------------------------------------------------------------------- - * Arduino objects - C++ only - *----------------------------------------------------------------------------*/ - -#ifdef __cplusplus - -/* ========================= - * ===== SERCOM DEFINITION - * ========================= -*/ -extern SERCOM sercom0; -extern SERCOM sercom1; -extern SERCOM sercom2; -extern SERCOM sercom3; -extern SERCOM sercom4; -extern SERCOM sercom5; - -extern Uart Serial; -extern Uart Serial1; - -#endif - -// These serial port names are intended to allow libraries and architecture-neutral -// sketches to automatically default to the correct port name for a particular type -// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, -// the first hardware serial port whose RX/TX pins are not dedicated to another use. -// -// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor -// -// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial -// -// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library -// -// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. -// -// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX -// pins are NOT connected to anything by default. -#define SERIAL_PORT_USBVIRTUAL SerialUSB -#define SERIAL_PORT_MONITOR Serial -// Serial has no physical pins broken out, so it's not listed as HARDWARE port -#define SERIAL_PORT_HARDWARE Serial1 -#define SERIAL_PORT_HARDWARE_OPEN Serial1 - -// Legacy way to describe serial port on pins 0-1 -#define Serial5 Serial1 - -#endif /* _VARIANT_ARDUINO_MZERO_ */ diff --git a/variants/arduino_zero/README.md b/variants/arduino_zero/README.md deleted file mode 100644 index e555a5310..000000000 --- a/variants/arduino_zero/README.md +++ /dev/null @@ -1,220 +0,0 @@ -# Pins descriptions for the Arduino/Genuino Zero - -``` -/* - * +------------+------------------+--------+-----------------+-------------------------------------------------------------------------------------------------------- - * + Pin number + ZERO Board pin | PIN | Label/Name | Comments (* is for available peripherals with this configuration) - * +------------+------------------+--------+-----------------+-------------------------------------------------------------------------------------------------------- - * | | Digital Low | | | - * +------------+------------------+--------+-----------------+-------------------------------------------------------------------------------------------------------- - * | 0 | 0 -> RX | PA11 | | *EIC/EXTINT[11] *ADC/AIN[19] PTC/X[3] *SERCOM0/PAD[3] SERCOM2/PAD[3] TCC0/WO[3] TCC1/WO[1] - * | 1 | 1 <- TX | PA10 | | *EIC/EXTINT[10] *ADC/AIN[18] PTC/X[2] *SERCOM0/PAD[2] TCC0/WO[2] TCC1/WO[0] - * | 2 | 2 | PA14 | | *EIC/EXTINT[14] SERCOM2/PAD[2] SERCOM4/PAD[2] TC3/WO[0] TCC0/WO[4] - * | 3 | ~3 | PA09 | | *EIC/EXTINT[9] *ADC/AIN[17] PTC/X[1] SERCOM0/PAD[1] *SERCOM2/PAD[1] *TCC0/WO[1] TCC1/WO[3] - * | 4 | ~4 | PA08 | | *EIC/NMI *ADC/AIN[16] PTC/X[0] SERCOM0/PAD[0] *SERCOM2/PAD[0] *TCC0/WO[0] TCC1/WO[2] - * | 5 | ~5 | PA15 | | *EIC/EXTINT[15] SERCOM2/PAD[3] SERCOM4/PAD[3] *TC3/WO[1] TCC0/WO[5] - * | 6 | ~6 | PA20 | | *EIC/EXTINT[4] PTC/X[8] SERCOM5/PAD[2] SERCOM3/PAD[2] *TCC0/WO[6] - * | 7 | 7 | PA21 | | *EIC/EXTINT[5] PTC/X[9] SERCOM5/PAD[3] SERCOM3/PAD[3] TCC0/WO[7] - * +------------+------------------+--------+-----------------+-------------------------------------------------------------------------------------------------------- - * | | Digital High | | | - * +------------+------------------+--------+-----------------+-------------------------------------------------------------------------------------------------------- - * | 8 | ~8 | PA06 | | EIC/EXTINT[6] *ADC/AIN[6] AC/AIN[2] PTC/Y[4] SERCOM0/PAD[2] *TCC1/WO[0] - * | 9 | ~9 | PA07 | | EIC/EXTINT[7] *ADC/AIN[7] AC/AIN[3] PTC/Y[5] SERCOM0/PAD[3] *TCC1/WO[1] - * | 10 | ~10 | PA18 | | *EIC/EXTINT[2] PTC/X[6] *SERCOM1/PAD[2] SERCOM3/PAD[2] *TC3/WO[0] TCC0/WO[2] - * | 11 | ~11 | PA16 | | *EIC/EXTINT[0] PTC/X[4] *SERCOM1/PAD[0] SERCOM3/PAD[0] *TCC2/WO[0] TCC0/WO[6] - * | 12 | ~12 | PA19 | | *EIC/EXTINT[3] PTC/X[7] *SERCOM1/PAD[3] SERCOM3/PAD[3] TC3/WO[1] *TCC0/WO[3] - * | 13 | ~13 | PA17 | LED | *EIC/EXTINT[1] PTC/X[5] *SERCOM1/PAD[1] SERCOM3/PAD[1] *TCC2/WO[1] TCC0/WO[7] - * +------------+------------------+--------+-----------------+-------------------------------------------------------------------------------------------------------- - * | | Analog Connector | | | - * +------------+------------------+--------+-----------------+-------------------------------------------------------------------------------------------------------- - * | 14 | A0 | PA02 | A0 | EIC/EXTINT[2] *ADC/AIN[0] *DAC/VOUT PTC/Y[0] - * | 15 | A1 | PB08 | A1 | *EIC/EXTINT[8] *ADC/AIN[2] PTC/Y[14] SERCOM4/PAD[0] TC4/WO[0] - * | 16 | A2 | PB09 | A2 | EIC/EXTINT[9] *ADC/AIN[3] PTC/Y[15] SERCOM4/PAD[1] TC4/WO[1] - * | 17 | A3 | PA04 | A3 | EIC/EXTINT[4] *ADC/AIN[4] AC/AIN[0] PTC/Y[2] SERCOM0/PAD[0] TCC0/WO[0] - * | 18 | A4 | PA05 | A4 | EIC/EXTINT[5] *ADC/AIN[5] AC/AIN[1] PTC/Y[5] SERCOM0/PAD[1] TCC0/WO[1] - * | 19 | A5 | PB02 | A5 | EIC/EXTINT[2] *ADC/AIN[10] PTC/Y[8] SERCOM5/PAD[0] - * +------------+------------------+--------+-----------------+-------------------------------------------------------------------------------------------------------- - * | | Wire | | | - * +------------+------------------+--------+-----------------+-------------------------------------------------------------------------------------------------------- - * | 20 | SDA | PA22 | SDA | *EIC/EXTINT[6] PTC/X[10] *SERCOM3/PAD[0] SERCOM5/PAD[0] *TC4/WO[0] TCC0/WO[4] - * | 21 | SCL | PA23 | SCL | *EIC/EXTINT[7] PTC/X[11] *SERCOM3/PAD[1] SERCOM5/PAD[1] *TC4/WO[1] TCC0/WO[5] - * +------------+------------------+--------+-----------------+-------------------------------------------------------------------------------------------------------- - * | |SPI (Legacy ICSP) | | | - * +------------+------------------+--------+-----------------+-------------------------------------------------------------------------------------------------------- - * | 22 | 1 | PA12 | MISO | *EIC/EXTINT[12] SERCOM2/PAD[0] *SERCOM4/PAD[0] TCC2/WO[0] TCC0/WO[6] - * | | 2 | | 5V0 | - * | 23 | 4 | PB10 | MOSI | EIC/EXTINT[10] *SERCOM4/PAD[2] *TC5/WO[0] TCC0/WO[4] - * | 24 | 3 | PB11 | SCK | EIC/EXTINT[11] *SERCOM4/PAD[3] *TC5/WO[1] TCC0/WO[5] - * | | 5 | | RESET | - * | | 6 | | GND | - * +------------+------------------+--------+-----------------+-------------------------------------------------------------------------------------------------------- - * | | LEDs | | | - * +------------+------------------+--------+-----------------+-------------------------------------------------------------------------------------------------------- - * | 25 | | PB03 | RX | - * | 26 | | PA27 | TX | - * +------------+------------------+--------+-----------------+-------------------------------------------------------------------------------------------------------- - * | | USB | | | - * +------------+------------------+--------+-----------------+-------------------------------------------------------------------------------------------------------- - * | 27 | | PA28 | USB_HOST_ENABLE | EIC/EXTINT[8] - * | 28 | | PA24 | USB_NEGATIVE | *USB/DM - * | 29 | | PA25 | USB_POSITIVE | *USB/DP - * +------------+------------------+--------+-----------------+-------------------------------------------------------------------------------------------------------- - * | | EDBG | | | - * +------------+------------------+--------+-----------------+-------------------------------------------------------------------------------------------------------- - * | 30 | | PB22 | EDBG_UART TX | *SERCOM5/PAD[2] - * | 31 | | PB23 | EDBG_UART RX | *SERCOM5/PAD[3] - * +------------+------------------+--------+-----------------+-------------------------------------------------------------------------------------------------------- - * | 32 | | PA22 | EDBG_SDA | Pin 20 (SDA) - * | 33 | | PA23 | EDBG_SCL | Pin 21 (SCL) - * +------------+------------------+--------+-----------------+-------------------------------------------------------------------------------------------------------- - * | 34 | | PA19 | EDBG_MISO | EIC/EXTINT[3] *SERCOM1/PAD[3] SERCOM3/PAD[3] TC3/WO[1] TCC0/WO[3] - * | 35 | | PA16 | EDBG_MOSI | EIC/EXTINT[0] *SERCOM1/PAD[0] SERCOM3/PAD[0] TCC2/WO[0] TCC0/WO[6] - * | 36 | | PA18 | EDBG_SS | EIC/EXTINT[2] *SERCOM1/PAD[2] SERCOM3/PAD[2] TC3/WO[0] TCC0/WO[2] - * | 37 | | PA17 | EDBG_SCK | EIC/EXTINT[1] *SERCOM1/PAD[1] SERCOM3/PAD[1] TCC2/WO[1] TCC0/WO[7] - * +------------+------------------+--------+-----------------+-------------------------------------------------------------------------------------------------------- - * | 38 | ATN | PA13 | EDBG_GPIO0 | *EIC/EXTINT[13] SERCOM2/PAD[1] SERCOM4/PAD[1] TCC2/WO[1] TCC0/WO[7] - * | 39 | | PA21 | EDBG_GPIO1 | Pin 7 - * | 40 | | PA06 | EDBG_GPIO2 | Pin 8 - * | 41 | | PA07 | EDBG_GPIO3 | Pin 9 - * +------------+------------------+--------+-----------------+-------------------------------------------------------------------------------------------------------- - * | | | | | - * +------------+------------------+--------+-----------------+-------------------------------------------------------------------------------------------------------- - * | | GND | | | - * | 42 | AREF | PA03 | | EIC/EXTINT[3] *[ADC|DAC]/VREFA *ADC/AIN[1] PTC/Y[1] - * +------------+------------------+--------+-----------------+-------------------------------------------------------------------------------------------------------- - * | |32.768KHz Crystal | | | - * +------------+------------------+--------+-----------------+-------------------------------------------------------------------------------------------------------- - * | | | PA00 | XIN32 | EIC/EXTINT[0] SERCOM1/PAD[0] TCC2/WO[0] - * | | | PA01 | XOUT32 | EIC/EXTINT[1] SERCOM1/PAD[1] TCC2/WO[1] - * +------------+------------------+--------+-----------------+-------------------------------------------------------------------------------------------------------- - */ -``` - - - -## PinDescription table format - -### Note that in 1.6.18-beta-b1 a new compact table format was added. -The standard PinDescription table uses 12 bytes per pin. Define PIN_DESCRIPTION_TABLE_SIMPLE -to use a more compact format that uses only 4 bytes per pin (currently only available -for the D11 chips). In this case, the PinType, PinAttribute, and GCLKCCL columns are not used -(they are not required). Additionally, the SetPortPin() and SetExtIntADC() macros are used to -pack Port and Pin into the PortPin column, and ExtInt and ADCChannelNumber into the ExtIntADC -column. Note that external libraries that reference the PinDescription table directly (uncommon) -will no longer work. This define can be combined with the PIN_MAP_COMPACT define, which -is available in variant.h of the D11 variants. This can save from 10's to over 200 bytes. - -### Note that a new column (GCLKCCL) was added for 1.6.8-beta-b0. -MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE in variant.h is used to track versions. -If using board variant files with the old format, the new core will still read the -table the old way, losing any new features introduced by the new column. Additionally, -new definitions have been added for D51, L21, and C21 support. - -### Each pin can have multiple functions. -The PinDescription table describes how each of the pins can be used by the Arduino -core. Each pin can have multiple functions (ie: ADC input, digital output, PWM, -communications, etc.), and the PinDescription table configures which functions can -be used for each pin. This table is mainly accessed by the pinPeripheral function in -wiring_private.c, which is used to attach a pin to a particular peripheral function. -The communications drivers (ie: SPI, I2C, and UART), analogRead(), analogWrite(), -analogReference(), attachInterrupt(), and pinMode() all call pinPeripheral() to -verify that the pin can perform the function requested, and to configure the pin for -that function. Most of the contents of pinMode() are now in pinPeripheral(). - -### Pin Mapping -There are different ways that pins can be mapped. Typically, there is no relation -between the arduino pin number used, and the actual port pin designator. Thus, the -pcb must be printed with the arduino numbering, otherwise, if the port pin is printed, -a cross reference table is needed to find the arduino pin number. However, this results -in the least amount of space used by the table. Another method, used by default by the -MT-D21E and MT-D11, maps Arduino pin numbers to the actual port pin number (ie: Arduino -pin 28 = Port A28). This works well when there is only one port (or if the PORTB pins -are used for onboard functions and not broken out). PIO_NOT_A_PIN entries must be added -for pins that are used for other purposes or for pins that do not exist (especially the -D11), so some FLASH space may be wasted. For an example of both types, see variant.cpp -from the MT-D11 variant. The Xeno combines both methods, using the actual port pin -designators from both PORTA and PORTB for arduino numbers 0-31 (ie: B1=1, A2=2), then -using arduino numbering only above 31. For 0-31 only one pin from PORTA or PORTB can be -used, leaving the other pin for some number above 31. - -**See [WVariant.h](https://github.com/mattairtech/ArduinoCore-samd/tree/master/cores/arduino/WVariant.h) for the definitions used in the table.** - -### Port -This is the port (ie: PORTA). Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### Pin -This is the pin (bit) within the port. Valid values are 0-31. Not used with -PIN_DESCRIPTION_TABLE_SIMPLE. - -### SetPortPin() -When PIN_DESCRIPTION_TABLE_SIMPLE is defined, Port and Pin are combined into one column -using the SetPortPin() packing macro: SetPortPin(PORTA, 2). If the pin is not usable, -use SetPortPin(NOT_A_PORT, 0). - -### PinType -This indicates what peripheral function the pin can be attached to. In most cases, -this is PIO_MULTI, which means that the pin can be anything listed in the PinAttribute -field. It can also be set to a specific peripheral. In this case, any attempt to -configure the pin (using pinPeripheral or pinMode) as anything else will fail (and -pinPeripheral will return -1). This can be used to prevent accidental re-configuration -of a pin that is configured for only one function (ie: USB D- and D+ pins). If a pin -is not used or does not exist, PIO_NOT_A_PIN must be entered in this field. See -WVariant.h for valid entries. These entries are also used as a parameter to -pinPeripheral() with the exception of PIO_NOT_A_PIN and PIO_MULTI. The pinMode function -now calls pinPeripheral() with the desired mode. Note that this field is not used to -select between the different peripherals possible with each of the SERCOM and TIMER -functions. PeripheralAttribute is now used for this. When PIN_DESCRIPTION_TABLE_SIMPLE -is defined, PinType is not used (the pin is treated as PIO_MULTI). - -### PeripheralAttribute -This is an 8-bit bitfield used for various peripheral configuration. It is primarily -used to select between the different peripherals possible with each of the SERCOM and -TIMER functions. TIMER pins are individual, while SERCOM uses a group of two to four -pins. This group of pins can span both peripherals. For example, pin 19 (SPI1 SCK) on -the MT-D21E uses PER_ATTR_SERCOM_ALT while pin 22 (SPI1 MISO) uses PER_ATTR_SERCOM_STD. -Both TIMER and SERCOM can exist for each pin. This bitfield is also used to set the -pin drive strength and the input buffer configuration (ie: totem-pole, open-drain, -buskeeper, etc.). Starting with 1.6.8, the ADC instance on the D51 and C21 (there are -two) is also selected here. Note that the D51 adds a third timer attribute and -requires consultation of the datasheet IOSET tables. See WVariant.h for valid entries. - -### PinAttribute -This is a 32-bit bitfield used to list all of the valid peripheral functions that a -pin can attach to. This includes GPIO functions like PIN_ATTR_OUTPUT. Certain -attributes are shorthand for a combination of other attributes. PIN_ATTR_DIGITAL -includes all of the GPIO functions, while PIN_ATTR_TIMER includes both -PIN_ATTR_TIMER_PWM and PIN_ATTR_TIMER_CAPTURE (capture is not used yet). -PIN_ATTR_ANALOG is an alias to PIN_ATTR_ANALOG_ADC. This bitfield is useful for -limiting a pin to only input related functions or output functions. This allows a pin -to have a more flexible configuration, while restricting the direction (ie: to avoid -contention). See WVariant.h for valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### TCChannel -This is the TC/TCC channel (if any) assigned to the pin. Some TC channels are available -on multiple pins. In general, only one pin should be configured in the pinDescription -table per TC channel. Starting with 1.6.8, the timer type is now encoded in this column -to support the D51, L21 and C21, which use TC numbers starting at 0 (rather than 3 as on -the D21). See WVariant.h for valid entries. - -### ADCChannelNumber -This is the ADC channel (if any) assigned to the pin. The D51 and C21 each have two ADC -instances, which are selected in the PeripheralAttribute column. See WVariant.h for -valid entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### ExtInt -This is the interrupt (if any) assigned to the pin. Some interrupt numbers are -available on multiple pins. In general, only one pin should be configured in the -pinDescription table per interrupt number. Thus, for example, if an interrupt was -needed on pin 2, EXTERNAL_INT_2 can be moved from pin 18. See WVariant.h for valid -entries. Not used with PIN_DESCRIPTION_TABLE_SIMPLE. - -### SetExtIntADC() -When PIN_DESCRIPTION_TABLE_SIMPLE is defined, ExtInt and ADCChannelNumber are combined -into one column using the SetExtIntADC() packing macro: SetExtIntADC(EXTERNAL_INT_4, -ADC_Channel2). If the pin is not usable, use SetExtIntADC(EXTERNAL_INT_NONE, No_ADC_Channel). - -### GCLKCCL -This column was added in 1.6.8-beta-b0. It is not yet used. It will eventually support -the Analog Comparators (AC), the Configurable Custom Logic (CCL) peripherals of the D51, -L21 and C21, and the GCLK outputs (inputs) of all of the MCUs. Not used with -PIN_DESCRIPTION_TABLE_SIMPLE. diff --git a/variants/arduino_zero/debug_scripts/SAMC21G15A.gdb b/variants/arduino_zero/debug_scripts/SAMC21G15A.gdb deleted file mode 100644 index f818c9bbe..000000000 --- a/variants/arduino_zero/debug_scripts/SAMC21G15A.gdb +++ /dev/null @@ -1,31 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21g15" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/arduino_zero/debug_scripts/SAMC21G16A.gdb b/variants/arduino_zero/debug_scripts/SAMC21G16A.gdb deleted file mode 100644 index 5c258d3ac..000000000 --- a/variants/arduino_zero/debug_scripts/SAMC21G16A.gdb +++ /dev/null @@ -1,31 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21g16" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/arduino_zero/debug_scripts/SAMC21G17A.gdb b/variants/arduino_zero/debug_scripts/SAMC21G17A.gdb deleted file mode 100644 index 0387ce888..000000000 --- a/variants/arduino_zero/debug_scripts/SAMC21G17A.gdb +++ /dev/null @@ -1,31 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21g17" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/arduino_zero/debug_scripts/SAMC21G18A.gdb b/variants/arduino_zero/debug_scripts/SAMC21G18A.gdb deleted file mode 100644 index 1d0b9d1c0..000000000 --- a/variants/arduino_zero/debug_scripts/SAMC21G18A.gdb +++ /dev/null @@ -1,31 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samc21g18" -f target/at91samcXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/arduino_zero/debug_scripts/SAMD21G15A.gdb b/variants/arduino_zero/debug_scripts/SAMD21G15A.gdb deleted file mode 100644 index f8b1d04e3..000000000 --- a/variants/arduino_zero/debug_scripts/SAMD21G15A.gdb +++ /dev/null @@ -1,31 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21g15" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/arduino_zero/debug_scripts/SAMD21G16A.gdb b/variants/arduino_zero/debug_scripts/SAMD21G16A.gdb deleted file mode 100644 index 2f9de5a98..000000000 --- a/variants/arduino_zero/debug_scripts/SAMD21G16A.gdb +++ /dev/null @@ -1,31 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21g16" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/arduino_zero/debug_scripts/SAMD21G17A.gdb b/variants/arduino_zero/debug_scripts/SAMD21G17A.gdb deleted file mode 100644 index be4c3e9ab..000000000 --- a/variants/arduino_zero/debug_scripts/SAMD21G17A.gdb +++ /dev/null @@ -1,31 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21g17" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/arduino_zero/debug_scripts/SAMD21G18A.gdb b/variants/arduino_zero/debug_scripts/SAMD21G18A.gdb deleted file mode 100644 index 3c37ffde2..000000000 --- a/variants/arduino_zero/debug_scripts/SAMD21G18A.gdb +++ /dev/null @@ -1,31 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91samd21g18" -f target/at91samdXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/arduino_zero/debug_scripts/SAML21G16B.gdb b/variants/arduino_zero/debug_scripts/SAML21G16B.gdb deleted file mode 100644 index d229f8f0c..000000000 --- a/variants/arduino_zero/debug_scripts/SAML21G16B.gdb +++ /dev/null @@ -1,31 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91saml21g16" -f target/at91samlXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/arduino_zero/debug_scripts/SAML21G17B.gdb b/variants/arduino_zero/debug_scripts/SAML21G17B.gdb deleted file mode 100644 index f67cdcb2f..000000000 --- a/variants/arduino_zero/debug_scripts/SAML21G17B.gdb +++ /dev/null @@ -1,31 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91saml21g17" -f target/at91samlXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/arduino_zero/debug_scripts/SAML21G18B.gdb b/variants/arduino_zero/debug_scripts/SAML21G18B.gdb deleted file mode 100644 index b5230803b..000000000 --- a/variants/arduino_zero/debug_scripts/SAML21G18B.gdb +++ /dev/null @@ -1,31 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Define 'reset' command -define reset - -info reg - -break main - -# End of 'reset' command -end - -target remote | openocd -c "interface cmsis-dap" -c "set CHIPNAME at91saml21g18" -f target/at91samlXX.cfg -c "gdb_port pipe; log_output openocd.log" diff --git a/variants/arduino_zero/linker_scripts/gcc/16KB_Bootloader/flash_128KB.ld b/variants/arduino_zero/linker_scripts/gcc/16KB_Bootloader/flash_128KB.ld deleted file mode 100644 index c541d8cd0..000000000 --- a/variants/arduino_zero/linker_scripts/gcc/16KB_Bootloader/flash_128KB.ld +++ /dev/null @@ -1,217 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00020000-0x4000 /* First 16KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00004000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x4000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} diff --git a/variants/arduino_zero/linker_scripts/gcc/16KB_Bootloader/flash_256KB.ld b/variants/arduino_zero/linker_scripts/gcc/16KB_Bootloader/flash_256KB.ld deleted file mode 100644 index a0b9f951f..000000000 --- a/variants/arduino_zero/linker_scripts/gcc/16KB_Bootloader/flash_256KB.ld +++ /dev/null @@ -1,217 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00040000-0x4000 /* First 16KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x4000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} diff --git a/variants/arduino_zero/linker_scripts/gcc/16KB_Bootloader/flash_32KB.ld b/variants/arduino_zero/linker_scripts/gcc/16KB_Bootloader/flash_32KB.ld deleted file mode 100644 index 5d8d047a9..000000000 --- a/variants/arduino_zero/linker_scripts/gcc/16KB_Bootloader/flash_32KB.ld +++ /dev/null @@ -1,217 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00008000-0x4000 /* First 16KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x4000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} diff --git a/variants/arduino_zero/linker_scripts/gcc/16KB_Bootloader/flash_64KB.ld b/variants/arduino_zero/linker_scripts/gcc/16KB_Bootloader/flash_64KB.ld deleted file mode 100644 index 3f7223790..000000000 --- a/variants/arduino_zero/linker_scripts/gcc/16KB_Bootloader/flash_64KB.ld +++ /dev/null @@ -1,217 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x4000, LENGTH = 0x00010000-0x4000 /* First 16KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00002000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x4000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} diff --git a/variants/arduino_zero/linker_scripts/gcc/8KB_Bootloader/flash_128KB.ld b/variants/arduino_zero/linker_scripts/gcc/8KB_Bootloader/flash_128KB.ld deleted file mode 100644 index 07940acbd..000000000 --- a/variants/arduino_zero/linker_scripts/gcc/8KB_Bootloader/flash_128KB.ld +++ /dev/null @@ -1,217 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00020000-0x2000 /* First 8KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00004000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x2000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} diff --git a/variants/arduino_zero/linker_scripts/gcc/8KB_Bootloader/flash_256KB.ld b/variants/arduino_zero/linker_scripts/gcc/8KB_Bootloader/flash_256KB.ld deleted file mode 100644 index 39944cffc..000000000 --- a/variants/arduino_zero/linker_scripts/gcc/8KB_Bootloader/flash_256KB.ld +++ /dev/null @@ -1,217 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00040000-0x2000 /* First 8KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x2000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} diff --git a/variants/arduino_zero/linker_scripts/gcc/8KB_Bootloader/flash_32KB.ld b/variants/arduino_zero/linker_scripts/gcc/8KB_Bootloader/flash_32KB.ld deleted file mode 100644 index 0d3aaf7a9..000000000 --- a/variants/arduino_zero/linker_scripts/gcc/8KB_Bootloader/flash_32KB.ld +++ /dev/null @@ -1,217 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00008000-0x2000 /* First 8KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00001000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x2000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} diff --git a/variants/arduino_zero/linker_scripts/gcc/8KB_Bootloader/flash_64KB.ld b/variants/arduino_zero/linker_scripts/gcc/8KB_Bootloader/flash_64KB.ld deleted file mode 100644 index 1c36f57e1..000000000 --- a/variants/arduino_zero/linker_scripts/gcc/8KB_Bootloader/flash_64KB.ld +++ /dev/null @@ -1,217 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00010000-0x2000 /* First 8KB used by bootloader */ - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00002000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.sketch_boot)) - - . = ALIGN(0x2000); - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} diff --git a/variants/arduino_zero/linker_scripts/gcc/No_Bootloader/flash_256KB.ld b/variants/arduino_zero/linker_scripts/gcc/No_Bootloader/flash_256KB.ld deleted file mode 100644 index 81adfe22d..000000000 --- a/variants/arduino_zero/linker_scripts/gcc/No_Bootloader/flash_256KB.ld +++ /dev/null @@ -1,215 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Linker script to configure memory regions. - * Need modifying for a specific board. - * FLASH.ORIGIN: starting address of flash - * FLASH.LENGTH: length of flash - * RAM.ORIGIN: starting address of RAM bank 0 - * RAM.LENGTH: length of RAM bank 0 - */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * Reset_Handler : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __copy_table_start__ - * __copy_table_end__ - * __zero_table_start__ - * __zero_table_end__ - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - * __ram_end__ - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __text_start__ = .; - - KEEP(*(.isr_vector)) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - LONG (__etext) - LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) - __copy_table_end__ = .; - } > FLASH - */ - - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) - __zero_table_end__ = .; - } > FLASH - */ - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(16); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > RAM - - .heap (COPY): - { - __end__ = .; - PROVIDE(end = .); - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy (COPY): - { - *(.stack*) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM) ; - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - __ram_end__ = ORIGIN(RAM) + LENGTH(RAM) -1 ; - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} diff --git a/variants/arduino_zero/openocd_scripts/SAMC21G15A.cfg b/variants/arduino_zero/openocd_scripts/SAMC21G15A.cfg deleted file mode 100644 index 10c51c4db..000000000 --- a/variants/arduino_zero/openocd_scripts/SAMC21G15A.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samc21g15 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samcXX.cfg] diff --git a/variants/arduino_zero/openocd_scripts/SAMC21G16A.cfg b/variants/arduino_zero/openocd_scripts/SAMC21G16A.cfg deleted file mode 100644 index ffb0146b7..000000000 --- a/variants/arduino_zero/openocd_scripts/SAMC21G16A.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samc21g16 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samcXX.cfg] diff --git a/variants/arduino_zero/openocd_scripts/SAMC21G17A.cfg b/variants/arduino_zero/openocd_scripts/SAMC21G17A.cfg deleted file mode 100644 index 5066d74c6..000000000 --- a/variants/arduino_zero/openocd_scripts/SAMC21G17A.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samc21g17 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samcXX.cfg] diff --git a/variants/arduino_zero/openocd_scripts/SAMC21G18A.cfg b/variants/arduino_zero/openocd_scripts/SAMC21G18A.cfg deleted file mode 100644 index 2946d9391..000000000 --- a/variants/arduino_zero/openocd_scripts/SAMC21G18A.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samc21g18 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samcXX.cfg] diff --git a/variants/arduino_zero/openocd_scripts/SAMD21G15A.cfg b/variants/arduino_zero/openocd_scripts/SAMD21G15A.cfg deleted file mode 100644 index e5d7eb8bb..000000000 --- a/variants/arduino_zero/openocd_scripts/SAMD21G15A.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samd21g15 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samdXX.cfg] diff --git a/variants/arduino_zero/openocd_scripts/SAMD21G16A.cfg b/variants/arduino_zero/openocd_scripts/SAMD21G16A.cfg deleted file mode 100644 index 677c80012..000000000 --- a/variants/arduino_zero/openocd_scripts/SAMD21G16A.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samd21g16 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samdXX.cfg] diff --git a/variants/arduino_zero/openocd_scripts/SAMD21G17A.cfg b/variants/arduino_zero/openocd_scripts/SAMD21G17A.cfg deleted file mode 100644 index 68641e118..000000000 --- a/variants/arduino_zero/openocd_scripts/SAMD21G17A.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samd21g17 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samdXX.cfg] diff --git a/variants/arduino_zero/openocd_scripts/SAMD21G18A.cfg b/variants/arduino_zero/openocd_scripts/SAMD21G18A.cfg deleted file mode 100644 index 36c65c32d..000000000 --- a/variants/arduino_zero/openocd_scripts/SAMD21G18A.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91samd21g18 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samdXX.cfg] diff --git a/variants/arduino_zero/openocd_scripts/SAML21G16B.cfg b/variants/arduino_zero/openocd_scripts/SAML21G16B.cfg deleted file mode 100644 index c5ef10770..000000000 --- a/variants/arduino_zero/openocd_scripts/SAML21G16B.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91saml21g16 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samlXX.cfg] diff --git a/variants/arduino_zero/openocd_scripts/SAML21G17B.cfg b/variants/arduino_zero/openocd_scripts/SAML21G17B.cfg deleted file mode 100644 index 48ad58a4d..000000000 --- a/variants/arduino_zero/openocd_scripts/SAML21G17B.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91saml21g17 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samlXX.cfg] diff --git a/variants/arduino_zero/openocd_scripts/SAML21G18B.cfg b/variants/arduino_zero/openocd_scripts/SAML21G18B.cfg deleted file mode 100644 index 0a162e7f5..000000000 --- a/variants/arduino_zero/openocd_scripts/SAML21G18B.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# -# Arduino Zero OpenOCD script. -# -# Copyright (c) 2014-2015 Arduino LLC. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -source [find interface/cmsis-dap.cfg] - -# chip name -set CHIPNAME at91saml21g18 -set ENDIAN little - -# choose a port here -set telnet_port 0 - -source [find target/at91samlXX.cfg] diff --git a/variants/arduino_zero/pins_arduino.h b/variants/arduino_zero/pins_arduino.h deleted file mode 100644 index db0e40c3d..000000000 --- a/variants/arduino_zero/pins_arduino.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -// API compatibility -#include "variant.h" - diff --git a/variants/arduino_zero/variant.cpp b/variants/arduino_zero/variant.cpp deleted file mode 100644 index 712882ec7..000000000 --- a/variants/arduino_zero/variant.cpp +++ /dev/null @@ -1,148 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* - * Modified 9 December 2016 by Justin Mattair - * for MattairTech boards (www.mattairtech.com) - * - * See README.md for documentation and pin mapping information - */ - - -#include "variant.h" - -/* - * Pins descriptions - */ -const PinDescription g_APinDescription[]= -{ - // 0..13 - Digital pins - // ---------------------- - // 0/1 - SERCOM/UART (Serial1) - { PORTA, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), NOT_ON_TIMER, ADC_Channel19, EXTERNAL_INT_11, GCLK_CCL_NONE }, // RX: SERCOM0/PAD[3] - { PORTA, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), NOT_ON_TIMER, ADC_Channel18, EXTERNAL_INT_10, GCLK_CCL_NONE }, // TX: SERCOM0/PAD[2] - - // 2..12 - // Digital Low - { PORTA, 14, PIO_MULTI, (PER_ATTR_DRIVE_STRONG), (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_14, GCLK_CCL_NONE }, - { PORTA, 9, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), TCC0_CH1, ADC_Channel17, EXTERNAL_INT_9, GCLK_CCL_NONE }, // TCC0/WO[1] SCL: SERCOM2/PAD[1] - { PORTA, 8, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), TCC0_CH0, ADC_Channel16, EXTERNAL_INT_NMI, GCLK_CCL_NONE }, // TCC0/WO[0] SDA: SERCOM2/PAD[0] - { PORTA, 15, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT), TC3_CH1, No_ADC_Channel, EXTERNAL_INT_15, GCLK_CCL_NONE }, // TC3/WO[1] - { PORTA, 20, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT|PIN_ATTR_COM), TCC0_CH6, No_ADC_Channel, EXTERNAL_INT_4, GCLK_CCL_NONE }, // TCC0/WO[6] - { PORTA, 21, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_EXTINT|PIN_ATTR_COM), TCC0_CH7, No_ADC_Channel, EXTERNAL_INT_5, GCLK_CCL_NONE }, - - // Digital High - { PORTA, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC1_CH0, ADC_Channel6, EXTERNAL_INT_6, GCLK_CCL_NONE }, // TCC1/WO[0] ADC/AIN[6] - { PORTA, 7, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_COM), TCC1_CH1, ADC_Channel7, EXTERNAL_INT_7, GCLK_CCL_NONE }, // TCC1/WO[1] ADC/AIN[7] - { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC3_CH0, No_ADC_Channel, EXTERNAL_INT_2, GCLK_CCL_NONE }, // TC3/WO[0] SS: SERCOM1/PAD[2] - { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, // TCC2/WO[0] MOSI: SERCOM1/PAD[0] - { PORTA, 19, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), TCC0_CH3, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, // TCC0/WO[3] MISO: SERCOM1/PAD[3] - - // 13 (LED) - { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, // TCC2/WO[1] SCK: SERCOM1/PAD[1] - - // 14..19 - Analog pins - // -------------------- - { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // ADC/AIN[0] / DAC - { PORTB, 8, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, ADC_Channel2, EXTERNAL_INT_8, GCLK_CCL_NONE }, // ADC/AIN[2] - { PORTB, 9, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel3, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // ADC/AIN[3] - { PORTA, 4, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel4, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // ADC/AIN[4] - { PORTA, 5, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel5, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // ADC/AIN[5] - { PORTB, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel10, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // ADC/AIN[10] - - // 20..21 I2C pins (SDA/SCL and also EDBG:SDA/SCL) - // ---------------------- - { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC4_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SDA: SERCOM3/PAD[0] - { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC4_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SCL: SERCOM3/PAD[1] - - // 22..24 - SPI pins (ICSP:MISO,SCK,MOSI) - // ---------------------- - { PORTA, 12, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_12, GCLK_CCL_NONE }, // MISO: SERCOM4/PAD[0] - { PORTB, 10, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_COM), TC5_CH0, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // MOSI: SERCOM4/PAD[2] - { PORTB, 11, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_COM), TC5_CH1, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // SCK: SERCOM4/PAD[3] - - // 25..26 - RX/TX LEDS (PB03/PA27) - // -------------------- - { PORTB, 3, PIO_OUTPUT, PER_ATTR_DRIVE_STRONG, PIN_ATTR_OUTPUT, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // used as output only - { PORTA, 27, PIO_OUTPUT, PER_ATTR_DRIVE_STRONG, PIN_ATTR_OUTPUT, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // used as output only - - // 27..29 - USB - // -------------------- - { PORTA, 28, PIO_MULTI, PER_ATTR_DRIVE_STRONG, PIN_ATTR_DIGITAL, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB Host enable - { PORTA, 24, PIO_COM, PER_ATTR_NONE, PIN_ATTR_COM, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DM - { PORTA, 25, PIO_COM, PER_ATTR_NONE, PIN_ATTR_COM, NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // USB/DP - - // 30..41 - EDBG - // ---------------------- - // 30/31 - EDBG/UART - { PORTB, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // TX: SERCOM5/PAD[2] - { PORTB, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_SERCOM_ALT), (PIN_ATTR_DIGITAL|PIN_ATTR_SERCOM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // RX: SERCOM5/PAD[3] - - // 32/33 I2C (SDA/SCL and also EDBG:SDA/SCL). These are duplicate entries of pins 20 and 21 - { PORTA, 22, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC4_CH0, No_ADC_Channel, EXTERNAL_INT_6, GCLK_CCL_NONE }, // SDA: SERCOM3/PAD[0] - { PORTA, 23, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC4_CH1, No_ADC_Channel, EXTERNAL_INT_7, GCLK_CCL_NONE }, // SCL: SERCOM3/PAD[1] - - // 34..37 - EDBG/SPI. These are duplicate entries of pins 12, 11, 10, and 13. - { PORTA, 19, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_ALT|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT|PIN_ATTR_COM), TCC0_CH3, No_ADC_Channel, EXTERNAL_INT_3, GCLK_CCL_NONE }, // MISO: SERCOM1/PAD[3] - { PORTA, 16, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH0, No_ADC_Channel, EXTERNAL_INT_0, GCLK_CCL_NONE }, // MOSI: SERCOM1/PAD[0] - { PORTA, 18, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TC3_CH0, No_ADC_Channel, EXTERNAL_INT_2, GCLK_CCL_NONE }, // SS: SERCOM1/PAD[2] - { PORTA, 17, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD|PER_ATTR_SERCOM_STD), (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_SERCOM|PIN_ATTR_EXTINT), TCC2_CH1, No_ADC_Channel, EXTERNAL_INT_1, GCLK_CCL_NONE }, // SCK: SERCOM1/PAD[1] - - // 38..41 - EDBG/Digital - { PORTA, 13, PIO_MULTI, (PER_ATTR_DRIVE_STRONG), (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_13, GCLK_CCL_NONE }, // EIC/EXTINT[13] PIN_ATN - - // 39..41 These are duplicate entries of pins 7, 8, and 9 so that AREF and DAC are still available on pins 42 and 43 - { PORTA, 21, PIO_MULTI, (PER_ATTR_DRIVE_STRONG), (PIN_ATTR_DIGITAL|PIN_ATTR_EXTINT|PIN_ATTR_COM), NOT_ON_TIMER, No_ADC_Channel, EXTERNAL_INT_5, GCLK_CCL_NONE }, - { PORTA, 6, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), TCC1_CH0, ADC_Channel6, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // TCC1/WO[0] ADC/AIN[6] - { PORTA, 7, PIO_MULTI, (PER_ATTR_DRIVE_STRONG|PER_ATTR_TIMER_STD), (PIN_ATTR_ADC|PIN_ATTR_DIGITAL|PIN_ATTR_TIMER|PIN_ATTR_COM), TCC1_CH1, ADC_Channel7, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // TCC1/WO[1] ADC/AIN[7] - - // 42 (AREF) - { PORTA, 3, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_REF|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel1, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // VREF ADC/AIN[1] - - // 43 - Alternate use of A0 (DAC output). This is a duplicate entry of pin 14 - { PORTA, 2, PIO_MULTI, PER_ATTR_DRIVE_STRONG, (PIN_ATTR_ADC|PIN_ATTR_DAC|PIN_ATTR_DIGITAL), NOT_ON_TIMER, ADC_Channel0, EXTERNAL_INT_NONE, GCLK_CCL_NONE }, // ADC/AIN[0] / DAC -} ; - -const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TCC1, TCC2, TC3, TC4, TC5 } ; - -// Multi-serial objects instantiation -SERCOM sercom0( SERCOM0 ) ; -SERCOM sercom1( SERCOM1 ) ; -SERCOM sercom2( SERCOM2 ) ; -SERCOM sercom3( SERCOM3 ) ; -SERCOM sercom4( SERCOM4 ) ; -SERCOM sercom5( SERCOM5 ) ; - -#if defined(ONE_UART) || defined(TWO_UART) -Uart Serial( SERCOM_INSTANCE_SERIAL, PIN_SERIAL_RX, PIN_SERIAL_TX, PAD_SERIAL_RX, PAD_SERIAL_TX ) ; - -void SERCOM5_Handler() -{ - Serial.IrqHandler(); -} -#endif - -#if defined(TWO_UART) -Uart Serial1( SERCOM_INSTANCE_SERIAL1, PIN_SERIAL1_RX, PIN_SERIAL1_TX, PAD_SERIAL1_RX, PAD_SERIAL1_TX ) ; - -void SERCOM0_Handler() -{ - Serial1.IrqHandler(); -} -#endif - diff --git a/variants/arduino_zero/variant.h b/variants/arduino_zero/variant.h deleted file mode 100644 index 41a003c77..000000000 --- a/variants/arduino_zero/variant.h +++ /dev/null @@ -1,289 +0,0 @@ -/* - Copyright (c) 2014-2015 Arduino LLC. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#ifndef _VARIANT_ARDUINO_ZERO_ -#define _VARIANT_ARDUINO_ZERO_ - -/* The definitions here need the MattairTech SAMD core >=1.6.8. - * The format is different than the stock Arduino SAMD core, - * which uses ARDUINO_SAMD_VARIANT_COMPLIANCE instead. - */ -#define MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE 10608 - -/*---------------------------------------------------------------------------- - * Clock Configuration - *----------------------------------------------------------------------------*/ - -/** Master clock frequency (also Fcpu frequency) */ -#define VARIANT_MCK (48000000ul) - -/* If CLOCKCONFIG_HS_CRYSTAL is defined, then HS_CRYSTAL_FREQUENCY_HERTZ - * must also be defined with the external crystal frequency in Hertz. - */ -//#define HS_CRYSTAL_FREQUENCY_HERTZ 16000000UL - -/* If the PLL is used (CLOCKCONFIG_32768HZ_CRYSTAL, or CLOCKCONFIG_HS_CRYSTAL - * defined), then PLL_FRACTIONAL_ENABLED can be defined, which will result in - * a more accurate 48MHz output frequency at the expense of increased jitter. - */ -//#define PLL_FRACTIONAL_ENABLED - -/* If both PLL_FAST_STARTUP and CLOCKCONFIG_HS_CRYSTAL are defined, the crystal - * will be divided down to 1MHz - 2MHz, rather than 32KHz - 64KHz, before being - * multiplied by the PLL. This will result in a faster lock time for the PLL, - * however, it will also result in a less accurate PLL output frequency if the - * crystal is not divisible (without remainder) by 1MHz. In this case, define - * PLL_FRACTIONAL_ENABLED as well. - */ -//#define PLL_FAST_STARTUP - -/* The fine calibration value for DFLL open-loop mode is defined here. - * The coarse calibration value is loaded from NVM OTP (factory calibration values). - */ -#define NVM_SW_CALIB_DFLL48M_FINE_VAL (512) - -/*---------------------------------------------------------------------------- - * Headers - *----------------------------------------------------------------------------*/ - -#include "WVariant.h" -#include "sam.h" - -#ifdef __cplusplus -#include "SERCOM.h" -#include "Uart.h" -#endif // __cplusplus - -#ifdef __cplusplus -extern "C" -{ -#endif // __cplusplus - -/*---------------------------------------------------------------------------- - * Pins - *----------------------------------------------------------------------------*/ - -// Number of pins defined in PinDescription array -#define NUM_PIN_DESCRIPTION_ENTRIES (44u) - -#define PINS_COUNT (26u) -#define NUM_DIGITAL_PINS (20u) -#define NUM_ANALOG_INPUTS (6u) -#define NUM_ANALOG_OUTPUTS (1u) -#define analogInputToDigitalPin(p) ((p < 6u) ? (p) + 14u : -1) - -#define digitalPinToPort(P) ( &(PORT->Group[g_APinDescription[P].ulPort]) ) -#define digitalPinToBitMask(P) ( 1 << g_APinDescription[P].ulPin ) -//#define analogInPinToBit(P) ( ) -#define portOutputRegister(port) ( &(port->OUT.reg) ) -#define portInputRegister(port) ( &(port->IN.reg) ) -#define portModeRegister(port) ( &(port->DIR.reg) ) -#define digitalPinHasPWM(P) ( (g_APinDescription[P].ulPinAttribute & PIN_ATTR_TIMER_PWM) == PIN_ATTR_TIMER_PWM ) - -/* - * digitalPinToTimer(..) is AVR-specific and is not defined for SAMD - * architecture. If you need to check if a pin supports PWM you must - * use digitalPinHasPWM(..). - * - * https://github.com/arduino/Arduino/issues/1833 - */ -// #define digitalPinToTimer(P) - -// LEDs -#define PIN_LED_13 (13u) -#define PIN_LED_RXL (25u) -#define PIN_LED_TXL (26u) -#define PIN_LED PIN_LED_13 -#define PIN_LED2 PIN_LED_RXL -#define PIN_LED3 PIN_LED_TXL -#define LED_BUILTIN PIN_LED_13 - -/* - * Analog pins - */ -#define PIN_A0 (14ul) -#define PIN_A1 (15ul) -#define PIN_A2 (16ul) -#define PIN_A3 (17ul) -#define PIN_A4 (18ul) -#define PIN_A5 (19ul) -#define PIN_DAC0 (14ul) - -static const uint8_t A0 = PIN_A0; -static const uint8_t A1 = PIN_A1; -static const uint8_t A2 = PIN_A2; -static const uint8_t A3 = PIN_A3; -static const uint8_t A4 = PIN_A4; -static const uint8_t A5 = PIN_A5; -static const uint8_t DAC0 = PIN_DAC0; -#define ADC_RESOLUTION 12 - -#define REMAP_ANALOG_PIN_ID(pin) if ( pin < A0 ) pin += A0 - -/* Set default analog voltage reference */ -#define VARIANT_AR_DEFAULT AR_DEFAULT - -/* Reference voltage pins (define even if not enabled with PIN_ATTR_REF in the PinDescription table) */ -#define REFA_PIN (42ul) -#define REFB_PIN (17ul) - -// Other pins -#define PIN_ATN (38ul) -static const uint8_t ATN = PIN_ATN; - -/* - * Serial interfaces - */ -// Serial (EDBG) -#define PIN_SERIAL_RX (31ul) -#define PIN_SERIAL_TX (30ul) -#define PAD_SERIAL_TX (UART_TX_PAD_2) -#define PAD_SERIAL_RX (SERCOM_RX_PAD_3) - -#define SERCOM_INSTANCE_SERIAL &sercom5 - -// Serial1 -#define PIN_SERIAL1_RX (0ul) -#define PIN_SERIAL1_TX (1ul) -#define PAD_SERIAL1_TX (UART_TX_PAD_2) -#define PAD_SERIAL1_RX (SERCOM_RX_PAD_3) - -#define SERCOM_INSTANCE_SERIAL1 &sercom0 - -/* - * SPI Interfaces - */ -#if defined(TWO_SPI) -#define SPI_INTERFACES_COUNT 2 -#elif defined(THREE_SPI) -#define SPI_INTERFACES_COUNT 3 -#else -#define SPI_INTERFACES_COUNT 1 -#endif - -#define PIN_SPI_MISO (22u) -#define PIN_SPI_MOSI (23u) -#define PIN_SPI_SCK (24u) -#define PERIPH_SPI sercom4 -#define PAD_SPI_TX SPI_PAD_2_SCK_3 -#define PAD_SPI_RX SERCOM_RX_PAD_0 - -static const uint8_t SS = PIN_A2 ; // SERCOM4 last PAD is present on A2 but HW SS isn't used. Set here only for reference. -static const uint8_t MOSI = PIN_SPI_MOSI ; -static const uint8_t MISO = PIN_SPI_MISO ; -static const uint8_t SCK = PIN_SPI_SCK ; - -#define PIN_SPI1_MISO (19u) -#define PIN_SPI1_MOSI (16u) -#define PIN_SPI1_SCK (17u) -#define PERIPH_SPI1 sercom1 -#define PAD_SPI1_TX SPI_PAD_2_SCK_3 -#define PAD_SPI1_RX SERCOM_RX_PAD_0 - -/* - * Wire Interfaces - */ -#if defined(TWO_WIRE) -#define WIRE_INTERFACES_COUNT 2 -#elif defined(THREE_WIRE) -#define WIRE_INTERFACES_COUNT 3 -#else -#define WIRE_INTERFACES_COUNT 1 -#endif - -#define PIN_WIRE_SDA (20u) -#define PIN_WIRE_SCL (21u) -#define PERIPH_WIRE sercom3 -#define WIRE_IT_HANDLER SERCOM3_Handler - -#define PIN_WIRE1_SDA (4u) -#define PIN_WIRE1_SCL (3u) -#define PERIPH_WIRE1 sercom2 -#define WIRE1_IT_HANDLER SERCOM2_Handler - -static const uint8_t SDA = PIN_WIRE_SDA; -static const uint8_t SCL = PIN_WIRE_SCL; - -/* - * USB - Define PIN_USB_HOST_ENABLE to assert the defined pin to - * PIN_USB_HOST_ENABLE_VALUE during startup. Leave undefined to disable this pin. - */ -#define PIN_USB_DM (28ul) -#define PIN_USB_DP (29ul) -#define PIN_USB_HOST_ENABLE (27ul) -#define PIN_USB_HOST_ENABLE_VALUE 1 - -/* - * I2S Interfaces - */ -#define I2S_INTERFACES_COUNT 1 - -#define I2S_DEVICE 0 -#define I2S_CLOCK_GENERATOR 3 -#define PIN_I2S_SD (9u) -#define PIN_I2S_SCK (1u) -#define PIN_I2S_FS (0u) - -#ifdef __cplusplus -} -#endif - -/*---------------------------------------------------------------------------- - * Arduino objects - C++ only - *----------------------------------------------------------------------------*/ - -#ifdef __cplusplus - -/* ========================= - * ===== SERCOM DEFINITION - * ========================= -*/ -extern SERCOM sercom0; -extern SERCOM sercom1; -extern SERCOM sercom2; -extern SERCOM sercom3; -extern SERCOM sercom4; -extern SERCOM sercom5; - -extern Uart Serial; -extern Uart Serial1; - -#endif - -// These serial port names are intended to allow libraries and architecture-neutral -// sketches to automatically default to the correct port name for a particular type -// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, -// the first hardware serial port whose RX/TX pins are not dedicated to another use. -// -// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor -// -// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial -// -// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library -// -// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. -// -// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX -// pins are NOT connected to anything by default. -#define SERIAL_PORT_USBVIRTUAL SerialUSB -#define SERIAL_PORT_MONITOR Serial -// Serial has no physical pins broken out, so it's not listed as HARDWARE port -#define SERIAL_PORT_HARDWARE Serial1 -#define SERIAL_PORT_HARDWARE_OPEN Serial1 - -#endif /* _VARIANT_ARDUINO_ZERO_ */