ITK-TTK4235 / nrf52dk-environment

Development environment for nRF52DK
0 stars 1 forks source link

nRF52DK Development Environment

Development environment for nRF52DK. This project can be used as a basic Makefile-based project or via VSCode with the cortex-debug extension on Linux or MacOS.

Dependencies

Dependencies can be install with your preferred package manager (apt, homebrew, yay, pacman etc.) or via the provided links.

Ubuntu installation (not needed for lab PCs)

This installation guide is not complete, and may vary depending on your specific release and/or architecture. See the installation script install_tildat_microcontroller_deps.sh for some hints.

Check for existing install:

arm-none-eabi-gcc --version

If not found download and install the ARM GNU toolchain from this link including libcurses5 (Check this link for solving a common issue with the dependency libcurses5.). Install nRF Command Line Tools (for nrfjprog) and Python 3.8.

MacOS installation

This installation guide is not complete, and may vary depending on your specific release and/or architecture. See the installation script install_tildat_microcontroller_deps.sh for some hints.

This installation process requires Homebrew package manager (https://brew.sh/).

  1. Install ARM Toolchain
    brew install arm-none-eabi-gcc
    brew install arm-none-eabi-gdb
  2. Download and install nRF Command Line Tools
  3. Install J-Link Software Tools (https://www.segger.com/downloads/jlink)
  4. Install dependencies for Marus cortex debug (See install script for hints)
  5. Clone repository and open repository with VSCode
  6. Adjust Makefile to suit Homebrew installation paths

VSCode debugging

To utilize the debugging features in VSCode you need to install the marus-cortex-debug extension.

Step 1: Click "Run and Debug"

step1

Step 2: Click: "Debug (jlink)"

step2

Step 3: Set break points and step through code

Screenshot 2024-02-06 at 15 20 23

Step 4: Change and read registers live

Screenshot 2024-02-06 at 15 21 12

Step 5: Read and decode memory layouts

image

Sources