Skip to content

Commit

Permalink
Nordic nRF52 support (proposal by @NextWorldLab)
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphwetzel committed Sep 26, 2023
1 parent 4a14405 commit 632ace5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mcu_plugin.html
Original file line number Diff line number Diff line change
Expand Up @@ -1092,8 +1092,9 @@
{ value: "sim", label: "Simulator" },
{ value: "esp", label: "ESP8266 | Espressif" },
{ value: "esp32", label: "ESP32 | Espressif" },
{ value: "pico", label: "Pico | Raspberry Pi" },
{ value: "gecko", label: "Gecko | Silicon Labs" },
{ value: "nrf52", label: "nRF52 | Nordic" },
{ value: "pico", label: "Pico | Raspberry Pi" },
{ value: "qca4020", label: "QCA4020 | Qualcomm" },
],
}],
Expand Down Expand Up @@ -1124,6 +1125,8 @@

} else if (value == "pico") {
row2.hide(500);
} else if (value == "nrf52") {
row2.hide(500);
} else {
row2.show(500);
}
Expand Down
12 changes: 12 additions & 0 deletions mcu_plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -1899,6 +1899,17 @@ module.exports = function(RED) {
// if (platform[1]?.length > 0)
// env.SUBPLATFORM = platform[1]
break;
case "nrf52":
switch (os.platform()) {
case "win32":
env.NRF52_SDK_PATH = ensure_env_path("NRF52_SDK_PATH", [`${HOME}/nrf5/nRF5_SDK_17.0.2_d674dde`]);
break;
case "linux":
case "darwin":
env.NRF_SDK_DIR = ensure_env_path("NRF_SDK_DIR", [`${HOME}/nrf5/nRF5_SDK_17.0.2_d674dde`]);
break;
}
break;
case "sim":
break;
default:
Expand Down Expand Up @@ -1983,6 +1994,7 @@ module.exports = function(RED) {
case "qca4020":
/* Not tested! */

case "nrf52":
case "sim":

bcmds.push(`runthis ${cmd}`);
Expand Down

0 comments on commit 632ace5

Please sign in to comment.