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.
-
Go to the project and load ESP-IDF. Do this in every new terminal.
Terminal window cd ~/CrossPadunset IDF_PATH IDF_PYTHON_ENV_PATHPATH=$(printf %s "$PATH" | tr : '\n' | grep -v -e /.espressif/ -e /esp-idf | paste -sd: -). "$CROSSPAD_IDF_DIR/export.sh"idf.py --versionYou should see:
ESP-IDF v5.5.5If not: idf.py command not found
-
Choose the board revision, then show what the project remembers.
Terminal window idf.py board --set v2idf.py boardYou should see:
v2 (explicit)from the first command. The second showsv2 (memory), orv2 (device …)when the board is plugged in. -
Build the firmware. The first build downloads components and takes several minutes.
Terminal window idf.py -B build_v2 -DSDKCONFIG=sdkconfig.v2 buildYou should see:
-- CrossPad board profile: v2near the start, andProject build complete. To flash, run:at the end.
-
Go to the project and load ESP-IDF. Do this in every new terminal.
Terminal window cd ~/CrossPadunset IDF_PATH IDF_PYTHON_ENV_PATHPATH=$(printf %s "$PATH" | tr : '\n' | grep -v -e /.espressif/ -e /esp-idf | paste -sd: -). "$CROSSPAD_IDF_DIR/export.sh"idf.py --versionYou should see:
ESP-IDF v5.5.5If not: idf.py command not found
-
Choose the board revision, then show what the project remembers.
Terminal window idf.py board --set v2idf.py boardYou should see:
v2 (explicit)from the first command. The second showsv2 (memory), orv2 (device …)when the board is plugged in. -
Build the firmware. The first build downloads components and takes several minutes.
Terminal window idf.py -B build_v2 -DSDKCONFIG=sdkconfig.v2 buildYou should see:
-- CrossPad board profile: v2near the start, andProject build complete. To flash, run:at the end.
-
Go to the project and load ESP-IDF. Do this in every new PowerShell window.
Terminal window Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -Force$env:IDF_TOOLS_PATH = "C:\CrossPad\.espressif"Remove-Item Env:IDF_PATH, Env:IDF_PYTHON_ENV_PATH -ErrorAction SilentlyContinue$env:Path = ($env:Path -split ';' | Where-Object { $_ -notmatch '\\\.espressif\\|\\esp-idf' }) -join ';'. "$env:CROSSPAD_IDF_DIR\export.ps1"cd C:\CrossPad\firmwareidf.py --versionYou should see:
ESP-IDF v5.5.5If not: idf.py command not found
-
Choose the board revision, then show what the project remembers.
Terminal window idf.py board --set v2idf.py boardYou should see:
v2 (explicit)from the first command. The second showsv2 (memory), orv2 (device …)when the board is plugged in. -
Build the firmware. The first build downloads components and takes several minutes. PowerShell needs the quotes around the
-Dargument.Terminal window idf.py -B build_v2 "-DSDKCONFIG=sdkconfig.v2" buildYou should see:
-- CrossPad board profile: v2near the start, andProject build complete. To flash, run:at the end.
Later, when you add or remove apps, rebuild from a clean build folder: Install and remove apps shows how.
Next: 3. Flash the board