takashi kadono
/
Nucleo_446
Color Oled(SSD1331) connect to STMicroelectronics Nucleo-F466
mbed-os/tools/importer/README.md@3:f3764f852aa8, 2018-10-11 (annotated)
- Committer:
- kadonotakashi
- Date:
- Thu Oct 11 02:27:46 2018 +0000
- Revision:
- 3:f3764f852aa8
- Parent:
- 0:8fdf9a60065b
Nucreo 446 + SSD1331 test version;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kadonotakashi | 0:8fdf9a60065b | 1 | ## Importing repositories into mbed-os |
kadonotakashi | 0:8fdf9a60065b | 2 | |
kadonotakashi | 0:8fdf9a60065b | 3 | importer.py script can be used to import code base from different repositories into mbed-os. |
kadonotakashi | 0:8fdf9a60065b | 4 | |
kadonotakashi | 0:8fdf9a60065b | 5 | ### Pre-requisties |
kadonotakashi | 0:8fdf9a60065b | 6 | 1. Get the required repository clone and update it to commit required. Note: Repository should be placed outside the mbed-os. |
kadonotakashi | 0:8fdf9a60065b | 7 | 2. Create json file as per template |
kadonotakashi | 0:8fdf9a60065b | 8 | |
kadonotakashi | 0:8fdf9a60065b | 9 | ### JSON file template |
kadonotakashi | 0:8fdf9a60065b | 10 | |
kadonotakashi | 0:8fdf9a60065b | 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. |
kadonotakashi | 0:8fdf9a60065b | 12 | New commit is created on branch `feature_+repo_name+last_sha` with commit message "[REPO_NAME]: Updated to last_sha" |
kadonotakashi | 0:8fdf9a60065b | 13 | |
kadonotakashi | 0:8fdf9a60065b | 14 | Note: Only files present in folder will be copied, directories inside the folder will not be copied. |
kadonotakashi | 0:8fdf9a60065b | 15 | |
kadonotakashi | 0:8fdf9a60065b | 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. |
kadonotakashi | 0:8fdf9a60065b | 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. |
kadonotakashi | 0:8fdf9a60065b | 18 | |
kadonotakashi | 0:8fdf9a60065b | 19 | { |
kadonotakashi | 0:8fdf9a60065b | 20 | "files" : [ |
kadonotakashi | 0:8fdf9a60065b | 21 | { |
kadonotakashi | 0:8fdf9a60065b | 22 | "src_file" : "CMSIS/Core/Template/ARMv8-M/tz_context.c", |
kadonotakashi | 0:8fdf9a60065b | 23 | "dest_file" : "cmsis/TARGET_CORTEX_M/mbed_tz_context.c" |
kadonotakashi | 0:8fdf9a60065b | 24 | }, |
kadonotakashi | 0:8fdf9a60065b | 25 | ... |
kadonotakashi | 0:8fdf9a60065b | 26 | { |
kadonotakashi | 0:8fdf9a60065b | 27 | "src_file" : "", |
kadonotakashi | 0:8fdf9a60065b | 28 | "dest_file" : "" |
kadonotakashi | 0:8fdf9a60065b | 29 | } |
kadonotakashi | 0:8fdf9a60065b | 30 | ], |
kadonotakashi | 0:8fdf9a60065b | 31 | "folders" : [ |
kadonotakashi | 0:8fdf9a60065b | 32 | { |
kadonotakashi | 0:8fdf9a60065b | 33 | "src_folder" : "CMSIS/Core/Include/", |
kadonotakashi | 0:8fdf9a60065b | 34 | "dest_folder" : "cmsis/TARGET_CORTEX_M/" |
kadonotakashi | 0:8fdf9a60065b | 35 | }, |
kadonotakashi | 0:8fdf9a60065b | 36 | ... |
kadonotakashi | 0:8fdf9a60065b | 37 | { |
kadonotakashi | 0:8fdf9a60065b | 38 | "src_folder" : "", |
kadonotakashi | 0:8fdf9a60065b | 39 | "dest_folder" : "" |
kadonotakashi | 0:8fdf9a60065b | 40 | } |
kadonotakashi | 0:8fdf9a60065b | 41 | ], |
kadonotakashi | 0:8fdf9a60065b | 42 | "commit_sha" : [ |
kadonotakashi | 0:8fdf9a60065b | 43 | "428acae1b2ac15c3ad523e8d40755a9301220822", |
kadonotakashi | 0:8fdf9a60065b | 44 | "d9d622afe0ca8c7ab9d24c17f9fe59b54dcc61c9", |
kadonotakashi | 0:8fdf9a60065b | 45 | ] |
kadonotakashi | 0:8fdf9a60065b | 46 | } |
kadonotakashi | 0:8fdf9a60065b | 47 | |
kadonotakashi | 0:8fdf9a60065b | 48 | ### Input to importer.py |
kadonotakashi | 0:8fdf9a60065b | 49 | 1. Repository: -r <repo_path> ( Example: CMSIS / Mbed-tls) |
kadonotakashi | 0:8fdf9a60065b | 50 | 2. `repo`_importer.json: -c <json_file> (Example: cmsis_importer.json) |
kadonotakashi | 0:8fdf9a60065b | 51 | |
kadonotakashi | 0:8fdf9a60065b | 52 | For example the command below can be used to update CMSIS: |
kadonotakashi | 0:8fdf9a60065b | 53 | `python tools\importer\importer.py -c tools\importer\cmsis_importer.json -r <path to cmsis repo>` |
kadonotakashi | 0:8fdf9a60065b | 54 | |
kadonotakashi | 0:8fdf9a60065b | 55 | Note: This script must be run from the mbed-os directory to work correctly. |