I am trying to run a NRF51822 chip using Emblocks and OpenOCD, the debugger interface is a ST-Link from a Discovery board, which supports SWD.
When I program the Blank device everything works fine, the program flow reaches the main function. However, when I flash S130, the program flow never reaches my main function (I don't have any other application code).
I have checked the assembly code and S130 is stuck on a (arm asm incoming) WFE and b.n instruction, to my knowledge, it seems like it is waiting for an interrupt, event or for a wake up to happen before doing anything... is this the expected behaviour or I am doing something wrong?
The only pins I have connected are the SWD lines (2 pins) GND and VDD (3 volts).
I solved it a long time ago, but forgot to post the solution. The problem was the script file provided with Emblocks, it needed to be modified.
I got it working by modifying the sections in the linker file from this:
To this:
Now the program flow reaches main.