2022-01-13 11:07 AM
CubeF4 version 1.26.2 and CubeF7 version 1.16.1 and 1.16.2 are missing the enum value for HardFault_IRQn in all of the device specific include files (ex. stm32f429xx.h and stm32f746xx.h). It may be missing in earlier versions, I did not check. CubeMX does generate code for a HardFault_Handler().
2022-01-13 11:44 AM
Not sure it's a bug as much as a design choice. I don't think it was ever there. What functionality is lacking as a result of it not being defined?
Most (all?) of the functions which that IRQn_Type as a parameter cannot take HardFault_IRQn (if it existed) as a value since you can't disable it or change its priority. Of course they can't take NonMaskableInt_IRQn either and it's defined.
Edit: although they exist in H7 CMSIS files so it's certainly inconsistent.
2022-01-14 11:19 AM
This doesn't affect any code generated from CubeMX. My custom fault handler code passes the fault/IRQ number to a common reporting/handling function. When porting my code from L4xx/G4xx to F7xx and F4xx CPUs I got compiler errors for the missing value. Yeah, it is a minor thing, but as you said, inconsistent with (at least) the L4, G4 and H7 files.