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/CC2630:__packed with CCS V7

Guru**** 2587345 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/605047/ccs-cc2630-__packed-with-ccs-v7

部件号:CC2630

工具/软件:Code Composer Studio

我正在将一个IAR项目迁移到CCS v7,我所有的打包结构类型都被CCS拒绝。  我收到未指明的警告和错误,如下所述

typedef     

__packed    //<<<警告 - 显式类型缺失(假定为"int")-- t__packed开头下有一个插入符号

struct     //<<<错误  -"Expected a ";""              ---在struct的开头下有一个脱字符

UINT8_t X;    
UINT8_t Y;     
UINT8_t Z;     
} Foo_t;   //<<<警告 -“解析在上一个语法错误后在此处重新启动”

 

typedef

_包装     

union    //<<<错误 -"类型说明符的无效组合"---- 在union的开头有一个脱字符  

UINT8_t字节[13];  
uINT32_t字[17];  
}条形图;

定义压缩typedef结构和联合的正确方法是什么?  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    请参阅  ARM编译器用户指南中标题为类型属性的部分。