Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
731 Views

Recompiling mmu toolchain

NOTE: I actually posted this in the IP and Dev Kit forum first but I eventually realized this toolchain is not the standard FPGA dev tool and I might get better visibility over here.  

 

I'm using nios2-linux-20100621.tar with my 3C120 Dev Board (ghrd.sof) and my statically compiled application is getting a segfault when I use the atan2 function in the math library from the binary mm toolchain. 

 

root:/tmp> ./atan2_test 0 1 

y = 0.000000 

x = 1.000000 

fabs (0.000000 / 1.000000) = 0.000000 

atan (0.000000 / 1.000000) = 0.000000 

atan (fabs(0.000000 / 1.000000)) = 0.000000 

atan2 (0.000000, 1.000000) = 0.000000 

root:/tmp> ./atan2_test 1 -1 

y = 1.000000 

x = -1.000000 

fabs (1.000000 / -1.000000) = 1.000000 

atan (1.000000 / -1.000000) = -0.785398 

atan (fabs(1.000000 / -1.000000)) = 0.785398 

SEGV 

 

Although the atan function seems to work, it appears that the atan2 function dies trying to call it. 

 

To get past this, I've been reading all the threads about the mmu toolchain and it does not appear that anyone has ever successfully recompiled the mmu toolchain. Is this the case? I've seen a few notes that a common toolchain is coming but they were old (2009?). Can anyone help point me to a resource on how to rebuild the mmu toolchain?
0 Kudos
3 Replies
Altera_Forum
Honored Contributor I
46 Views

See here: 

http://alterawiki.com/wiki/build_the_gcc4_toolchain 

 

I have the build working. There is actually a slightly newer version I found from CodeSourcery that I've been using. At some point I started working on importing it into git, but that got put off.
Altera_Forum
Honored Contributor I
46 Views

I don't seem to be able to find the niosftp site. Is there a mirror?

Altera_Forum
Honored Contributor I
46 Views

Hi Gregdowd, 

 

the niosftp.com server does not exist anymore. I don't know if it will become available again.  

But you can use the following ftp site for downloading toolchain and linux distribution: 

 

Toolchain: 

ftp://sopc.et.ntust.edu.tw/pub/gnutools/ (ftp://sopc.et.ntust.edu.tw/pub/

 

Linux: 

ftp://sopc.et.ntust.edu.tw/pub/linux/ 

 

 

Urmel
Reply