1 # CMSIS-Core Device Files {#cmsis_device_files}
3 The **CMSIS-Core Device Files** implement CMSIS-Core support for a specific microcontroller device or family of devices. These files are typically provided by the device vendor and use \ref cmsis_standard_files via \#include directives.
5 CMSIS-Core specifies the organization of CMSIS-Core Device Files, defines their functionalities, and provides unified naming conventions. This brings following benefits:
6 - Simplified device support for vendors with fast scaling for device families and variants on all Arm Cortex-M cores.
7 - Uniform workflows and experience for application developers.
9 Following CMSIS-Core Device Files are defined:
10 - \subpage system_c_pg
11 - \subpage device_h_pg
12 - \subpage startup_c_pg
13 - \subpage linker_sct_pg
15 - \subpage partition_h_pg
16 - \subpage partition_gen_h_pg
19 \ref cmsis_files_dfps explains how to distribute \ref cmsis_device_files in CMSIS-Pack format.
21 ## Device Template Files {#cmsis_template_files}
23 CMSIS-Core includes the template files that simplify the creation of CMSIS-Core Device Files for a specific device variant.
25 Silicon vendors typically need to add to these template files the following information:
26 - **Device Peripheral Access Layer** that provides definitions for device-specific peripherals.
27 - **Access Functions for Peripherals** (optional) that provides additional helper functions to access device-specific peripherals.
28 - **Interrupt vectors** in the startup file that are device specific.
30 Template File | Description
31 :-----------------------------------|:----------------------------------------
32 📂 CMSIS/Core/Template/Device_M | Folder with CMSIS-Core device file templates ([See on GitHub](https://github.com/ARM-software/CMSIS_6/blob/main/CMSIS/Core/Template/Device_M/))
33 ┣ 📂 Config | Template configuration files
34   ┣ 📄 Device_ac6.sct | \ref linker_sct_pg template
35   ┣ 📄 Device_gcc.ld | Linker description file for GNU GCC Arm Embedded Compiler
36   â”— 📄 partition_Device.h |\ref partition_h_pg template
37 ┣ 📂 Include | Template header files
38   ┣ 📄 Device.h | \ref device_h_pg template
39   â”— 📄 system_Device.h | \ref system_Device_sec
40 ┗ 📂 Source | Template C files
41   ┣ 📄 startup_Device.c | \ref startup_c_pg template
42   â”— 📄 system_Device.c | \ref system_Device_sec
44 **Adapt Template Files to a Device**
46 Each template file contains comments that start with **ToDo:** and describe required modifications.
48 The templates contain several placeholders that need to be replaced when creating CMSIS-Core device files:
50 Placeholder | To be replaced with
51 :--------------------------|:----------------------------------------
52 `<Device>` | The specific device name or device family name, for example `LPC17xx`
53 `<DeviceInterrupt>` | The specific interrupt name of the device, for example `TIM1` for Timer 1 interrupt
54 `<DeviceAbbreviation>` | Short name or abbreviation of the device family, for example `LPC`
55 `Cortex-M#` | The specific Cortex-M processor name, for example `Cortex-M3`
57 Device files for the \ref device_examples can be also a good reference point for implementing CMSIS-Core support for specific devices.