First Firmware and Hardware Bring-Up Code
Get code onto a board you designed and use it as an instrument: blink, toggle, measure, and write the small diagnostics that prove each subsystem works.
Two ways in. Work the material, or if you already know this, go straight to the project and prove it.
Where this sits
- Used by tracks
- Embedded Hardware Prototyper
How this skill is structured
- 1. Concepts — the ideas stated plainly, with the equations worth memorising.
- 2. Worked example — one real problem solved end to end, numbers included.
- 3. Tool demonstration — do the thing in a real open-source tool.
- 4. Resources — the specific free readings and videos, and what part of each to use.
- 5. Project — built alone, producing something a reviewer can check.
- 6. Competence checklist — what you must be able to do. This is also the audit rubric.
1. Concepts
Read these first. Tick each one when you could explain it to someone else without notes.
2. Worked example
Bringing up a new board from 'nothing works' to 'all subsystems verified'
ProblemYour first prototype has arrived, assembled. What order do you do things in?
- 1Before power: visual inspection under magnification. Check the orientation of every polarised part against the assembly drawing. Check for bridges on fine-pitch parts. This costs ten minutes and saves boards.
- 2Before power: continuity checks. Measure resistance from each supply rail to ground. A short (a few ohms or less) means stop and find it. Typical healthy readings are hundreds of ohms to kilohms depending on the decoupling and the loads.
- 3First power: use a bench supply with a current limit set to slightly above your expected idle current, not a USB port. Ramp the voltage slowly and watch the current. A sudden jump means stop.
- 4Measure every rail with the multimeter at the point of load, not at the regulator. Compare against your power tree. Record the numbers.
- 5Scope the rails: look for oscillation, ripple and startup behaviour. An LDO oscillating at hundreds of kilohertz is invisible on a multimeter and fatal to everything downstream.
- 6Check the clock: scope the crystal (with a 10x probe on the output pin, not the input pin, which the probe capacitance will stop). Confirm the frequency and amplitude.
- 7Check reset: confirm the reset line goes high after the supervisor's timeout, and that the pulse is long enough.
- 8Now attach the debug probe. Can it detect the target? If not, check SWD wiring, target power detection, and that the chip is not in a low-power or locked state.
- 9Run blink. This is the first firmware. If it works, power, reset, clock, boot, flash, one GPIO and your toolchain are all proven.
- 10If blink does not work: halt the core with the debugger. Read the program counter. Is it in the reset handler? In a fault handler? In an infinite loop? This single observation localises the problem immediately.
- 11GPIO sweep: write firmware that toggles every GPIO in turn at a distinct frequency, and probe each pin. This finds unsoldered pins, shorts, and footprint errors in one pass. Record the result for every pin.
- 12I2C scan: write firmware that attempts a read from every 7-bit address and reports which ones ACK. Compare against your address map. A missing device is either not powered, not soldered, has the wrong address, or the bus is broken — and the pull-up measurements from an earlier skill tell you which.
- 13SPI: read a known-constant register. Most flash chips have a JEDEC ID; most sensors have a WHO_AM_I. If the value is wrong but not zero or all-ones, suspect the SPI mode. If it is all zeros or all ones, suspect wiring or chip select.
- 14ADC: measure a known voltage (a divider from the rail) and compare to the calculated value. This validates the reference, the input network and your conversion maths at once.
- 15Record everything in a bring-up log with the board's serial number. The second board will have different problems and you will want the first board's baseline.
AnswerInspect, then check for shorts, then power with a current-limited supply, then measure and scope every rail, then clock and reset, then attach the debugger, then blink. After blink: GPIO sweep, I2C scan, SPI ID read, ADC check. Every step recorded in a log against a board serial number.
3. Tool demonstration
Build, flash and debug firmware entirely with open-source tools, then write bring-up diagnostics.
4. Resources
Free and, wherever possible, openly licensed. The note tells you which part to actually use — do not read them cover to cover.
5. Project — build this on your own
About 3 hours. This is the artifact that proves the skill. Work it without a walkthrough.
Write a complete bring-up firmware suite for a board (your own if you have one fabricated, otherwise any development board treated as if it were an unknown prototype), and produce a bring-up log that documents the board's verified state.
Deliverables
Acceptance criteria — how you know it is good enough
If you want to push further
- Add RTT or a semihosting channel for logging without a UART, and use it to stream diagnostic data during bring-up.
- Write a self-test that runs at power-up on every board, checks every subsystem, and reports a pass/fail code on an LED, so production units test themselves.
6. Competence checklist
Tick these honestly. If you are auditing this skill, this is your rubric — you should be able to demonstrate every line from the project you just built.