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

There seems to be a problem with the external sensor library path.

Hello!


I use SDK v17 and using the library and example code for the lsm9ds1 sensor.      

github.com/.../nRF52-DK-and-LSM9DS1

'lsm9ds1_reg.c', 'lsm9ds1_reg.c' these two files were added to this path ../../../lsm9ds1_driver.
In addition, I added '../../../lsm9ds1_driver', the path to the header file, in option-preprocessor-User Included Directors in the Segger IDE. However, when build, the error 'lsm9ds1_reg.h: No such file or directory' is printed from main.c.
Can I know what the problem is? The main.c is written as this example.

Thank you always!

Parents
  • Hello,

    'lsm9ds1_reg.c', 'lsm9ds1_reg.c' these two files were added to this path ../../../lsm9ds1_driver.
    In addition, I added '../../../lsm9ds1_driver', the path to the header file, in option-preprocessor-User Included Directors in the Segger IDE. However, when build, the error 'lsm9ds1_reg.h: No such file or directory' is printed from main.c.

    It looks to me like you have placed the source and header file in a folder that is at the root of the SDK, which is not what you have specified in your User Included Directories.
    Could you try to change your  to ../../../lsm9ds1_driver to ../../../../../../lsm9ds1_driver in the User Included Directories, and see if this resolves the issue?

    Best regards,
    Karl

Reply
  • Hello,

    'lsm9ds1_reg.c', 'lsm9ds1_reg.c' these two files were added to this path ../../../lsm9ds1_driver.
    In addition, I added '../../../lsm9ds1_driver', the path to the header file, in option-preprocessor-User Included Directors in the Segger IDE. However, when build, the error 'lsm9ds1_reg.h: No such file or directory' is printed from main.c.

    It looks to me like you have placed the source and header file in a folder that is at the root of the SDK, which is not what you have specified in your User Included Directories.
    Could you try to change your  to ../../../lsm9ds1_driver to ../../../../../../lsm9ds1_driver in the User Included Directories, and see if this resolves the issue?

    Best regards,
    Karl

Children
No Data
Related