Project with pc part and embedded part

Hi there,
I am pretty new to PlatformIO, so excuse me if my question is kinda dumb. Also I don’t know if this is the right place, but let me try to explain my problem.
I want to build a project that has an embedded part running on an esp8266 or texas instruments cc microcontroller and the counterpart running on a raspberry pi or pc.
I would like to use as much code for both version as possible.
Right now I started building my project using cmake, but would like to port to platformio, since it is easier to port the code to different embedded architectures.
I made the embedded part of my project work with platformio, but I don’t know how I should define the environment for the raspberry pi.

I already searched the forum, but found nothing that really matches. Even google does not spit out something usefull…
Thanks in advance.

So which “Raspberry Pi” exactly?

The Linux-ARM series is supported, as stated in the documentation (Boards — PlatformIO latest documentation). Using e.g. the board target for Raspberry Pi 3B you can cross-compile your project, but you have to install pio remote on a Pi for that, as there’s currently a workaround needed.

Note that when compiling on the Raspberry Pi, you can also use the native platform.