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: 
Observer sparks333
Observer
6,755 Views
Registered: ‎10-05-2012

Error with Standard Libaries in Zynq

Hello!

 

I am attempting to use a stringstream object in my C++ project, but every time I use the str() method, I get a bunch of errors:

 

f:\xilinx\sdk\2014.1\gnu\arm\nt\arm-xilinx-eabi\include\c++\4.8.1\sstream:126:11: error: macro "str" requires 2 arguments, but only 1 given

 

I traced the issue back down to xpseudo_asm_gcc.h, where it defines str(arg, arg) as an assembly instruction. This is obviously a bit of an issue - it is using the assembly define instead of the string call, which is all sorts of not okay. I feel that I must be doing something very wrong, but for the life of me I can't figure out what. I tried excluding xpseudo_asm_gcc.h, but it is needed for interrupt handling. Any hints anyone can provide would be appreciated.

 

-Sparks333

0 Kudos
11 Replies
Observer sparks333
Observer
6,713 Views
Registered: ‎10-05-2012

Re: Error with Standard Libaries in Zynq

Bump

0 Kudos
Scholar sampatd
Scholar
6,705 Views
Registered: ‎09-05-2011

Re: Error with Standard Libaries in Zynq

Can you attach your SDK workspace?

I will take a look at it.
0 Kudos
Observer sparks333
Observer
6,698 Views
Registered: ‎10-05-2012

Re: Error with Standard Libaries in Zynq

Hello!

 

Thanks for helping me out - I really appreciate it.

 

Attached is an example application that has the same issue as my primary program - the main program is far too large to attach. I apologize for the size, but in the interest of completeness, I wanted to give you all of the generated files as well.

 

A couple things of interest: I first tried to build a simple application with just a stringstream converted to a string via stringstream::str(), but that worked just fine. I increased the complexity by starting with the base lwip-echo example and adding the stringstream test, and that threw the requisite error.

 

Please let me know if you need any additional information.

 

-Sparks (Dane)

0 Kudos
Observer sparks333
Observer
6,693 Views
Registered: ‎10-05-2012

Re: Error with Standard Libaries in Zynq

Another note - it's hackish, but I got the application working by undefining str in the preprocessor before calling stringstream::str. It's a solution, but I can easily see it creating serious issues if used without understanding the full implications of what the str(arg, arg) macro does within the pseudo_asm_gcc.h file.

0 Kudos
Xilinx Employee
Xilinx Employee
6,679 Views
Registered: ‎08-02-2007

Re: Error with Standard Libaries in Zynq

Hi,

 

There is a custom driver by name e_step_top that is missing in your BSP. I cannot compile the design without the driver.

 

Also please post the error message that you are seeing.

 

 

-- Hem

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos
Observer sparks333
Observer
6,673 Views
Registered: ‎10-05-2012

Re: Error with Standard Libaries in Zynq

Apologies - that's a custom driver. I doubt it's the issue, but on the off-chance it is, it is attached.

 

Dane

0 Kudos
Observer sparks333
Observer
6,672 Views
Registered: ‎10-05-2012

Re: Error with Standard Libaries in Zynq

Also, the exact error verbatim is in the original post.
0 Kudos
Visitor eactor
Visitor
4,165 Views
Registered: ‎06-27-2013

Re: Error with Standard Libaries in Zynq

Any results?

I have the same problem with str() macro

0 Kudos
Observer sparks333
Observer
4,161 Views
Registered: ‎10-05-2012

Re: Error with Standard Libaries in Zynq

I kinda hacked my way around it - in the file where stringstream is required, stick this at the top

 

#undef str

 

Sad, but appears to work.

 

- Sparks

0 Kudos
1,785 Views
Registered: ‎02-02-2015

Re: Error with Standard Libaries in Zynq

Any results?

I have the same problem with str() macro

0 Kudos
Highlighted
Adventurer
Adventurer
1,580 Views
Registered: ‎09-19-2014

Re: Error with Standard Libaries in Zynq

This is addressed in this support answer.

http://www.xilinx.com/support/answers/64193.html

 

It unfortunately is still a problem in SDK 2015.4 / GCC 4.9.2.

0 Kudos