Questions tagged [armclang]

Question related to ARM Compiler 6, which is based on LLVM.

armclang is LLVM based C/C++ compiler for ARM architecture, provided by ARM Ltd. This compiler is part of ARM Compiler 6 tool-chain suite.

More information can be found at http://ds.arm.com/ds-5/build/arm-compiler-6/

32 questions
0
votes
0 answers

Compile embedded C code project using ARMCompiler6 in WSL

I'm attempting to migrate the workflow for an ARM embedded C code project from Cygwin to WSL and PowerShell. I'm using ARM Development Studio 2019.0-1 and its ARMCompiler6.12.1. I setup WSL, moved to my project dir, switched to bash, ran make, and…
M99
  • 1
  • 1
0
votes
1 answer

arm-gcc compiled code is bigger than on armclang

I've generated the same project on STM32CubeMx and added the same code uint8_t* data = new uint8_t[16] HAL_Delay and HAL_GPIO_TogglePin in infinite loop for the Keil MDK project and as Makefile project. In both main.c is changed to main.cpp The…
lazba
  • 129
  • 9
0
votes
0 answers

Why can't Compiler Explorer find ?

I am trying to compile a C module that includes math.h on Compiler Explorer, targeted at the ARM architecture. The compiler complains that it cannot find math.h regardless of the armclang version I am using. How can I get CE to find and include…
ysap
  • 7,723
  • 7
  • 59
  • 122
0
votes
0 answers

How to get the ARM compiler to use the STM instruction instead of STR?

Compiling a C function that reads a memory location repeatedly and writes into a memory buffer, I am trying to get the compiler to generate code using STM instruction instead of multiple STRs. The target CPU is Cortex-M0+, which does not have an…
ysap
  • 7,723
  • 7
  • 59
  • 122
0
votes
0 answers

armclang:error: couldn't allocate output register for constraint 'w', but pass with GCC

I have an inline assembler code, and passed with arm-none-eabi-gcc, compiled error with armclang. Here is the sample code: //wrong-reg.c #include #include #define __asm__ asm volatile float __vabs(const float a) { …
Yingchun
  • 303
  • 4
  • 13
0
votes
1 answer

What is the difference between armcc and armclang?

armcc and armclang are the compilers for embedded C and C++ code. Recently, armclang has been gaining popularity as an alternative compiler. What is the difference between armcc and armclang? Is there an advantage to using armclang?
SoyM
  • 3
  • 4
0
votes
0 answers

GCC equivalent of armclang --target=aarch64-arm-none-eabi compiler option

Hi I am trying to find out the GCC equivalent of armclang compiler option --target=aarch64-arm-none-eabi which instructs the compiler to generate A64 instructions?
arijit
  • 63
  • 6
0
votes
0 answers

Linking static library compiled with ARMCLANG v6 with GNU gcc linker

I have small static library compiled with latest ARM compiler ARMCLANG v6. Now I have small application that uses this library. I am developing this application in Segger Embedded Studio to debug on Atmel SAM3x8e microcontroller. I am trying to link…
Alex
  • 1
0
votes
1 answer

Does armclang saves all needed register on stack with attribute("IRQ")?

I'm working with Keil ARMCompiler 6.15 (armclang.exe) and I'm in doubt of the correctness of the generated assembler code. It seems to me that the attribute 'interrupt("IRQ")' is ignored. For me r1 and r2 should be saved on the stack, too. When I…
0
votes
1 answer

Is it possible to prevent optimization from a single translation unit, or part of it?

In a project that includes dozens of modules, we have O1 as the default debug optimization level. Sometimes, I need a lesser optimization (i.e., no optimization at all). So I use the clang attribute optnone to exclude a single function from…
ysap
  • 7,723
  • 7
  • 59
  • 122
0
votes
0 answers

Passing more than four arguments to a function called through a wrapper function written using inline assembly in ARM clang 6.6

I am trying to create wrapper functions around functions provided by the RTOS. In the wrapper function I use inline assembly in order to call software interrupt instruction (SVC) so that processor jumps to the SWI handler which further calls the…
0
votes
1 answer

Does armclang/armcc provide options for copy-elision?

I have read some documents regarding on gcc on copy-elision and they provide options "-fno-elide-constructors" to disable copy-elision. I am wondering if arm supports this as well. I could not find any answer on arm user guide and reference guide...
0
votes
1 answer

Why programs on stm32 can only be debugged to run?

I use armclang build my program,and the progarm will let LED on in board.But when I downlaod program to stm32f407 by st-link, the LED is not on.So I run the program in debug mode by st-link, zhe LED will ON,it mean that the program is running. I…
0
votes
1 answer

Why are there wrong paths in DWARF table

I compiled my program with armclang with -g option. When I try to debug it with Keil it doesn't recognize the source files ( I cannot set breakpoints in them, or see in which function I currently am). I checked the compiled .o files with objdump and…
0
votes
1 answer

Constexpr function in constexpr constructor initialiser list

I would like to initialise a struct member with a hash of the struct name. constexpr uint32_t myHash(const char* const data) { //Some code for hash return myHash; } struct My_Struct{ constexpr Test() : ID(myHash("My_Struct")) { } …
Flip
  • 881
  • 7
  • 13