SAMD51 upload code error

I tryed to upload compiled code to a SAMD51 board (adafruit grand central M4). Code compiles correctly, flash is correctly cleared but I get an error as soon as first code is loaded (it’s correctly loaded from 0x4000).
Same project compiled with arduino ide can be correctly loaded.
My cmdline was:
pio run -target upload --environment=adafruit_grandcentral_M4 --verbose
‘verbose’ was to get more info about error:

Erase flash
Done in 5.001 seconds
Write 62264 bytes to flash (122 pages)
[ ] 0% (0/122 pages)w
rite(addr=0SAM-BA operation failed
writeBuffer(scr_addr=0x20004034, dst_addr=0x4000, size=0x1000)
scons: *** [upload] Error 1
[ERROR] Took 42.20 seconds

Do you use the latest dev/platform? PlatformIO IDE > PIO Home > Platforms > Updates.

I retested it today with 4.0.0 final and I get the same result

Please report to Issues · platformio/platform-atmelsam · GitHub

Thanks for giving correct redirection for this issue