This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Can't get Keil to break at Main

I have a custom board utilizing an RF51822aa device. To test connectivity to the board I built blinky_s110_pca10028. Using Keil 5.12 I tried to debug the program simply expecting to break in main thus verify I can talk to the M0 on the RF51822. My setup uses, as i mention 5.12 and Keil's ULINK2. When I start debug I can see the download occur, then Keil opens a Disassembly window.

I was expecting to have main.c opened and a break point hit. Instead, I have the Disassembly window open and a pointer to address 0x000114CC. Not sure what address that is.

Any thoughts?

  • Mac - I'm fairly new to Nordic myself, and have been through the issues you're describing. When I can't break at main, it's either because I didn't have the stack programmed, or in Keil under Project/Options, C/C++ I didn't have the IROM1 and IRAM1 memory correct. I'm not sure what they should be for the PCA10028 - It has more RAM than the older PCA10003 board that I'm using.

    To program the stack the easiest thing is make sure you have a current version of nRFgo Studio, the current softdevice stack's hex file. Plug your board into the USB port of you PC, and start nRFgo Studio. Left side of the opening screen is a Device Manager Pain. You should see your board labelled Seggar (s/n on seggar chip). Double click on you board. The large right area of studio's window should have a window with 3 tabs, the left labelled "Program Softdevice" Choose that tab, browse to you S110 hex file. and click program. You should be good to go.

  • I am not able to program the softdevice into our custom board. I have programmed 7.0.0 into said device. I then built my application and have the application loading to address 0x14000. When I use keil and start debug my main routine is never hit. Halting the debugger It seems to be in a loop where it is looping to the same address almost as if it is in some sort of hard reset loop. If I then load the applications reset_Handler() address, which I got from the .map file" and hit run everything runs as expected. So, what am I missing?

  • You can program the softdevice stack using Ulink via keil using the approach described here: www.keil.com/.../uv4_fl_hexdownload.htm

    Note that the application start address should be 0x16000 with softdevice s110 v.7x.x. The memory sections are described in more detail in chapter 10 in the S110-SDS

Related