Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified documentation/doxygen/src/images/blocks.pptx
Binary file not shown.
Binary file modified documentation/doxygen/src/images/component-selection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified documentation/doxygen/src/images/retarget_io_std.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 8 additions & 7 deletions documentation/doxygen/src/rt_io.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@ The subcomponent selection allows you to change the target hardware interface of

The following subcomponents are available:

Variant | Description
:---------------------|:-------------------
**Breakpoint** | When the I/O stream is used, the application stops with [BKPT](https://developer.arm.com/documentation/100073/latest/The-Arm-C-and-C---Libraries/Support-for-building-an-application-with-the-C-library/Using-the-C-and-C---libraries-with-an-application-in-a-semihosting-environment?lang=en) instruction. No additional code is required.
**Event Recorder** | STDOUT and STDERR can be redirected using the [Event Recorder](https://arm-software.github.io/CMSIS-View/main/evr.html) (especially interesting for targets without ITM (such as Cortex-M0/M0+/M23)).
**ITM** | Use [Instrumentation Trace Macrocell (ITM)](https://developer.arm.com/documentation/ddi0314/h/Instrumentation-Trace-Macrocell?lang=en) for I/O communication via the debugger (only available for Cortex-M3/M4/M7/M33/M55/M85 processors).<br/> Usually, data is shown in a dedicated window.<br/> No additional code is required to output or input data through the ITM channel. However, you have to configure the ITM channel for tracing.
**UART** | Retarget I/O streams to UART. Default implementation variant uses CMSIS-Driver USART.
**Custom** | Retarget I/O stream to a user defined interface (such as custom UART implementation or other application specific interface).<br/>See \subpage custom_subcomponent for further details.
Variant | Description
:------------------|:-------------------
**Breakpoint** | When the I/O stream is used, the application stops with [BKPT](https://developer.arm.com/documentation/100073/latest/The-Arm-C-and-C---Libraries/Support-for-building-an-application-with-the-C-library/Using-the-C-and-C---libraries-with-an-application-in-a-semihosting-environment?lang=en) instruction. No additional code is required.
**Event Recorder** | STDOUT and STDERR can be redirected using the [Event Recorder](https://arm-software.github.io/CMSIS-View/main/evr.html) (especially interesting for targets without ITM (such as Cortex-M0/M0+/M23)).
**ITM** | Use [Instrumentation Trace Macrocell (ITM)](https://developer.arm.com/documentation/ddi0314/h/Instrumentation-Trace-Macrocell?lang=en) for I/O communication via the debugger (only available for Cortex-M3/M4/M7/M33/M55/M85 processors).<br/> Usually, data is shown in a dedicated window.<br/> No additional code is required to output or input data through the ITM channel. However, you have to configure the ITM channel for tracing.
**RTT** | Retarget I/O streams to SEGGER RTT Channel 0.
**UART** | Retarget I/O streams to UART. Default implementation variant uses CMSIS-Driver USART.
**Custom** | Retarget I/O stream to a user defined interface (such as custom UART implementation or other application specific interface).<br/>See \subpage custom_subcomponent for further details.


> **Note**
Expand Down
105 changes: 102 additions & 3 deletions documentation/doxygen/src/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,116 @@ cpackget add ARM::CMSIS-Compiler
Alternatively, you can download the latest version from the
[CMSIS-Compiler](https://www.keil.arm.com/packs/cmsis-compiler-arm/versions/) page.

## Component selection and usage
## Component selection

1. In your IDE, open the
[Manage software components](https://mdk-packs.github.io/vscode-cmsis-solution-docs/create_app.html#software-components)
dialog.
2. If you cannot see the **CMSIS-Compiler** component, select to display **All installed packs**.
3. You must select the component **CMSIS-Compiler::CORE** and at least one additional **API**.


![Manage software components](./images/component-selection.png)

## Resolve Dependencies {#usage_resolve_dependencies}

### Using Event Recorder {#usage_evr}

The **Event Recorder** subcomponent requires the `CMSIS-View::Event Recorder` component from the [CMSIS-View](https://www.keil.arm.com/packs/cmsis-view-arm/) pack.

1) Install the **CMSIS-View** pack:

```sh
cpackget add ARM::CMSIS-View
```

2) In the **Manage Software Components** dialog, select **Software Pack**, then choose **All installed packs** and find and select **ARM::CMSIS-View**.

![Select CMSIS-View Pack](./images/stdio_evr_pack.png)

3) Select the **CMSIS-View::Event Recorder** component.

![Select CMSIS-View::Event Recorder Component](./images/stdio_evr_components.png)

The project yml file should contain:

```yml
packs:
- pack: ARM::CMSIS-Compiler
- pack: ARM::CMSIS-View
```

```yml
components:
- component: CMSIS-Compiler:CORE
- component: CMSIS-Compiler:STDOUT:Event Recorder
- component: CMSIS-View:Event Recorder&DAP
```

### Using RTT {#usage_rtt}

The **RTT** subcomponent requires the `SEGGER::RTT` component from the [SEGGER RTT](https://www.keil.arm.com/packs/rtt-segger/) pack.

1) Install the **SEGGER RTT** pack:

```sh
cpackget add SEGGER::RTT
```

2) In the **Manage Software Components** dialog, select **Software Pack**, then choose **All installed packs** and find and select **SEGGER::RTT**.

![Select SEGGER Pack](./images/stdio_rtt_pack.png)

3) Select the **SEGGER::RTT** component.

![Select SEGGER::RTT Component](./images/stdio_rtt_components.png)

The project yml file should contain:

```yml
packs:
- pack: ARM::CMSIS-Compiler
- pack: SEGGER::RTT
```

```yml
components:
- component: CMSIS-Compiler:CORE
- component: CMSIS-Compiler:STDOUT:RTT
- component: SEGGER:RTT
```

### Using UART {#usage_uart}

The **UART** subcomponent provides default implementation variant **CMSIS** which requires the `CMSIS Driver::USART` implementation, typically provided by a Board Support Pack (BSP) or Device Family Pack (DFP) for the target hardware.

> **Note**
>
> Refer to the sections [Low-level I/O](./rt_io.md) and
> [Multithreading Support Retarget](./rt_os.md) for more information about the retargeting options.
> Use the [CMSIS Packs catalog](https://www.keil.arm.com/packs/) to find the appropriate pack for your target hardware.

1) Install the Board Support Pack (BSP) or Device Family Pack (DFP):

```sh
cpackget add Vendor::Pack
```

2) In the **Manage Software Components** dialog, select **Software Pack**, then choose **All installed packs** and find and select installed BSP or DFP.

3) Select the **CMSIS Driver::USART** component.

![Select CMSIS Driver::USART Component](./images/stdio_uart_components.png)

The project yml file should contain:

```yml
packs:
- pack: ARM::CMSIS-Compiler
- pack: Vendor::Pack
```

```yml
components:
- component: CMSIS-Compiler:CORE
- component: CMSIS-Compiler:STDOUT:UART&CMSIS
- component: CMSIS Driver:USART
```
Loading