Closed thebruce87m closed 4 years ago
Hi @thebruce87m,
Thank you for reporting this issue. It will be forwarded to our development teams. I will let you updated as soon as they provide me with their feedback. Thank you for your patience.
Take care and stay safe.
With regards,
Hi @thebruce87m,
Thank you again for both reports, this one on GitHub and the other on the ST Community forum.
To answer your first question, I confirm that our STM32L4/L4+ HAL- and LL-driver source are MISRA C:2004 compliant. However, compliance does not necessarily mean strict and absolute conformity to all rules.
Regarding the way to perform MISRA C checks on our HAL- and LL-driver, there are no particular instructions. We use the check mechanism offered by IAR's IDE as briefly explained from page 5 to page 7 (Implementation and interpretation of the MISRA C rules) of this document.
Regarding the obtention of a MISRA C check report, it is possible under the condition a NDA (Non-Disclosure Agreement) is signed by the requester.
Please allow me now these few comments on the PC-Lint report you shared with the ST Community:
stm32l4xx_hal_conf.h
file (92%) out of 1079 reported deviations (including redundant ones).
stm32l4xx_hal_conf.h
files included in our examples, I could not find non-compliant C-style comments.stm32l4xx_hal_conf_template.h
for the need of your application, would it be possible that you used non-compliant C-style comments?
https://github.com/STMicroelectronics/STM32CubeL4/blob/1ebb94256904a8b081e38caaffd4da7c2003136e/Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_conf_template.h#L33-L42assert_param(exp)
macro.
USE_FULL_ASSERT
is not defined at your project level, the macro is replaced by the no-side-effect statement ((void)0U)
.I hope you find in these explanations answers to your questions. Thank you once more for your reports. Take care and stay safe.
With regards,
Thanks for the response. We are pursuing an NDA in order to get the X-CUBE-STL libraries so I will ask for the MISRA report once we have this.
Note that I am not the user on the forum that posted the report - as of the time of writing this I do not have any posts at all on the forum - but it was interesting to see your analysis.
Hi All,
I have come across the following information:
I don't have access to CodeSonar but pc-lint is an industry standard tool for checking MISRA compliance and indeed used by ARM to check CMSIS so I trust the results.
The PC-Lint tool gives multiple violations for the HAL library, for example the code below in stm32l4xx_hal_i2c.c:
Shows multiple return statements in the function HAL_I2C_Init(). PC-Lint shows this as an error below:
So my questions are: