STM32F042F6P6, generating much too large .bin file silently?
Without seeing your code, the only thing I can think of offhand is that you might have USE_FULL_ASSERT (#define) enabled. I don’t see any reference to printf() in the map file, so I could very well be wrong.
If USE_FULL_ASSERT is on and you’re using the Cube HAL, a LOT of extra code will get generated.