Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

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?

3 Replies