I want to add ibex riscv core to platformio and run C code or riscv assembly code on it, I am new here, I would be very grateful if you could help me.
Sounds like you’re looking for an emulator?
PlatformIO is a cross-platform, cross-architecture, multiple framework, professional tool for embedded systems engineers and for software developers who write applications for embedded products.
There is still a misunderstanding: PlatformIO is not an emulator but a development environment.
However, you can use an emulator like Wokwi for example.
Wokwi for vscode also supports debugging.
You can try the following configuration to emulate SiFive RISC-V:
[env:sifive-hifive1-qemu]
platform = sifive
framework = freedom-e-sdk
board = hifive1
build_type = debug
monitor_speed = 115200
debug_tool = qemu
; debug_tool = renode
See the full example https://github.com/platformio/platform-sifive/tree/develop/examples/freedom-e-sdk_sifive-welcome