|
| 1 | +@ -1,251 +0,0 @@ |
| 2 | +# csolution: Proposals (on hold) |
| 3 | + |
| 4 | +<!-- markdownlint-disable MD013 --> |
| 5 | +<!-- markdownlint-disable MD036 --> |
| 6 | + |
| 7 | +This document is a collection of proposals that are currently on hold and will not get implemented for CMSIS-Toolbox 2.0. |
| 8 | +The proposals in this document will be discussed and potentially progressed after release of CMSIS-Toolbox 2.0. |
| 9 | + |
| 10 | +## Implemented Features but not exposed to users |
| 11 | + |
| 12 | +For CMSIS-Toolbox 2.0 the goal is to have stable input YML formats. The following features are implemented already, but will be not exposed to users as (a) use cases are unclear, and/or (b) it is unclear if the feature set needs extensions. |
| 13 | + |
| 14 | +The `processor:` keyword defines attributes such as FPU register usage or endianness selection. |
| 15 | + |
| 16 | +`processor:` | Content |
| 17 | +:------------------------------|:------------------------------------ |
| 18 | + `fpu:` | Control usage of FPU registers (S-Register for MVE/Helium, float/double hardware FPU) (default: on for devices with FPU registers). |
| 19 | + `endian:` | Select `endian:` little \| big (only available when devices are configurable). |
| 20 | + |
| 21 | +`output-dirs:` | | Content |
| 22 | +:----------------------------|--------------|:------------------------------------ |
| 23 | + `rtedir:` | Optional | Specifies the directory for the RTE files (component configuration files). |
| 24 | + |
| 25 | +The default setting for the `output-dirs:` are: |
| 26 | + |
| 27 | +```yml |
| 28 | +rtedir: <csolution.yml base directory>/%Project$/RTE |
| 29 | +``` |
| 30 | +
|
| 31 | +## Feature Overview (on hold) |
| 32 | +
|
| 33 | +- Manage the resources (memory, peripherals, and user defined) across the entire application to: |
| 34 | + - Partition the resources of the system and create related system and linker configuration. |
| 35 | + - Support in the configuration of software stacks (such as RTOS threads). |
| 36 | + - Hint the user for inclusion of software layers that are pre-configured for typical use cases. |
| 37 | +
|
| 38 | +## ASM Specific nodes |
| 39 | +
|
| 40 | +In CMSIS-Toolbox 2.0 the `define:` and `add-path:` will be applied only to C and C++ source files. |
| 41 | +For assembler files, `misc:` can be used to add sepcific controls |
| 42 | + |
| 43 | +In a later version of the CMSIS-Toolbox, ASM specific controls may be added. |
| 44 | +`define-asm:` only applies to assembly source files (new) |
| 45 | +`add-path-asm:` only applies to assembly source files (new) |
| 46 | + |
| 47 | +## Linker Script |
| 48 | + |
| 49 | +In CMSIS-Toolbox 2.0 the [Linker Script Management](Linker-Script-Management.md) will be implemented. |
| 50 | + |
| 51 | +In a later iteration of the tools it should be possible to generate the `regions_<device_or_board>.h` with a workflow that is similar to "CMSIS-Zone" or "DeviceTree". |
| 52 | + |
| 53 | +## Resource Management (Proposal) (out-of-scope) |
| 54 | + |
| 55 | +The **csolution - CMSIS Project Manager** integrates an extended version of the Project Zone functionality of |
| 56 | +[CMSIS-Zone](https://arm-software.github.io/CMSIS_5/Zone/html/index.html) with this nodes: |
| 57 | + |
| 58 | +- [`resources:`](#resources) imports resource files (in |
| 59 | + [CMSIS-Zone RZone format](https://arm-software.github.io/CMSIS_5/Zone/html/xml_rzone_pg.html) or a compatible yml |
| 60 | + format tbd) and allows to split or combine memory regions. |
| 61 | +- [`phases:`](#phases) defines the execution phases may be used to assign a life-time to memory or peripheral resources |
| 62 | + in the project zones. |
| 63 | +- [`project-zones:`](#project-zones) collect and configure the memory or peripheral resources that are available to |
| 64 | + individual projects. These zones are assigned to the [`projects:`](YML-Input-Format.md#projects) of a `*.csolution.yml` file. |
| 65 | +- [`requires:`](#requires) allows to specify additional resources at the level of a `*.cproject.yml` or `*.clayer.yml` |
| 66 | + file that are added to the related zone of the project. |
| 67 | + |
| 68 | +The **csolution - CMSIS Project Manager** generates for each project context (with build and/or target-type) a data file |
| 69 | +(similar to the current [CMSIS FZone format](https://arm-software.github.io/CMSIS_5/Zone/html/GenDataModel.html), exact |
| 70 | +format tbd could be also JSON) for post-processing with a template engine (Handlebars?). |
| 71 | + |
| 72 | +### `resources:` |
| 73 | + |
| 74 | +`resources:` | | Content |
| 75 | +:----------------------------------------------|--------------|:------------------------------------ |
| 76 | +`- import:` | **Required** | File/resource to be used. |
| 77 | +`- split:` | Optional | Split a resource/memory region. |
| 78 | +`- combine:` | Optional | Combine a resource/memory region. |
| 79 | + |
| 80 | +#### `- import:` |
| 81 | + |
| 82 | +`- import:` | | Content |
| 83 | +:----------------------------------------------|--------------|:------------------------------------ |
| 84 | +`- import:` path_to_resource | **Required** | Path to the resource file. |
| 85 | + |
| 86 | +#### `- split:` |
| 87 | + |
| 88 | +Split a resource into subresources. |
| 89 | + |
| 90 | +`- split:` | | Content |
| 91 | +:-----------------------------|--------------|:------------------------------------ |
| 92 | +`into:` | **Required** | |
| 93 | + `- region:` name | **Required** | Name of the new resource. |
| 94 | + `- size:` value | **Required** | Size of the new resource. |
| 95 | + |
| 96 | +#### `- combine` |
| 97 | + |
| 98 | +Combine/merge resources into a new resource. |
| 99 | + |
| 100 | +`- combine:` name | | Content |
| 101 | +:-----------------------------|--------------|:------------------------------------ |
| 102 | +`from:` | **Required** | |
| 103 | + `- region:` name | **Required** | Name of the resource to be combined. |
| 104 | + |
| 105 | +**Example:** |
| 106 | + |
| 107 | +Added to `*.csolution.yml` file |
| 108 | + |
| 109 | +```yml |
| 110 | +resources: |
| 111 | +# depending on the device: and/or board: settings these resources may get added automatically |
| 112 | + - import: .\LPC55S69.rzone # resource definitions of the device |
| 113 | + - import: .\MyEvalBoard.rzone # add resource definitions of the Eval board |
| 114 | +
|
| 115 | + - split: SRAM_NS # split a memory resource into two regions |
| 116 | + into: |
| 117 | + - region: DATA_NS |
| 118 | + size: 128k |
| 119 | + - region: DATA_BOOT |
| 120 | + size: 45k |
| 121 | +
|
| 122 | + - combine: SRAM # combine two memory regions (contiguous, same permissions) |
| 123 | + from: |
| 124 | + - region: SRAM1 |
| 125 | + - region: SRAM2 |
| 126 | +``` |
| 127 | + |
| 128 | +> **Note:** |
| 129 | +> |
| 130 | +> Exact behavior for devices that have no RZone file is tbd. It could be that the memory resources are derived from device definitions |
| 131 | + |
| 132 | +### `phases:` |
| 133 | + |
| 134 | +**Example:** |
| 135 | + |
| 136 | +Added to `*.csolution.yml` file |
| 137 | + |
| 138 | +```yml |
| 139 | +phases: # define the life-time for resources in the project-zone definition |
| 140 | + - phase: Boot |
| 141 | + - phase: OTA |
| 142 | + - phase: Run |
| 143 | +``` |
| 144 | + |
| 145 | +### `project-zones:` |
| 146 | + |
| 147 | +**Example:** |
| 148 | + |
| 149 | +Added to `*.csolution.yml` file |
| 150 | + |
| 151 | +```yml |
| 152 | +project-zones: |
| 153 | + - zone: BootLoader |
| 154 | + requires: |
| 155 | + - memory: Code_Boot |
| 156 | + permission: rx, s |
| 157 | + - memory: Ram_Boot |
| 158 | + phase: Boot |
| 159 | + permission: rw, s |
| 160 | + - peripheral: UART1 |
| 161 | + - peripheral: Watchdog |
| 162 | + phase: Boot # only for phase Boot |
| 163 | +
|
| 164 | + - zone: Application |
| 165 | + - memory: * # all remaining memory |
| 166 | + permission: ns # with permission ns |
| 167 | + phase: ~Boot # for every phase except Boot |
| 168 | +
|
| 169 | +projects: |
| 170 | + - project: ./bootloader/Bootloader.cproject.yml # relative path |
| 171 | + zone: Bootloader |
| 172 | +
|
| 173 | + - project: ./application/MyApp1.yml # Application 1 |
| 174 | + zone: Application |
| 175 | +
|
| 176 | + - project: ./application/MyApp2.yml # relative path |
| 177 | + zone: Application |
| 178 | +``` |
| 179 | + |
| 180 | +#### `requires:` |
| 181 | + |
| 182 | +##### `- memory:` |
| 183 | + |
| 184 | +##### `- peripheral:` |
| 185 | + |
| 186 | +Added to `*.cproject.yml` or `*.clayer.yml` file |
| 187 | + |
| 188 | +```yml |
| 189 | +requires: |
| 190 | + - memory: Ram2 |
| 191 | + permission: rx, s |
| 192 | + - peripheral: SPI2 |
| 193 | + permission: ns, p |
| 194 | +``` |
| 195 | + |
| 196 | +## Directory Control |
| 197 | + |
| 198 | +### `rte-dirs:` |
| 199 | + |
| 200 | +**(Proposal)** Out-of-scope (review if this is really required) |
| 201 | + |
| 202 | +The default RTE directory structure can be modified with [`rte-dirs:`](YML-Input-Format.md#rte-dirs). |
| 203 | +This list node allows to specify for each software component `Cclass` the directory that should be used to partly share a common configuration across a `project:` or `layer:`. |
| 204 | + |
| 205 | +The `rte-dirs:` list allows to control the location of configuration files for each [component `Cclass`](YML-Input-Format.md#component-name-conventions). A list of `Cclass` names can be assigned to specific directories that store the related configuration files. |
| 206 | + |
| 207 | +**Example:** |
| 208 | + |
| 209 | +```yml |
| 210 | + rte-dirs: |
| 211 | + - Board_Support: ..\common\RTE\Board |
| 212 | + - CMSIS Driver: ..\common\RTE\CMSIS_Driver |
| 213 | + - Device: ..\common\RTE\Device\Core1 |
| 214 | + - Compiler: ..\RTE\Compiler\Debug |
| 215 | + for-context: .Debug |
| 216 | +``` |
| 217 | + |
| 218 | +- With [RTE directory settings](./YML-Input-Format.md#rte-dirs) that are specific to software component `Cclass` names it is possible partly share a common configuration across layers. |
| 219 | + |
| 220 | +## CMSIS-Zone Integration |
| 221 | + |
| 222 | +Suggest to split this into two sections: |
| 223 | + |
| 224 | +- `resources:` to define the execution phases, memory regions and region splits, and peripherals. This section would be |
| 225 | + in the `csolution.yml` file. |
| 226 | +- `requirements:` to define project requirements - effectively the partitioning of a system. It should be possible to |
| 227 | + assign to the application all remaining resources. |
| 228 | + |
| 229 | +Add to the project the possibility to specify . The issue might be that the project files become overwhelming, |
| 230 | +alternative is to keep partitioning in separate files. |
| 231 | + |
| 232 | +```yml |
| 233 | +resources: |
| 234 | + phases: # define the life-time of a resource definition |
| 235 | + - phase: Boot |
| 236 | + - phase: OTA |
| 237 | + - phase: Run |
| 238 | +
|
| 239 | + memories: # specifies the required memory |
| 240 | + - split: SRAM_NS |
| 241 | + into: |
| 242 | + - region: DATA_NS |
| 243 | + size: 128k |
| 244 | + permission: n |
| 245 | + - region: DATA_BOOT |
| 246 | + phase: Boot # region life-time (should allow to specify multiple phases) |
| 247 | + size: 128k |
| 248 | + |
| 249 | + peripherals: # specifies the required peripherals |
| 250 | + - peripheral: I2C0 |
| 251 | + permission: rw, s |
| 252 | +``` |
0 commit comments