Page tree
Skip to end of metadata
Go to start of metadata

There is no hard restriction on the compilers, but the Toolkit is prepared to work with Microsoft compilers, GNU GCC out of the box.

Data packets sent to the firmware are defined inside structure and use byte packing functions (#pragma pack(1) or __attribute__((packed))).

If your compiler does not support byte packing all packets which are aligned wrong won't work and you will need to modify the Toolkit source.

The table below lists a subset of available compilers and indicates support for the byte packing of structures.

CompilerByte packing supportNote
GNU GCC (gcc)(tick)

__attribute__((packed))

Microsoft Visual C++(tick)

#pragma pack(1)

ARM Compiler (armcc)

(tick)All substructures of a packed structure must be declared using __packed (see Compiler Reference Guide)
CodeWarrior C Compiler(tick)#pragma options align=pack/reset pairs (see Porting GNU C Programs to Freescales CodeWarrior C Compiler)
TI Code Composer Studio - TMS320C28x(error)The packed (struct/union) attribute is NOT available for C5500 or C2000 (see GCC Extensions in TI Compilers)
IAR C/C++ Compiler(tick)

#pragma pack(1)

__packed (arm targets only, see IAR C/C++ Development Guide for ARM Cores)

 

NOTE: Your compiler must provide the ISO C99 header file "stdint.h" (alternatively a user specific implementation) to provide fixed width data types.