Let me explain how I actually started C coding, because maybe that gives some context
I first installed GCC on my laptop and started writing C code in Notepad++. I used the command prompt to compile and run the programs. I also tried Code Blocks, but I personally preferred the first approach. Once I became comfortable with basic C programming, I thought I should try writing C for a microcontroller.
I bought some components like a P89V51RD2, crystal, resistors, capacitors and LEDs. Since the P89V51RD2 has an on-chip bootloader, I tried setting everything up on a breadboard and wrote some Embedded C code using Keil. I wanted to blink an LED, I used flash magic tool but even after trying many times I couldn't get the MCU programmed properly.
After that I bought an 8051 development board. I started writing Embedded C programs using keil for different peripherals such as LCD, buttons, UART, SPI, ADC, etc. Then I wanted more hands-on hardware experience, so I bought PIC microcontrollers and built things on a zero PCB. I used MPLAB and XC8 and experimented with different peripherals. After that I moved to ARM. I have an STM32 board with STM32CubeIDE.
The reason I'm explaining all this is that I have never really followed MISHRA C coding standard. My approach has mostly been: write the code, compile it, look at the warnings or errors, fix them, and keep doing that until the program builds successfully without errors or warnings.
So my actual question is about MISRA C. I'm still learning and mostly doing this as a hobby, so I may be missing something obvious here. I searched about this and found tools such as LDRA that can check whether a program follows MISRA C guidelines.
Do you guys normally follow only MISRA C rules when writing embedded C? If you do, how do you actually know that your code is compliant with the MISRA rules? Do you manually check the rules, or do you use some static-analysis tool?