Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion adafruit.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@

usb_path = join(FRAMEWORK_DIR, "libraries", "Adafruit_TinyUSB_Arduino")
if isdir(usb_path):
if env.subst("$BOARD") != "adafruit_feather_nrf52832":
if board.get("build.mcu") != "nrf52832":
env.Append(
CPPDEFINES=[
"USBCON",
Expand All @@ -247,6 +247,22 @@
]
)

# NRF52840 has a new crypto lib
crypto_path = join(FRAMEWORK_DIR, "libraries", "Adafruit_nRFCrypto", "src")
if isdir(crypto_path):
if board.get("build.mcu") == "nrf52840":
env.Append(
CPPPATH=[
join(crypto_path),
],
LIBPATH=[
join(crypto_path, "cortex-m4", "fpv4-sp-d16-hard")
],
LIBS=[
join("nrf_cc310_0.9.13-no-interrupts")
]
)

cpp_flags = env.Flatten(env.get("CPPDEFINES", []))

if "CFG_DEBUG" not in cpp_flags:
Expand Down