This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52 DK: Zephyr Hello World

Hi, I am trying to get a working demo up for the Zephyr OS on your nRF52 DK but having trouble. See attached for description, I get this error -

-- runners.nrfjprog: Flashing file: /home/jmreina/zephyrproject/zephyr/build/zephyr/zephyr.hex
ERROR: JLinkARM DLL reported an error. Try again. If error condition
ERROR: persists, run the same command again with argument --log, contact Nordic
ERROR: Semiconductor and provide the generated log.log file to them.
FATAL ERROR: command exited with status 33: nrfjprog --program /home/jmreina/zephyrproject/zephyr/build/zephyr/zephyr.hex --sectoranduicrerase -f NRF52 --snr 682906967
jmreina@zephyr-ubuntu:~/zephyrproject/zephyr$

Seems simple to fix but I am stuck, how do I get this blinky demo to run on my DK? 

@brief 		nRF Zephyr Debug Notes
@details 	nRF52 DK
@auth 		Justin Reina
@date 		8/23/21


@section 	Procedure [2]
	Create a fresh VM of Ubuntu 20.04

	Update & Upgrade
		sudo apt install git gitk
		sudo apt update
		sudo apt upgrade

	Get Kitware
		wget https://apt.kitware.com/kitware-archive.sh 
		sudo bash kitware-archive.sh

	Use apt to install the required dependencies:
		sudo apt install --no-install-recommends git cmake ninja-build gperf \
		ccache dfu-util device-tree-compiler wget \
		python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file \
		make gcc gcc-multilib g++-multilib libsdl2-dev

	Install west
		pip3 install --user -U west
		echo 'export PATH=~/.local/bin:"$PATH"' >> ~/.bashrc
		source ~/.bashrc

	Get the Zephyr source code:
		west init ~/zephyrproject
		cd ~/zephyrproject
		west update

	Export a Zephyr CMake package
		west zephyr-export

	Zephyr’s scripts:
		pip3 install --user -r ~/zephyrproject/zephyr/scripts/requirements.txt

	1. Download the latest SDK installer:
		cd ~
		wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.13.0/zephyr-sdk-0.13.0-linux-x86_64-setup.run

	2. Run the installer, installing the SDK in ~/zephyr-sdk-0.13.0:
		chmod +x zephyr-sdk-0.13.0-linux-x86_64-setup.run
		./zephyr-sdk-0.13.0-linux-x86_64-setup.run -- -d ~/zephyr-sdk-0.13.0
		
		>src ctrl roots of zephyr-sdk-0.13.0\ & zephyrproject\

	3. Install udev rules, which allow you to flash most Zephyr boards as a regular user:
		sudo cp ~/zephyr-sdk-0.13.0/sysroots/x86_64-pokysdk-linux/usr/share/openocd/contrib/60-openocd.rules /etc/udev/rules.d
		sudo udevadm control --reload

	4. Build the Blinky Sample
		cd ~/zephyrproject/zephyr
		west build -p auto -b nrf52dk_nrf52832 samples/basic/blinky

	Flash the Sample
		west flash

@section 	Nordic Community Try [3]
	Get the Zephyr source code:
		west init ~/zephyrproject
		cd ~/zephyrproject
		west update

	> 'west flash'

		cd <ncs location>/zephyr/samples/basic/blinky
			> cd ~/zephyrproject/zephyr/samples/basic/blinky
		
		Connect nrf52 DK to computer and turn on it on
		
			> Devices -> USB => USB Settings... -> Add new
			
		west build -b nrf52dk_nrf52832 && west flash
			Now LED1 should blink
		
		'nrfjprog --program' command
			cd <ncs location>/zephyr/samples/basic/blinky/build/zephyr
			nrfjprog --eraseall
				Make sure LED1 stops blinking
			nrfjprog --program zephyr.hex --sectorerase
			nrfjprog --reset 
				Now LED1 should blink


@section 	Notes
	@board 	nRF52 DK [1]
				*PCA10040 2.1.0
				*nrf52dk_nrf52832
@section 	Opens
	NCS has Zephyr built in?

@section 	Reference
	1. https://www.nordicsemi.com/Products/Development-hardware/nrf52-dk
	2. https://docs.zephyrproject.org/latest/getting_started
	3. https://devzone.nordicsemi.com/f/nordic-q-a/75927/unable-to-run-zephyr-programs-on-nrf52840dk/313361#313361

6505.Console Report.zip

Parents Reply Children
No Data
Related