Skip to content

Commit 76fb1f8

Browse files
authored
Merge pull request #2708 from sarahmarshy/uvision-and-iar
[Exporters] Refactor Uvision and IAR and initial support of CMSIS projects
2 parents 22ec73b + 2a8c9ef commit 76fb1f8

26 files changed

+4280
-2310
lines changed

docs/mbed_targets.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ mbed uses JSON as a description language for its build targets. The JSON descrip
1414
"function": "TEENSY3_1Code.binary_hook",
1515
"toolchains": ["ARM_STD", "ARM_MICRO", "GCC_ARM"]
1616
},
17-
"progen": {"target": "teensy-31"},
17+
"device_name": "MK20DX256xxx7",
1818
"detect_code": ["0230"]
1919
```
2020

@@ -160,17 +160,10 @@ In this case, it converts the output file (`binf`) from binary format to Intel H
160160

161161
The hook code can look quite different between different targets. Take a look at the other classes in *targets.py* for more examples of hook code.
162162

163-
## progen
163+
## device_name
164164

165-
This property is used to pass additional data to the project generator (used to export the mbed code to various 3rd party tools and IDEs). A definition for `progen` looks like this:
165+
This property is used to pass necessary data for exporting the mbed code to various 3rd party tools and IDEs.
166166

167-
```
168-
"progen": {
169-
"target": "lpc11u35_401",
170-
"uvision": {
171-
"template": ["uvision_microlib.uvproj.tmpl"]
172-
}
173-
```
167+
This is possible because the device name corresponds to a field in publicly hosted CMSIS packs. These packs hold target properties. [This](http://www.keil.com/pack/Keil.Kinetis_K20_DFP.pdsc) is the pdsc that contains TEENSY_31 device (MK20DX256xxx7). The device information begins on line 156. The dname (device name) field on line 156 directly corresponds to that in the Uvision5 IDE target selection window. Beginning on line 15 of `tools/export/uvision/uvision.tmpl`, target information from these packs is used to generate valid Uvision5 projects. If the device name is not found, we use a generic ARM CPU target in Uvision5.
168+
`tools/export/iar/iar_definitions.json` utilizes this device name to store information necessary to set the target in an IAR project.
174169

175-
The `target` property of `progen` specifies the target name that must be used for the exporter (if different than the mbed target name).
176-
For each exporter, a template for exporting can also be specified. In this example, the template used for generating a uVision project file is in a file called `uvision_microlib.uvproj.tmpl`. It is assumed that all the templates are located in `tools/export`.

requirements.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ PySerial>=2.7
33
PrettyTable>=0.7.2
44
Jinja2>=2.7.3
55
IntelHex>=1.3
6-
project-generator==0.9.10
7-
project_generator_definitions>=0.2.26,<0.3.0
86
junit-xml
97
pyYAML
108
requests
119
mbed-ls>=0.2.13
1210
mbed-host-tests>=1.1.2
1311
mbed-greentea>=0.2.24
12+
pyxdg>=0.25
13+
pycurl>=4
14+
beautifulsoup4>=4
15+
fuzzywuzzy>=0.11

targets/targets.json

Lines changed: 241 additions & 330 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)