Question
Can running code find out the part number it's running on?
I'm writing code for STM32F042. If I'm running on the TSSOP20 package, I need to remap PA11 and PA12 to PA9 and PA10. For all other packages, I need to leave them alone.
I can have a compile-time switch and generate different binaries for different packages. Ideally, I'd like to have a single binary. It's only a small difference in code, and I'd like to avoid the potential for confusion about flushing the wrong binary.
