[feature] DFP (Device Family Pack) / atpack / CMSIS integration with PlatformIO
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- python
- Domain
- build-system, embedded-iot, tooling
Research direction
Start by reviewing the CMSIS-Pack Manager, cpackget, and atpack viewer references, then compare the DFP, atpack, and CMSIS metadata described in the issue with PlatformIO's existing package and board workflows. Done would require a decided integration scope, including whether to support pack browsing, datasheets, or broader device data, plus a defined implementation and validation plan.
Written by the indexing model from the issue text.
Description
Hello,
I'm currently looking at DFP... atpack... CMSIS... (I'm totaly new to this topic)
For those who don't know much about these formats. Here's a quick summary (from my understanding)
-
DFP (Device Family Pack) are standardized packages containing device-specific information including register definitions, memory maps, peripheral descriptions, startup code, and linker scripts for microcontroller families. They're part of the CMSIS-Pack standard.
-
atpack: Microchip's (formerly Atmel's) specific implementation of device packs for their AVR, PIC and ARM microcontrollers. These contain similar device-specific data but in Microchip's format.
-
CMSIS (Cortex Microcontroller Software Interface Standard): ARM's hardware abstraction layer providing standardized APIs, device headers, and system startup code for Cortex-M processors. CMSIS-Pack is the packaging format for distributing device support.
I wonder if all of these very interesting data couldn't (shouldn't) be integrated into PlatformIO environment... especially the VS Code extension.
A lot of information could be get out of such files and it could help developers if they are well integrated with PlatformIO environment.
Let's have a look for example at a quite old MCU from Microchip ( PIC16F876A see #704 )
https://packs.download.microchip.com/
/Microchip.pidx (if you want to grab index automatically)
Microchip PIC16Fxxx Series Device Support (1.7.162) contains the following (rename .atpack with .zip and unzip it)
> tree /f
│ Microchip.PIC16Fxxx_DFP.pdsc
│ Microchip.PIC16Fxxx_DFP.sha1
│ package.content
│
├───edc
│ AC162052_AS_PIC16F630.PIC
│ AC162052_AS_PIC16F676.PIC
│ AC162053_AS_PIC16F627A.PIC
│ AC162053_AS_PIC16F628A.PIC
│ AC162053_AS_PIC16F648A.PIC
...
│ PIC16LF876.PIC
│ PIC16LF876A.PIC
│ PIC16LF877.PIC
│ PIC16LF877A.PIC
│ PIC16LF88.PIC
│
├───hwtools
│ ├───mplab
│ │ MPHeader.xml
│ │ PluginBoardSupport.xml
│ │
│ ├───persfr
│ │ pic16.persfr
│ │
│ └───sdm
│ sdmCompilers.xml
│ sdmDebuggerMap.xml
│ sdmICD3.xml
│ sdmICD4.xml
...
│ 16lf876.html
│ 16lf876a.html
│ 16lf877.html
│ 16lf877a.html
│ 16lf88.html
│
└───pic
├───dat
│ │ 20250326211330_en.msgs
│ │
│ ├───cfgdata
│ │ 16f505.cfgdata
│ │ 16f506.cfgdata
│ │ 16f526.cfgdata
...
│ │ 16lf877.cfgdata
│ │ 16lf877a.cfgdata
│ │ 16lf88.cfgdata
│ │
│ ├───cfgmap
│ │ 16f505.cfgmap
│ │ 16f506.cfgmap
│ │ 16f526.cfgmap
...
│ │ 16lf876.cfgmap
│ │ 16lf876a.cfgmap
│ │ 16lf877.cfgmap
│ │ 16lf877a.cfgmap
│ │ 16lf88.cfgmap
│ │
│ └───ini
│ 16f188ex.ini
│ 16f18nvm.ini
│ 16f505.ini
...
│ 16lf876.ini
│ 16lf876a.ini
│ 16lf877.ini
│ 16lf877a.ini
│ 16lf88.ini
│
└───include
│ aspic.h
│ caspic.h
│ pic.h
│ pic.inc
│ pic_as_chip_select.inc
│ pic_chip_select.h
│
└───proc
16f505.cgen.inc
16f506.cgen.inc
16f526.cgen.inc
...
pic16lf876.h
pic16lf876.inc
pic16lf876a.h
pic16lf876a.inc
pic16lf877.h
pic16lf877.inc
pic16lf877a.h
pic16lf877a.inc
pic16lf88.h
pic16lf88.inc
This kind of file is a Device Family Pack (DFP) for Microchip PIC16Fxxx microcontrollers. The Microchip.PIC16Fxxx_DFP.pdsc file describes the package contents and supported devices.
Key points:
- Purpose: Provides device support for the PIC16Fxxx series (configuration files, hardware tool support, IDE/compiler prerequisites).
- Supported tools: MPLAB X IDE, MPLAB X IPE, MPLAB XC8 compiler.
- Devices: Lists many PIC16Fxxx microcontrollers (e.g., PIC16F505, PIC16F506, PIC16F526, etc.), each with references to device-specific files, hardware tool configurations, and documentation links.
- Hardware tools: Includes support files for debugging, simulation, and programming (e.g., ICD3, ICD4, RealICE, simulator).
- Release history: Documents changes and updates for each version.
Here is the role of each file extension found in the project, based on the pdsc file contents:
-
.sha1(Checksum): SHA1 hash file Verifies pack integrity during installation. Ensures files haven't been corrupted or tampered with -
package.content. Resource manifest file. Lists all files included in the pack. Maps resources to specific devices Organizes files by type (pic, hwtools, xc8, docs) -
.pdsc: The Device Family Pack (DFP) description file itself. It defines the package structure, supported devices, tool requirements, and links to all other files. Example :Microchip.PIC16Fxxx_DFP.pdsc:- Defines all supported devices (PIC16F505, PIC16F506, etc.)
- Specifies tool requirements and file locations
- Contains device processor information (core type, endianness, memory)
- Links to datasheets and product pages
-
.PIC: (Located in edc directory) Device configuration and description files for individual PIC16Fxxx microcontrollers. They contain information needed by development tools to support programming, debugging, and simulation for each device. -
Device-specific
.PICfiles- Electronic Device Configuration files
- Define memory maps, register layouts, configuration bits
- Specify device features and peripherals
-
Adapter .PIC files (e.g.,
edc/AC162059_AS_PIC16F505.PIC)- Configuration for specific programming/debugging adapters
- Support various development boards and programmers
-
.xml: Hardware tool configuration files. Used by MPLAB tools to define headers, board support, compiler mappings, debugger maps, and simulator settings. Located inhwtoolssubdirectories:mplabMPHeader.xml: MPLAB IDE integration headerPluginBoardSupport.xml: Development board support
sdmsdmCompilers.xml: Compiler definitions and mappingssdmDebuggerMap.xml: Debugger hardware mappingsdmICD3.xml: ICD3 debugger supportsdmICD4.xml: ICD4 debugger supportsdmICD5.xml: ICD5 debugger supportsdmICE4.xml: ICE4 emulator supportsdmRealICE.xml: RealICE debugger supportsdmRealICE4.xml: RealICE4 debugger supportsdmSimulator.xml: Simulator configuration
-
.persfr: Peripheral SFR (Special Function Register) mapping files. They describe the registers and peripherals for PIC16 devices, helping IDEs and debuggers display and interact with device features. Examplepic16.persfr- Special Function Register definitions
- Memory persistence configuration for debugging
- Variable watch and breakpoint support
These files together enable IDEs and toolchains (like MPLAB X and XC8) to recognize, configure, and work with the supported PIC16Fxxx microcontrollers but PlatformIO could probably also make use of these data (may I ask a lawyer ⚖️?)
Are there any plans about such an integration ?
The very minimal integration could be to simply be able to browse datasheet when using a board. But I'm pretty sure many integration ideas could come up.
Kind regards
Sébastien
Related project could be
- https://github.com/pyocd/cmsis-pack-manager
- https://github.com/Open-CMSIS-Pack/cpackget
- https://ctag.github.io/atpack/atpack.html provides an example of an atpack viewer (for ATMEL AVR) maybe that's something which could be integrated into https://github.com/platformio/platformio-vscode-ide
- Dominant language
- Python
- Stars
- 9.6k
- Forks
- 916
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from platformio/platformio-core
-
Toolchain include order from DumpIntegrationIncludes depends on directory order (unsorted glob)Possibly taken @Leooo21 claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
platformio/platformio-core#5555 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
platformio/platformio-core#5554 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
platformio/platformio-core#5552 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
platformio/platformio-core#5551 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
platformio/platformio-core#5553 ·
Maintainers usually reply within 1 day
All issues in platformio/platformio-core
Similar issues
-
docs(contributing): the two things that silently block a PRPossibly taken A pull request linked to this issue is open or already merged. Openavailable documentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 95/100
Nixitov/Riptide-Native#944 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
JTHCode/secretguard#24 ·
Maintainers usually reply within 1 day
-
area: middleware documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 ·
Maintainers usually reply within 1 day