Naming conventions and coding standards

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Naming conventions and coding standards

1,663件の閲覧回数
Glogov_Kolac
Contributor II

Is there are some official coding standard and naming convention for C programming language for CW and Freescale MCU's. I now use notaton similar to C# (camael for local vars, atributes and Pascal notation for function names), I try to avoid long names vith _ between words to distinguish them from MQX kernel function names !

ラベル(1)
0 件の賞賛
2 返答(返信)

1,086件の閲覧回数
irob
Contributor V

I really like Michael Barr's "Embedded C Coding Standard", which is based on MISRA's I believe.  His company, Netrino, does training and consulting.  He's got an excellent blog at http://embeddedgurus.com/barr-code/

0 件の賞賛

1,086件の閲覧回数
AirDragon
Contributor III

I'm not sure about the other members here, but I've been trying to use the MISRA conventions. I also somehow stumbled upon a declassified document that goes over the C++ language and style rules used for the JSF electronics, but that's another story.

 

As far as I know, the Codewarrior compiler is happy so long as you have ISO 9899:1990. Versions after 6 or so support 9899:1999 I think.

0 件の賞賛