--- tags: Dexatek Development note --- (“ ̄▽ ̄)-o█ █o-( ̄▽ ̄”) --- [TOC] # [DX-DN][01] Nordic environment setup > reference data : > + [nRF Connect SDK - Getting started » Installing automatically](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/gs_assistant.html) > + [Installing on Windows and macOS](https://nrfconnect.github.io/vscode-nrf-connect/connect/install.html#installing-on-windows-and-macos) ## Install nRF Connect for Desktop + Download [nRF Connect for Desktop](https://www.nordicsemi.com/Products/Development-tools/nrf-connect-for-desktop/download#infotabs) + Double click nRF Connect for Desktop (nrfconnect-3.10.0.dmg) ![](https://i.imgur.com/JI0jwpk.png) + Drop nRF Connect for Desktop icon to Applications icon ![](https://i.imgur.com/El98li3.png) + Launch nRF Connect for Desktop from Launchpad ![](https://i.imgur.com/zUf5n3p.png) ## Install Toolchain Manager. > reference data : > + [Installing the Toolchain Manager](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/gs_assistant.html#installing-the-toolchain-manager) + In the APPS section, click ==Install== next to Toolchain Manager. ![](https://i.imgur.com/HvqixDs.png) + The app is installed on your machine, and the Install button changes to ==Open==. ![](https://i.imgur.com/3MvuyqR.png) ## Install SDK v1.8.0 > reference data : > + [Installing the nRF Connect SDK](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/gs_assistant.html#installing-the-ncs) + Click ==Install== button at nRF Connect SDK v1.8.0 ![](https://i.imgur.com/XGeVB7i.png) + nRF Connect will notify us need to install VS Code first. + Download VS code for M1 revision from [offical web](https://code.visualstudio.com/Download) + Drop download file to Application folder. ![](https://i.imgur.com/dcVKj8o.png) + Launch VS code from Launchpad ![](https://i.imgur.com/lYCQPo9.png) + Launch the Command Palette ==(Cmd+Shift+P)== and type 'shell command' to find the Shell Command: Install 'code' command in PATH command. ![](https://i.imgur.com/1C7dXhW.png) + Close VS code and nRF Connect + Reopen nRF Connect + Launch ==Toolchain Manager== + Click ==Install== next to SDK v1.8.0 to start download it + Wait SDK download finish (around 1.3GB) ![](https://i.imgur.com/AV1ciu3.png) ## Install VS Code extensions + Click ==Open VS Code== from Toolchain Manager ![](https://i.imgur.com/vxxCYYD.png) + nRF Connect will pop some extensions need to install ![](https://i.imgur.com/THDMYvJ.png) + Click ==Open VS Code== + nRF Connect will stick that seem like Nordic issue...Orz ![](https://i.imgur.com/jIIEsv7.png) ## Setting nRF Connect for VS code + Launch VS Code + Click left side ==nRF Connect for VS Code== icon + Click ==Quick Setup== ![](https://i.imgur.com/C2Y14YV.png) + Select SDK revision + 1.8.0 (/opt/nordic/ncs/v1.8.0) ![](https://i.imgur.com/YnmxckA.png) ## Create a sample and build it + Click ==Create a new application from sample== ![](https://i.imgur.com/jHRCtgj.png) + Select prefer setting for sample project + Application type + Freestanding + Application template + zephyr/samples/helo_world + Application name can't duplicate in Application location. + Click ==Create Application== to create sample project ![](https://i.imgur.com/mzTxBWW.png) + Click ==Add Vuild Configuration== ![](https://i.imgur.com/hnhXCtz.png) + Select prefer setting + Board : + Nordic boards + nrf52840dk_nrf52840 + Click ==Build Configuration== ![](https://i.imgur.com/mThHDre.png) + We can find some new files be generated ![](https://i.imgur.com/V3v6txh.png) + Click ==Build== from ==ACTION== and confirm build result without any error message ![](https://i.imgur.com/rfjJKxX.png) + Output file will locate at + $(Project_folder)/build/zephyr/ ![](https://i.imgur.com/aU2oQn8.png) ## Let VS Code detect your J-LINK + Normally you will find this issue, macOS can detect J-LINK but VS Code can't ![](https://i.imgur.com/LtuQtQH.png) + Connect nRF52840-DK to your MacBook ![](https://i.imgur.com/mSR9y2b.png) + Install J-LINK for x86 ==**<= it's very strange but workable...Orz**== + Launch nrf-command-line-tools-$(VERSION)-Darwin.dmg (Download from [**Here**](https://www.nordicsemi.com/Products/Development-tools/nrf-command-line-tools/download)) ![](https://i.imgur.com/8T7GvhW.png) + Click refresh icon to redetect J-LINK ![](https://i.imgur.com/YQAmixq.png) + Now we can see J-LINK from VS Code :+1: ![](https://i.imgur.com/KMcAN96.png) # Get your environment setting > reference data : > + [nRF Connect extensions for VS Code - Troubleshooting](https://nrfconnect.github.io/vscode-nrf-connect/connect/troubleshooting.html#troubleshooting) + Install [nRF command line tools](https://www.nordicsemi.com/Products/Development-tools/nRF-Command-Line-Tools/Download) + While download finish, double click the file to start install + Install below tools + nRF Tools + J-LINK for M1 ![](https://i.imgur.com/tBdsGfG.png) + Launch VS Code after installing + Launch ==Command Palette== (Cmd+Shift+P) + Type ==nRF Connect: Generate Support Information== ![](https://i.imgur.com/zz2MlCF.png) + VS Code will dump your environment setting ```shell= IMPORTANT: The data below could contain sensitive or confidential information about your environment. If you do not wish this to be seen by others, please make sure to remove it before sharing. For help and support, visit the Nordic DevZone at https://devzone.nordicsemi.com/. { "platform": { "os": "darwin", "osVersion": "Darwin Kernel Version 21.3.0: Wed Jan 5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_ARM64_T8101", "osKernel": "21.3.0", "vscode": "1.65.2", "electron": "13.5.2", "node": "v14.16.0" }, "system": { "date": "2022-03-23T02:51:57.533Z", "vscodeRoot": "/Applications/Visual Studio Code.app/Contents/Resources/app", "nrfConnectForDesktopInstalled": true, "vscodeUptime": "00:00:13", "osUptime": "19:47:45", "cpu": { "model": "Apple M1", "speed": "24 MHz", "count": 4 }, "memory": { "total": "16.00 GB", "free": "0.11 GB" } }, "workspace": { "name": "hello_world", "workspaceFile": null, "folders": [ "/Users/kuoprince/Nordic_project/hello_world" ] }, "extensions": { "internal": { "nordic-semiconductor.nrf-connect": { "version": "2022.3.104", "path": "/Users/kuoprince/.vscode/extensions/nordic-semiconductor.nrf-connect-2022.3.104", "isActive": true }, "nordic-semiconductor.nrf-terminal": { "version": "2022.3.16", "path": "/Users/kuoprince/.vscode/extensions/nordic-semiconductor.nrf-terminal-2022.3.16", "isActive": true }, "nordic-semiconductor.devicetree": null, "nordic-semiconductor.kconfig": null }, "external": { "marus25.cortex-debug": "1.4.1", "ms-vscode.cpptools": "1.8.4", "ms-vscode.js-debug": "1.65.0", "ms-vscode.js-debug-companion": "1.0.15", "ms-vscode.references-view": "0.0.85", "ms-vscode.vscode-js-profile-table": "0.0.18", "alefragnani.Bookmarks": "13.2.4", "cschlosser.doxdocgen": "1.4.0", "jeff-hykin.better-cpp-syntax": "1.15.13", "ms-vscode-remote.remote-containers": "0.224.3", "ms-vscode-remote.remote-ssh": "0.76.1", "ms-vscode-remote.remote-ssh-edit": "0.76.1", "ms-vscode-remote.remote-wsl": "0.64.2", "ms-vscode.cpptools-extension-pack": "1.1.0", "ms-vscode.cpptools-themes": "1.0.0", "trond-snekvik.gnu-mapfiles": "1.1.0" } }, "tools": { "/Applications/SEGGER/JLink/JLinkExe": "7.58b", "/usr/local/bin/nrfjprog": null, "nrfutil": "Not found", "/opt/nordic/ncs/v1.8.0/toolchain/bin/cmake": "3.21.1", "/opt/nordic/ncs/v1.8.0/toolchain/bin/west": "0.12.0", "/opt/nordic/ncs/v1.8.0/toolchain/bin/python3": "3.9.6", "/opt/nordic/ncs/v1.8.0/toolchain/bin/ninja": "1.10.2", "/opt/nordic/ncs/v1.8.0/toolchain/bin/gperf": "3.1", "/opt/nordic/ncs/v1.8.0/toolchain/bin/dtc": "1.6.1", "/opt/nordic/ncs/v1.8.0/toolchain/bin/arm-none-eabi-gcc": "9-2019-q4-major", "/opt/nordic/ncs/v1.8.0/toolchain/bin/gn": "1961", "/opt/nordic/ncs/v1.8.0/toolchain/bin/git": "2.32.0" }, "sdks": [ { "version": "1.8.0", "path": "/opt/nordic/ncs/v1.8.0" } ], "toolchains": [ { "version": "1.8.0", "path": "/opt/nordic/ncs/v1.8.0/toolchain" } ], "connectedDevices": [], "deviceProviders": [ "nrfjprog" ], "config": { "nordic-semiconductor.nrf-connect": { "topdir": "${nrf-connect.sdk:1.8.0}", "toolchain": { "path": "${nrf-connect.toolchain:1.8.0}" }, "ozonePath": "", "applications": [ "${workspaceFolder}" ], "kconfig": { "interface": "kconfig" }, "welcome": { "showOnStartup": true }, "west": { "env": { "$base": "terminal" } }, "boardRoots": [], "enableTelemetry": true }, "nordic-semiconductor.nrf-terminal": { "terminalMode": "character" }, "nordic-semiconductor.devicetree": { "modules": [ "${zephyrBase}", "${zephyrBase}/../nrf", "." ], "zephyr": "", "ctxFile": "", "defaultBoard": "" }, "nordic-semiconductor.kconfig": { "root": "", "env": {}, "cfiles": true, "disable": false, "zephyr": { "base": "" }, "python": "", "liveValue": true }, "marus25.cortex-debug": { "armToolchainPath": null, "armToolchainPrefix": "arm-none-eabi", "gdbPath": null, "objdumpPath": null, "JLinkGDBServerPath": null, "openocdPath": null, "pyocdPath": null, "PEGDBServerPath": null, "stutilPath": null, "stlinkPath": null, "stm32cubeprogrammer": null, "enableTelemetry": true, "flattenAnonymous": false, "registerUseNaturalFormat": true, "variableUseNaturalFormat": true, "dbgServerLogfile": null, "showRTOS": false, "showDevDebugOutput": "none" } }, "environment": { "westExe": "/opt/nordic/ncs/v1.8.0/toolchain/bin/west", "westEnv": { "ELECTRON_RUN_AS_NODE": "1", "GIT_EXEC_PATH": "/opt/nordic/ncs/v1.8.0/toolchain/Cellar/git/2.32.0_1/libexec/git-core", "HOME": "/Users/kuoprince", "PATH": "/opt/nordic/ncs/v1.8.0/toolchain/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin", "ZEPHYR_BASE": "/opt/nordic/ncs/v1.8.0/zephyr", "GNUARMEMB_TOOLCHAIN_PATH": "/opt/nordic/ncs/v1.8.0/toolchain", "ZEPHYR_TOOLCHAIN_VARIANT": "gnuarmemb", "USER": "kuoprince" }, "toolchainPath": "/opt/nordic/ncs/v1.8.0/toolchain", "toolchainBinPath": "/opt/nordic/ncs/v1.8.0/toolchain/bin", "toolchainVersion": "1.8.0" }, "terminal": { "shell": null, "defaultProfile": null } } ``` # Informatinos about test equipment + NB : MacBook Air (M1, 2020) + Memory : 16GB + OS : Monterey 12.2.1 ![](https://i.imgur.com/wAUMdcx.png) # Other information + [nRF Connect SDK v1.8.0 doesn't open VS Code under macOS with nRF Connect 3.7.2](https://devzone.nordicsemi.com/f/nordic-q-a/84303/nrf-connect-sdk-v1-8-0-doesn-t-open-vs-code-under-macos-with-nrf-connect-3-7-2/350943?focus=true) + [Zephyr Project - Getting Started Guide](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.8.0/zephyr/getting_started/index.html#getting-started) + [nRF Connect for VS Code YouTube videos, having problems with Include paths and Kconfig in mac OS](https://devzone.nordicsemi.com/f/nordic-q-a/84319/nrf-connect-for-vs-code-youtube-videos-having-problems-with-include-paths-and-kconfig-in-mac-os) + [DX-DN][12] Setup Thread build under Jenkins](https://hackmd.io/2xckgkhXQRewRgjFavGKaQ?both)