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

SPI Example Symbol cannot be resolved

I'm trying to set up SPI example from SDK12.3, but I get error at line 53 of main.c

static const nrf_drv_spi_t spi = NRF_DRV_SPI_INSTANCE(SPI_INSTANCE);

It's saying

Symbol "NRF_SPI0" could not be resolved

Symbol "SPI0_TWI0_IRQn" could not be resolved

What else should I add to make the example run?

Another question I always want to ask. Every time I run SDK example for the first time, I always get "could not be resolved" error. I have to spend lot of time searching online or asking here to find the answer that should have been documented with the example. It is really frustrating experience. Is there any complete list to show any extra file I need to include or any config I need to enable for each example?

Parents
  • Hi,

    SPI0_TWI0_IRQn specify the Interrupt number for serial instance 0 (0x40003000). This is related to Cortex M processor architecture, and is similar in nRF51 and nRF52 series. The file nrf51_to_nrf52.h is included by nrf.h, if the symbol NRF52832_XXAA is defined. This symbol is defined if too-generic symbol NRF52 is defined.

    In the Makefile provided with the SDK, the symbol NRF52 is defined, and the path to the header files is included:

    INC_FOLDERS += \
      $(SDK_ROOT)/components/device \
    .
    .
    CFLAGS += -DNRF52
    

    If Eclipse does not include this file automatically, there is either something wrong with the parsing of the Makefile, or you har skipped some step in the tutorial.

    Best regards,

    Jørgen

Reply
  • Hi,

    SPI0_TWI0_IRQn specify the Interrupt number for serial instance 0 (0x40003000). This is related to Cortex M processor architecture, and is similar in nRF51 and nRF52 series. The file nrf51_to_nrf52.h is included by nrf.h, if the symbol NRF52832_XXAA is defined. This symbol is defined if too-generic symbol NRF52 is defined.

    In the Makefile provided with the SDK, the symbol NRF52 is defined, and the path to the header files is included:

    INC_FOLDERS += \
      $(SDK_ROOT)/components/device \
    .
    .
    CFLAGS += -DNRF52
    

    If Eclipse does not include this file automatically, there is either something wrong with the parsing of the Makefile, or you har skipped some step in the tutorial.

    Best regards,

    Jørgen

Children
No Data
Related