Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

Why cross compile fails ?

Altera_Forum
Honored Contributor II
1,170 Views

hello All once again.. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/biggrin.gif  

 

 

as i said before, i am making an MPEG-2 decoder on uClinux .. i almost 

finished the VGA controller using some external circuits. 

 

the S/w part, i use the code provided from mpeg.org .. it is tracking the standard 

step by step with almost no optimization. 

 

i found a much better code here: libmpeg2 

http://libmpeg2.sourceforge.net/files/mpeg2dec-0.4.0.tar.gz (http://libmpeg2.sourceforge.net/files/mpeg2dec-0.4.0.tar.gz

 

this library come with 6 sample programs (in doc folder) 

i want to compile the library and use sample6 

 

it worked on my PC giving super results.. 

 

but for many days, i cant compile it for nios using your prebuilt binary cross compiler <http://nioswiki.jot.com/WikiHome/OperatingSystems/BinaryToolchain

it gives weird errors even when i disable cpu accelerate options when doing " ./config " 

 

Please guys , i know i ask a lot .. but beleive me , i tried so hard,, 

 

I ask you to try to compile the code .. if you succeed, pls mail me the executable sample6 

or simply tell me what was your trick ,, 

 

 

Sorry for interrupting you ,, but i really need you ! 

 

Thanks for everything. 

 

Yours, 

Tarek 

tarekeldeeb@msn.com
0 Kudos
8 Replies
Altera_Forum
Honored Contributor II
329 Views

I forked to another thread, so that it may catch other interested people. 

http://forum.niosforum.com/forum/index.php?showtopic=4313 (http://forum.niosforum.com/forum/index.php?showtopic=4313)
0 Kudos
Altera_Forum
Honored Contributor II
329 Views

 

--- Quote Start ---  

originally posted by hippo@Jul 12 2006, 09:30 AM 

i forked to another thread, so that it may catch other interested people. 

http://forum.niosforum.com/forum/index.php?showtopic=4313 (http://forum.niosforum.com/forum/index.php?showtopic=4313

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=16820) 

--- quote end ---  

 

--- Quote End ---  

 

 

 

THANKS A LOOOOOOOT http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/biggrin.gif  

 

 

another point to Hippo the Great http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/laugh.gif
0 Kudos
Altera_Forum
Honored Contributor II
329 Views

 

--- Quote Start ---  

originally posted by tarekeldeeb+jul 12 2006, 12:40 pm--><div class='quotetop'>quote (tarekeldeeb @ jul 12 2006, 12:40 pm)</div> 

--- quote start ---  

<!--quotebegin-hippo@Jul 12 2006, 09:30 AM 

i forked to another thread, so that it may catch other interested people. 

http://forum.niosforum.com/forum/index.php?showtopic=4313 (http://forum.niosforum.com/forum/index.php?showtopic=4313

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=16820) 

--- quote end ---  

 

--- Quote End ---  

 

 

 

THANKS A LOOOOOOOT http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/biggrin.gif  

 

 

another point to Hippo the Great http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/laugh.gif  

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=16825)</div> 

[/b] 

--- Quote End ---  

 

 

 

sorry .. but you forgot something !! 

 

http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/huh.gif http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/huh.gif  

 

the elf2flt flag .. the executable cannot be run on the uClinux.. i tried it ,, 

please release " version 3 " of mpeg2dec .. with this flag 

 

http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/rolleyes.gif Good work ,, 

 

Thanks http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/biggrin.gif
0 Kudos
Altera_Forum
Honored Contributor II
329 Views

the wiki is udpated to ver 3, as your wish.

0 Kudos
Altera_Forum
Honored Contributor II
329 Views

 

--- Quote Start ---  

originally posted by hippo@Jul 12 2006, 04:10 PM 

the wiki is udpated to ver 3, as your wish. 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=16835) 

--- quote end ---  

 

--- Quote End ---  

 

 

thanks .. 

 

i tested the decoded frames .. they had some error blocks .. both the rgb (ppm-format) and the yuv fraes had these errors... 

 

the same code was tested on PC ..was working perfectly.. 

 

the code uses <inttypes.h> <stdlib.h><stdio.h> .. are they correctly used by the compiler.. ? 

 

i think .. maybe .. the datatypes differ from PC to uClinux .. this can make some data cropping producing the error blocks in the frames .. 

 

i dont know .. what do u say ? 

 

thanks for all http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/biggrin.gif
0 Kudos
Altera_Forum
Honored Contributor II
329 Views

you may check the configure result at the end of config.log . 

or try change CFLAGS to -O2 or add others .
0 Kudos
Altera_Forum
Honored Contributor II
329 Views

i tried to insert the " -02" flag .. same results..  

 

did you try to run the mpeg2dec on your board ? 

 

the frames still contain errors. 

 

can you tell me the size of the " uint8_t " for example (under uClinux )?? 

 

is it equivalent to that on linux ? 

 

i checked (more than once) the codes output on the PC ... the frames are decoded correctly..  

 

Also i noticed that the error frames have weird black and green blocks.. due to error from the IDCT process.. also there is an error in the motion compensation. 

 

what i am trying to say .. the software code is good .. but something else is wrong 

 

http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/blink.gif
0 Kudos
Altera_Forum
Honored Contributor II
329 Views

uint8_t should be 1 byte.  

 

you may need to check double float math, it may be different from that of x86. 

does it use double float? 

 

another common problem in RISC arch, the long word, 4 bytes access to unaligned address is different from x86. it does not wrap up in Nios2. It will cause execption on MIPS. 

 

I don&#39;t have video port on my boards. I didn&#39;t work on video, too. I can&#39;t help you on this.
0 Kudos
Reply