1. Buy the debugger

Printf debugging over UART feels fine until it doesn't. A cheap SWD probe pays for itself the first time you hit a hard fault.

2. Read the errata

Every silicon vendor ships bugs. They document them. Almost nobody reads the document.

3. Watch your stack

Stack overflows in embedded systems don't crash politely — they corrupt whatever happens to be next in memory and fail somewhere unrelated an hour later.

4. Version your board files

The schematic you built against will change. Tag it.

5. Write the test harness first

Even a crude one. You'll run it hundreds of times.