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

Debugging hids_keyboard weirdness under OSX/Eclipse (nrf51422)

Hello,

I’m porting the hids_keyboard demo to work with the nrf51422 dev board. I just changed the #defines for the board in project settings, as well as the pin assignments for the buttons and LEDs.

When I compile and flash the code, the device pairs to my computer, but seems to freeze when it drops into the keys_send() function upon button press.

Using the debugger, I can set a breakpoint in the button_event_handler() function and trigger the button. I then step into the switch() statement. When I try to step into the keys_send() function, it just says “starting target CPU” and doesn’t seem to go anywhere.

If I set a breakpoint inside the actual keys_send() function, it never makes it there, either.

I’m working in Eclipse Luna under OSX Yosemite, and using the PCA10003 dev board with toolchain set up from instructions from here, with appropriate flags set for nrf51422 in the project settings. I had to tweak the linker script to make it work with s110 version 7, too.

This is my first time working with a proper embedded debugger, so I’m kind of a at a loss as to what to do next.....any advice would be appreciated!

UPDATE: Trying the same code on Keil, I can get stepped into the keys_send() function, but the stepping buttons disappear when getting to the memcpy() in send_key_scan_press_release() called by keys_send().

Parents Reply
  • Pretty much - I am using the eclipse ARM plugins, as well as the eclipse project template I mentioned in original post, as I am using a dev kit and code written for the PCA10001 which is similar to the board Im using (PCA10003). So I'm not using your EHAL source tree. Thing seems to be compiling fine though, but it freezes when going into that keys_send function. Even when I'm not using a debugger and just try to turn on an LED in that function....it just never gets there.

Children
No Data
Related