Error setting path to specific file in Segger embedded studio

 hi

We are developing with Segger embedded studio.

.

If you copy and move the SW development project folder to another PC, the following error occurs.

(Only occurs on copied PC)

.

- error massage : nRF5_SDK_17.1.0\modules\nrfx\drivers\src\nrfx_spim.c: No such file or directory

- When building, when comparing the file in which the above error occurs and the normal C file, the path is different.

Corresponding C file - right mouse - option - file - full path

(The C file with the error has an abnormal path.)

.

.

.

.

So, I try to chang.e the full path to the normal path, but it cannot be modified because it is deactivated.

Is there a way to batch edit files with these path problems?

Parents
  • Hello,

    I suspect the path is too long in the place that you copied the project into. Try putting it closer to the C:/ folder, so that the overall path to the nrfx_spim.c is not too long. This is a known "issue" in Windows.

    Personally, I use C:\nordic\sdk\17.1.0\examples\custom

    For my custom application projects.

    If that doesn't help, please let me know the full path to your nrfx_spim.c file, and show me a screenshot and full build logs of how it fails.

    Best regards,

    Edvin

  • HI, Edvin

    I followed your advice and moved the folder right to D: to shorten the path.

    .

    And when I build, the same error as below occurs.

    However, the file path in the error window is not the path I moved to.

    (Folder on the PC where the original was created before copying)

    .

    I tried opening 'nrfx_pars.c' where the error occurred... but the file did not open.

    (This is the PC path before the previous copy.)

    .

    If you look at the options for the file, the file path is incorrect and cannot be modified.

    .

    However, if you look for it, there are many files that cannot be opened as shown above.

    So I would like to know how to fix incorrect paths in bulk.

    thank you

Reply
  • HI, Edvin

    I followed your advice and moved the folder right to D: to shorten the path.

    .

    And when I build, the same error as below occurs.

    However, the file path in the error window is not the path I moved to.

    (Folder on the PC where the original was created before copying)

    .

    I tried opening 'nrfx_pars.c' where the error occurred... but the file did not open.

    (This is the PC path before the previous copy.)

    .

    If you look at the options for the file, the file path is incorrect and cannot be modified.

    .

    However, if you look for it, there are many files that cannot be opened as shown above.

    So I would like to know how to fix incorrect paths in bulk.

    thank you

Children
  • Hello,

    I have seen this before. Typically when receiving customer applications, and relative paths are not used. In this case, there is a relative path, so you would have to edit the path to each file. The quickest way to do this is to open the .emProject file in a text editor, and click CTRL + H (find and replace), and look for a pattern in all the wrong paths, and replace it with where it is located on your PC.

    To make it easier to transfer the project between computers, I guess you would need a common folder structure. I am not sure exactly how SES decides how much of the path to include in a relative path, so you may need to do some research here, or ask Segger.

    Best regards,

    Edvin

  • HI

    The quickest way to do this is to open the .emProject file in a text editor, and click CTRL + H (find and replace), and look for a pattern in all the wrong paths, and replace it with where it is located on your PC.

    It was easily fixed using the method you suggested.

    .

    Additionally,

    Can't I edit the full path directly in Seggar?

    .

  • David_Kim said:
    Can't I edit the full path directly in Seggar?

    No, you need to remove the file from Segger, and add it back manually, which is why I prefer opening the .emProject file in a text editor. 

    Why it is not possible, I don't know. You will have to ask Segger about this. 

    But as I mentioned, if you plan to share the project between multiple computers, I suggest that you find a common folder structure. E.g. create a folder in the examples folder in the SDK:

    SDK\examples\custom, and place your application and custom files there (or at least within the SDK).

    And place the application in there. This way, it would be possible to link to all the SDK files, and custom files without "exiting" the SDK. 

    Best regards,

    Edvin

Related