-
Notifications
You must be signed in to change notification settings - Fork 3k
adr: Recommend CMSIS component source structure #13464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "cmsis-cmsis5-rtos2" | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
|
||
# CMSIS Version 5 | ||
|
||
This directory contains a ported version of the upstream repository for [CMSIS_5](http://arm-software.github.io/CMSIS_5/General/html/index.html) as well as Mbed specific RTX configuration and RTOS boot source files. | ||
|
||
The upstream source code is imported using the Python script located at [`tools/importer/importer.py`](../tools/importer/importer.py) when passed the [`tools/importer/cmsis_importer.json`](../tools/importer/cmsis_importer.json) configuration file. | ||
For more information on the importer script please read [`tools/importer/README.md`](../tools/importer/README.md). | ||
|
||
The directory is organised as follows: | ||
|
||
``` | ||
+--cmsis | ||
| +-- README.md # The present mardown file | ||
| +-- device/ | ||
| +-- mbed_cmsis_conf.h # Process stack configuration | ||
| +-- RTE/ | ||
| +-- include/ | ||
| +-- RTE_Components.h # Run-Time-Environment Component Configuration File | ||
| +-- rtos/ | ||
| +-- mbed_lib.json # Mbed library configuration file | ||
| +-- include/ | ||
| +-- mbed_boot.h # Declares the functions that run before main() | ||
| +-- mbed_rtx_conf.h # Changes to RTX configuration | ||
| +-- mbed_rtx_storage.h # Declares the primitives storage types for RTX | ||
| +-- source/ | ||
| +-- mbed_boot.c # Implements some of the functions that run before main() | ||
| +-- mbed_rtos_rtx.c # Implements some of the functions that run before main() | ||
| +-- mbed_rtx_handlers.c # Implements RTX handlers | ||
| +-- mbed_rtx_idle.cpp # Implements RTX idle loop | ||
| +-- TOOLCHAIN_ARM_MICRO/ | ||
| +-- mbed_boot_arm_micro.c # Mbed entry point for the uARM toolchain | ||
| +-- TOOLCHAIN_ARM_STD/ | ||
| +-- mbed_boot_arm_std.c # Mbed entry point for the ARM toolchain | ||
| +-- TOOLCHAIN_GCC_ARM/ | ||
| +-- mbed_boot_gcc_arm.c # Mbed entry point for the GCC_ARM toolchain | ||
| +-- TOOLCHAIN_IAR/ | ||
| +-- mbed_boot_iar.c # Mbed entry point for the IAR toolchain | ||
| +-- CMSIS_5/ # Imported from the upstream repository as described in the importer script configuration file (cmsis_importer.json) | ||
``` | ||
|
||
Two Mbed libraries live within this directory: | ||
* `rtos` from `device/rtos` | ||
* `cmsis-cmsis5-rtos2` from `CMSIS_5/CMSIS/RTOS2` |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
24 changes: 24 additions & 0 deletions
24
docs/adr/0001_cmsis_component_source_structure_recommendations.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# CMSIS component source structure recommendations | ||
Date: 2020-08-19 | ||
|
||
## Status | ||
Proposed | ||
|
||
## Context | ||
[`ARM-software/CMSIS_5`](https://github.com/ARM-software/CMSIS_5) has been ported to Mbed OS. However, it is split across multiple directories and it is not immediately obvious that it comes from that repository when imported with the [importer script](../../tools/importer/importer.py ). | ||
|
||
## Decision | ||
The current proposal is to create new directories within the existing `cmsis/` directory: | ||
* `CMSIS_5/`: mirrors closely the structure used by `ARM-software/CMSIS_5/` keeping only the directories and files needed by Mbed OS and renames some directories in order to work with Mbed OS build tools. See [importer configuration file](./../tools/importer/cmsis_importer.json). | ||
* `device`: includes Mbed OS specific files to configure RTX. | ||
|
||
This will result in the removal of the `rtos/source/TARGET_CORTEX/` directory. | ||
Additionally, `cmsis/TARGET_CORTEX_A/TOOLCHAIN_IAR/cmain.S` to `platform/source/TARGET_CORTEX_A/TOOLCHAIN_IAR/cmain.S` so it can be accessible when building with the bare metal profile. Note that we already have the equivalent file for TARGET_CORTEX_M at `platform/source/TARGET_CORTEX_M/TOOLCHAIN_IAR/cmain.S`. | ||
|
||
It will provide the following advantages: | ||
* Better maintenance of the CMSIS component | ||
* Easy creation of an independent CMake target that can be built as a library that can be optionally be linked against by end users | ||
* Easy source navigation that mirrors closely the upstream CMSIS_5 repository | ||
|
||
## Documentation | ||
A `README.md` within the `cmsis` will contain a brief introduction of the component and will detail the Mbed specific files added. |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.