summaryrefslogtreecommitdiff
path: root/build_rules
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2021-09-16 11:09:30 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2021-09-16 11:09:30 +0200
commitcad5bd6501868f9532d5b4a227ca156f9c9d1d8e (patch)
tree7dce7fe31ed3f85ade53d38fe68b76e540403e5e /build_rules
parent3c526f3d0b30e200462290651f7c6a5eb30710a2 (diff)
Added NRF52 support.nrf52
Diffstat (limited to 'build_rules')
-rw-r--r--build_rules9
1 files changed, 9 insertions, 0 deletions
diff --git a/build_rules b/build_rules
index fc7fd75..ddc9647 100644
--- a/build_rules
+++ b/build_rules
@@ -109,12 +109,21 @@ def select_stm32(env, variant):
print 'Unknown stm32 family: %s' % family
Exit(1)
+def select_nrf(env, variant):
+ if variant == 'nrf52840':
+ select_arm(env, 'cortex-m4f')
+ env.Append(CPPDEFINES = ['NRF52840'])
+ env['LINK_SCRIPT'] = 'nrf52840.ld'
+
def SelectMCU(env, mcu, variant_dir = None):
mcu = mcu.lower()
if mcu.startswith('stm32'):
select_stm32(env, mcu)
+ elif mcu.startswith('nrf'):
+ select_nrf(env, mcu)
+
else:
print 'Unknown MCU: %s' % mcu
Exit(1)