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

# Change board or chip safely

> Retarget the native build, not just the device badge.

Use the native project configuration to change the target. In PlatformIO choose the intended environment; in Zephyr choose the exact SDK board; in CMake use the corresponding native preset/toolchain. ESP-IDF target changes follow its SDK procedure.

1. Stop active flash/debug/capture operations.
2. Select or edit the native target/build configuration.
3. Reconfigure and rebuild. Inspect generated headers, linker memory layout and output directory.
4. Select the matching debug device and register description.
5. Select the physical probe and the new artifact before programming.

The **debug device override** controls debugging metadata. It does not regenerate startup code, change pin assignments, select an ABI, or make an old image compatible with a new chip.

<Warning>ESP-IDF `set-target` changes project configuration and clears the build directory. Review the SDK's documented behavior before running it on a working tree.</Warning>

[ESP-IDF target changes](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/tools/idf-py.html) · [Zephyr build targets](https://docs.zephyrproject.org/latest/develop/west/build-flash-debug.html)
