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

Compilation issue

Hi,

I am new to Nordic development environment.

I am compiling the some code developed by vendor for NRF5  SDK 12.2.0

I am getting errors such as

Error1 snippet

"'NRF_SAADC' undeclared (first use in this function); did you mean 'NRF_ADC'?
    'NRF_SAADC' undeclared (first use in this function); did you mean 'NRF_ADC'?
    'NRF_SAADC' undeclared (first use in this function); did you mean 'NRF_ADC'?
    'NRF_SAADC' undeclared (first use in this function); did you mean 'NRF_ADC'?
    'NRF_SAADC' undeclared (first use in this function); did you mean 'NRF_ADC'?
    'NRF_SAADC' undeclared (first use in this function); did you mean 'NRF_ADC'?
    'NRF_SAADC' undeclared (first use in this function); did you mean 'NRF_ADC'?
    'SAADC_CH_LIMIT_LOW_Pos' undeclared (first use in this function); did you mean 'NRF_SAADC_LIMIT_LOW'?
    'SAADC_CH_LIMIT_LOW_Msk' undeclared (first use in this function); did you mean 'SAADC_CH_LIMIT_LOW_Pos'?
    'SAADC_CH_LIMIT_HIGH_Pos' undeclared (first use in this function); did you mean 'SAADC_CH_LIMIT_LOW_Pos'?
    'SAADC_CH_LIMIT_HIGH_Msk' undeclared (first use in this function); did you mean 'SAADC_CH_LIMIT_HIGH_Pos'?"

Error2 Snippet:
NRF_P0' undeclared (first use in this function); did you mean 'NRF_SPI0'?
    'NRF_P1' undeclared (first use in this function); did you mean 'NRF_P0'?

I am sure these must be declared in some library or header

Can somebody help me in locating these undeclared variables and resolving build issues.

Thank You,

skiran

Parents
  • I would recommend you to open the SAADC example in SDK 12.2 (located in examples/peripheral/saadc), and then search for the undeclared definitions (ctrl+shift+F).

    The defintion NRF_SAADC is declared in the file nrf52.h, and you will need to add this header file to the include paths.  The defintions SAADC_CH_LIMIT_LOW_Pos and SAADC_CH_LIMIT_HIGH_Pos is declared in nrf52_bitfields.h.

    Best regards,

    Simon

Reply
  • I would recommend you to open the SAADC example in SDK 12.2 (located in examples/peripheral/saadc), and then search for the undeclared definitions (ctrl+shift+F).

    The defintion NRF_SAADC is declared in the file nrf52.h, and you will need to add this header file to the include paths.  The defintions SAADC_CH_LIMIT_LOW_Pos and SAADC_CH_LIMIT_HIGH_Pos is declared in nrf52_bitfields.h.

    Best regards,

    Simon

Children
No Data
Related