This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


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: Cortex M3 Support


On 30 January 2011 04:51, Neil MacMunn <nmacmunn@gmail.com> wrote:
> Hi Everyone,
>
> I'm trying to build libffi for a Luminary Cortex-M3 processor. Has
> anyone tried this? I've installed arm-bare_newlib_cortex_m3_
> nommu-eabi toolchain using crosstool-ng and am getting the following
> error message:
>
> Building file: ../source/ffi/sysv.S
> Invoking: GCC Assembler
> arm-bare_newlib_cortex_m3_nommu-eabi-gcc -Wa,-mthumb-interwork
> -I"/home/neil/m3projects/robovero/firmware/include"
> -o"source/ffi/sysv.o" "../source/ffi/sysv.S"
> ../source/ffi/sysv.S: Assembler messages:
> ../source/ffi/sysv.S:145: Error: selected processor does not support ARM opcodes
> ../source/ffi/sysv.S:147: Error: attempt to use an ARM instruction on
> a Thumb-only processor -- `stmfd sp!,{r0-r3,fp,lr}'
>
> I've tried passing various command line options to the assembler to no
> avail. I have little experience building toolchains so I'm unsure of
> whether I did that wrong of if libffi simply doesn't support thumb2.

>From a quick glance at it, it's going to need some tweaking to work for Thumb2.
The macro ARM_FUNC_START ends up always putting the assembler in arm mode,
hence the errors you got.
My gut feeling is that it would probably need a bit more work than
just changing that
to assemble it in thumb2 mode.

Dave


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