UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor woitha
Visitor
4,187 Views
Registered: ‎04-22-2013

Linker problem with xilffs

Hello,

 

I am using Vivado 17.2 with a Zybo-Board. I am trying to read/write files on a SDCARD (FAT32) with the „xilffs“ library.

I started with the  “xilffs_polled_example” (adding it to my sources / standalone project) and it works fine.

 

The next day I restarted Vivado and the SDK, and now I got the following linker errors, when cleaning the project:

 

./src/sdcard.o: In function `FfsSdPolledExample':

sdcard.c:(.text+0x5c): undefined reference to `f_mount'

sdcard.c:(.text+0x80): undefined reference to `f_mkfs'

sdcard.c:(.text+0x9c): undefined reference to `f_open'

sdcard.c:(.text+0xac): undefined reference to `f_lseek'

sdcard.c:(.text+0xcc): undefined reference to `f_write'

sdcard.c:(.text+0xdc): undefined reference to `f_lseek'

sdcard.c:(.text+0xfc): undefined reference to `f_read'

sdcard.c:(.text+0x128): undefined reference to `f_close'

 

It works again, when I am modifying the BSP settings:

  1. Remove “xilffs” from BSP
  2. Add “xilffs” to BSP

But after restarting the SDK, the problem occurs again.

 

I have also found out, that the objects.mk file did not contain the “lxilffs”, after restarting the sdk.

LIBS := -Wl,--start-group,-lxil,-lgcc,-lc,--end-group

 

But should be:

LIBS := -Wl,--start-group,-lxil,-lgcc,-lc,--end-group -Wl,--start-group,-lxilffs,-lxil,-lgcc,-lc,--end-group

 

I am doing something wrong? Is it a bug? Is there another workaround excepting the one I have found?

0 Kudos
7 Replies
Moderator
Moderator
4,173 Views
Registered: ‎11-09-2015

Re: Linker problem with xilffs

Hi @woitha,

 

Which OS are you using?

 

Could you send a test case?

 

Regards,

 

Florent


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Moderator
Moderator
4,151 Views
Registered: ‎09-12-2007

Re: Linker problem with xilffs

If the linker options arent getting correctly populated after you add the xilffs to the BSP, then this is a bug. 

0 Kudos
Visitor woitha
Visitor
4,150 Views
Registered: ‎04-22-2013

Re: Linker problem with xilffs

Hi Florent,

 

I am using Windows 10 Pro x64 latest release.

 

I generated a new project with the “xilffs_polled_example” and this time the problem does not occur. However I do not like to restart my complete project.

 

That’s why I have copied my project and deleted everything except the Prozessing-System and the “xilffs_polled_example”. This is now almost the same project I have generated before, but now the problem still exists. Perhaps you can have a look at this project (VideoProzessor.xpr.zip).

 

  1. Start Vivado
  2. Open the VideoProzessor project
  3. Launch SDK
  4. Clean should generate the described errors
  5. Modify BSP (remove xilffs)
  6. Modify BSP (add xilffs) again
  7. Clean should work without errors
  8. Close SDK
  9. You may continue with 3. again

By the way, there is also another strange thing. Every time I am generating a new bitstream and exporting the hardware (with bitstream), the SDK shows the new hdf-File but still  the old bitstream. Currently I am always deleting the hw_platform in SDK before exporting new hardware in vivado. However I do not think this is way it should work.

 

Thank you in advance for your help!

 

Regards,

 

Dirk   

0 Kudos
Moderator
Moderator
4,143 Views
Registered: ‎11-09-2015

Re: Linker problem with xilffs

Hi @woitha,

 

By the way, there is also another strange thing. Every time I am generating a new bitstream and exporting the hardware (with bitstream), the SDK shows the new hdf-File but still  the old bitstream. Currently I am always deleting the hw_platform in SDK before exporting new hardware in vivado. However I do not think this is way it should work.

This is a known issue of SDK 2017.2. Please check AR#69489, there is a workaround.

This AR should be updated with a script for a more convenient workaround.

 

I will have a look to your project and let you know what I have found.

 

Regards,

 

Florent


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
Visitor meakerb
Visitor
3,027 Views
Registered: ‎12-12-2011

Re: Linker problem with xilffs

Is there a response for this issue? I am having the same issue (although running SDK 2016.4) and cannot figure out what to do.

0 Kudos
Observer a@1
Observer
2,467 Views
Registered: ‎04-17-2018

Re: Linker problem with xilffs

The methods are not working..thoigh i have added, required preprocessors,f_open is still showing undefined reference

0 Kudos
1,896 Views
Registered: ‎04-16-2015

Re: Linker problem with xilffs

I think that xilffs library is not automatically linked.

 

Manually link it.

 

SDK Properties -> C/C++ Build -> Settings -> gcc linker -> Inferred Options -> Software Platform

 

In Software Platform Inferred Flags options, add '-lxilffs'.

 

0 Kudos