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.
Dears,
The code generated by HalCoGen has plenty of #pragma xxxx(), such as
#pragma CODE _STATE ()
#pragma INTERRUPT ()
#pragma WEAK ()
these codes are not MISRA-2004 compliant. And I tried to delete these #pragma xxx(). it runs ok .
So my question is that is there any risk for deleting these #pragma xxx()?
Hello Gavin,
MISRA-2004 Rule 3.4 says that "All uses of the #pragma directive shall be documented and explained". The use of #pragma doesn't violate the MSIRA rules.
Those directives are required for ISR.
Regards,
QJ