STM32 Platform upgrade to v5.5.0-errors PortA, PortB, ... undeclared

After a recent upgrade of STM32 platform to v5.5.0 getting multiple errors
.platformio\packages\framework-arduinoststm32\cores\arduino\stm32/PinNames.h:16:12: error: ‘PortA’ undeclared here (not in a function)
PA_0 = (PortA << 4) + 0x00,
^~~~~
.platformio\packages\framework-arduinoststm32\cores\arduino\stm32/PinNames.h:33:12: error: ‘PortB’ undeclared here (not in a function); did you mean ‘PortA’?
PB_0 = (PortB << 4) + 0x00,
^~~~~
PortA
.platformio\packages\framework-arduinoststm32\cores\arduino\stm32/PinNames.h:50:12: error: ‘PortC’ undeclared here (not in a function); did you mean ‘PortB’?
PC_0 = (PortC << 4) + 0x00,
^~~~~
PortB

Environment:
PLATFORM: ST STM32 5.5.0 > STM32F407ZG (192k RAM. 1024k Flash)
HARDWARE: STM32F407ZGT6 168MHz, 192KB RAM, 1MB Flash
DEBUG: Current (jlink) External (jlink, stlink)
PACKAGES: framework-arduinoststm32 3.10601.190716 (1.6.1), toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)

I’m getting the exact same error, after trying to upgrade from 5.4.3 to get around an OpenOCD error.

This is not reproducable for me.

platformio.ini

[env:test2]
platform = ststm32@5.5.0
board = black_f407zg  
framework = arduino

main.cpp

#include <Arduino.h>

void setup() {
	pinMode(PA0, OUTPUT);
	Serial.begin(115200);
}

void loop() {
}

Result

DATA:    [          ]   0.4% (used 792 bytes from 196608 bytes)
PROGRAM: [          ]   1.4% (used 14508 bytes from 1048576 bytes)
[SUCCESS] Took 4.94 seconds 

Does your .platformio\packages\framework-arduinoststm32\cores\arduino\stm32\PortNames.h file contain

typedef enum {
  FirstPort = 0x00,
  PortA = FirstPort,
  PortB,
...

? This is where PortA etc definitions come from (#include "PortNames.h"). If this file is not there / contents are different I’d suggest deleting the .platformio\packages\framework-arduinoststm32\ folder and recompiling.