Skip to content

Commit 458370b

Browse files
committed
correct header file names
1 parent 6c6a3c0 commit 458370b

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

ext/nordic/module.lb

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@
1414
import re
1515
from pathlib import Path
1616

17+
1718
# -----------------------------------------------------------------------------
1819
def init(module):
1920
module.name = ":cmsis:device"
2021

22+
2123
def prepare(module, options):
2224
device = options[":target"]
2325
if device.identifier["platform"] != "nrf":
@@ -26,7 +28,10 @@ def prepare(module, options):
2628
module.depends(":cmsis:core")
2729
return True
2830

31+
2932
pp = {}
33+
34+
3035
def validate(env):
3136
device = env[":target"]
3237
device_name = device.identifier.string.split("-")[0]
@@ -44,7 +49,12 @@ def validate(env):
4449
raise ValidateException("No device define found for '{}'!".format(device.partname))
4550

4651
family_folder = family_file.parent
47-
device_header = "{}.h".format(device_name)
52+
if device_name == "nrf51822":
53+
device_header = "nrf51.h"
54+
elif device_name == "nrf52832":
55+
device_header = "nrf52.h"
56+
else:
57+
device_header = "{}.h".format(device_name)
4858

4959
global pp
5060
pp = {
@@ -53,6 +63,7 @@ def validate(env):
5363
"device_header": device_header,
5464
}
5565

66+
5667
def build(env):
5768
global pp
5869
env.collect(":build:path.include", "modm/ext/cmsis/device")

0 commit comments

Comments
 (0)