Skip to content
Eliott65Sondewiki
Contents

How to use it

From a new Pico W to a board flashed over Wi-Fi: the wiring, the commands and the known pitfalls.

Wiring

The same as for debugprobe: GP2 → SWCLK, GP3 → SWDIO, and a common ground. Short wires and a solid ground; a ground wire along SWCLK may help (see Tests on the board).

Building and installing the firmware

  1. Copy firmware/wifi_secret.h.modele to firmware/wifi_secret.h (this file stays out of the repository) and put the Wi-Fi network name and password in it.
  2. Build: make firmware (pico-sdk in ~/pico-sdk, or PICO_SDK_PATH).
  3. First installation: plug in the Pico W while holding BOOTSEL, and copy build/firmware/eliott65sonde_complet.uf2 (boot loader and application) onto the RPI-RP2 drive.
  4. The LED blinks while looking for the network, then stays on.

After that, no more BOOTSEL: see below.

OpenOCD over Wi-Fi

openocd -f interface/cmsis-dap-tcp.cfg -c "cmsis-dap tcp host eliott65sonde.local" \
        -c "cmsis-dap tcp port 4441" -f target/rp2040.cfg
  • Always give cmsis-dap tcp port 4441: without it, the development version of OpenOCD takes a text instead of a number as the port.
  • If eliott65sonde.local does not resolve while the probe answers, check that the network’s DNS does not answer for the local. domain; give the IP address in the meantime.
  • For flashing and long reads, stay at 200 kHz as long as the wiring is the one from the tests.

The local log

outils/e65s.py connecter                               # core 0; --coeur 1
outils/e65s.py releve 1000 0x20000000:4 0x20000004:4   # every 1,000 µs
outils/e65s.py declencheur inchange 0 2000 --zone 0x20000000:256
outils/e65s.py etat
outils/e65s.py releves > releves.csv
outils/e65s.py instantane --fichier instantane.bin
outils/e65s.py lire 0x20010000 65536 --fichier memoire.bin

The commands are in French (connecter: connect, relevé: reading, déclencheur: trigger, état: status, instantané: snapshot, lire: read). The log is paused while OpenOCD is connected to port 4441.

Update over the network

make firmware
outils/e65s.py --hote ADRESSE ota build/firmware/eliott65sonde.uf2
outils/e65s.py --hote ADRESSE etat-ota               # validated, on trial, restored…
outils/e65s.py --hote ADRESSE redemarrer            # --bootsel: RPI-RP2 drive over USB

e65s.py ota validates the new firmware as soon as the probe is back and answers. Otherwise, the boot loader puts the old one back after 3 start-ups. A probe from before v0.6 (without a boot loader) moves to v0.6 through an update with eliott65sonde_complet.uf2.

Going back to USB

Reflash debugprobe’s UF2, through BOOTSEL.

Testing on the PC

make            # CMSIS-DAP processor, simulated target, TCP server
make test       # processor, PIO program in the simulator, OpenOCD, log and update

The PIO program’s bench uses the PIO simulator from the Eliott65 repository.

Sources in the repository : README.md, docs/journal/04-essai-reel.md, docs/journal/06-integrite-du-signal.md.