Monday, October 14, 2013

__attribute__((packed)) with Code Composer (Texas instruments TI ARM GCC)

NOTE: TI renamed Stellaris LM4F232H5QD to Tiva C Series TM4C123GH6PGE - Both these part numbers refer to the same chip. StellarisWare is now superseded by/renamed to TivaWare 2.0. The LM4F232 USB+CAN Evaluation Kit is now rebranded as Tiva™ C Series TM4C123G USB+CAN Development Kit. This blog post refers to the old StellarisWare (SW-LM3S-9107(Stellarisware).exe) and old CodeComposer Studio (CCS5.2.1.00018_win32) and the old part numbers for the microcontroller chip and the evaluation kit.

So if you are writing code for some kinds of networking protocol for TI Stellaris Cortex M4 processors like LM4F232H5QD, you might end up using __attribute__((packed)) for various structures. (Details here)

If you haven't enabled the correct options for your arm-gcc supplied as part of Code Composer, you might get the following error for struct defined with :

"..\prot.h", line 23: error #80: expected a type specifier

To fix that you need to enable support for GCC extensions for your CCS project like so:


More details here

Sometimes importing a project from one CCS eclipse workspace to another CCS eclipse workspace, might cause this option to be reset. 

0 comments:

Post a Comment