Could this be due to
application.h including a definition of
PIN_MAP via some of the nested headers?
On the Core
PIN_MAP worked without the need for an explicit declaration in user code, so it must be there somewhere.
This made me think, if this
STM32_Pin_Info* PIN_MAP = HAL_Pin_Map(); // Pointer required for highest access speed
should not be put inside the
PLATFORM_ID == 6 block.