# The RSL15 CMSIS-Pack Component Structure

## Introduction

The CMSIS-Pack is a convenient method to package and deliver sample code. The structure of the pack, projects and workspaces allow for easy update when new packs are available.

The sample code project workspaces contain the application files, but not the system-level files. The system-level files remain in the CMSIS-Pack, and are linked to the project workspaces. This allows for easy updating of these linked system-level files when new packs are installed, without changing the user application code to which these files are linked. For most use cases, customers do not need to modify these linked system level files.

## What is a Component?

A component is a group of files in the CMSIS-Pack that are relevant to a particular project. For example, the GPIO component in the blinky sample project consists of gpio_driver.c, gpio_driver.h and Driver_GPIO.h. This is shown in the "GPIO Component" figure, which shows a list of the files in the GPIO component.

Figure: GPIO Component

Component Files

The files of a software component are used in development toolchains when an application is being built. The way the files are handled depends on the attributes of the files, as follows:

- Libraries, source files, and header files without an attribute cannot be modified in the Keil μVision IDE, but can be modified in the onsemi and IAR Embedded Workbench IDEs. These files without attributes are stored in the folders of the software component and are directly included from this location into the project. This means you need to be careful in modifying these files, because your changes apply to all the other applications that use these files.
- Header files of compiled libraries are linked/read-only, because modifying the header without the library source has no effect on the library.
- Source files and header files that have the config attribute are copied to the project, so that the user can edit them according to what is needed in the application.

The "Display of a Software Component’s Files in Different Development Tools" figure shows how a software component’s files are displayed in the three different development tools. In the figure, files that do not have an attribute are highlighted for the onsemi IDE and the IAR IDE; for the Keil IDE, they have a lock icon. Files with attr=“config” are not highlighted.

Figure: Display of a Software Component’s Files in Different Development Tools

The "Software Components for the Blinky Sample Application" figure shows the software components for the blinky sample project, as have been illustrated in the "Display of a Software Component’s Files in Different Development Tools" figure.

Figure: Software Components for the Blinky Sample Application

## Modifying Files Without an Attribute

For most cases, you do not need to modify the linked files that do not have an attribute, as any modifications are applied to all applications that use the files. However, if you do need to modify the linked file for a particular application without impacting the other applications, you can do so by following these steps:

1. Open the ONSemiconductor.RSL15.pdsc file located at %LOCALAPPDATA%\Arm\Packs\ONSemiconductor\RSL15\<version> (for onsemi IDE and Keil IDE), or C:\Users\<user_name>\IAR-CMSIS-Packs\ONSemiconductor\RSL15\<version> (for IAR IDE).
2. Search for the file you want to modify in the <component> section, and add attr = “config” to the file. (See the "Modifying a File Without an Attribute" figure.)

Figure: Modifying a File Without an Attribute

1. Save the ONSemiconductor.RSL15.pdsc file.

NOTE: For the Keil IDE, you need to open the editor in administrator mode; otherwise you cannot save the file.

1. Restart the IDE.