building for Cortex M3

Mon Oct 19 21:58:00 GMT 2009


On Monday 19 October 2009 23:10:11 Yann E. MORIN wrote:
> On Monday 19 October 2009 22:51:46 Allen Curtis wrote:
> > I would like to build a toolchain for the Cortex M3. The sample  
> > configurations include a Cortex A8. Is it as simple as changing the A8  
> > references in .config to M3?
> If all goes well, you should set the following:
> CT_ARCH_ARCH: armv7-m     (I'm not so sure about that one, if it fails,
>                            leave the field empty)
> CT_ARCH_CPU : cortex-m3
> CT_ARCH_TUNE: cortex-m3

OK, I just tested, it does not work. Error message is:
cc1: error: target CPU does not support ARM mode

Both gcc and glibc complain, although the gcc build does not stop, and
happily goes on, even if the newly-built gcc is broken. Then glibc breaks
becasue the compiler does not support ARM mode...

So we have to find a way to convince gcc that indeed the target CPU is a
Cortex-M3, so that it is in THUMB2 mode (./configure --with-mode=thumb),
and then to convince glibc that, yes, the compiler is working (using
CT_LIBC_GLIBC_EXTRA_CFLAGS=-mthumb). Or something along the lines...
We'd also need to tweak off thumb-interworking: interworking is irelevant
as the CPU has no ARM mode, and therefore can not switch THUMB <-> ARM.

Well... It still breaks... I will look into that later, now is time
to got to bed... In the meantime, dig the archives...

Yann E. MORIN.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

For unsubscribe information see

More information about the crossgcc mailing list