How to program nRF51822

ChibiOS public support forum for topics related to the Nordic nRF51 family of micro-controllers.
Post Reply
ep.hobbyiest
Posts: 94
Joined: Sun Jun 26, 2016 5:22 pm
Has thanked: 4 times
Been thanked: 1 time

How to program nRF51822

Post by ep.hobbyiest »

Hi,

I am planning to use nRF51822 with chibios. I want to know about. how to program this controller.
I am planning to buy following module.
https://www.aliexpress.com/item/NRF5182 ... b61df5d9a8
utzig
Posts: 359
Joined: Sat Jan 07, 2012 6:22 pm
Has thanked: 1 time
Been thanked: 20 times

Re: How to program nRF51822

Post by utzig »

I have similar boards and I one baseboard with pins for programming. As a programmer I use the st-link on a STM32F4-Discovery, but any SWD programmer should do.

Cheers,
Fabio Utzig
User avatar
DeusExMachina
Posts: 223
Joined: Tue Apr 03, 2012 5:08 am
Has thanked: 3 times
Been thanked: 3 times

Re: How to program nRF51822

Post by DeusExMachina »

Yes, openOCD supports ST-Link2 and it works quite well with nrf51822.
just try something like this with OpenOCD10 in "Debugger" tab
Config options

Code: Select all

-f interface/stlink-v2.cfg  -f target/nrf51.cfg -s c:/ChibiStudio/tools/openocd10/scripts

commands

Code: Select all

set mem inaccessible-by-default off
ep.hobbyiest
Posts: 94
Joined: Sun Jun 26, 2016 5:22 pm
Has thanked: 4 times
Been thanked: 1 time

Re: How to program nRF51822

Post by ep.hobbyiest »

Thanks.
And i got few tutorials as well.

I was looking for for example code for nrf51822 processor. I got one in chibi-contri.
But while compiling i got following error. I think problem with linking.
here is error.

Code: Select all

make -j4 all 
make: *** No rule to make target `chcoreasm_v6m.S', needed by `build/obj/chcoreasm_v6m.o'.  Stop.
make: *** Waiting for unfinished jobs....
Compiling crt0_v6m.S
Post Reply