diff --git a/boards.txt b/boards.txt index abcda535e..12eee24e0 100644 --- a/boards.txt +++ b/boards.txt @@ -274,7 +274,7 @@ adafruit_gemma_m0.build.usb_product="Gemma M0" adafruit_gemma_m0.build.usb_manufacturer="Adafruit" adafruit_gemma_m0.build.board=GEMMA_M0 adafruit_gemma_m0.build.core=arduino -adafruit_gemma_m0.build.extra_flags=-D__SAMD21E18A__ -DCRYSTALLESS -DADAFRUIT_GEMMA_M0 -DARDUINO_SAMD_ZERO -DARM_MATH_CM0PLUS {build.usb_flags} +adafruit_gemma_m0.build.extra_flags=-D__SAMD21E18A__ -DCRYSTALLESS -DADAFRUIT_GEMMA_M0 -DARM_MATH_CM0PLUS {build.usb_flags} adafruit_gemma_m0.build.ldscript=linker_scripts/gcc/flash_with_bootloader.ld adafruit_gemma_m0.build.openocdscript=openocd_scripts/gemma_m0.cfg adafruit_gemma_m0.build.variant=gemma_m0 @@ -330,7 +330,7 @@ adafruit_trinket_m0.build.usb_product="Trinket M0" adafruit_trinket_m0.build.usb_manufacturer="Adafruit" adafruit_trinket_m0.build.board=TRINKET_M0 adafruit_trinket_m0.build.core=arduino -adafruit_trinket_m0.build.extra_flags=-D__SAMD21E18A__ -DCRYSTALLESS -DADAFRUIT_TRINKET_M0 -DARDUINO_SAMD_ZERO -DARM_MATH_CM0PLUS {build.usb_flags} +adafruit_trinket_m0.build.extra_flags=-D__SAMD21E18A__ -DCRYSTALLESS -DADAFRUIT_TRINKET_M0 -DARM_MATH_CM0PLUS {build.usb_flags} adafruit_trinket_m0.build.ldscript=linker_scripts/gcc/flash_with_bootloader.ld adafruit_trinket_m0.build.openocdscript=openocd_scripts/trinket_m0.cfg adafruit_trinket_m0.build.variant=trinket_m0 @@ -388,7 +388,7 @@ adafruit_qtpy_m0.build.usb_product="QT Py M0" adafruit_qtpy_m0.build.usb_manufacturer="Adafruit" adafruit_qtpy_m0.build.board=QTPY_M0 adafruit_qtpy_m0.build.core=arduino -adafruit_qtpy_m0.build.extra_flags=-D__SAMD21E18A__ -DCRYSTALLESS -DADAFRUIT_QTPY_M0 -DARDUINO_SAMD_ZERO -DARM_MATH_CM0PLUS {build.usb_flags} +adafruit_qtpy_m0.build.extra_flags=-D__SAMD21E18A__ -DCRYSTALLESS -DADAFRUIT_QTPY_M0 -DARM_MATH_CM0PLUS {build.usb_flags} adafruit_qtpy_m0.build.ldscript=linker_scripts/gcc/flash_with_bootloader.ld adafruit_qtpy_m0.build.openocdscript=openocd_scripts/qtpy_m0.cfg adafruit_qtpy_m0.build.variant=qtpy_m0 @@ -736,7 +736,7 @@ adafruit_itsybitsy_m0.build.usb_product="ItsyBitsy M0 Express" adafruit_itsybitsy_m0.build.usb_manufacturer="Adafruit" adafruit_itsybitsy_m0.build.board=ITSYBITSY_M0 adafruit_itsybitsy_m0.build.core=arduino -adafruit_itsybitsy_m0.build.extra_flags=-D__SAMD21G18A__ -DCRYSTALLESS -DADAFRUIT_ITSYBITSY_M0 -DARDUINO_SAMD_ZERO -DARM_MATH_CM0PLUS {build.usb_flags} +adafruit_itsybitsy_m0.build.extra_flags=-D__SAMD21G18A__ -DCRYSTALLESS -DADAFRUIT_ITSYBITSY_M0 -DARM_MATH_CM0PLUS {build.usb_flags} adafruit_itsybitsy_m0.build.ldscript=linker_scripts/gcc/flash_with_bootloader.ld adafruit_itsybitsy_m0.build.openocdscript=openocd_scripts/itsybitsy_m0.cfg adafruit_itsybitsy_m0.build.variant=itsybitsy_m0 diff --git a/extras/makeboards.py b/extras/makeboards.py index 0dde8d452..d2c604c69 100755 --- a/extras/makeboards.py +++ b/extras/makeboards.py @@ -85,10 +85,19 @@ def build_build(mcu, name, variant, vendor, product, vid, pid_list, boarddefine, print("{}.build.mcu={}".format(name, mcu_dict[mcu]['build_mcu'])) print("{}.build.f_cpu={}".format(name, mcu_dict[mcu]['f_cpu'])) print('{}.build.usb_product="{}"'.format(name, product)) - print('{}.build.usb_manufacturer="{}"'.format(name, vendor)) - print("{}.build.board={}".format(name, boarddefine)) - print("{}.build.core=arduino".format(name)) - print("{}.build.extra_flags={} {} {{build.usb_flags}}".format(name, extra_flags, mcu_dict[mcu]['extra_flags'])) + print('{}.build.usb_manufacturer="{}"'.format(name, vendor)) + print("{}.build.board={}".format(name, boarddefine)) + print("{}.build.core=arduino".format(name)) + + # Due to fastLed issue https://github.com/FastLED/FastLED/issues/1363 + # although there is a simple fix already https://github.com/FastLED/FastLED/pull/1424 + # fastLED is not well maintained, and we need to skip ARDUINO_SAMD_ZERO for affected boards + # in the long run we should move all of our libraries away from ARDUINO_SAMD_ZERO + if variant in [ 'gemma_m0', 'trinket_m0', 'qtpy_m0', 'itsybitsy_m0' ]: + print("{}.build.extra_flags={} -DARM_MATH_CM0PLUS {{build.usb_flags}}".format(name, extra_flags)) + else: + print("{}.build.extra_flags={} {} {{build.usb_flags}}".format(name, extra_flags, mcu_dict[mcu]['extra_flags'])) + print("{}.build.ldscript=linker_scripts/gcc/flash_with_bootloader.ld".format(name)) print("{}.build.openocdscript=openocd_scripts/{}.cfg".format(name, variant)) print("{}.build.variant={}".format(name, variant)) diff --git a/platform.txt b/platform.txt index 14d4627b1..19cfa87c8 100644 --- a/platform.txt +++ b/platform.txt @@ -20,7 +20,7 @@ # https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification name=Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards -version=1.7.10 +version=1.7.11 # Compile variables # ----------------- @@ -143,6 +143,7 @@ tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port tools.bossac18.path={runtime.tools.bossac-1.8.0-48-gb176eee.path} tools.bossac18.cmd=bossac +tools.bossac18.cmd.windows=bossac.exe tools.bossac18.upload.params.verbose=-i -d tools.bossac18.upload.params.quiet=