-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
.PIC
files- 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 inhwtools
subdirectories:mplab
MPHeader.xml
: MPLAB IDE integration headerPluginBoardSupport.xml
: Development board support
sdm
sdmCompilers.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