cancel
Showing results for 
Search instead for 
Did you mean: 

coding guidelines for CUBEMX generated software?

dieter 123
Associate III
Posted on October 13, 2016 at 17:39

Hi

is there a document on coding guidelines(naming convention and so on) for the code generated by STM32 CUBE MX?

THX

#stm32cubemx-4.17
3 REPLIES 3
Nesrine M_O
Lead II
Posted on October 13, 2016 at 17:54

Hi dieter.dieter,

1.I think that you need a user manual for CUBEMX witch already exists:

http://www.st.com/content/ccc/resource/technical/document/user_manual/10/c5/1a/43/3a/70/43/7d/DM00104712.pdf/files/DM00104712.pdf/jcr:content/translations/en.DM00104712.pdf

2.Code generated by CUBEMX is based on HAL drivers so you need coding rules for HAL : have a look to the

http://www.st.com/content/ccc/resource/technical/document/user_manual/96/03/db/05/12/8d/40/9a/DM00107720.pdf/files/DM00107720.pdf/jcr:content/translations/en.DM00107720.pdf

User manual for STM32CUBEF4 as example 

3.If these documents don’t answer your need please tell us?

-Syrine-

dieter 123
Associate III
Posted on October 14, 2016 at 08:28

Hi

no I meant a coding guideline. I already know how cube works. A coding guideline or coding convention is :

https://en.wikipedia.org/wiki/Coding_conventions

Is ST using some thing like that?
Nesrine M_O
Lead II
Posted on October 14, 2016 at 11:04

Hi dieter.dieter,

HAL and LL source code is developed in Strict ANSI-C which makes it independent from the development tools. It is checked with CodeSonarTM static analysis tool. It is fully documented and is MISRA-C 2004 compliant.

Please refer to the

http://www.st.com/content/ccc/resource/technical/document/user_manual/2f/71/ba/b8/75/54/47/cf/DM00105879.pdf/files/DM00105879.pdf/jcr:content/translations/en.DM00105879.pdf

User Manual 

-Syrine-