Skip to content

2. Build the firmware

You tell the project which board you have, then build the firmware for it. CrossPad keeps one configuration per board revision, so a bare idf.py build stops with an error on purpose: you always name the revision.

Your board is v2 if the PCB revision printed on its circuit board is r20. This page uses v2. Not sure? Plug the board in before step 2: idf.py board then reads the revision from the board itself.

  1. Go to the project and load ESP-IDF. Do this in every new terminal.

    Terminal window
    cd ~/CrossPad
    unset IDF_PATH IDF_PYTHON_ENV_PATH
    PATH=$(printf %s "$PATH" | tr : '\n' | grep -v -e /.espressif/ -e /esp-idf | paste -sd: -)
    . "$CROSSPAD_IDF_DIR/export.sh"
    idf.py --version

    You should see: ESP-IDF v5.5.5

    If not: idf.py command not found

  2. Choose the board revision, then show what the project remembers.

    Terminal window
    idf.py board --set v2
    idf.py board

    You should see: v2 (explicit) from the first command. The second shows v2 (memory), or v2 (device …) when the board is plugged in.

    If not: idf.py board shows no board revision

  3. Build the firmware. The first build downloads components and takes several minutes.

    Terminal window
    idf.py -B build_v2 -DSDKCONFIG=sdkconfig.v2 build

    You should see: -- CrossPad board profile: v2 near the start, and Project build complete. To flash, run: at the end.

    If not: build stops before Project build complete

Later, when you add or remove apps, rebuild from a clean build folder: Install and remove apps shows how.

Next: 3. Flash the board