Questions tagged [armcc]

Questions regarding armcc, C/C++ compiler that is part of proprietary ARM compiler tool-chain, version 5 and below. For questions regarding ARM Compiler 6, use armclang tag instead.

The ARM C compiler is a mature, industrial-strength compiler, based on Codemist Ltd's multi-target, multi-language compiler suite (also known as the Norcroft C compiler).

By default the ARM C compiler compiles ANSI C as defined by American National Standard for Information Systems - Programming Language C, X3J11/90-013, Feb 14, 1990.

The ARM C compiler also has a pcc mode, which accepts the dialect of C used by Berkeley Unix. In this mode the compiler has been used to build a complete ARM-based Unix system (the RISCiX system).

More information about ARMCC at ARM tools website

87 questions
3
votes
1 answer

what are the compiler options for gcc-linaro-aarch64-linux-gnu-4.8-2014.04_linux?

I was using the options: -O3 -march=armv7-a -mtune=cortex-a8 -ftree-vectorize -mfloat-abi=softfp -fsigned-char -Wall -save-temps for cross compiling for arm-v7 (32 bit) using ArmLinuxToolChain. What is the equivalent compiler options for…
srat
  • 41
  • 1
  • 3
3
votes
1 answer

What is the use of __packed attribute in function arguments

int readint(__packed int *data) { return *data; } I have seen __packed attribute in struct declarations to avoid padding. However, what is the benefit of using __packed attribute in function arguments. The author says that he has used __packed…
manav m-n
  • 11,136
  • 23
  • 74
  • 97
3
votes
3 answers

Which compiler, compiled this file?

I am using gnu gcc and armcc to compile a few C files. How can I get the information about which compiler compiled which file? Ex: test.cpp is being compiled by armcc or gnu gcc. The makefile is very complicated and I am looking out for a command…
aditya3524
  • 175
  • 2
  • 4
  • 12
2
votes
1 answer

What's the meaning of (i.function name) section in ARMCC (C++)?

I found out (i.function name) section in map file after build completion. ====================================================== ex) [foo1.h] // inline function definition and declaration __forceinline UINT32 func1(VOID) { ... } [foo2.cpp] //…
sbklyu
  • 21
  • 1
2
votes
2 answers

Prevent "enumerated type mixed with another type" warnings for boolean values in Keil uVision

I'm migrating an application I was developing in CodeWarrior v5.2 to Keil uVision v5.25, which uses the ARM C compiler v5.06. Throughout my code I've used bool to represent boolean values, which is defined in a types.h file in my project as: typedef…
Tagc
  • 8,736
  • 7
  • 61
  • 114
2
votes
3 answers

Copy constructor for C volatile bitfield struct

Good day I am trying to use a C SD driver/file system libary (Keil MDK), in a C++11 project. It was added by the Pack manager in Keil MDK 5.23. I am compiling with ARMCC 5.06u4 I get the warning class "_ARM_MCI_STATUS" has no suitable copy…
Flip
  • 881
  • 7
  • 13
2
votes
2 answers

Force ARM compiler to issue an undefined macro error

Header file config.h contains the following statements: #define RED 0 #define BLUE 1 #define GREEN 2 #define CONFIG_COLOR RED Source file main.c does not include config.h but contains the following: #if CONFIG_COLOR == RED /* Red code */ #elif…
s7amuser
  • 827
  • 6
  • 18
2
votes
1 answer

How to prevent LDM/STM instructions expansion in ARM Compiler 5 armcc inline assembler?

I'm trying to generate AXI bus burst accesses using STM/LDM instructions in inline assembly in .c file compiled with ARM Compiler 5 armcc. inline void STMIA2(uint32_t addr, uint32_t w0, uint32_t w1) { __asm { STMIA addr!, { w0, w1 } …
imiron13
  • 31
  • 4
2
votes
2 answers

Declaring a type (enum, struct etc.) in class definition increase code size

I am developing some embedded software with armcc compiler. For debugging purposes optimizations are kept at minimum wiht -O0 flag. In order to improve code clarity I have moved some enum and struct definitions into a class with public access. From…
ifyalciner
  • 1,190
  • 1
  • 10
  • 22
2
votes
2 answers

Use ARMCC to compile Android native library

I've been working on an Android project which has several native C++ libraries. Compiling and debugging using Eclipse with ADT plugin works well. Obviously Android NDK uses arm-linux-gnueabi-gcc of some version to compile the native libraries. Since…
NumberFour
  • 3,551
  • 8
  • 48
  • 72
2
votes
2 answers

ARMCC remove unused variables

I'm trying to remove unused code with Keil ARM tools that use ARMCC compiler. I've previously used GCC based compilers for ARM and I could easily remove the unused code with: -fdata-sections -ffunction-sections For ARMCC i found similar…
Mark Luko
  • 31
  • 6
2
votes
3 answers

Compiling error: 2574: explicit specialization of must precede its first use ()

When using the armcc4.1 to compiler my code, it reports following error: "access/qnetworkrequest_p.h", line 94: Error: #2574: explicit specialization of class "QTypeInfo>" must precede its first use (at line 105 of…
thincal
  • 63
  • 7
1
vote
0 answers

optimization flag '-falign-functions' is not supported in armcc

How to achieve a similar effect to -falign-functions of gcc flag in armcc. I'm using armcc to compile my C program, I think some functions suffer from performance degradation due to addresses not being aligned to 16 bytes. So I would like to force…
xisme
  • 19
  • 4
1
vote
0 answers

question about using ARM pseudo-instruction UND

I am trying to generate a undefined instruction by using pseudo-instruction mentioned in http://www.keil.com/support/man/docs/armasm/armasm_dom1361289918908.htm My inline assembly code like below: __asm volatile ("UND 0xe7f000f0") However I got…
ch001
  • 69
  • 1
  • 4
1
vote
0 answers

The hidden __result local variable in armcc DWARF debug information

I'm writing tools for debugging Cortex-M and I have discovered an artefact when reviewing the DWARF .debug_info section which the armcc outputs for some C source. (The exact compiler is ARM Compiler 5.05.) For example when the C source contains a…