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

Programming nrf51822 using Jlink

Hello,

I am new to nordic nrf51822 and want to program nrf51822- www.raytac.com/.../MDBT40 spec-Version A5.pdf using jlink (world.taobao.com/.../537881589911.htm. I want to program one of the GPIO pin to go high and low with delay of 1 sec (same as Blink led sketch in arduino)

Few queries (might be very basic but forgive me):

To connect jlink with nrf51822, only vcc, gnd, sclk, sdo are required?

Can I use arduino IDE to compile sketch and upload the .hex file using Jlink?

Is there are any way such that I write code in arduino IDE and upload the .hex file using some software by way of Jlink?

Thank you.

    1. That's not a real JLink, that's a clone which infringes on Segger's technology. Please don't buy knockoffs, get a proper JLink (the JLink EDU is affordable as long as you meet the criteria of non-commercial work)

    2. Yes you need to connect SWDIO, SWDCLK, GND and VCC

    3. You can't directly use anything arduino to program an nrf51 chip. There is an open source core here github.com/.../arduino-nRF5 which purports to provide the functions the chip needs for arduino type programming you can try.

    As a newbie you are way better off purchasing a proper nrf51 or nrf52 kit from Nordic which comes with an onboard (official) segger you can use for programming that board or other nrf51 chips and either learn to program it the usual way, or try sandeeps core, or purchase Nordic's arduino compatible boards which you can program with arduino directly. You're going to have a hard job starting from scratch with one of those modules and making it work. And the development boards are cheap for what you get.

    I usually advise people to get off arduino as soon as possible if you're really going to make a proper product and learn to program the chips natively.

Related