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.
You can try the following configuration to emulate SiFive RISC-V:
platform = sifive
framework = freedom-e-sdk
board = hifive1
build_type = debug
monitor_speed = 115200
debug_tool = qemu
; debug_tool = renode