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
9
votes
2 answers

ARMCC: problems with memcpy (alignment exceptions)

I am porting some software from the gcc-toolchain to the armcc-toolchain (processor stays the same (Cortex-A9)). In the C-code memcpy is used. armcc replaces a call to memcpy by a call to __aeabi_memcpy. The FAQ sais the following about…
user3035952
  • 301
  • 5
  • 12
9
votes
2 answers

Can an __attribute__ specifier be used with both the function prototype and the function definition?

My question directly pertains to the __attribute__((noreturn)) but more generally could pertain to others as well - such as __attribute__(noinline). I have looked at both the gcc manual and the Keil compiler reference guide to determine what the…
embedded_guy
  • 1,939
  • 3
  • 24
  • 39
6
votes
2 answers

Working with a C++ compiler that doesn't support exceptions?

I'm porting a C++ library to my mbed using the hosted mbed C++ compiler which is basically ARMCC with a configuration that you can't really change. One of the configuration options they decided on (for some unknown reason) is that exceptions are not…
Earlz
  • 62,085
  • 98
  • 303
  • 499
6
votes
1 answer

What's the structure of .arm.extab entry in armcc?

I'm trying to understand exactly how the exception table (.arm.extab) works. I'm aware that this is compiler dependent, so I'll restrict myself to armcc (as I'm using Keil). A typical entry in the table looks something like: b0aa0380 2a002c00…
Tal Ben-Porath
  • 135
  • 1
  • 5
6
votes
1 answer

remove debug strings in release build

I use a LOG_DEBUG function to print debug information to the screen. I used a #define _DEBUG to disable LOG_DEBUG function by defining _DEBUG FLAG in compile time (release time). but linux strings commands of release build app still shows debug…
jafar
  • 345
  • 4
  • 11
6
votes
5 answers

GNU-Make does not recompile when a header file changed

GNU-Make does not recompile when hdr.h file changed. As below printed lines, it did not try to recompile even main.d file is generated. Can you guide me why it happend? hdr.h #ifndef __HDR_H__ #define LOOP_CNT 1000 #endif /* __HDR_H__ */ …
andwella
  • 83
  • 2
  • 6
5
votes
3 answers

the best way to solve "variable 'xxx' was declared but never referenced"

-Pre-condition: I know it has many ways to ignore this warning, but I do need fix it but NOT just add some flags for compiler to ignore it, because I can do this makefile CFLAG modification on my local, but the compile/build policy can NOT been…
How Chen
  • 1,340
  • 2
  • 17
  • 37
4
votes
2 answers

arm compiler 5 do not fully respect volatile qualifier

Consider the following code: volatile int status; status = process_package_header(&pack_header, PACK_INFO_CONST); if ((((status) == (SUCCESS_CONST)) ? ((random_delay() && ((SUCCESS_CONST) == (status))) ? 0 : side_channel_sttack_detected()) :…
izac89
  • 3,790
  • 7
  • 30
  • 46
4
votes
1 answer

Why does ARM treat "0xFFFFFFFF" as out of "int" range for enums but not for assignment?

I am trying to compile the following code in C (armcc file.c): typedef enum A { JANUARY, FEBRUARY= 0xFFFFFFFF /* Warning seen on this line */ }A; int main() { int max = 0xFFFFFFFF; /* No warning seen for this line*/ ... } I get a…
Quest
  • 41
  • 1
4
votes
2 answers

Calling a C function from ARM function defined with __asm

I am having trouble understanding my compiler. We use the Scons utility to compile ARM code for an M0+ processor (on Windows, if it matters. It's an ARMCC compile) I am trying to capture the address of the stack pointer during an interrupt using the…
MPStoering
  • 184
  • 2
  • 12
4
votes
3 answers

Warning: "extra ; ignored" by using C macros with ARMCC

My compiler raises the warning #381-D: extra ";" ignored in such a situation: I have a struct defined, like the following struct example_s { u8_t foo; SOME_MACRO(bar); }; The macro SOME_MACRO(x) does the following: #if defined(SYSTEM_A) …
daniel
  • 85
  • 4
3
votes
1 answer

ADS 1.2 C compiler instrumentation option

I'm attempting to add instrumenting/profiling calls to C source. Many compilers I have found have flags that let you do this (--gnu_instrument, -finsturment-functions, etc). Then you provide the definitions for the inserted function calls. From…
Idan Reed
  • 53
  • 4
3
votes
2 answers

Elegant way to define an automatic variable with specific alignment

I am working with the ARM compiler and have a HW peripheral (having direct memory access) which is requiring a specific alignment for the memory buffers passed to it (32-byte alignment). This is not a problem when the buffers are global/static and…
Eugene Sh.
  • 17,802
  • 8
  • 40
  • 61
3
votes
1 answer

Path to GCC_ARM (mbed_settings.py)

I've just started to use mbed API, and every time I'm trying to compile my project this happen P.S. I'm on arch Linux usage: make.py [-h] [-m MCU] [-t TOOLCHAIN] [--color] [--cflags CFLAGS] [--asmflags ASMFLAGS] [--ldflags LDFLAGS]…
MathieuAuclair
  • 1,229
  • 11
  • 41
3
votes
1 answer

armcc complains that `q0` is not defined compiling neon assembly

int main(){ __asm volatile { // load data vld1.16 {q0, q1}, [r0]! ... using command armcc --cpu=Cortex-A9 -O2 -Otime --vectorize --remarks -g --md --depend_format=unix_escaped --no_depend_system_headers -c -o test.o test.c It has error…
Tmx
  • 579
  • 2
  • 6
  • 17
1
2 3 4 5 6