Getting Linker Errors "undefined references to..."

I'm just starting to make a project using SDK 17.1, which is loosely based on a working, mature project based on SDK 15.2 and I'm hitting a bunch of issues. My path here is to copy an example (in my case beacon) and then strip everything out and add stuff back in slowly as needed.

Right now I'm just trying to nrfx_rtc, nrfx_spim, and printf via app_uart working to read in some sensor data and print to a terminal program. Everything compiles all the way to linking the .elf and I get:

  • undefined reference to 'app_uart_init'
  • undefined reference to 'nrfx_rtc_init'
  • undefined reference to 'nrfx_spim_xfer'

app_uart doesn't seem to have any entries in sdk_config.h any more but the nrfx_rtc and nrtx_spim are both enabled so I'm not at all sure what's going on.

Any thoughts or things I should be looking at? This SDK has always confused the bejesus out of me so I don't have any clue where it's all going wrong.

Adam

Parents
  • Ok some interesting results. I'm not sure why my sdk_config.h isn't working...

    Using NRF_MODULE_ENABLED(NRFX_SPIM) indicates NRFX_SPIM isn't enabled:

    But it is enabled in my sdk_config.h:

    Any ideas?

  • It's definitely something related to my sdk_config.h not being looked at. Why the %)(* does this even exist or need to be so complicated? Why can't I just initialize a driver in my code and be done? Why can't I just copy and paste the defines from the sdk_config into my project?

    Is there a way to just remove the need for sdk_config.h? I'm just trying to get a simple project with SPIM working and it's taken me DAYS. It would have taken hours with other vendor's sdk.

    Also, there is another sdk_config.h in config/nrf52840/config that's not even the same sdk_config.h that's in the example! How is this such a disaster?

Reply
  • It's definitely something related to my sdk_config.h not being looked at. Why the %)(* does this even exist or need to be so complicated? Why can't I just initialize a driver in my code and be done? Why can't I just copy and paste the defines from the sdk_config into my project?

    Is there a way to just remove the need for sdk_config.h? I'm just trying to get a simple project with SPIM working and it's taken me DAYS. It would have taken hours with other vendor's sdk.

    Also, there is another sdk_config.h in config/nrf52840/config that's not even the same sdk_config.h that's in the example! How is this such a disaster?

Children
No Data
Related