Menu

#112 Clang/LLVM support for Cortex M0

v1.0 (example)
closed
nobody
None
8
2020-02-25
2015-08-15
Peter Green
No

Hi,

I tried to compile the GCC port for the Cortex M0 (LPC11c14) with a the Clang/LLVM compiler under Crossworks.

In FreeRTOSV8.1.2\FreeRTOSV8.1.2\FreeRTOS\Source\portable\GCC\ARM_CM0\port.c
I got several times the error "instruction requires: arm-mode" on add and sub assembler instructions with immediates.

I was able to fix compatible with gcc and clang it by adding #ifdef clang

ifdef clang

" adds r0, #16 \n" / Move to the high registers. /

else

" add r0, r0, #16 \n" / Move to the high registers. /

endif

So i want to suggest this to be added to the portable library.

Please find the modified file attached.

Best regard

1 Attachments

Discussion

  • Richard Barry

    Richard Barry - 2015-08-16

    This does not look like a bug in existing code, as we don't provide any clang demos. Please open an identical ticket in the feature request tracker then I will close this bug report.

     
  • Richard Barry

    Richard Barry - 2020-02-25
    • status: open --> closed
     
  • Richard Barry

    Richard Barry - 2020-02-25

    Now captured by a separate more generic 'ARM Clang' backlog item.

     

Log in to post a comment.