Repository navigation
Releases: Clifford-Swartz/peripheral-pretender
Release list
VS Code extension 0.6.2
Peripheral Pretender for VS Code, Windows x64. QEMU, Python and gdb are bundled: nothing else to install.
Install: code --install-extension peripheral-pretender-win32-x64-0.6.2.vsix, reload VS Code, click the chip icon in the activity bar.
New since 0.4.8:
- The workspace. The bench opens as you left it: several boards side by side, each with its own firmware, plus their Click boards, parts and wires. A palette (press
/to search) holds templates, boards, Click boards, parts and pin tags; click to add or drag onto the bench. Click boards can also be wired pin by pin to any pads, and the bench checks that a SERCOM can reach them. - The timeline (the waveform button, top right): pins, decoded UART, SPI and I2C traffic, and interrupts, in the firmware's own time. It zooms from a minute down to microseconds, and works on all four boards, the AVR64EA48 Nano and the PyKit included.
- Faults (side panel): short a pin to GND or VDD, make an I2C device stop answering, or stick an SPI host's MISO. The board's title bar shows ⚡ while any is set.
- Exact replay (timeline bar): Record restarts the firmware and keeps every button press, Click control and console line with the instant it took effect. Replay runs it again and says whether everything happened the same, or where it first differed.
- Assistants: the extension registers the Peripheral Pretender MCP server with VS Code (1.101 or later), so an AI assistant can add boards, plug Clicks, run firmware, press buttons, read the console and the timeline, inject faults, and record and replay.
- AVR fix: an interrupt that went pending while interrupts were disabled was taken late after
sei, at a moment that changed from run to run. It is now taken after the instruction that followssei, as on silicon (patch 0077). - Circuits simulated alongside the twin (the RC template, and bench capacitors and inductors) need ngspice's shared library, which is not bundled: MSYS2's
mingw-w64-ucrt-x86_64-ngspice, or setPP_NGSPICEto its path.
Boards: PIC32CM MC00 Curiosity Pro, PIC32CM JH01 Curiosity Pro, AVR64EA48 Curiosity Nano on a Nano Base, Curiosity PyKit Explorer. 31 Click boards.
The QEMU binaries are GPL-2.0-or-later, built from QEMU v11.1.2 plus the patches in qemu/patches/ (0001-0078 at this tag). A personal project, not affiliated with Microchip or MikroElektronika. Setting up a development machine: SETUP.md.
VS Code extension 0.4.8
Peripheral Pretender for VS Code, Windows x64. QEMU, Python and gdb are bundled: nothing else to install.
Install: code --install-extension peripheral-pretender-win32-x64-0.4.8.vsix, reload VS Code, click the chip icon in the activity bar.
New since 0.4.7, probed on PIC32CM MC00 silicon and checked against it:
- PDEC, the position decoder: quadrature decoding (X4, X2) from pins or events with silicon's direction, velocity and error rules, angular and revolution counters, compare flags, the START/STOP/RETRIGGER commands, COUNTER mode, Hall sensor codes and the compare buffer. The index input is not modelled yet.
Boards: PIC32CM MC00 Curiosity Pro, PIC32CM JH01 Curiosity Pro, AVR64EA48 Curiosity Nano on a Nano Base, Curiosity PyKit Explorer. 31 Click boards, every one of them on the Nano Base too.
The QEMU binaries are GPL-2.0-or-later, built from QEMU v11.1.2 plus the patches in qemu/patches/. A personal project, not affiliated with Microchip or MikroElektronika. Setting up a development machine: SETUP.md.
VS Code extension 0.4.7
Peripheral Pretender for VS Code, Windows x64. QEMU, Python and gdb are bundled: nothing else to install.
Install: code --install-extension peripheral-pretender-win32-x64-0.4.7.vsix, reload VS Code, click the chip icon in the activity bar.
New since 0.4.6, each feature probed on PIC32CM MC00 silicon and checked against it:
- Sleep and standby: a WFI with PM.SLEEPCFG = STANDBY stops every clock channel that no peripheral with RUNSTDBY asks for, and the CPU clock with SysTick; counters resume where they stopped, and only what still runs (RTC, WDT, EIC, peripherals with RUNSTDBY) wakes the core.
- CCL: the four lookup tables and two sequencers on every input source (pins, LINK, FEEDBACK, events, TC and TCC waveform outputs, AC comparators), with the synchronizer, filter and edge detector timing and the register protection silicon applies.
- Pins as peripheral inputs: a peripheral now reads a pad muxed to it, which the CCL's inputs use and later models will reuse.
Boards: PIC32CM MC00 Curiosity Pro, PIC32CM JH01 Curiosity Pro, AVR64EA48 Curiosity Nano on a Nano Base, Curiosity PyKit Explorer. 31 Click boards, every one of them on the Nano Base too.
The QEMU binaries are GPL-2.0-or-later, built from QEMU v11.1.2 plus the patches in qemu/patches/. A personal project, not affiliated with Microchip or MikroElektronika. Setting up a development machine: SETUP.md.
VS Code extension 0.4.6
Peripheral Pretender for VS Code, Windows x64. QEMU, Python and gdb are bundled: nothing else to install.
Install: code --install-extension peripheral-pretender-win32-x64-0.4.6.vsix, reload VS Code, click the chip icon in the activity bar.
New since 0.4.5: the PIC32CM analog blocks and DMA, each feature probed on PIC32CM MC00 silicon and checked against it:
- ADC: conversions take the time silicon takes (prescaler, resolution, sampling, averaging, start-up after the enable); free running, automatic sequences with SEQSTATUS, the START and SYNC (flush) events, RESRDY and WINMON event outputs, and ADC1 as ADC0's client (both at once or interleaved).
- DAC: DATABUF moved by the START event, the EMPTY and UNDERRUN flags, the EMPTY event, SYNCBUSY while DATABUF waits, and dithering.
- DMA: every peripheral trigger is wired now. New: ADC, SDADC and TSENS results, the DAC's EMPTY, and TCC overflow, compare and capture requests. A request already pending when a channel is enabled moves at once, as on silicon.
Boards: PIC32CM MC00 Curiosity Pro, PIC32CM JH01 Curiosity Pro, AVR64EA48 Curiosity Nano on a Nano Base, Curiosity PyKit Explorer. 31 Click boards, every one of them on the Nano Base too.
The QEMU binaries are GPL-2.0-or-later, built from QEMU v11.1.2 plus the patches in qemu/patches/. A personal project, not affiliated with Microchip or MikroElektronika. Setting up a development machine: SETUP.md.
VS Code extension 0.4.5
Peripheral Pretender for VS Code, Windows x64. QEMU, Python and gdb are bundled: nothing else to install.
Install: code --install-extension peripheral-pretender-win32-x64-0.4.5.vsix, reload VS Code, click the chip icon in the activity bar.
New since 0.4.4: the PIC32CM timers on their pins, each feature probed on PIC32CM MC00 silicon and checked against it:
- TC: waveform outputs on the pads (NFRQ, MFRQ, NPWM, MPWM, inversion) and capture from events (plain, timestamp, period and pulse width) through the two-deep capture FIFO.
- TCC: the waveform extension (output matrix, dead time, swap, pattern generator, inversion), DSCRITICAL, RAMP2/RAMP2A/RAMP2C, dithering, and what the outputs do after a STOP (the DRVCTRL non-recoverable state).
- TCC faults: recoverable faults A and B with filter, blanking, qualification, keep, restart, hardware and software halt and capture; non-recoverable faults that hold the counter and the outputs until software clears them.
- TCC capture: event capture through the CCx/CCBUFx FIFO, period and pulse-width capture (PPW/PWP), and the circular PER and CC buffers.
- Timing: the TC and TCC no longer drift a tick every few hundred events at high clock rates.
Boards: PIC32CM MC00 Curiosity Pro, PIC32CM JH01 Curiosity Pro, AVR64EA48 Curiosity Nano on a Nano Base, Curiosity PyKit Explorer. 31 Click boards, every one of them on the Nano Base too.
The QEMU binaries are GPL-2.0-or-later, built from QEMU v11.1.2 plus the patches in qemu/patches/. A personal project, not affiliated with Microchip or MikroElektronika. Setting up a development machine: SETUP.md.
VS Code extension 0.4.4
Peripheral Pretender for VS Code, Windows x64. QEMU, Python and gdb are bundled: nothing else to install.
Install: code --install-extension peripheral-pretender-win32-x64-0.4.4.vsix, reload VS Code, click the chip icon in the activity bar.
New since 0.4.3: two more PIC32CM models, each probed on PIC32CM MC00 silicon and checked against it:
- WDT, the watchdog (MC00, JH01, SAM E51): time-out, window mode and the early warning, with silicon's synchronization delays. A wrong CLEAR key resets the part, even while the watchdog is disabled, as on silicon.
- NVMCTRL, flash and data flash programming (MC00, JH01): the page buffer, erase and write with silicon's timings, automatic page writes, region locks and BOOTPROT. What a program writes to flash survives resets, and code written into flash runs.
Boards: PIC32CM MC00 Curiosity Pro, PIC32CM JH01 Curiosity Pro, AVR64EA48 Curiosity Nano on a Nano Base, Curiosity PyKit Explorer. 31 Click boards, every one of them on the Nano Base too.
The QEMU binaries are GPL-2.0-or-later, built from QEMU v11.1.2 plus the patches in qemu/patches/. A personal project, not affiliated with Microchip or MikroElektronika. Setting up a development machine: SETUP.md.
VS Code extension 0.4.3
Peripheral Pretender for VS Code, Windows x64. QEMU, Python and gdb are bundled: nothing else to install.
Install: code --install-extension peripheral-pretender-win32-x64-0.4.3.vsix, reload VS Code, click the chip icon in the activity bar.
New since 0.4.2: four more PIC32CM peripherals, each modelled from probes on PIC32CM MC00 silicon and checked against it:
- AC, the analog comparators (MC00, JH01)
- TSENS, the temperature sensor (MC00); set the temperature with the
temperatureproperty - FREQM, the frequency meter (MC00, JH01, SAM E51); GCLK dividers are now exact
- DMAC, the DMA controller with its CRC engine (MC00, JH01)
The MC00 board also takes vcc=<mV> (the VCC_SEL jumper) and xosc32k=off (a board without its 32.768 kHz oscillator).
Boards: PIC32CM MC00 Curiosity Pro, PIC32CM JH01 Curiosity Pro, AVR64EA48 Curiosity Nano on a Nano Base, Curiosity PyKit Explorer. 31 Click boards, every one of them on the Nano Base too.
The QEMU binaries are GPL-2.0-or-later, built from QEMU v11.1.2 plus the patches in qemu/patches/. A personal project, not affiliated with Microchip or MikroElektronika. Setting up a development machine: SETUP.md.
VS Code extension 0.4.2
Peripheral Pretender for VS Code, Windows x64. QEMU, Python and gdb are bundled: nothing else to install.
Install: code --install-extension peripheral-pretender-win32-x64-0.4.2.vsix, reload VS Code, click the chip icon in the activity bar.
Boards: PIC32CM MC00 Curiosity Pro, PIC32CM JH01 Curiosity Pro, AVR64EA48 Curiosity Nano on a Nano Base, Curiosity PyKit Explorer. 31 Click boards, every one of them on the Nano Base too.
The QEMU binaries are GPL-2.0-or-later, built from QEMU v11.1.2 plus the patches in qemu/patches/. A personal project, not affiliated with Microchip or MikroElektronika. Setting up a development machine: SETUP.md.