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 shakeelsultan
Observer
4,510 Views
Registered: ‎07-01-2008

problems in generating .elf file for Dhrystone benchmark

Well, I'm trying to profile Dhrystone benchmark using EDK 10.1, I'm using Microblaze softcore and I need to generate the .elf file through Xilinx Plateform studio, I'm trying to follow the standard procedure of software development given in Plateform studio's help but as soon as I bulid Dhrystone's application after generating linker script I get the following error:

 

At Local date and time: Wed Dec 03 18:32:17 2008

 xbash -q -c "cd /cygdrive/c/uclinux-xupv2p/; /usr/bin/make -f system.make my_app_program; exit;" started...

mb-gcc -O2 /cygdrive/c/uclinux-xupv2p/dhrystone_application/dhry_1.c /cygdrive/c/uclinux-xupv2p/dhrystone_application/dhry_2.c  -o my_app/executable.elf \

   -mno-xl-soft-mul -mcpu=v4.00.a  -Wl,-T -Wl,/cygdrive/c/uclinux-xupv2p/my_app/my_app_linker_script.ld  -g    -I./microblaze_0/include/  -Idhrystone_application/  -L./microblaze_0/lib/  \

-pg,-WI,-Lc  

/cygdrive/c/uclinux-xupv2p/dhrystone_application/dhry_1.c:31: warning: conflicting types for built-in function 'malloc'

/cygdrive/c/uclinux-xupv2p/dhrystone_application/dhry_1.c:48: error: conflicting types for 'times'

/cygdrive/c/EDK/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/times.h:23: error: previous declaration of 'times' was here

/cygdrive/c/uclinux-xupv2p/dhrystone_application/dhry_1.c: In function 'main':

/cygdrive/c/uclinux-xupv2p/dhrystone_application/dhry_1.c:94: warning: incompatible implicit declaration of built-in function 'strcpy'

Done!

 

Kindly help me out sort this problem out, thanks in advance... 

0 Kudos
3 Replies
Highlighted
Newbie yumaikou
Newbie
3,198 Views
Registered: ‎01-22-2012

Re: problems in generating .elf file for Dhrystone benchmark

Conflicting definitions of various stuff. The joys of software.

For this:

/cygdrive/c/uclinux-xupv2p/dhrystone_application/dhry_1.c:31: warning: conflicting types for built-in function 'malloc'

change the type of malloc to match some other definition:

/*extern char     *malloc ();*/
  extern void     *malloc ();
The other problems I get too (as do many) and this and similar questions are asked everywhere, unfortunately, answered nowhere (that I could find).

I get that 'times' is defined in two different ways in dhry_1.c and in <path>/times.h, but how to fix that, who knows...

Cheers,

M.

Tags (1)
0 Kudos
Newbie yumaikou
Newbie
3,197 Views
Registered: ‎01-22-2012

Re: problems in generating .elf file for Dhrystone benchmark

Simple, as it turns out:

/* extern  int     times ();*/
   extern  clock_t times ();
Compiles and seems to work...

Cheers,

M.

0 Kudos
Visitor dongfongsyu
Visitor
2,178 Views
Registered: ‎02-14-2015

Re: problems in generating .elf file for Dhrystone benchmark

Hi there,
I have replaced int with clock_t as you did, but a new error message pop up which is "undefined reference to '_times' ." Are you in the same situation? Any help would be appreciated!
0 Kudos