08-23-2017 02:21 AM
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:
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?
08-23-2017 03:00 AM
Hi @woitha,
Which OS are you using?
Could you send a test case?
Regards,
Florent
08-23-2017 05:54 AM
If the linker options arent getting correctly populated after you add the xilffs to the BSP, then this is a bug.
08-23-2017 05:59 AM
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).
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
08-23-2017 07:00 AM
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
02-24-2018 11:21 PM
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.
05-01-2018 09:40 PM
The methods are not working..thoigh i have added, required preprocessors,f_open is still showing undefined reference
07-25-2018 05:00 PM
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'.
08-23-2019 11:21 AM
Confirmed this is still an issue in 2018.3. Manually linking as described in the post above seemed to do the trick, though I used:
SDK Properties -> C/C++ Build -> Settings -> gcc linker -> ARM v8 gcc linker -> Libraries
and then added a library (-l) called xilffs. That did the trick.
If you are version controlling your project this change will be captured in the .cproject file for the application project.