7/28/2023 0 Comments Segger embedded studio nrf51822Haven’t tried debugging yet.īluetooth Low Energy (or Bluetooth 4.0) is a new protocol that’s much simpler than traditional Bluetooth and optimized for low duty cycle communication such as heart rate monitors, fitness devices and remote control. It takes a little help from the Internet, but I got it to work with Nordic’s SDK and the gcc-arm-none-eabi toolchain. Here’s a breakout board I made for it, using a Johanson balun and chip antenna. It’s a Bluetooth Low Energy system-on-chip that includes a transceiver and a Cortex-M0 microcontroller. This amazing component is the Nordic nRF51822 that was released last year and is now available for order from Mouser. I guess the problem is with the address, but I can’t figure out how to solve it.Guan Yang of HackManhattan informs us of his efforts in working with a Bluetooth low energy component: hex file that I get after compiling with gcc, together with the same soft device, it doesn’t. hex file contained in the SDK, I burn the. hex file together with the completed soft device s130, both included in the SDK, it works. I also think that it could be a problem with the address, did you change them in the linker script when compiling it with gcc?įLASH (rx) : ORIGIN = 0x1C000, LENGTH = 0x25000 Now, instead of using Segger I’m using gcc, as you explain in a related post. Halt nrf51 mass_erase sleep 500 flash write_image $SOFTDEV 0 flash write_image $HEXFILE 0 verify_image $SOFTDEV 0 verify_image $HEXFILE 0 reset runĪt this point, your sniffer or phone or whatever should see the Nordic_Prox device. #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. The Hardware here is simple and cheap, it can be done with any Pi, though I used a Pi Zero.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |