[LLVMdev] Generate code for ARM Cortex m0, m3, and m4.

Amara Emerson amara.emerson at gmail.com
Sat Oct 12 15:00:29 PDT 2013


Hi Jan,

For Cortex-M0, you should probably use the armv6m string in the target
triple. For M3 and M4 you need to use the thumbv7m arch string, -mthumb
won't be necessary.

Amara


On 11 October 2013 19:23, Jan Hoogerbrugge <
jan.hoogerbrugge at biface-tools.com> wrote:

> Hi,
>
> I am trying to cross compile code for ARM Cortex m0, m3, and m4.
>
> For m0, I use:
>
>   -target armv6--eabi -mcpu=cortex-m0
>
> That seems to work. For m3 and m4, I use the following which does not work
> (fatal error: error in backend: CPU: 'cortex-m3' does not support ARM
> mode):
>
>  -target armv7m--eabi -mcpu=cortex-m3
>
> and
>
>  -target armv7em--eabi -mcpu=cortex-m4
>
> Who can help me with the right command line arguments for m3 and m4?
>
> Thanks,
> Jan
>
>
> ______________________________**_________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/**mailman/listinfo/llvmdev<http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131012/5872a4c4/attachment.html>


More information about the llvm-dev mailing list