The MPLAB Blockset adds a dedicated Microchip tab to the Simulink toolstrip (ribbon). Every common action โ€” configuring the target, inserting a peripheral, generating code, flashing the board, and live-tuning over External Mode โ€” is one click away from this tab. This page documents each button.

The Microchip tab appears automatically when a model is configured for a Microchip target (it has a Microchip Master block, or its System target file is one of the MCHP_*_stf.tlc targets).


Tab layout

The tab is organised into sections, left to right:

SectionPurpose
SetupBoard templates, target configuration
EditInsert peripheral, View Code, open in MPLAB X / VS Code
BuildGenerate code, Build-Deploy-Start, Clean folder
Ext-ModeExternal Mode / PIL settings, Monitor & Tune, PicGui
TuneTunable parameters (promote / audit / show / bind)
Sim-OnlyToggle and highlight simulation-only blocks

Setup

Board templates

Opens the board-template gallery โ€” a grid of ready-to-build starter models for the supported development boards (MCLV-2, MCLV-48V-300W, MCHV-230VAC, Curiosity Nano, MCDB, โ€ฆ). Picking one creates a new model pre-wired for that board and DIM. See Board Templates .

Command: MCHP_Fun.openBoardTemplate()


Edit

Insert Peripheral

Opens a card-style picker of the peripheral blocks that the currently selected chip actually supports, and drops the chosen block into the model โ€” one block at a time, with no pin conflicts.

The list is filtered by the chip’s real peripheral set: a chip that has the modern High-Speed ADC / PWM does not offer the legacy ADC / PWM block, and vice-versa. (The same filter powers the right-click Insert Peripheral context-menu item.)

Command: MCHP_Fun.insertPeripheralBlock()

View Code

Opens the generated C source for the model (after a build) in the MATLAB editor / code view, with traceability back to the originating blocks.

Command: MCHP_Fun.viewCode()

MPLAB X

Opens the generated project (.X) in MPLAB X IDE for hardware debugging, breakpoints, and the full Microchip debug toolchain.

VS Code

Opens the generated project in Visual Studio Code (with the MPLAB extension), for users who prefer a VS Code workflow.

Command: MCHP_Fun.openInVsCode()


Build

Generate Code only

Runs Embedded Coder to produce the C source and the .X project without compiling or flashing. Useful for inspecting the generated code or building externally.

Command: MCHP_Fun.generateCodeOnly()

Build, Deploy & Start

The one-click path: generate code โ†’ compile with the XC compiler โ†’ program the target โ†’ start execution. Equivalent to Ctrl+B plus deploy.

Command: MCHP_Fun.buildDeployStart()

Clean folder

Removes build artefacts (slprj/, the .X project, generated .c/.h, .hex/.elf) for a clean rebuild.

Command: MCHP_Fun.CleanFolder(bdroot)


Ext-Mode (External Mode & PIL)

Ext Mode settings

Opens the External Mode configuration dialog โ€” pick the COM port (the PKOB nano CDC virtual serial port), baud rate, and transport. See External Mode .

Command: MCHP_ExtModeGui(bdroot)

PIL settings

Opens the Processor-in-the-Loop configuration. See PIL Testing .

Command: MCHP_PILGui(bdroot)

Monitor & Tune

Builds, flashes, and starts streaming live signals to the Simulink scopes while letting you tune parameters on the running target โ€” all in one click. This is the External Mode “go” button.

Command: MCHP_Fun.monitorTuneGuarded()

PicGui

Launches the picgui MATLAB host interface for interactive UART communication and real-time plotting (used with the UART Tx-Matlab block). See picgui .

Command: picgui


Tune (Tunable parameters)

A three-row stack for exposing block parameters as calibratable variables reachable over XCP / External Mode. See the dedicated Tunable Parameters guide.

ButtonAction
Tunable paramPromote the selected block’s literal parameters to tunable Simulink.Parameters
Tunable auditWhole-model audit table of every promotable field
Tunable showHighlight tunable (XCP-reachable) vs C-only blocks on the canvas
Bind sliderAttach a dashboard Slider/Knob to a promoted parameter
Tunable โ€ฆDrop-down with the full verb set (export/import calibration set, rename, revert)

Commands: MCHP_Fun.tunable.run('promote' | 'audit' | 'highlight' | 'bind')


Sim-Only

Sim-Only toggle / Highlight / Clear

Mark blocks as simulation-only (excluded from code generation), highlight them on the canvas, or clear the highlight. Useful for keeping plant models, scopes, and test harnesses in the same model as the embedded algorithm without generating code for them.

Commands: MCHP_Fun.toggleSimOnly(), MCHP_Fun.highlightSimOnly(bdroot), MCHP_Fun.clearSimOnlyHighlight(bdroot)


Keyboard shortcuts

ShortcutAction
Ctrl+BBuild (generate + compile + deploy)
Ctrl+DUpdate diagram (refresh pin/peripheral allocation after edits)
Ctrl+ULook under a masked subsystem (e.g. the BOARD block in a template)