Troubleshooting
Step-by-step fixes for debug probe, SWD and flash programming errors on ARM Cortex-M targets — the same errors MCUHex reports in-app, explained in depth.
SDK & Connection
The local bridge, USB probes and getting a stable link to your board.
SDK not running
The MCUHex SDK is not running on this computer.
Read the full guideSDK is out of date
This version of MCUHex sends the firmware to the SDK, and the SDK running here is old enough to still expect a file path instead. Nothing was written to the chip.
Read the full guideConnection lost
The MCUHex SDK stopped responding — it was quit or it crashed.
Read the full guideNo devices found
The SDK is running but no debug probes were detected.
Read the full guideThis probe has no driver
Windows sees the probe, but no WinUSB driver is bound to it, so pyOCD cannot open it. The probe and the cable are fine.
Read the full guideNo device selected
Please select a device before connecting.
Read the full guideDevice is busy
Another tool or debugger is connected to this device.
Read the full guidePermission denied
Access to the probe was refused — usually because another debugger already has it open.
Read the full guideProbe is open in another mode
Another tool already holds this probe — an IDE debug session, STM32CubeProgrammer, or a second MCUHex window.
Read the full guideMCUHex cannot talk to this device
The device is plugged in and enumerated, but it speaks over a path MCUHex has no driver for. Debugging today goes through SWD, over a CMSIS-DAP or ST-Link probe.
Read the full guideProbe firmware is too old
This probe's firmware predates the protocol the debug library speaks.
Read the full guideProbe driver mismatch
The selected probe driver does not match the connected hardware.
Read the full guideConnection timed out
The device did not respond in time.
Read the full guideDevice disconnected
The USB device was removed during the session.
Read the full guideMemory operation failed
Could not read or write to the device memory.
Read the full guideCommand timed out
The SDK did not respond to a command in time.
Read the full guideConnection error
An unexpected error occurred.
Read the full guideCortex-M & SWD
Target-side failures: locked debug ports, SWD faults, resets and HardFaults.
No answer from the chip
The probe is working, but nothing answered on the SWD lines. The chip is unpowered, not wired to the probe, or its SWD pins have been switched to something else by the firmware on it.
Read the full guideDebug port answered, no core behind it
The chip answered but no Cortex-M core was found behind its debug port. This is what a chip held in reset, or one whose core domain is unpowered, looks like from here.
Read the full guideDebug unit would not power up
The chip refused to power its debug unit. Usually the board is browning out, or the probe is reading the wrong target voltage.
Read the full guideDebug port locked
The debug port answered and refused the access. That is what read-out protection looks like: STM32 RDP level 1, Nordic APPROTECT, Kinetis FSEC.
Read the full guideSWD protocol error
A wire-level fault occurred on the SWD/JTAG interface.
Read the full guideTarget held in reset
The target MCU is being held in reset and cannot communicate.
Read the full guideTarget not halted
The target is running and memory cannot be accessed safely.
Read the full guideFlash write protected
The target flash region is write-protected.
Read the full guideTarget support not installed
pyOCD knows which MCU this is but has no support pack for it installed.
Read the full guideHardFault detected
The target MCU has entered a HardFault exception.
Read the full guideFlash & Files
Firmware programming, verification and file selection problems.
File not found
The selected firmware file does not exist on the SDK host.
Read the full guideUnsupported file format
Only .hex, .bin, .elf, and .axf firmware files are supported.
Read the full guideFlash verification failed
The programmed data does not match the source file.
Read the full guideFlash in progress
Another flash operation is already running.
Read the full guideProbe not connected
Connect to a debug probe before flashing.
Read the full guideFlash cancelled
The flash operation was cancelled.
Read the full guideTarget memory map unknown
PyOCD reports no programmable flash region for this target, so there is nothing to write firmware into.
Read the full guideFirmware does not fit this chip
Part of the image is addressed outside the memory this target has, so writing it would leave the chip with an incomplete firmware.
Read the full guideThis is not the chip you picked
The chip on the board reports less flash than the part chosen for it has. Programming it with the wrong geometry would erase it against the wrong map, and that cannot be undone, so nothing was written.
Read the full guideFlash programming rejected
The flash controller rejected a page write (PGSERR). Usually this means the target is running, write-protected, or requires a full chip erase before re-programming.
Read the full guideErase failed
The flash controller rejected an erase, before anything new was written. What was on the chip is still there.
Read the full guideFirmware is too large to send
The image has to travel to the SDK before it can be programmed, and this one is over the 16 MB that fits in one transfer. An ELF carrying full debug symbols is usually what pushes it over — the part that gets programmed is a fraction of that.
Read the full guideFirmware file is empty
The file has no contents, so there is nothing to program. A build that failed often leaves a zero-byte artifact behind where the firmware should be.
Read the full guideFirmware did not reach the SDK
The image was rejected before programming started, so the chip is untouched.
Read the full guideDevice Support Packs
Downloading the CMSIS-Pack that teaches MCUHex your chip: network, disk and cache.
You appear to be offline
Support for a chip is downloaded from the CMSIS-Pack servers the first time you pick it, and nothing on this machine is reaching the internet. Nothing was installed and nothing was changed.
Read the full guideThe pack server did not answer
Support for a chip is downloaded from the CMSIS-Pack servers the first time you pick it. This machine is online, but that download could not reach them, so nothing was installed and nothing was changed.
Read the full guideNo room left for the chip support pack
The pack download stopped because the folder it is cached in has no space left. Packs run from a few megabytes to a few hundred.
Read the full guideThe pack folder cannot be written to
Chip support is cached in a folder under your user account. That folder refused to be written to, so the download had nowhere to go.
Read the full guideChip support downloads are unavailable
The component that fetches CMSIS-Pack files is missing from this MCUHex install, so no new chip can be added. Chips pyOCD already ships still work.
Read the full guideThe chip index is incomplete
The SDK checks the CMSIS-Pack index against the vendor’s own list before trusting it. Some descriptors served from keil.com could not be downloaded, so the parts they cover — STM32 families among them — may be missing from this list.
Read the full guideELF & Debug Symbols
Getting your build’s symbols into MCUHex: file formats, size limits and uploads.
Invalid file type
Only .elf and .out files are supported.
Read the full guideFile too large
Files must be under 32 MB.
Read the full guideParsing failed
The file could not be parsed for debug symbols.
Read the full guideParsing timed out
The server took too long to process this file.
Read the full guideUpload failed
The file could not be uploaded to the server.
Read the full guideConnection error
Could not reach the server.
Read the full guideSign in required
You need to sign in to upload and parse files.
Read the full guideDaily upload limit reached
You have uploaded 10 files today. The counter resets at 00:00 UTC.
Read the full guideSomething went wrong
An unexpected error occurred.
Read the full guide