cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
aaron_b1
Explorer
Explorer
1,888 Views
Registered: ‎12-20-2017

Problems compiling xilisf.h in 2018.1?

Jump to solution

 

I'm trying to build a stanalone application that reads from the QSPI on a zynqmp platform.  I'm having a mix of troubles in the xilisf.h header file.

First of all, including xilisf.h in my c file generates compiler errors: xilisf.h does not include headers to define the types it uses (u32, etc).  Therefore, the caller has to include these before the "#include <xilisf.h>" .  I consider this a bug.

make all 
'Building file: ../src/sftest.c'
'Invoking: ARM v8 gcc compiler'
aarch64-none-elf-gcc -Wall -O0 -g3 -c -fmessage-length=0 -MT"src/sftest.o" -I../../DCON_2019-02-21_rxapp_bsp/psu_cortexa53_0/include -MMD -MP -MF"src/sftest.d" -MT"src/sftest.o" -o "src/sftest.o" "../src/sftest.c"
In file included from ../src/sftest.c:5:0:
../../DCON_2019-02-21_rxapp_bsp/psu_cortexa53_0/include/xilisf.h:803:56: error: unknown type name 'u32'
 typedef void (*XIsf_StatusHandler) (void *CallBackRef, u32 StatusEvent,
                                                        ^~~
.

I fixed this by including xbasic_types.h before xilixsf.h.

#include <xbasic_types.h> // Needed by xilisf.h#include <xilisf.h>

Second, when compiling test code based on https://github.com/Xilinx/embeddedsw/blob/release-2018.1/lib/sw_services/xilisf/examples/xilisf_intel_rdwr_polled_example.c, , I'm getting errors because XIsf_Iface is never defined in xilisf.h

In file included from ../src/helloworld.c:53:0:
../../ZCU102_2019_02_19_helloworld_bsp/psu_cortexa53_0/include/xilisf.h:834:2: error: unknown type name 'XIsf_Iface'
  XIsf_Iface *SpiInstPtr; /**< SPI Device Instance pointer */
  ^~~~~~~~~~

I believe this should be defined in xilisf.h, around line 794, but none of the prerequisite defines are present in my xparameters.h:

/**************************** Type Definitions *******************************/

#ifdef XPAR_XISF_INTERFACE_AXISPI
typedef XSpi XIsf_Iface;
#elif XPAR_XISF_INTERFACE_PSSPI
typedef XSpiPs XIsf_Iface;
#elif XPAR_XISF_INTERFACE_PSQSPI
typedef XQspiPs XIsf_Iface;
#elif XPAR_XISF_INTERFACE_QSPIPSU
typedef XQspiPsu XIsf_Iface;
#endif

I notice this is a problem whether I build against my custom platform or the zcu102. 

Is there something I'm doing wrong?  

 

 

 

0 Kudos
1 Solution

Accepted Solutions
glena
Moderator
Moderator
1,859 Views
Registered: ‎03-19-2014

Xilsf is supported.   I suspect you don't have it configured correctly.   Refer to the library parameters  documented in UG1037.   For a Zynq device, you'll need the serial_flash_family set to 5 and the serial_flash_interface set to 3

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

View solution in original post

5 Replies
glena
Moderator
Moderator
1,881 Views
Registered: ‎03-19-2014

Make sure you have the xilsf library included in your BSP  - the library also needs to have the correct serial_flash_family and serial_flash_interface defined

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
aaron_b1
Explorer
Explorer
1,864 Views
Registered: ‎12-20-2017

Thank you.  I've done that, and I get the compile error.

Is the xilisf library officially supported?  It is broken (doesn't compile), unless there is something that has to happen in vivado to make the code build.

 

0 Kudos
glena
Moderator
Moderator
1,860 Views
Registered: ‎03-19-2014

Xilsf is supported.   I suspect you don't have it configured correctly.   Refer to the library parameters  documented in UG1037.   For a Zynq device, you'll need the serial_flash_family set to 5 and the serial_flash_interface set to 3

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

View solution in original post

aaron_b1
Explorer
Explorer
1,834 Views
Registered: ‎12-20-2017
Thanks. this fixed it.
0 Kudos
luoyanghero
Explorer
Explorer
1,499 Views
Registered: ‎11-24-2016
Yes, it needs to set flash_family is 'macron', and flash_interface is 'PS QSPI'.
0 Kudos