I can see that other people have run into the "no code for breakpoint" problem when attempting to use the SEGGER debugger. I have read the earlier posts. I have not been able to fix my problem using the suggestions I have read.
My setup is a PCA10040 board, nRF5 SDK 15.3.0, and SEGGER Embedded Studio v.4.52.
I am unable to set a breakpoint on ANY line in the following function.
void thermistor_read(thermistor_t * thermistor)
{
nrf_gpio_pin_write(thermistor->gpio_power, 1);
nrf_delay_us(25);
APP_ERROR_CHECK( nrf_drv_saadc_sample_convert(thermistor->channel,
&thermistor->data) );
nrf_gpio_pin_write(thermistor->gpio_power, 0);
nrf_delay_us(25);
}
I get a dialog box from SES stating "no code for breakpoint" when I try to run in Debug mode.
However: I tried setting a breakpoint on various lines in another function elsewhere in the same .c file, and it always works perfectly. Thinking that the problem might have something to do with the specific function(s) happen to call in thermistor_read(), I tried setting a breakpoint on a call to nrf_delay_us() in another function. It worked fine.
Please help me to understand how this is happening. I can see the assembly code pop up in the left panel of SES when it claims that I have no code associated with any line of my function. There's plenty of code there.
Thanks for your advice.