Discussion about PIO support in Single board computers

PlatformIO is currently not capable of cross-compiling a program for a Raspberry Pi / Linux ARM from a regular desktop PC. (see here).

On the other hand, if you have a real Raspberry Pi on hand, you can use PIO Remote to use it as the machine that runs the compiler and outputs a native binary.

If you meant whether you can build a microcontroller on a Raspberry Pi, e.g., for an Arduino, then most likely yes, if the package is available for Linux ARM. For example, you can create a firmware for an Arduino Uno just fine because toolchain-atmelavr is available.