This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: building for Cortex M3


Allen,
All,

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?
[--SNIP--]
> 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...

Regards,
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  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
`------------------------------^-------^------------------^--------------------'



--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]