> ## Documentation Index
> Fetch the complete documentation index at: https://docs.embedder.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Migrate to XMOS

> Port a SigmaStudio DSP project or other firmware to your XMOS board with Migration mode: convert the source, review a plan, then implement it.

Use Migration mode to port an existing design to the XMOS board selected for your project. It works with a SigmaStudio project (ADAU17xx or ADAU14xx `.dspproj`) and with MCU, DSP, FPGA, or older XMOS firmware. Embedder converts the source into a text design you can review, plans the port with you, and implements the plan after you approve it.

> [!NOTE]
>
> Migration mode appears only when the selected project's platform is an XMOS board or xcore device. Select the target board's project before you start. See [XMOS](https://docs.embedder.com/supported-hardware/xmos.md).

## Prerequisites

* An Embedder project whose platform is the target XMOS board.
* For building and running the port: XMOS XTC Tools and the project's `.embedder/xmos.json`, set up as in [Prepare your project and tools](https://docs.embedder.com/supported-hardware/xmos.md#prepare-your-project-and-tools).
* For a SigmaStudio port: the `.dspproj` file and, ideally, its exported system files. See [Export files from SigmaStudio](#export-files-from-sigmastudio).
* Optionally, the original product's project folder: host code, tests, audio recordings, and schematics.

SigmaStudio+ (`.ssprj`) projects aren't supported.

## Export files from SigmaStudio

In SigmaStudio, choose **Action → Export System Files**. You don't need the board attached to export. Provide these files with the `.dspproj`:

| File | What Embedder reads from it |
| - | - |
| `<name>.params` | Every parameter of every block: name, address, value, and raw words. |
| `<name>.xml` | The same parameters, plus each block's settings at export time. Embedder compares these with the saved project. |
| `<name>_IC_<n>_PARAM.h` | The number format of each parameter (`5.23`, `8.24`, and others) and full-precision values. |
| `<name>_NetList.xml` | The compiled blocks and links. Adds SigmaStudio's toolbox names and checks the decoded wiring. |

Embedder finds exports named after the project next to the `.dspproj`, in its `Export/` folder, or anywhere in the project folder you provide. The other export files (`_IC_<n>.h`, `_REG.h`, `.hex`, `.dat`, E2Prom) repeat this data, so Embedder skips them.

## Start a migration

> [tab] VS Code
>
> 1. Choose **Migration** from the mode menu beside the chat input, or enter `/migration`. You can also press `Shift+Tab` until the **Migrate to XMOS** dialog opens.
> 2. Under **Migrating from**, choose a source:
>    * **SigmaStudio project**: under **Project file**, choose the `.dspproj`. Exports Embedder finds are listed below it. Use **Add export files** to add others, or remove any you don't want. To include host code, tests, recordings, or more exports, choose a folder under **Project folder (optional)**. Embedder reads the folder where it is and doesn't copy it.
>    * **Something else**: choose a **Source type**, such as **Older XMOS (XS1/XS2)**, **MCU firmware (STM32, NXP, ESP32…)**, **DSP processor code**, **USB audio bridge**, or **FPGA / CPLD**. Then choose the **Source folder**, enter a **Description** of what the firmware does and what must carry over, or both.
> 3. Review the preview. For a SigmaStudio project, it shows the block count, inputs and outputs, sample rate, blocks that need custom code, and any warnings about the files you chose. For another source with a folder, it summarizes the folder.
> 4. For a SigmaStudio project, optionally add **Notes for the agent (optional)**.
> 5. Select **Start migration plan**, or press `Cmd+Enter` (macOS) or `Ctrl+Enter` (Windows and Linux).
>
> **Start migration plan** stays unavailable until Embedder has read the file or folder you chose, or, for **Something else** without a folder, until you enter a description. The line under it says what is missing, such as **Choose a .dspproj to continue**. Select **Cancel** or press `Esc` to close the dialog and keep the current mode.
>
> You can also pass a path to `/migration` in the VS Code chat to start without the dialog.

> [tab] Terminal UI
>
> Pass the project file or a folder to `/migration`:
>
> ```text theme={"theme":"css-variables"}
> /migration hardware/dsp/amp.dspproj
> ```
>
> A folder that contains a `.dspproj` starts a SigmaStudio migration and becomes the project folder. If the folder contains more than one `.dspproj`, pass the project file instead. Any other folder starts a migration from that source folder.
>
> ```text theme={"theme":"css-variables"}
> /migration ../legacy-amp
> ```
>
> `/migration` without a path opens **Migrate to XMOS**, where you choose the source as in VS Code.

When the migration starts, Embedder:

1. Converts the source into a folder under `.embedder/migration/`, named after the project file, the source folder, or the source type. Once the dialog has read the source, it shows the exact location.
2. Switches the chat to Migration mode.
3. Loads the `xmos-migration` and `xmos-shared-memory` [skills](https://docs.embedder.com/core-concepts/skills.md) and your board's XMOS skills. A SigmaStudio migration also loads `sigmastudio-migration` and `xmos-audio-dsp`.
4. Posts a start message that summarizes the source, the target board, and the converted design.

Starting again from the same source refreshes the files in its folder.

### If the source can't be read

In VS Code, the dialog shows the problem next to the file or folder. In the terminal UI, `/migration` reports the problem instead of starting. The table uses the dialog's wording.

| Message | What to do |
| - | - |
| **Not a SigmaStudio project** | Choose the `.dspproj` that SigmaStudio saved. The file may be damaged or from another tool. |
| **SigmaStudio+ (.ssprj) is not supported yet** | Use a SigmaStudio `.dspproj`, or choose **Something else** and describe the design. |
| **File is too large** | The project file is larger than 64 MB, or its design is too large to convert. Choose **Something else** and describe the design instead. |
| An export file marked **not used** | Read the warning in the preview. Embedder skips an export file that isn't a SigmaStudio export, is larger than 8 MB, can't be read, only repeats data from the other exports, or has the same type as a file already in use. |
| **Not found**, **Not readable**, **Not a file**, or **Not a folder** | Check the path, the file or folder permissions, and that you chose a file or folder as asked. |

## Review the converted design

A SigmaStudio migration folder contains:

| Path | Content |
| - | - |
| `design.txt` | The decoded SigmaStudio design, one record per line. |
| `data/` | Long arrays (FIR taps, tables), large parameter lists, and register snapshots referenced from `design.txt`. |
| `README.md` | Device, sample rate, block counts, issues, and the project folder's file tree when you provided one. |
| `source/` | Copies of the `.dspproj` and the export files used. |

A migration from another source writes only a `README.md`, with your description and a survey of the source folder.

`design.txt` replaces the binary `.dspproj` as the source of truth for the migration. It lists the device and sample rate, I/O cells, every block, its parameters, and the wires between blocks. Values that contain spaces are quoted. Each block carries an `xmos=` status that says how it maps to XMOS:

| Status | Meaning |
| - | - |
| `stage` | A `lib_audio_dsp` stage implements the block. |
| `module` | A `lib_audio_dsp` module function covers it in custom C. |
| `approx` | A stage comes close but differs. Embedder states the difference and asks you to accept it. |
| `custom` | Nothing in `lib_audio_dsp` does it. Embedder writes new C, a Python model, and a unit test. |
| `io` | An input or output cell to map to a codec channel, I²S/TDM slot, or S/PDIF. |
| `unknown` | Embedder doesn't recognize the algorithm and asks you about it. |

```text theme={"theme":"css-variables"}
block id=B102 path="Main/CH 1 FL" kind=volume class=SingleSliderMed alg=Gain1940AlgNS xmos=stage stage=VolumeControl in=1 out=1
param id=B102 path="Main/CH 1 FL" name=gain value=0 unit=dB min=-80 max=0 res=40 scale=log control=slider
wire from=B57.out0 to=B102.in0 from_path=Main/X1 to_path="Main/CH 1 FL"
```

During implementation, Embedder copies `design.txt` and `data/` into the XMOS app, so parameter scripts and reference models build from files in your repository.

### Warnings in `design.txt`

Problems appear as `issue` records. Two depend on the export files:

* **`stale_export`**: a setting differs between the saved `.dspproj` and its exports. Embedder asks which version the product ships instead of picking one. If the project is the current version, re-export from SigmaStudio.
* **`missing_internals`**: an ADI fixed-function block keeps values that the `.dspproj` never stores, and the export files don't supply them. Affected blocks include DC block, level detectors, band analyzers, signal detect, dynamic bass, Super Bass, Phat Stereo, curve-table compressors, slewed mutes, and oscillators. Provide the export folder to resolve it. Otherwise, Embedder designs the block from ADI's documentation, reports it as an approximation, and checks it against recordings of the original hardware when you have them.

Other issues flag unknown blocks, feedback cycles, unconnected inputs or outputs, inputs with more than one driver, protected or missing hierarchy boards, and exports that disagree with the project (`export_mismatch`).

## Plan, approve, and implement

Until you approve the plan, Migration mode works like [Plan mode](https://docs.embedder.com/core-concepts/modes.md#plan-review-an-approach-before-implementation): Embedder reads the project and writes only the plan. It studies the design and the board, then asks only what the files can't answer: I/O mapping, sample rate and latency, which controls stay tunable, and how to handle each approximate or unsupported block. The plan covers the feature map, architecture and cycle budget, test steps, and risks.

Answer in chat when Embedder asks, or add your decisions up front:

```text theme={"theme":"css-variables"}
Keep the carrier frequency adjustable over I²C, map Input1 to the board's ADC
channel 0, and compare the output against the captures in tests/recordings/.
```

After you approve the plan, Embedder implements it in Act mode. An approved plan can assign independent steps to [subagents](https://docs.embedder.com/core-concepts/subagents.md).

## Build, run, and verify

When the implementation finishes, run the plan's test steps and compare the results with the original design:

```text theme={"theme":"css-variables"}
Build the migrated app and run the plan's test steps in the simulator. Then
run it on the board and check its startup output over xSCOPE. Report each
check as passed, failed, or unverified, with its evidence.
```

| To | See |
| - | - |
| Run the app without a board, drive pins, and run test cases in parallel | [XMOS xsim](https://docs.embedder.com/debug-mode/xsim.md) |
| Read console output and record probe values, on the board or in the simulator | [xSCOPE](https://docs.embedder.com/debug-mode/xscope.md) |
| Load or attach through an xTAG and inspect tiles, threads, registers, and memory | [XMOS debugging](https://docs.embedder.com/debug-mode/xmos-debugging.md) |
| Write the image to the board's boot flash, replacing the image it boots from | [Program XMOS hardware](https://docs.embedder.com/debug-mode/flashing.md#program-xmos-hardware) |

A simulator run doesn't show real-time I/O timing, so repeat timing checks on the board. For tool setup and target selection, see [XMOS](https://docs.embedder.com/supported-hardware/xmos.md). For general porting practice, see [Platform migrations](https://docs.embedder.com/solutions/platform-migrations.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.