This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Error while compiling through makefile

Hello, I am using sdk12.2.0 and pca10028 dk. I am using one code downloaded from unknown source. The code is used to store data in flash. When I compile through keil I don't get any error in code except that the code size is limited (as I am not using licensed version). When I try to compile makefile I am getting error as attached cmderror1.PNG I have added files and path to the code. I have also made changes in sdk_config file. I am also attaching my makefile and main file here makefile - makefile.txt

main - main.txt

Error2 - cmderror2.PNG

Parents
  • Hi,

    The errors suggest the implementation of the functions are not included in the project.

    You need to add the source file to the twi driver to the Makefile:

    SRC_FILES += \
      $(SDK_ROOT)/components/drivers_nrf/twi_master/nrf_drv_twi.c \
    

    You also need to enable the TWI driver in sdk_config.h:

    #define TWI_ENABLED 1
    

    Best regards,

    Jørgen

  • Hello Jørgen, I have already enable TWI_ENABLED 1 in sdk_config.h file. I tried your suggestion to make changes in makefile and I included the line $(SDK_ROOT)/components/drivers_nrf/twi/nrf_drv_twi.c \ but I am still getting error as attached above. Can you please edit and try at your end?

Reply
  • Hello Jørgen, I have already enable TWI_ENABLED 1 in sdk_config.h file. I tried your suggestion to make changes in makefile and I included the line $(SDK_ROOT)/components/drivers_nrf/twi/nrf_drv_twi.c \ but I am still getting error as attached above. Can you please edit and try at your end?

Children
No Data
Related