This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/EK-TM4C123GXL: PACKSTRUCT #148 Error When Importing Library

Part Number: EK-TM4C123GXL

Tool/software: Code Composer Studio

I am trying to use UART to connect to a peripheral Wi-Fi module. The module is listed below as well as a solution to somebody using the Keil IDE with the same problem. I tried using their solution by adding the __ARMCC_VERSION to the header file in order for the library to recognize the compiler. However, it still left me with 90 errors (the same guy experienced it and somehow fixed it). It seems that I cannot figure out how he fixed the issue. He said he added _packed before each struct that contained another struct. If that is the fix could somebody give me an example code of one of the functions with the fix in it? Thank you for your help I have to finish a project for school this week.

Thanks,

Dylan Overstreet

Wi-FIi Module:  

cmd_def.h file: cmd_def.h

Stack Overflow Similar Issue:  

  • Hi Dylan,

    First, sorry for the delay. You posted in the CCS forum and they transferred it to the TM4C forum. (I really think it might better be answered in the compiler forum.) To be clear, which compiler are you using? Are you using the TI ARM C-compiler? You can also use the GNU ARM C-compiler with CCS and the cmd_def.h file already has a macro definition for PACKSTRUCT. The TI ARM compiler uses "__attribute__((__packed__))" between the struct keyword and the structure identifier. (See section 5.16.4 of the TI ARM C-Compiler User's Guide.) Unfortunately I did not think of a way to define the macro such that it placed the attribute between the struct keyword and the identifier. You may have to edit the header file for use with the TI compiler.