custom uClibc toolchain for imx28 and compiler flags question

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

custom uClibc toolchain for imx28 and compiler flags question

1,125 Views
jordifarres
Contributor III

Hello,

I’ve build a custom toolchain using crosstool-ng with uClibc for imx28. Work fine excep for some c++ aplications that crash into a segment fault.

I suspect that I’m missing some compiler flag that lead to a bad eabi link.

The flags that I’m using are:

-march=armv5te

-mtune=arm9tdmi

-mfloat-abi=soft

Are they correct?

Am I omitting any other crucial flag?

I find that -mtune could be also arm926ej-s. Which one is correct for imx28?

Thanks in advance

jordi


Labels (2)
Tags (1)
0 Kudos
3 Replies

724 Views
esben_haabendal
Contributor I

i.MX28 is an ARM926EJ-S, which should be the correct mtune setting, and not arm9tdmi.

724 Views
OtavioSalvador
Senior Contributor II

How did you build the toolchain? I've build custom toolchains for it using Yocto and didn't have these problems.

0 Kudos

724 Views
jordifarres
Contributor III

Hi Octavio,

I have not yet worked with yocto

I've used cosstol-ng (from http://crosstool-ng.org/) as explained in imx28 bsp documentation gcc4.4.4_multilib_toolchain_release_note.pdf. I’ve configured for uClibc, disabled multilib mode, and added flags of above...

The strange thing is that everything works fine (kernel, busybox …) except for some c++ applications that cause next execution error:

terminate called after throwing an instance of 'std::bad_alloc'

what():  std::bad_alloc

Aborted

And sometimes segment fault


0 Kudos