Skip to content

Commit

Permalink
Merge pull request #337 from adafruit/release-1.7.11
Browse files Browse the repository at this point in the history
Remove ARDUINO_SAMD_ZERO for some boards
  • Loading branch information
hathach authored Nov 1, 2022
2 parents c2d4153 + 66ebeeb commit 024eaa5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
8 changes: 4 additions & 4 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
17 changes: 13 additions & 4 deletions extras/makeboards.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
3 changes: 2 additions & 1 deletion platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
# -----------------
Expand Down Expand Up @@ -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=
Expand Down

0 comments on commit 024eaa5

Please sign in to comment.