Try   HackMD

[DX-DN][01] Nordic environment setup

reference data :

Install nRF Connect for Desktop

  • Download nRF Connect for Desktop

  • Double click nRF Connect for Desktop (nrfconnect-3.10.0.dmg)

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  • Drop nRF Connect for Desktop icon to Applications icon

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  • Launch nRF Connect for Desktop from Launchpad

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

Install Toolchain Manager.

reference data :

  • In the APPS section, click Install next to Toolchain Manager.

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  • The app is installed on your machine, and the Install button changes to Open.

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

Install SDK v1.8.0

reference data :

  • Click Install button at nRF Connect SDK v1.8.0

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  • nRF Connect will notify us need to install VS Code first.

  • Download VS code for M1 revision from offical web

  • Drop download file to Application folder.

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  • Launch VS code from Launchpad

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  • Launch the Command Palette (Cmd+Shift+P) and type 'shell command' to find the Shell Command: Install 'code' command in PATH command.

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  • 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)

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

Install VS Code extensions

  • Click Open VS Code from Toolchain Manager

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  • nRF Connect will pop some extensions need to install

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  • Click Open VS Code

  • nRF Connect will stick that seem like Nordic issueOrz

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

Setting nRF Connect for VS code

  • Launch VS Code
  • Click left side nRF Connect for VS Code icon
  • Click Quick Setup
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →
  • Select SDK revision
    • 1.8.0 (/opt/nordic/ncs/v1.8.0)
      Image Not Showing Possible Reasons
      • The image file may be corrupted
      • The server hosting the image is unavailable
      • The image path is incorrect
      • The image format is not supported
      Learn More →

Create a sample and build it

  • Click Create a new application from sample

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  • 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

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  • Click Add Vuild Configuration

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  • Select prefer setting

    • Board :
      • Nordic boards
      • nrf52840dk_nrf52840
  • Click Build Configuration

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  • We can find some new files be generated

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  • Click Build from ACTION and confirm build result without any error message

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  • Output file will locate at

    • $(Project_folder)/build/zephyr/
      Image Not Showing Possible Reasons
      • The image file may be corrupted
      • The server hosting the image is unavailable
      • The image path is incorrect
      • The image format is not supported
      Learn More →
  • Normally you will find this issue, macOS can detect J-LINK but VS Code can't

  • Connect nRF52840-DK to your MacBook

  • Install J-LINK for x86 <= it's very strange but workableOrz

    • Launch nrf-command-line-tools-$(VERSION)-Darwin.dmg (Download from Here)
  • Click refresh icon to redetect J-LINK

  • Now we can see J-LINK from VS Code :+1:

Get your environment setting

reference data :

  • Install nRF command line tools
  • While download finish, double click the file to start install
  • Install below tools
    • nRF Tools
    • J-LINK for M1
      Image Not Showing Possible Reasons
      • The image file may be corrupted
      • The server hosting the image is unavailable
      • The image path is incorrect
      • The image format is not supported
      Learn More →
  • Launch VS Code after installing
  • Launch Command Palette (Cmd+Shift+P)
  • Type nRF Connect: Generate Support Information
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →
  • VS Code will dump your environment setting
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

Other information