Skip to content

Commit 7ad0af3

Browse files
committed
Enable BLE feature on NRF51 and nrf52.
Update softdevice references. Add BLE and softdevice related macros. Add specific macros for NRF52_DK.
1 parent c8dc17a commit 7ad0af3

File tree

1 file changed

+37
-27
lines changed

1 file changed

+37
-27
lines changed

hal/targets.json

Lines changed: 37 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,14 @@
11001100
"inherits": ["Target"],
11011101
"core": "Cortex-M0",
11021102
"OVERRIDE_BOOTLOADER_FILENAME": "nrf51822_bootloader.hex",
1103-
"macros": ["NRF51", "TARGET_NRF51822"],
1103+
"macros": [
1104+
"NRF51",
1105+
"TARGET_NRF51822",
1106+
"BLE_STACK_SUPPORT_REQD",
1107+
"SOFTDEVICE_PRESENT",
1108+
"S130",
1109+
"BLE_STACK_SUPPORT_REQD"
1110+
],
11041111
"MERGE_BOOTLOADER": false,
11051112
"extra_labels": ["NORDIC", "MCU_NRF51", "MCU_NRF51822", "NRF5"],
11061113
"OUTPUT_EXT": "hex",
@@ -1110,37 +1117,18 @@
11101117
"MERGE_SOFT_DEVICE": true,
11111118
"EXPECTED_SOFTDEVICES_WITH_OFFSETS": [
11121119
{
1113-
"boot": "s130_nrf51_1.0.0_bootloader.hex",
1114-
"name": "s130_nrf51_1.0.0_softdevice.hex",
1115-
"offset": 114688
1116-
},
1117-
{
1118-
"boot": "s110_nrf51822_8.0.0_bootloader.hex",
1119-
"name": "s110_nrf51822_8.0.0_softdevice.hex",
1120-
"offset": 98304
1121-
},
1122-
{
1123-
"boot": "s110_nrf51822_7.1.0_bootloader.hex",
1124-
"name": "s110_nrf51822_7.1.0_softdevice.hex",
1125-
"offset": 90112
1126-
},
1127-
{
1128-
"boot": "s110_nrf51822_7.0.0_bootloader.hex",
1129-
"name": "s110_nrf51822_7.0.0_softdevice.hex",
1130-
"offset": 90112
1131-
},
1132-
{
1133-
"boot": "s110_nrf51822_6.0.0_bootloader.hex",
1134-
"name": "s110_nrf51822_6.0.0_softdevice.hex",
1135-
"offset": 81920
1120+
"boot": "",
1121+
"name": "s130_nrf51_2.0.0_softdevice.hex",
1122+
"offset": 110592
11361123
}
11371124
],
11381125
"detect_code": ["1070"],
11391126
"post_binary_hook": {
11401127
"function": "MCU_NRF51Code.binary_hook",
11411128
"toolchains": ["ARM_STD", "GCC_ARM"]
11421129
},
1143-
"program_cycle_s": 6
1130+
"program_cycle_s": 6,
1131+
"features": ["BLE"]
11441132
},
11451133
"MCU_NRF51_16K_BASE": {
11461134
"inherits": ["MCU_NRF51"],
@@ -1738,7 +1726,7 @@
17381726
"MCU_NRF52": {
17391727
"inherits": ["Target"],
17401728
"core": "Cortex-M4F",
1741-
"macros": ["NRF52", "TARGET_NRF52832"],
1729+
"macros": ["NRF52", "TARGET_NRF52832", "BLE_STACK_SUPPORT_REQD", "SOFTDEVICE_PRESENT"],
17421730
"extra_labels": ["NORDIC", "MCU_NRF52", "MCU_NRF52832", "NRF5"],
17431731
"OUTPUT_EXT": "hex",
17441732
"is_disk_virtual": true,
@@ -1758,12 +1746,34 @@
17581746
"function": "MCU_NRF51Code.binary_hook",
17591747
"toolchains": ["ARM_STD", "GCC_ARM"]
17601748
},
1761-
"MERGE_BOOTLOADER": false
1749+
"MERGE_BOOTLOADER": false,
1750+
"features": ["BLE"]
17621751
},
17631752
"NRF52_DK": {
17641753
"supported_form_factors": ["ARDUINO"],
17651754
"inherits": ["MCU_NRF52"],
17661755
"progen": {"target": "nrf52-dk"},
1756+
"macros_add": [
1757+
"BOARD_PCA10040",
1758+
"NRF52_PAN_12",
1759+
"NRF52_PAN_15",
1760+
"NRF52_PAN_58",
1761+
"NRF52_PAN_55",
1762+
"NRF52_PAN_54",
1763+
"NRF52_PAN_31",
1764+
"NRF52_PAN_30",
1765+
"NRF52_PAN_51",
1766+
"NRF52_PAN_36",
1767+
"NRF52_PAN_53",
1768+
"S132",
1769+
"CONFIG_GPIO_AS_PINRESET",
1770+
"BLE_STACK_SUPPORT_REQD",
1771+
"SWI_DISABLE0",
1772+
"NRF52_PAN_20",
1773+
"NRF52_PAN_64",
1774+
"NRF52_PAN_62",
1775+
"NRF52_PAN_63"
1776+
],
17671777
"device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE"]
17681778
}
17691779
}

0 commit comments

Comments
 (0)