Debug: cannot set breakpoint in VS Code

Hi guys, my setup:

- nRf Connect 2.6.0

- VS Code 1.88.1

- Apple Macbook M3 Max (ARM64 CPU)

- nRF52840-DK

I created a new project based on the zephyr button sample. It builds and it runs as expected.

I cannot set a breakpoint in the button_pressed() callback. I've rebuilt, and I added a useless incrementing integer to maybe prod the debugger into accepting a breakpoint. This does not work. The code:

I build, then debug which also flashes the device. The breakpoint I just added disappears:

I attempt to set it again, and a duplicate breakpoint gets added at line 44, the beginning of main().

The first code line is line 47, "if (!gpio_is_ready_dt(&button))". I cannot set a breakpoint here. When I try, a breakpoint gets set to line 48, "printk([...])".

I also cannot set breakpoints at the following: "ret = gpio_pin_interrupt_configure_dt(&buttonGPIO_INT_EDGE_TO_ACTIVE);", "gpio_init_callback(&button_cb_data, button_pressed, BIT(button.pin));".

What's going on here?

Parents
  • The problem was caused a single typo in an edit I made to display_st7789v.c within the nRF Connect SDK, as suggested by this ST7789V display project: 

    https://github.com/JON95Git/lvgl-nrf52840-mdk-sample

    The edit was this region:

    #define ST7789V_INIT(inst)

    static const struct st7789v_config st7789v_config_ ## inst = {

    .bus = SPI_DT_SPEC_INST_GET(inst, SPI_OP_MODE_MASTER | SPI_WORD_SET(8| SPI_TRANSFER_MSB  SPI_MODE_CPOL , 0),

    [...]

    Somehow the project was still allowed to build without errors, even though the init routine for the display was throwing data access errors I could only see when debugging with Segger Ozone.

    After fixing the content of the ".bus" definition the system started working as intended.

Reply
  • The problem was caused a single typo in an edit I made to display_st7789v.c within the nRF Connect SDK, as suggested by this ST7789V display project: 

    https://github.com/JON95Git/lvgl-nrf52840-mdk-sample

    The edit was this region:

    #define ST7789V_INIT(inst)

    static const struct st7789v_config st7789v_config_ ## inst = {

    .bus = SPI_DT_SPEC_INST_GET(inst, SPI_OP_MODE_MASTER | SPI_WORD_SET(8| SPI_TRANSFER_MSB  SPI_MODE_CPOL , 0),

    [...]

    Somehow the project was still allowed to build without errors, even though the init routine for the display was throwing data access errors I could only see when debugging with Segger Ozone.

    After fixing the content of the ".bus" definition the system started working as intended.

Children
No Data
Related