This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Compile SDK11 with ARM Compiler Version 6

I would like to use the latest ARM Compiler Version 6 (armclang) because I need some features of the C++11 language.

Is it possible to use the latest ARM Compiler Version 6 to compile the SDK 11 ? Which flags should we use to be compatible with all macros currently available for GCC and armcc ?

In future SDK releases, will this compiler be officially supported ?

Parents
  • is armclang related to clang, as in the LLVM compiler? If so, it's very likely not going to work at all. clang/llvm fails to generate proper softdevice calls in release mode for reasons I and others have gone into at length on other threads. You can't currently use clang to compile so if armclang is based on LLVM, give up.

  • that would be very welcome. I have actually done this work some time ago, it was just too manual to keep up but I'm happy to share anything I still have if you want it. It's going to be a one-time pain thing to come up with a version of SVCALL which works, all my other testing with clang showed up no other issues than that although any use of __asm() probably needs auditing because inline assembler is treated quite differently from gcc, any other assembler in .s files, will be fine.

    Segger Embedded Studio also has a clang option, so that's another product people are going to see a clang option and try it out.

    clang is a nice compiler, it can do some very clever optimisations although it's better at making fast code than small code in my limited experience. These days with the wonderful amount of flash we get to play with it's less of an issue.

Reply
  • that would be very welcome. I have actually done this work some time ago, it was just too manual to keep up but I'm happy to share anything I still have if you want it. It's going to be a one-time pain thing to come up with a version of SVCALL which works, all my other testing with clang showed up no other issues than that although any use of __asm() probably needs auditing because inline assembler is treated quite differently from gcc, any other assembler in .s files, will be fine.

    Segger Embedded Studio also has a clang option, so that's another product people are going to see a clang option and try it out.

    clang is a nice compiler, it can do some very clever optimisations although it's better at making fast code than small code in my limited experience. These days with the wonderful amount of flash we get to play with it's less of an issue.

Children
No Data
Related