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: 
909 Views
Registered: ‎05-16-2018

flexible array member 'DHCPDG_T::options' not at end of 'struct DHCPMEM_T'

 

I am trying to interface the WiFi Pmod with the Zynq Processor.

The following is my Block Design:Block Design.jpg

 

 

I have successfully generated the bitstream after which I export the bitstream and Launch the SDK.

 

I have then created a new application project using Language as C++.

The issue i am facing is in the WiFiscan_bsp folder. The following errors are the ones I have encountered.

 

error.JPG

 

I have downloaded the latest vivado-library-master folder from Gtihub and tried the process to no avail.

Please advice on how to proceed.

 

Thanks in advance!.

 

0 Kudos
5 Replies
Moderator
Moderator
852 Views
Registered: ‎10-06-2016

Re: flexible array member 'DHCPDG_T::options' not at end of 'struct DHCPMEM_T'

Hi ashadevi.d@rediff.com,

 

I'm not sure which kind of library are you trying to use but from a quick google search it seems that it's a kind of library for the PMod dongle provided by Digilent.

https://github.com/Digilent/vivado-library/tree/master/ip/Pmods/PmodWIFI_v1_0

 

If you share the details on how are you using the library and the steps you made within SDK it is gonna be easier for the community to reproduce or understand the issue, and eventually solve it.

 

From the error log it seems that you are missing some compiler options or header files...

 

Regards

Ibai


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
Moderator
Moderator
819 Views
Registered: ‎10-06-2016

Re: flexible array member 'DHCPDG_T::options' not at end of 'struct DHCPMEM_T'

Hi ashadevi.d@rediff.com,

Are you still facing the issue? You have not been back since my last message so just wondering if you have been able to go through it. If so would be great if you could post a small sumary of your solution as it might be used by others in the future :)

Regards
Ibai

Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
433 Views
Registered: ‎05-16-2018

Re: flexible array member 'DHCPDG_T::options' not at end of 'struct DHCPMEM_T'

Hi @Ibai,

Sorry for the late response.
I was able to resolve the issue by switching to Windows 7.

Thanks
Asha Devi
0 Kudos
Visitor rsmith-ft
Visitor
340 Views
Registered: ‎09-26-2018

Re: flexible array member 'DHCPDG_T::options' not at end of 'struct DHCPMEM_T'

I am having the same problem. The problem occurs with Vivado 2018.2 and 2019.1. The previous solution of installing Windows 7 is not an option for me.

The problem seems to occur during the build process.  Looking thru the build logs the errors and warnings go on for 1200 lines: ...metadata/.plugins/org.eclipse.cdt.ui/global-build.log

These are typical

76 In file included from ./DEIPcK/utility/deIP.h:409:0,
77 from ../../../include/DEIPcK.h:64,
78 from DEIPcK/DEIPcK.cpp:54:
79 ./DEIPcK/utility/DHCP.h:216:25: error: flexible array member 'DHCPDG_T::options' not at end of 'struct DHCPMEM_T'
80 uint8_t options[]; // variable lenght options ends with the end opiton of 0xFF


88 In file included from ./DEIPcK/utility/deIP.h:404:0,
89 from ../../../include/DEIPcK.h:64,
90 from DEIPcK/DEIPcK.cpp:54:
91 ./DEIPcK/utility/HeapMgr.h:145:25: error: flexible array member 'SMGR_T::rgPages' not at end of 'struct DNSMEM_T'
92 PGID rgPages[];

However, looking at the code snippets:

#pragma pack(push,1)
typedef struct DHCPDG_T
{
uint8_t op; // BOOTREQUEST == 1, BOOTREPLY == 2
uint8_t htype; // always hwtypeEthernet == 1
uint8_t hlen; // length of the mac == 6
uint8_t hops; // usually 0
uint32_t xid; // random number
uint16_t secs; // sec sense start of BootP process, or 0
uint16_t flags; // broadcast flag, we arn't using, set to 0
IPv4 ciaddr; // client internet address
IPv4 yiaddr; // your internet address
IPv4 siaddr; // server internet address
IPv4 giaddr; // relay agent internet address, usually 0
uint8_t chaddr[16]; // hardware address... MAC
uint8_t sname[64]; // server name, almost always 0s
uint8_t file[128]; // file name, bootp record, almost always 0s
IPv4 MagicCookie; // always 99.130.83.99; not really an IP, but it is easy to make it as such (I think 0x63538263).
uint8_t options[]; // variable lenght options ends with the end opiton of 0xFF
} DHCPDG;
#pragma pack(pop)

and

typedef struct PMGR_T
{
DPMGRCopyToPage CopyToPage; // copy bytes to a page
DPMGRCopyFromPage CopyFromPage; // read bytes from a page
uint8_t pf2PerPage; // this is the power of 2 power factor, thus (1 << pfPerPage) MUST == cbPerPage.
uint8_t cPages; // max of 255 pages 0-254; 0x255 == PMGRFreePage is reserved
uint8_t cAlloc; // number of alloced pages
uint8_t cbAllocMap; // how many bytes are in the allocation map
uint8_t rgAllocMap[]; // A bit map of pages in use 1 = in use, 0 free
} PMGR;

// the stream manager is typically used internally by a socket,
// but can be used by anyone who follows the rules.
#define SMGRAtBegining 0x0000
#define SMGRAtEnding 0xFFFF


// the socket stream manager

typedef struct SMGR_T
{
PMGR * pPMGR; // a handle to the page manager; many streams may use the same page manager
uint32_t iStart; // linear start offset into the stream
uint32_t iEnd; // linear end offset into the stream
uint8_t cPages;
PGID rgPages[];
} SMGR;

 

In the rgPages case, we see the flexible arrays pass muster in the, rgAllocMap[] case, but fail in the, rgPages[] case.

The project is dead in the water until this problem is fixed. I am wondering if the is a solution or any work around.

Thanks in advance.

0 Kudos
Newbie ironkenichi
Newbie
256 Views
Registered: ‎09-27-2018

Re: flexible array member 'DHCPDG_T::options' not at end of 'struct DHCPMEM_T'

Has this issue been resolved with the latest version of Vivado (2019.1)? I am having similar issues with flexible arrays in DHCP.h and HeapMgr.h contained within the utility folder of DEIPcK. I am currently using Vivado 2018.3.

0 Kudos