[cfe-commits] [PATCH] Add support for cortex-m0 cpu

James Orr jorr at apple.com
Mon Mar 21 15:34:22 PDT 2011


Thanks. Now it works.

On Mar 21, 2011, at 3:02 PM, Bob Wilson wrote:

> No problem.  Committed as svn r128029.
> 
> On Mar 21, 2011, at 2:30 PM, James Orr wrote:
> 
>> 
>> On Mar 21, 2011, at 1:48 PM, Bob Wilson wrote:
>> 
>>> 
>>> On Mar 18, 2011, at 2:06 AM, James Orr wrote:
>>> 
>>>> On Mar 17, 2011, at 5:04 PM, James Orr wrote:
>>>> 
>>>>> Hi,
>>>>> 
>>>>> Currently clang supports the cortex-m3 cpu and gcc-llvm supports this and cortex-m0. In order to maintain parity between clang and gcc-llvm this patch adds support for the cortex-m0.
>>>>> 
>>>>> Was able to compile firmware and it ran successfully.
>>>>> 
>>>>> -arch armv6 -mcpu=cortex-m0 -mthumb
>>>>> 
>>>>> -James
>>>>> 
>>>> 
>>>> The previous patch was sending the triple "thumb-apple-darwin10.0.0".
>>>> 
>>>> Updated it to use: "thumbv6m-apple-darwin10.0.0" for Cortex-M0 and "thumbv7m-apple-darwin10.0.0" for Cortex-M3.
>>>> 
>>>> These are the same arch part of the triples as used by llvm-gcc.
>>> 
>>> Thanks, James.  I commited your patch in r128018.
>> 
>> Thanks for checking it in but I noticed, when I updated, that I missed a file when I created the second diff:
>> 
>> Index: lib/Basic/Targets.cpp
>> ===================================================================
>> --- lib/Basic/Targets.cpp	(revision 128019)
>> +++ lib/Basic/Targets.cpp	(working copy)
>> @@ -1840,6 +1840,7 @@
>>      .Cases("arm1156t2-s", "arm1156t2f-s", "6T2")
>>      .Cases("cortex-a8", "cortex-a9", "7A")
>>      .Case("cortex-m3", "7M")
>> +      .Case("cortex-m0", "6M")
>>      .Default(0);
>>  }
>>  virtual bool setCPU(const std::string &Name) {
>> 
>> Sorry for the trouble.
>> 
>> -James
> 




More information about the cfe-commits mailing list