cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
vidyut
Explorer
Explorer
10,304 Views
Registered: ‎11-16-2012

problem in running c++ application on zedboard!!

Jump to solution

Dear colleague,

 

I have written simple hallo_world program in c++  sdk and trying to execute on zedboard which is running linux----for unknow reason i cannot do it....no error is seen...!!! What am I doing wrong?

 

I will glad if you could help me here!!

regards

 

 

0 Kudos
1 Solution

Accepted Solutions
radheys
Xilinx Employee
Xilinx Employee
17,988 Views
Registered: ‎02-20-2014

Hi,

 

Please take a look at this post:

http://forums.xilinx.com/t5/Embedded-Linux/arm-xilinx-linux-gnueabi-g/td-p/317537

 

You have to copy libstdc++.so into target /lib directory.

 

Additonally if you dont want to edit the ramdisk , copy libc directory to the SD card and set LD_LIBRARY_PATH before running the application.

 

export  LD_LIBRARY_PATH=/mnt/libc:$LD_LIBRARY_PATH

./hello_world

 

Hope it works.

 

-Radhey

 

View solution in original post

0 Kudos
9 Replies
radheys
Xilinx Employee
Xilinx Employee
10,274 Views
Registered: ‎02-20-2014

I assume compiler invoked for your project is :

arm-xilinx-linux-gnueabi-g++

 

Which tool version are you using?

Have you done any modification to ramdisk image?

 

Check out zynq release images @http://www.wiki.xilinx.com/Zynq+Releases

 

Hope it helps.

-Radhey

 

 

0 Kudos
vidyut
Explorer
Explorer
10,261 Views
Registered: ‎11-16-2012

dear Radhey

 

Many thanks for your reply...

for your information  I am pasting the copy of commnad invoked by sdk14.4 

'Building file: ../src/main.cc'
'Invoking: ARM g++ compiler'
arm-xilinx-eabi-g++ -Wall -O0 -g3 -c -fmessage-length=0 -MT"src/main.o" -I../../bitset1_bsp/ps7_cortexa9_0/include -MMD -MP -MF"src/main.d" -MT"src/main.d" -o "src/main.o" "../src/main.cc"
'Finished building: ../src/main.cc'
' '
'Building target: bitset1.elf'
'Invoking: ARM g++ linker'
arm-xilinx-eabi-g++ -Wl,-T -Wl,../src/lscript.ld -L../../bitset1_bsp/ps7_cortexa9_0/lib -o "bitset1.elf" ./src/main.o -Wl,--start-group,-lxil,-lgcc,-lc,-lstdc++,--end-group
'Finished building target: bitset1.elf'
' '
'Invoking: ARM Print Size'
arm-xilinx-eabi-size bitset1.elf |tee "bitset1.elf.size"
text data bss dec hex filename
476372 2556 31368 510296 7c958 bitset1.elf
'Finished building: bitset1.elf.size'

 

==============================================================

 

I am using latest release of zync Zynq 2014.4 Release (latest) 

 

Regards

0 Kudos
vidyut
Explorer
Explorer
10,260 Views
Registered: ‎11-16-2012

Vivado 2014.4.1

0 Kudos
radheys
Xilinx Employee
Xilinx Employee
10,235 Views
Registered: ‎02-20-2014

Hi ,

 

From your SDK console log it appears that you are creating/compiling a standalone c++ application.

 

Here is the option for creating c++ application for Linux platform.

File -> Application project

In OS Platform menu - > select Linux and then build the application.

 

Hope it helps.

 

-Radhey

0 Kudos
vidyut
Explorer
Explorer
10,222 Views
Registered: ‎11-16-2012

dear Radhey,

 

Many thanks for your message!

 

my c++ application for standalone version is working fine.. problem is eveident when i try on my linux machine.

 

I have made the project using OS:linux...but problem is something else !!

 

something related to libstdc++.so.6. I saw many post on this forum which are marked solved for not working any more for me...I think this is a kind of problem which is very common and need to be fixed.

 

I copied libstdc++.so.6 from my SDK/2014.4/lib/lnx32.o/  to ramdisk ...but problem still persist. 

 

I will gratful if you could help me here!! 

 

0 Kudos
radheys
Xilinx Employee
Xilinx Employee
17,989 Views
Registered: ‎02-20-2014

Hi,

 

Please take a look at this post:

http://forums.xilinx.com/t5/Embedded-Linux/arm-xilinx-linux-gnueabi-g/td-p/317537

 

You have to copy libstdc++.so into target /lib directory.

 

Additonally if you dont want to edit the ramdisk , copy libc directory to the SD card and set LD_LIBRARY_PATH before running the application.

 

export  LD_LIBRARY_PATH=/mnt/libc:$LD_LIBRARY_PATH

./hello_world

 

Hope it works.

 

-Radhey

 

View solution in original post

0 Kudos
vidyut
Explorer
Explorer
10,182 Views
Registered: ‎11-16-2012

Dear Radhey!!

 

Many thank for the files!! In

 

it is really fixed  now !!!

 

I will mention how I actually did it.

 

unzip the file into the /lib/ folder of  ramdisk (in such a way that it still recognise that file are linked, sometime simply copying does not show it!!)

see this  

http://forums.xilinx.com/t5/Embedded-Linux/arm-xilinx-linux-gnueabi-g/td-p/317537 

and re-create your ramdisk.

 

Done!!

 

Many thanks for these files and your concern!!!

 

Many Regards

0 Kudos
radheys
Xilinx Employee
Xilinx Employee
10,174 Views
Registered: ‎02-20-2014

Good to hear that issue is resolved!!!

 

-Radhey

0 Kudos
vidyut
Explorer
Explorer
10,164 Views
Registered: ‎11-16-2012

Dear radhey!!

 

I would say to please update the new release image with these files. As after modification you neeed to update your u-boot also.

 

I would suggest please update the new release with these files.

0 Kudos