SimpleFOC on platformIO configuration

Hey guys.
I built a tiny STM32F1 based FOC module, which have UART, CAN communications. I use DRV8316 as my mos-fet driver and MTMT6701 as my magnetic sensor.
I totally understand the FOC libs is based on Arduino framwork, which is mentioned in many other discussions. So I use platformIO as my IDE. Then, I got some troubles:
1 How to setup pin definitions? I have already found this: F103C8T_F103CB(T-U) Pinout | STM32 Pinouts. But I still confuse to the setup.
2 Does it support CAN bus or any CAN bus protocol? (A normal standare CAN should be enought). And how to setup in platformIO…

Here it goes:

Hi @Charles_Lee

I encountered a similar issue some time ago while using PlatformIO with non-standard development boards. Perhaps this information could be helpful to you:

The CAN Bus is not natively supported by Arduino, but with PlatformIO, you can go beyond the Arduino framework and directly call STM32 HAL functions. It might be a bit tricky, but it’s entirely doable. This is how I did it:

Best regards!