Naming conventions and coding standards

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Naming conventions and coding standards

2,231 Views
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 !

Labels (1)
0 Kudos
Reply
2 Replies

1,654 Views
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 Kudos
Reply

1,654 Views
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 Kudos
Reply