Dev container for building and debugging Microchip PolarFire SoC (MPFS) bare-metal projects in VS Code. Drop in any existing SoftConsole project and get clangd, GDB hardware debugging via OpenOCD + FlashPro6, Renode emulation, and Libero SoC FPGA design, all without installing the RISC-V toolchain on the host.
Replaces the SoftConsole (Eclipse) workflow while keeping full compatibility with it.
Built on SoftConsole-Docker and Libero-Docker.
- Docker
- VS Code with the Dev Containers extension
- Microchip license files at
~/Microchip/license/on the host - Libero vault at
~/Microchip/vault/on the host - For hardware debug: FlashPro6 via USB with a udev rule (MODE="0666")
- Clone this repo (or use it as a GitHub template).
- Drop your SoftConsole project folder into the repo root (should contain
.cprojectand.projectfiles) - Open in VS Code, reopen in the dev container when prompted.
Ctrl+Shift+Bto build. Pick a config when asked (LIM-Debug, LIM-Release, etc).- Run "Generate compile_commands.json" task once so clangd picks up your includes.
- F5 to debug.
The build system finds your project by looking for .project.
F1 > "Tasks: Run Task":
- Build -- compile the selected config (
Ctrl+Shift+B) - Clean -- clean the selected config
- Rebuild (Clean + Build) -- clean then build
- Generate compile_commands.json -- build with
bearto capture compile commands for clangd - Launch OpenOCD Server -- start OpenOCD for hardware debug (handles USB/hidraw setup)
- Kill OpenOCD Server -- stop OpenOCD
- Launch Renode Server -- start Renode emulator on port 3333
- Kill Renode Server -- stop Renode
- Create SoftConsole Workspace -- import project into a local Eclipse workspace for SoftConsole
- Build via SoftConsole (Headless) -- build using Eclipse CDT headless builder
- Launch SoftConsole -- open SoftConsole GUI (auto-creates workspace first)
- Launch Libero -- open Libero SoC for FPGA design (needs X11)
After building, build/latest.elf is a symlink to whichever ELF was last built. All debug configs point at this.
F5 opens the debug config picker. Options:
- OpenOCD: Debug All Harts (Hardware) -- reset, load, break at e51
- OpenOCD: Attach All Harts (Hardware) -- attach without reset/load
- OpenOCD: Debug Hart 0 (E51) -- single hart
- OpenOCD: Debug Hart 1 (U54_1) -- single hart
- Renode: Debug All Harts (Emulation) -- no hardware needed
OpenOCD configs automatically start/stop the server. FlashPro6 must be connected and USB passed through to the container.
Uses clangd, not Microsoft C/C++ IntelliSense. Run "Generate compile_commands.json" after your first build or after switching configs.
.clangd at the repo root strips GCC flags that clang doesn't understand.
The project stays compatible with SoftConsole. "Launch SoftConsole" creates the workspace and opens the GUI. "Build via SoftConsole (Headless)" builds without the GUI.
The softconsole-workspace/ directory is ignored by git.
Hidden files
Eclipse project files (.project, .cproject, .settings/, *.launch) are hidden from the VS Code explorer. They're still on disk. To unhide, edit files.exclude in .vscode/settings.json.
.clangd # strips GCC flags clang doesn't understand
.devcontainer/ # container definition (Dockerfile, devcontainer.json)
.vscode/
build.sh # build wrapper (auto-detects project dir)
setup_eclipse_workspace.sh # creates softconsole-workspace/, imports project
start_openocd.sh # starts OpenOCD, fixes hidraw device nodes
tasks.json # all build/debug/tool tasks
launch.json # GDB debug configurations
settings.json # editor, clangd, file visibility
<your-project>/ # SoftConsole project (.project, .cproject, src/, ...)
- Fix Renode emulation (mono not installed in container)
- Add
Launch MSSconvenience task