From 23554cccf5b1fd89da3f04bdbe93877efa152465 Mon Sep 17 00:00:00 2001 From: chocotov1 Date: Mon, 16 Nov 2020 01:26:09 +0100 Subject: [PATCH] Lower consumption by not setting pins to input. Hint found here: https://community.atmel.com/comment/1851566#comment-1851566 --- boards.txt | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 91 insertions(+), 7 deletions(-) diff --git a/boards.txt b/boards.txt index 3f5601dca..4f48eed69 100644 --- a/boards.txt +++ b/boards.txt @@ -36,7 +36,7 @@ adafruit_feather_m0.build.usb_product="Feather M0" adafruit_feather_m0.build.usb_manufacturer="Adafruit" adafruit_feather_m0.build.board=SAMD_ZERO adafruit_feather_m0.build.core=arduino -adafruit_feather_m0.build.extra_flags=-DARDUINO_SAMD_ZERO -DARM_MATH_CM0PLUS -DADAFRUIT_FEATHER_M0 -D__SAMD21G18A__ {build.usb_flags} +adafruit_feather_m0.build.extra_flags=-DARDUINO_SAMD_ZERO -DARM_MATH_CM0PLUS -DADAFRUIT_FEATHER_M0 -D__SAMD21G18A__ {build.usb_flags} -DVERY_LOW_POWER adafruit_feather_m0.build.ldscript=linker_scripts/gcc/flash_with_bootloader.ld adafruit_feather_m0.build.openocdscript=openocd_scripts/feather_m0.cfg adafruit_feather_m0.build.variant=feather_m0 @@ -72,7 +72,7 @@ adafruit_feather_m0_no_bl.build.usb_product="Feather M0" adafruit_feather_m0_no_bl.build.usb_manufacturer="Adafruit" adafruit_feather_m0_no_bl.build.board=SAMD_ZERO adafruit_feather_m0_no_bl.build.core=arduino -adafruit_feather_m0_no_bl.build.extra_flags=-DARDUINO_SAMD_ZERO -DARM_MATH_CM0PLUS -DADAFRUIT_FEATHER_M0 -D__SAMD21G18A__ {build.usb_flags} +adafruit_feather_m0_no_bl.build.extra_flags=-DARDUINO_SAMD_ZERO -DARM_MATH_CM0PLUS -DADAFRUIT_FEATHER_M0 -D__SAMD21G18A__ {build.usb_flags} -DVERY_LOW_POWER adafruit_feather_m0_no_bl.build.ldscript=linker_scripts/gcc/flash_without_bootloader.ld adafruit_feather_m0_no_bl.build.openocdscript=openocd_scripts/feather_m0.cfg adafruit_feather_m0_no_bl.build.variant=feather_m0 @@ -102,7 +102,7 @@ adafruit_feather_m0_no_bl_24mhz.build.usb_product="Feather M0" adafruit_feather_m0_no_bl_24mhz.build.usb_manufacturer="Adafruit" adafruit_feather_m0_no_bl_24mhz.build.board=SAMD_ZERO adafruit_feather_m0_no_bl_24mhz.build.core=arduino -adafruit_feather_m0_no_bl_24mhz.build.extra_flags=-DARDUINO_SAMD_ZERO -DARM_MATH_CM0PLUS -DADAFRUIT_FEATHER_M0 -D__SAMD21G18A__ {build.usb_flags} +adafruit_feather_m0_no_bl_24mhz.build.extra_flags=-DARDUINO_SAMD_ZERO -DARM_MATH_CM0PLUS -DADAFRUIT_FEATHER_M0 -D__SAMD21G18A__ {build.usb_flags} -DVERY_LOW_POWER adafruit_feather_m0_no_bl_24mhz.build.ldscript=linker_scripts/gcc/flash_without_bootloader.ld adafruit_feather_m0_no_bl_24mhz.build.openocdscript=openocd_scripts/feather_m0.cfg adafruit_feather_m0_no_bl_24mhz.build.variant=feather_m0 @@ -142,6 +142,90 @@ adafruit_feather_m0_no_bl_8mhz.build.pid=0x800B adafruit_feather_m0_no_bl_8mhz.bootloader.tool=openocd adafruit_feather_m0_no_bl_8mhz.bootloader.file=featherM0/bootloader-feather_m0-v2.0.0-adafruit.5.bin +samd21_proRF.name=SparkFun SAMD21 Pro RF +samd21_proRF.vid.0=0x1B4F +samd21_proRF.pid.0=0x214F +samd21_proRF.vid.1=0x1B4F +samd21_proRF.pid.1=0x215F +samd21_proRF.upload.tool=bossac +samd21_proRF.upload.protocol=sam-ba +samd21_proRF.upload.maximum_size=262144 +samd21_proRF.upload.use_1200bps_touch=true +samd21_proRF.upload.wait_for_upload_port=true +samd21_proRF.upload.native_usb=true +samd21_proRF.build.mcu=cortex-m0plus +samd21_proRF.build.f_cpu=48000000L +samd21_proRF.build.usb_product="SFE SAMD21 Pro RF" +samd21_proRF.build.usb_manufacturer="SparkFun" +samd21_proRF.build.board=SAMD_ZERO +samd21_proRF.build.core=arduino +samd21_proRF.build.extra_flags=-D__SAMD21G18A__ {build.usb_flags} -DVERY_LOW_POWER +samd21_proRF.build.ldscript=linker_scripts/gcc/flash_with_bootloader.ld +samd21_proRF.build.openocdscript=openocd_scripts/arduino_zero.cfg +samd21_proRF.build.variant=SparkFun_ProRF +samd21_proRF.build.variant_system_lib= +samd21_proRF.build.extra_combine_flags= +samd21_proRF.build.vid=0x1B4F +samd21_proRF.build.pid=0x214F +samd21_proRF.bootloader.tool=openocd +samd21_proRF.bootloader.file=zero/Sparkfun_SAMD21_ProRF.bin + +samd21_proRF_no_bl_24.name=SparkFun SAMD21 Pro RF (no bootloader, 24 MHz) +samd21_proRF_no_bl_24.vid.0=0x1B4F +samd21_proRF_no_bl_24.pid.0=0x214F +samd21_proRF_no_bl_24.vid.1=0x1B4F +samd21_proRF_no_bl_24.pid.1=0x215F +samd21_proRF_no_bl_24.upload.tool=bossac +samd21_proRF_no_bl_24.upload.protocol=sam-ba +samd21_proRF_no_bl_24.upload.maximum_size=262144 +samd21_proRF_no_bl_24.upload.use_1200bps_touch=true +samd21_proRF_no_bl_24.upload.wait_for_upload_port=true +samd21_proRF_no_bl_24.upload.native_usb=true +samd21_proRF_no_bl_24.build.mcu=cortex-m0plus +samd21_proRF_no_bl_24.build.f_cpu=24000000L +samd21_proRF_no_bl_24.build.usb_product="SFE SAMD21 Pro RF" +samd21_proRF_no_bl_24.build.usb_manufacturer="SparkFun" +samd21_proRF_no_bl_24.build.board=SAMD_ZERO +samd21_proRF_no_bl_24.build.core=arduino +samd21_proRF_no_bl_24.build.extra_flags=-D__SAMD21G18A__ {build.usb_flags} -DVERY_LOW_POWER +samd21_proRF_no_bl_24.build.ldscript=linker_scripts/gcc/flash_without_bootloader.ld +samd21_proRF_no_bl_24.build.openocdscript=openocd_scripts/arduino_zero.cfg +samd21_proRF_no_bl_24.build.variant=SparkFun_ProRF +samd21_proRF_no_bl_24.build.variant_system_lib= +samd21_proRF_no_bl_24.build.extra_combine_flags= +samd21_proRF_no_bl_24.build.vid=0x1B4F +samd21_proRF_no_bl_24.build.pid=0x214F +samd21_proRF_no_bl_24.bootloader.tool=openocd +samd21_proRF_no_bl_24.bootloader.file=zero/Sparkfun_SAMD21_ProRF.bin + +samd21_proRF_no_bl.name=SparkFun SAMD21 Pro RF (no bootloader, 8 MHz) +samd21_proRF_no_bl.vid.0=0x1B4F +samd21_proRF_no_bl.pid.0=0x214F +samd21_proRF_no_bl.vid.1=0x1B4F +samd21_proRF_no_bl.pid.1=0x215F +samd21_proRF_no_bl.upload.tool=bossac +samd21_proRF_no_bl.upload.protocol=sam-ba +samd21_proRF_no_bl.upload.maximum_size=262144 +samd21_proRF_no_bl.upload.use_1200bps_touch=true +samd21_proRF_no_bl.upload.wait_for_upload_port=true +samd21_proRF_no_bl.upload.native_usb=true +samd21_proRF_no_bl.build.mcu=cortex-m0plus +samd21_proRF_no_bl.build.f_cpu=8000000L +samd21_proRF_no_bl.build.usb_product="SFE SAMD21 Pro RF" +samd21_proRF_no_bl.build.usb_manufacturer="SparkFun" +samd21_proRF_no_bl.build.board=SAMD_ZERO +samd21_proRF_no_bl.build.core=arduino +samd21_proRF_no_bl.build.extra_flags=-D__SAMD21G18A__ {build.usb_flags} -DVERY_LOW_POWER +samd21_proRF_no_bl.build.ldscript=linker_scripts/gcc/flash_without_bootloader.ld +samd21_proRF_no_bl.build.openocdscript=openocd_scripts/arduino_zero.cfg +samd21_proRF_no_bl.build.variant=SparkFun_ProRF +samd21_proRF_no_bl.build.variant_system_lib= +samd21_proRF_no_bl.build.extra_combine_flags= +samd21_proRF_no_bl.build.vid=0x1B4F +samd21_proRF_no_bl.build.pid=0x214F +samd21_proRF_no_bl.bootloader.tool=openocd +samd21_proRF_no_bl.bootloader.file=zero/Sparkfun_SAMD21_ProRF.bin + # Arduino Zero (Prorgamming Port) # --------------------------------------- arduino_zero_edbg.name=Arduino Zero (Programming Port) @@ -264,7 +348,7 @@ mkrzero.build.usb_product="Arduino MKRZero" mkrzero.build.usb_manufacturer="Arduino LLC" mkrzero.build.board=SAMD_MKRZERO mkrzero.build.core=arduino -mkrzero.build.extra_flags=-DUSE_ARDUINO_MKR_PIN_LAYOUT -D__SAMD21G18A__ {build.usb_flags} +mkrzero.build.extra_flags=-DUSE_ARDUINO_MKR_PIN_LAYOUT -D__SAMD21G18A__ {build.usb_flags} -DVERY_LOW_POWER mkrzero.build.ldscript=linker_scripts/gcc/flash_with_bootloader.ld mkrzero.build.openocdscript=openocd_scripts/arduino_zero.cfg mkrzero.build.variant=mkrzero @@ -293,7 +377,7 @@ mkrzero_no_bl.build.usb_product="Arduino MKRZero" mkrzero_no_bl.build.usb_manufacturer="Arduino LLC" mkrzero_no_bl.build.board=SAMD_MKRZERO mkrzero_no_bl.build.core=arduino -mkrzero_no_bl.build.extra_flags=-DUSE_ARDUINO_MKR_PIN_LAYOUT -D__SAMD21G18A__ {build.usb_flags} +mkrzero_no_bl.build.extra_flags=-DUSE_ARDUINO_MKR_PIN_LAYOUT -D__SAMD21G18A__ {build.usb_flags} -DVERY_LOW_POWER mkrzero_no_bl.build.ldscript=linker_scripts/gcc/flash_without_bootloader.ld mkrzero_no_bl.build.openocdscript=openocd_scripts/arduino_zero.cfg mkrzero_no_bl.build.variant=mkrzero @@ -322,7 +406,7 @@ mkrzero_no_bl_24mhz.build.usb_product="Arduino MKRZero" mkrzero_no_bl_24mhz.build.usb_manufacturer="Arduino LLC" mkrzero_no_bl_24mhz.build.board=SAMD_MKRZERO mkrzero_no_bl_24mhz.build.core=arduino -mkrzero_no_bl_24mhz.build.extra_flags=-DUSE_ARDUINO_MKR_PIN_LAYOUT -D__SAMD21G18A__ {build.usb_flags} +mkrzero_no_bl_24mhz.build.extra_flags=-DUSE_ARDUINO_MKR_PIN_LAYOUT -D__SAMD21G18A__ {build.usb_flags} -DVERY_LOW_POWER mkrzero_no_bl_24mhz.build.ldscript=linker_scripts/gcc/flash_without_bootloader.ld mkrzero_no_bl_24mhz.build.openocdscript=openocd_scripts/arduino_zero.cfg mkrzero_no_bl_24mhz.build.variant=mkrzero @@ -351,7 +435,7 @@ mkrzero_no_bl_8mhz.build.usb_product="Arduino MKRZero" mkrzero_no_bl_8mhz.build.usb_manufacturer="Arduino LLC" mkrzero_no_bl_8mhz.build.board=SAMD_MKRZERO mkrzero_no_bl_8mhz.build.core=arduino -mkrzero_no_bl_8mhz.build.extra_flags=-DUSE_ARDUINO_MKR_PIN_LAYOUT -D__SAMD21G18A__ {build.usb_flags} +mkrzero_no_bl_8mhz.build.extra_flags=-DUSE_ARDUINO_MKR_PIN_LAYOUT -D__SAMD21G18A__ {build.usb_flags} -DVERY_LOW_POWER mkrzero_no_bl_8mhz.build.ldscript=linker_scripts/gcc/flash_without_bootloader.ld mkrzero_no_bl_8mhz.build.openocdscript=openocd_scripts/arduino_zero.cfg mkrzero_no_bl_8mhz.build.variant=mkrzero