ERROR: cannot find -lC:\emFile_V322c\LinkLibrary\PSoC5\GCC\libemf32nosnlfn.a

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
DaSl_2925376
Level 2
Level 2
First like given

Don't think I'm the only one to have this problem but being new to using the Cypress Developer Community I don't know how to find the answer. So sorry in advance if I'm duplicating a question.

I need to use an SD Card in my latest design so I started by downloading the emFile_Example01. I've downloaded all the necessary files as instructed and set up the Build Settings to look for the necessary include file etc. Once again as instructed in the FileSystemLibrary(emFile).pdf.

However, build fails:-

ERROR: cannot find -lC:\emFile_V322c\LinkLibrary\PSoC5\GCC\libemf32nosnlfn.a

collect2.exe: error: ld returned 1 exit status

The command 'arm-none-eabi-gcc.exe' failed with exit code '1'.

--------------- Rebuild Failed: 06/01/2020 11:52:47 ---------------

The directory/file path is correct. I've checked and re-checked. Help please. Could there be something simple that I have forgotten to do?

Thanks in advance,

Dafydd

0 Likes
1 Solution

Hello Dheeraj

Thanks. At last success. The IDE automatically put in the full path name for the library file which I did not think would be a problem. Once I removed the pathname and just left the file name – without the li band .a – it worked.

Thanks once more

Dafydd

Oddi wrth: DheerajK_81 <community-manager@cypress.com>

Anfonwyd: 02 June 2020 11:25

At: Dafydd Slade <dafydd.slade@ntlworld.com>

Pwnc: Re: - ERROR: cannot find -lC:\emFile_V322c\LinkLibrary\PSoC5\GCC\libemf32nosnlfn.a

<http://www.cypress.com/>

<https://community.cypress.com/?et=watches.email.thread> Cypress Developer Community

ERROR: cannot find -lC:\emFile_V322c\LinkLibrary\PSoC5\GCC\libemf32nosnlfn.a

reply from DheerajK_81 <https://community.cypress.com/people/DheerajK_81?et=watches.email.thread> in Community Information - View the full discussion <https://community.cypress.com/message/237479?et=watches.email.thread#237479>

View solution in original post

0 Likes
3 Replies
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

Hello Dafydd,

When specifying the library, you shouldn't add the prefix "lib" and ".a" in the Linker Settings. Only add "emf32nosnlfn" as shown below:

pastedImage_1.png

Also, when building the project if you see the error "device.h: No such file or directory", then open the file "FS_ConfigIO.c" and change "#include <device.h>" to "#include <project.h>".

After this, the build should be successful. Let me know your observations.

Regards,

Dheeraj

0 Likes

Hello DheerajK_81

Thanks. I did try to enter the library without the lib and the .a originally. I’ve done it again now and I now get

ERROR: cannot find -lC:\emFile_V322c\LinkLibrary\PSoC5\GCC\emf32nosnlfn

collect2.exe: error: ld returned 1 exit status

The command 'arm-none-eabi-gcc.exe' failed with exit code '1'.

0 Likes

Hello Dheeraj

Thanks. At last success. The IDE automatically put in the full path name for the library file which I did not think would be a problem. Once I removed the pathname and just left the file name – without the li band .a – it worked.

Thanks once more

Dafydd

Oddi wrth: DheerajK_81 <community-manager@cypress.com>

Anfonwyd: 02 June 2020 11:25

At: Dafydd Slade <dafydd.slade@ntlworld.com>

Pwnc: Re: - ERROR: cannot find -lC:\emFile_V322c\LinkLibrary\PSoC5\GCC\libemf32nosnlfn.a

<http://www.cypress.com/>

<https://community.cypress.com/?et=watches.email.thread> Cypress Developer Community

ERROR: cannot find -lC:\emFile_V322c\LinkLibrary\PSoC5\GCC\libemf32nosnlfn.a

reply from DheerajK_81 <https://community.cypress.com/people/DheerajK_81?et=watches.email.thread> in Community Information - View the full discussion <https://community.cypress.com/message/237479?et=watches.email.thread#237479>

0 Likes