[LLVMbugs] [Bug 8485] New: error: unknown target CPU 'cortex-m3'

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Oct 27 12:11:41 PDT 2010


           Summary: error: unknown target CPU 'cortex-m3'
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: mail+llvm at t-kindler.de
                CC: llvmbugs at cs.uiuc.edu


I just wanted to give clang/llvm a try to compile for a small embedded STM32
ARM Cortex-M3 target. I'm working from a fresh cygwin install on Windows 7.

I did everything as listed on the clang getting started page:

$ svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
$ cd llvm/tools
$ svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
$ cd ..

$ ./configure --enable-optimized --disable-assertions

$ time make -j4
real    16m55.481s
user    40m12.278s
sys     7m13.942s

$ make install

$ clang --version
clang version 2.9 (trunk 117454)
Target: i386-pc-cygwin
Thread model: posix

Everything's fine so far. I've tried a plain vanilla hello-world:

#incude <stdio.h>

int main()
    printf("Hello World!\n");
    return 1;

Compiling for armv7 (== cortex-a8 ?) seems to work:

$ clang -ccc-host-triple armv7-none-eabi -S -o - foo.c
clang: warning: unknown platform, assuming -mfloat-abi=soft
        .syntax unified
        .cpu cortex-a8
        sub     sp, sp, #8
        str     lr, [sp, #4]
        str     r11, [sp]
        mov     r11, sp

But compiling for arm7m (the STM32 is a Cortex-M3) fails:

$ clang -ccc-host-triple armv7m-none-eabi -S -o - foo.c
clang: warning: unknown platform, assuming -mfloat-abi=soft
error: unknown target CPU 'cortex-m3'

What did I do wrong?

best regards,
Thomas Kindler

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list