Marco Zecchini
/
Example_RTOS
Rtos API example
mbed-os/tools/importer/README.md@0:9fca2b23d0ba, 2019-02-23 (annotated)
- Committer:
- marcozecchini
- Date:
- Sat Feb 23 12:13:36 2019 +0000
- Revision:
- 0:9fca2b23d0ba
final commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
marcozecchini | 0:9fca2b23d0ba | 1 | ## Importing repositories into mbed-os |
marcozecchini | 0:9fca2b23d0ba | 2 | |
marcozecchini | 0:9fca2b23d0ba | 3 | importer.py script can be used to import code base from different repositories into mbed-os. |
marcozecchini | 0:9fca2b23d0ba | 4 | |
marcozecchini | 0:9fca2b23d0ba | 5 | ### Pre-requisties |
marcozecchini | 0:9fca2b23d0ba | 6 | 1. Get the required repository clone and update it to commit required. Note: Repository should be placed outside the mbed-os. |
marcozecchini | 0:9fca2b23d0ba | 7 | 2. Create json file as per template |
marcozecchini | 0:9fca2b23d0ba | 8 | |
marcozecchini | 0:9fca2b23d0ba | 9 | ### JSON file template |
marcozecchini | 0:9fca2b23d0ba | 10 | |
marcozecchini | 0:9fca2b23d0ba | 11 | You can list all the files and folders which are required to be copied in config file in `file` and `folder` arrays respectively. Script will remove the files/folders specified in `src` section from mbed-os repository before copy operation is performed. |
marcozecchini | 0:9fca2b23d0ba | 12 | New commit is created on branch `feature_+repo_name+last_sha` with commit message "[REPO_NAME]: Updated to last_sha" |
marcozecchini | 0:9fca2b23d0ba | 13 | |
marcozecchini | 0:9fca2b23d0ba | 14 | Note: Only files present in folder will be copied, directories inside the folder will not be copied. |
marcozecchini | 0:9fca2b23d0ba | 15 | |
marcozecchini | 0:9fca2b23d0ba | 16 | `commit_sha` is list of commits present in mbed-os repo. These commits will be applied after copying files and folders listed above.Each commit in the commit_sha list is cherry-picked and applied with the -x option, which records the SHA of the source commit in the commit message. |
marcozecchini | 0:9fca2b23d0ba | 17 | Note: You must resolve any conflicts that arise during this cherry-pick process. Make sure that the "(cherry picked from commit ...)" statement is present in the commit message. Re-execute the python script to apply rest of the SHA commits. |
marcozecchini | 0:9fca2b23d0ba | 18 | |
marcozecchini | 0:9fca2b23d0ba | 19 | { |
marcozecchini | 0:9fca2b23d0ba | 20 | "files" : [ |
marcozecchini | 0:9fca2b23d0ba | 21 | { |
marcozecchini | 0:9fca2b23d0ba | 22 | "src_file" : "CMSIS/Core/Template/ARMv8-M/tz_context.c", |
marcozecchini | 0:9fca2b23d0ba | 23 | "dest_file" : "cmsis/TARGET_CORTEX_M/mbed_tz_context.c" |
marcozecchini | 0:9fca2b23d0ba | 24 | }, |
marcozecchini | 0:9fca2b23d0ba | 25 | ... |
marcozecchini | 0:9fca2b23d0ba | 26 | { |
marcozecchini | 0:9fca2b23d0ba | 27 | "src_file" : "", |
marcozecchini | 0:9fca2b23d0ba | 28 | "dest_file" : "" |
marcozecchini | 0:9fca2b23d0ba | 29 | } |
marcozecchini | 0:9fca2b23d0ba | 30 | ], |
marcozecchini | 0:9fca2b23d0ba | 31 | "folders" : [ |
marcozecchini | 0:9fca2b23d0ba | 32 | { |
marcozecchini | 0:9fca2b23d0ba | 33 | "src_folder" : "CMSIS/Core/Include/", |
marcozecchini | 0:9fca2b23d0ba | 34 | "dest_folder" : "cmsis/TARGET_CORTEX_M/" |
marcozecchini | 0:9fca2b23d0ba | 35 | }, |
marcozecchini | 0:9fca2b23d0ba | 36 | ... |
marcozecchini | 0:9fca2b23d0ba | 37 | { |
marcozecchini | 0:9fca2b23d0ba | 38 | "src_folder" : "", |
marcozecchini | 0:9fca2b23d0ba | 39 | "dest_folder" : "" |
marcozecchini | 0:9fca2b23d0ba | 40 | } |
marcozecchini | 0:9fca2b23d0ba | 41 | ], |
marcozecchini | 0:9fca2b23d0ba | 42 | "commit_sha" : [ |
marcozecchini | 0:9fca2b23d0ba | 43 | "428acae1b2ac15c3ad523e8d40755a9301220822", |
marcozecchini | 0:9fca2b23d0ba | 44 | "d9d622afe0ca8c7ab9d24c17f9fe59b54dcc61c9", |
marcozecchini | 0:9fca2b23d0ba | 45 | ] |
marcozecchini | 0:9fca2b23d0ba | 46 | } |
marcozecchini | 0:9fca2b23d0ba | 47 | |
marcozecchini | 0:9fca2b23d0ba | 48 | ### Input to importer.py |
marcozecchini | 0:9fca2b23d0ba | 49 | 1. Repository: -r <repo_path> ( Example: CMSIS / Mbed-tls / uVisor) |
marcozecchini | 0:9fca2b23d0ba | 50 | 2. `repo`_importer.json: -c <json_file> (Example: cmsis_importer.json) |