![]() #halt, erase, write softdevice and binary, verify both, run it. Set HEXFILE $BASEPATH/examples/ble_peripheral/ble_app_proximity/pca10028/s130/armgcc/_build/nrf51422_xxac_s130.hex Set SOFTDEV $BASEPATH/components/softdevice/s130/hex/s130_nrf51_2.0.0_softdevice.hex This is the proximity example from the SDK: set BASEPATH ~/host/home/user/Downloads/nRF5_SDK_11.0.0_89a8197 ![]() Since the path is rather long, I break it in two and store into variables. To burn the code, we need two files, in my case both are on a different machine (host) so I use sshfs to mount that. To connect from your development platform: telnet pi0 4444 If it worked correctly, the last line should read (nothing before this indicates you successfully connected): Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints To run openocd: openocd -f interface/raspberrypi-native.cfg -c "transport select swd set WORKAREASIZE 0" -f target/nrf51.cfg You can check yours by grabbing the middle 8 digits from: hexdump -s4 -n4 -e '"0x" 4/1 "X""\n"" "' /proc/device-tree/soc/rangesĮdit it with: vi /usr/local/share/openocd/scripts/interface/raspberrypi-native.cfgĬheck to be sure your default speed is 700Mhz, or adjust bcm2835gpio_speed_coeffs: cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq The peripheral base address is different on some Pi models. I needed to comment out: #bcm2835gpio_jtag_nums 11 25 10 9Īnd to add: # Each of the SWD lines need a gpio number set: swclk swdio The raspberrypi-native.cfg didn’t have SWD support, so add them from raspberrypi2-native.cfg. Git clone git://.net/p/openocd/code openocd-code The debugger/programmer install is: cd ~/DownloadsĪpt-get install libtool libusb-dev libusb-1.0 autoconf automake texinfo For me, it was free because I had the Pi Zero and the wire.Īt the time this was written, OpenOCD didn’t have bcm2835gpio in the main release so we git clone it. That should make the DK board show up in the studio and you should be able to erase and program it.The Hardware here is simple and cheap, it can be done with any Pi, though I used a Pi Zero. Just open the nRFgo Studio and press help: Check for updates and download the lastest version and run the install. If the nRFgo Studio does not work for your DK board, you might have to update it. and the SW Device should have a device listed), then perhaps you need to download a newer segger software.Īfter installing this, try again and see if the device appears. when you choose Options for Target: Debug tab: Use: J-LINK / J-TRACE Cortex: Settings: Port SW (the device should show up as J-Link / J-Trace Adapter SN: SERIALNUM. If the device (having the JLink firmware installed) is not showing up in Keil, ie. ![]() Wait until the transfer is complete, and then power cycle the board (turn off and on again without holding the reset button). the nRF51-DK-J-Link-IF.bin file) into the mounted bootloader drive on the connected computer. To swap the Interface MCU FW, drag and drop the Interface image (ie. to enter bootloader mode, press the boot/reset button (SW5) while the board is powered until the LED (LD5) starts to blink). You need to be logged in and also have the product key added for your nRF51-DK board so that the interface firmwares are available to you for downloading (nRF51-DK-J-Link-IF, and nRF51-DK-mbed-IF).Īfter you have acquired the interface firmware (nRF51-DK-J-Link-IF.bin), you can follow the approach you used earlier to swap back to the J-Link firmware.įollow the approach in section 4.1 "IF Boot/Reset button" on page 8 to enter the bootloader (ie. One approach you can follow is to download the J-Link OB image from the website: If I have understood it correctly, you want to switch back to the J-Link interface firmware on your nRF51-DK board? ![]()
0 Comments
Leave a Reply. |