IAR Embedded Workbench - setting endian-ness of variable

Posted by Seidleroni on Stack Overflow See other posts from Stack Overflow or by Seidleroni
Published on 2010-05-31T13:17:11Z Indexed on 2010/06/01 11:53 UTC
Read the original article Hit count: 331

Filed under:
|
|
|
|

I'm using IAR Embedded Workbench for ARM (ARM7TDMI-S) and the majority of my work is done using little-endian format. However, I saw in the manual that I can do something like :

__big_endian int i, j;

to declare those two variables as big endian (while the rest of the app as little endian). This seems like a fantastic feature, but when I try to compile, I always get the errror:

Error[Pa002]: the type attribute "__big_endian" is not allowed on this declaration.

The big endian line above is copied directly from the manual, but it does not work. This is a great feature of the compiler and would make life a big easier. Any ideas how to get it working?

I have my language conformance set to 'Allow IAR extensions' on the C/C++ Compiler options tab on the IDE options.

© Stack Overflow or respective owner

Related posts about c

    Related posts about embedded