[llvm-dev] status of msp430?

Vadzim Dambrouski via llvm-dev llvm-dev at lists.llvm.org
Sun Jun 17 07:11:14 PDT 2018


Tim is right, you need to have msp430-elf-gcc [1] installed in your /usr/bin
(don't ask me why it has to be /usr/bin, I don't know why clang can't just search your $PATH)
and you also need to set the target to `--target=msp430-elf` that way clang can find assembler
to produce the object files.

I can confirm that codegen in LLVM 6.0 release is working fine. There are some missing features
like low power modes support and there are some bugs, like [2] and [3] but you can work around them.

I am trying to keep this target running, but unfortunately I don't have much free time lately.


[1] http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/5_01_02_00/index_FDS.html
[2] http://lists.llvm.org/pipermail/llvm-dev/2018-May/123597.html
[3] https://bugs.llvm.org/show_bug.cgi?id=37618

> On Jun 17, 2018, at 10:42, Tim Northover via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> Hi Andrew,
> On Sun, 17 Jun 2018 at 02:47, Andrew Kelley via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
>> I have a user asking about msp430 support for Zig. When they try to target msp430, this error is triggered:
>>        if (target_machine->addPassesToEmitFile(MPM, dest, ft)) {
>>            *error_message = strdup("TargetMachine can't emit a file of this type");
>>            return true;
>>        }
> It looks like there's no support for emitting object files in MSP430
> (and so no JIT).
>> $ clang -c add.c -target msp430-unknown
>> /run/user/1000/add-91f569.s: Assembler messages:
>> /run/user/1000/add-91f569.s:7: Error: no such instruction: `push.w r4'
> This is for the same reason as above. Because Clang can't emit an
> object file it's emitting textual assembly and calling the host's
> assembler on it. Obviously that doesn't go well when the host's
> assembler is expecting x86 input.
>> Is msp430 supported?
> I think it's a bit of a grey area. It's had about 2 patches in the
> last year so it's not exactly active, and I don't know of anyone doing
> runtime tests to make sure regressions don't creep in. But it's a
> fairly simple backend so chances are it'll keep working anyway.
> Cheers.
> Tim.
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

More information about the llvm-dev mailing list