And well one cheap way to fix the problem is to comment out the double-define, e.g. by getting rid of the wchar_t specialization in the header pointed to by the error.
But that’s not what users are supposed to do. The project hasn’t been updated to use newer Marlin versions for almost 2 years nows, and this version of Marlin uses a platform (https://github.com/p3p/pio-nxplpc-arduino-lpc176x/archive/0.1.3.zip) which does not pin the toolchain version (as e.g. seen in Fix compilation error by maxgerhardt · Pull Request #12 · p3p/pio-nxplpc-arduino-lpc176x · GitHub), so breakagaes can happen.
Per compilation log the compile is using
- framework-arduino-lpc176x @ 0.2.9
- toolchain-gccarmnoneeabi @ 1.100301.220327 (10.3.1)
but that toolchain version didn’t even exist 2 or 3 years ago, it was only published 1 year ago.
So the obvios way is to go in here
and turn that into
platform_packages =
framework-arduino-lpc176x@^0.2.5
toolchain-gccarmnoneeabi@~1.90301.0
then recompilation works without problems and no file modifications.

