npx skills add ...
npx skills add mc3545dada/mspm0-skill --skill mspm0-ccs
Tool-neutral CLI agent rules for TI MSPM0 development with Code Composer Studio, Keil/uVision, CMake/GCC/OpenOCD, SysConfig, and DriverLib. Use when an agent needs to inspect or modify MSPM0 projects, edit .syscfg configuration, avoid generated SysConfig/build files, use DriverLib APIs, validate SysConfig output, package reusable MSPM0 examples, or work on NUEDC-style MSPM0 embedded firmware.
npx skills add mc3545dada/mspm0-skill --skill mspm0-ccs
Use this skill for TI MSPM0 firmware projects that use SysConfig and DriverLib through CCS / CCS Theia, Keil/uVision, or CMake + Arm GNU Toolchain + OpenOCD workflows. It is intended for Claude Code, OpenCode, OpenClaw, Continue, Cursor, Codex, and similar CLI/editor agents.
.syscfg or system.syscfg, editable source files, generated ti_msp_dl_config.h, and the active project entrypoint: targetConfigs/*.ccxml for CCS, *.uvprojx plus scatter file for Keil/uVision, or CMakeLists.txt plus OpenOCD .cfg files for CMake/GCC/OpenOCD.python scripts/check_syscfg.py <project-dir> when this skill is available..syscfg metadata: device, package, SDK product, SysConfig version, modules, instances, pins, clocks, and interrupts.ti_msp_dl_config.h for macro names, IRQ names, instance names, and the exact SysConfig init function spelling..syscfg, examples/*/manifest.json, TI SDK examples, or source/ti/driverlib/.meta/*.syscfg.js..syscfg and application-code surface..syscfg edit and run python scripts/run_sysconfig.py <project-dir> before rebuilding. Use CCS SysConfig MCP only when the user explicitly requests it or the current session already exposes a confirmed SysConfig MCP tool.python scripts/detect_probe.py or python scripts/check_syscfg.py <project-dir> --probe before selecting a backend. Confirm the configured probe matches the connected hardware and prefer a System Reset after programming..syscfg as the source of truth for pinmux, peripheral setup, clocks, interrupts, DMA ownership, and generated initialization.Debug/ti_msp_dl_config.c, Debug/ti_msp_dl_config.h, the project-root ti_msp_dl_config.c / ti_msp_dl_config.h pair in Keil layouts, device_linker.cmd, Objects/, Listings/, object files, maps, or .out files..syscfg metadata such as @cliArgs, @v2CliArgs, @versions, --device, --package, and --product.ti_msp_dl_config.h and use the local macros and the local init function spelling, such as SYSCFG_DL_init()..syscfg settings. If a requested feature requires a larger rewrite, explain why before making it when possible.USBDevice, HIDClass, or Ports children. Inspect OS USB/PnP devices and serial ports (python scripts/serial_console.py --list on Windows), then try the intended backend's read-only probe/list command or ask the user before concluding the probe is absent.When the user explicitly says the board is LCKFB Tianmengxing MSPM0G3507:
main.c, empty.c, or a small number of files. It is acceptable to make narrowly scoped edits there.app/, bsp/, components/, core/, drivers/, hal/, middleware/, or tasks/. First identify ownership boundaries before adding peripherals or changing control logic.system.syscfg and ti_msp_dl_config.c / ti_msp_dl_config.h as the configuration source surface for Keil-based MSPM0 projects that keep SysConfig outputs at the project root..uvprojx as the project entrypoint, the scatter file as the linker source of truth, and Objects/, Listings/, *.uvoptx, build logs, and generated outputs as inspection-only unless a request explicitly targets them.CMakeLists.txt, toolchain files, and OpenOCD .cfg files as the project entrypoints for CMake/GCC/OpenOCD projects.cmake --build cmake-build-debug --target <target>.unable to find a matching CMSIS-DAP device, report that as probe discovery failure rather than firmware failure.targetConfigs/*.ccxml when the active project uses OpenOCD instead of DSLite.FreeRTOSConfig.h, FreeRTOS.h, task.h, xTaskCreate, or vTaskStartScheduler are present, treat the project as RTOS-aware.If the user omits important hardware parameters, do not silently choose risky values.
examples/ or local TI SDK examples, then tell the user which defaults were applied.Example: if the user asks "add a timer interrupt", ask which timer and period they want, and recommend a starter such as TIMG at 1 ms or 10 ms if they are unsure.
When asked to drive an external module, sensor, motor driver, servo, display, radio, or custom board:
Read references only when needed:
references/project_workflows.md: .syscfg editing, CCS / Keil / CMake project layout, SDK schema lookup, SysConfig CLI, builds, DSLite/J-Link, and OpenOCD.references/driverlib_runtime_rules.md: DriverLib usage, interrupts, clock tree, delays, and common runtime mistakes.references/hardware_validation_notes.md: verified Tianmengxing MSPM0G3507 lessons, HFXT warnings, flash/reset behavior, and real-board caveats.references/debug_backends.md: CCS-DSS and OpenOCD/GDB probe, flash, breakpoint, retry, and manual-unlock workflows.Use examples/ as one source for reusable tested patterns. Prefer scripts/list_examples.py to inspect available examples before opening individual example files, but do not assume packaged examples outrank the user's existing project structure or official TI SDK examples.
Each reusable example should contain:
Do not require users to drop full CCS projects into examples/. Use scripts/capture_example.py to extract a compact example package from a real project.
When applying an example to a user project:
.syscfg fields, generated-name expectations, code pattern, or debugging lesson.BSP/, do not create BSP/ in the user project unless the user asked for that structure or the project already follows it.UART_poll() for extra receive ports, or TX-only init for ports that do not receive..syscfg, confirm the generated load value against the generated CPU clock, enable the generated IRQ in application code, and keep the ISR short.Run bundled scripts with Python 3.10 or newer. serial_console.py additionally requires pyserial; if import fails, tell the user to run python -m pip install pyserial. TI SDK, SysConfig, CCS/UniFlash, OpenOCD, and GDB remain external workflow dependencies and are not installed by this skill.
python scripts/check_syscfg.py <project-dir>: static project check for .syscfg, generated files, pins, init spelling, project shape, CCS/Keil/CMake/OpenOCD clues, build output, target config, and validation hints.python scripts/run_sysconfig.py <project-dir>: discover the project-declared SysConfig and MSPM0 SDK versions, then validate the selected .syscfg into an isolated temporary directory without overwriting project outputs. Use --tool or --product only for an intentional explicit override.python scripts/detect_probe.py: read-only connected-probe detection for common CMSIS-DAP/DAPLink, J-Link, XDS110, and ST-Link hardware; an empty result is explicitly inconclusive and requires OS/backend fallback checks.python scripts/check_syscfg.py <project-dir> --probe: run the static check, detect connected probes, compare them with project hints, and suppress unsafe flash suggestions when a CCS .ccxml conflicts with the physical probe.python scripts/list_examples.py: list packaged examples from examples/*/manifest.json.python scripts/capture_example.py <project-dir> --name <example-name> --include <glob>: package selected source files and .syscfg from a user project into examples/<example-name>/.python scripts/index_syscfg_examples.py <mspm0-sdk-root> --board LP_MSPM0G3507 --module UART: search local TI SDK examples and module metadata.python scripts/serial_console.py --list: list serial ports.python scripts/ccs_dss_debug.py <project-dir> probe --leave-running: connect through CCS Debug Server Scripting, read reset/register state, verify the configured .ccxml debug path, and continue the target before disconnecting.python scripts/ccs_dss_debug.py <project-dir> load-symbols --symbol main: load debug symbols from .out without programming flash.python scripts/openocd_debug.py <project-dir> probe: connect through OpenOCD, halt briefly, report target state, and resume.python scripts/openocd_debug.py <project-dir> flash: flash, verify, and reset-run an auto-detected .out, .elf, .axf, or .hex output through OpenOCD.python scripts/openocd_debug.py <project-dir> run-to-symbol --symbol main: use OpenOCD + arm-none-eabi-gdb to reset and run to a symbol breakpoint.For the verified CH340 setup, use python scripts/serial_console.py -p COM6 -b 115200 --timestamp --duration 10 after closing other serial tools such as VOFA+.
For line-based MCU parsers, send one test frame and wait for the echo with python scripts/serial_console.py -p COM6 -b 115200 --send "ping" --send-line --timestamp --duration 3. Use --send-hex "00 00 80 3F" when testing binary payloads.
Before selecting a flash backend for a vague request such as "flash this project", run:
Probe detection is read-only. Do not flash when multiple probes are connected, detection is unknown, or the physical probe conflicts with the project configuration until the user confirms the intended backend. On Windows, if no probe is identified, inspect Get-PnpDevice -PresentOnly and python scripts/serial_console.py --list; a debug probe may expose a CMSIS-DAP/XDS interface or virtual COM port outside the generic USB device class.
The verified CCS flash path is DSLite / UniFlash with J-Link. For automated flashing after clock-tree changes, prefer DSLite System Reset:
For CMake/GCC/OpenOCD projects, use the project's existing flash target or explicit OpenOCD config. The packaged openocd_debug.py helper can also flash an existing compatible output. Keep the backend explicit and report probe-discovery errors separately from build success.
Keep CCS-DSS and OpenOCD/GDB as separate backends. Read references/debug_backends.md before debugging or diagnosing repeated probe failures.
For CCS / CCS Theia / UniFlash-style projects with a matching targetConfigs/*.ccxml:
For OpenOCD-capable MSPM0 projects:
The CCS-DSS physical probe is selected by .ccxml; it is not inherently J-Link-only. Use symbol-only loading when firmware is already flashed and rewriting flash is unnecessary. For OpenOCD, do not run concurrent operations against one probe. Neither backend should silently issue destructive recovery. If a target appears locked or protected, first separate probe/wiring/reset faults, application startup faults, SWD password or security policy, invalid NONMAIN configuration, and an interrupted-flash recovery state. On a Tianmengxing MSPM0G3507, a readable SWD DPIDR followed by repeated Could not find MEM-AP to control the core errors was reproduced after programming was interrupted; follow the UART BSL recovery boundary in references/debug_backends.md instead of treating this as proof that the probe is absent. With CCS-DSS and a matching XDS target configuration, a read-only CFGAP_BOOTDIAG check can work even when the Cortex-M0+ session cannot connect. Only use BSL Mass Erase, DSSM Mass Erase, or Factory Reset after the user explicitly authorizes data loss, and follow references/debug_backends.md; never infer success from a reset pulse or a timed-out command. Debug actions can halt the CPU, so report that risk before using breakpoints or register inspection on real-time control hardware.