I guess AVI-crak is referring to different versions of the same chip that may or may not have fixes for silicon bugs. But since you can read the chip revision from the chip, you can determine which silicon bugs you need to work around and which are fixed. But it does take extra software.
Yes. If the chip can be identified before compile time, and its bugs described via preprocessor macros, then one can save RAM/Flash use by only including the required workarounds.
No, these workarounds are typically enabled / disabled at runtime to make the software more compatible with all possible hardware out there. This doesn't increase size of the software significantly because the workarounds are only a few lines of code.
That is what is most commonly done, yes (except workarounds like the stack pointer being loaded from incorrect address if an interrupt happens during the data phase using
LDR SP, [Rn], #imm, with workaround being to load the value to a temporary register and from there to stack pointer, tend to be always enabled, since they are harmless on hardware that does not have the bug).
But, if the exact variant is known at compile time, they can be implemented directly, without any runtime checks or patching. This kind of code adapting to hardware is not new, and can be also done at compile time, not only runtime, was my point.
there is a clear policy by ST to not fix any of the stuff which is there today.
Based on the errata, it definitely looks that way.
The OTG_FS and OTG_HS bugs mean there may be some USB HID devices that won't work with STM32F417 as the host. (The only low-speed USB devices I've ever seen are some
old custom HID devices, like those used in old mini numpads and old bar code readers.)
The OTG_FS_DCFG bug means when read, the DAD and PFIVL bits (4-12) may be incorrect. The workaround is to use a 32-bit RAM variable for it, initializing it to
0x0220'0000 (it's bootup initialization value), and do the operations on the RAM variable and just copy the value to
usbx->DCFG. I don't see such a workaround in STM32CubeF4/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_usb.c at Github, though.
I didn't look at the other errata.