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 Children
No Data
Related