Skip to content

[Exporters] Refactor Uvision and IAR and initial support of CMSIS projects #2708

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 49 commits into from
Oct 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
448205a
device_name in targets.json. Removed progen target
sarahmarshy Sep 8, 2016
6fd1c77
Refactor uvision. Add support for CMSIS project files
sarahmarshy Sep 9, 2016
fdd7820
IAR revision
sarahmarshy Sep 7, 2016
db696f8
Remove progen and progen def dependencies.
sarahmarshy Sep 9, 2016
45ad394
New build tests.
sarahmarshy Sep 12, 2016
01ee8cb
arm_pack_manager - ya gotta start somewhere
theotherjimmy May 31, 2016
0832770
arm_pack_manager - now we have a cache
theotherjimmy Jun 1, 2016
44980ab
arm_pack_manager - caches packs now too.
theotherjimmy Jun 2, 2016
687a9ba
arm_pack_manager - refactored Cache into class and downloaded pack files
theotherjimmy Jun 2, 2016
d3017f4
arm_pack_manager - commands added. uses fuzzy search to find things
theotherjimmy Jun 3, 2016
efffa2a
arm_pack_manager - searching is now indexed and much faster
theotherjimmy Jun 3, 2016
677b847
arm_pack_manager - added a cache by part cammand
theotherjimmy Jun 3, 2016
cdc0649
arm_pack_manager - Refactors cli out of __init__.py and adds it as a …
theotherjimmy Jun 6, 2016
0299546
arm_pack_manager - Adds an dump parts command
theotherjimmy Jun 6, 2016
6c13576
arm_pack_manager - Add Documentation
theotherjimmy Jun 10, 2016
9cf4f0d
arm_pack_manager - Add Descritpion of subcommands
theotherjimmy Jun 10, 2016
15b7381
arm_pack_manager - Add more info to flash algorithm
theotherjimmy Jun 23, 2016
ece1de3
arm_pack_manager - Update docstrings for extra flash algorithm info
theotherjimmy Jun 23, 2016
b840a1b
arm_pack_manager - Update find parts for new flash alogrithm api
theotherjimmy Jul 5, 2016
b05964a
arm_pack_manager - Simplify find_device
theotherjimmy Jul 5, 2016
6b2595a
arm_pack_manager - Add --and, --or, --intersection, and --union options
theotherjimmy Jul 5, 2016
39c1703
arm_pack_manager - [API change] differentiate between pack and pdsc l…
theotherjimmy Jul 5, 2016
2240a3a
arm_pack_manager - Try really hard to fill the processor dict
theotherjimmy Jul 5, 2016
e1f1a5e
arm_pack_manager - Added caching target vendor and processor(clock, f…
sarahmarshy Jul 6, 2016
6a4b392
arm_pack_manager - Multi-level processor and compile elements search
sarahmarshy Jul 7, 2016
a25d453
arm_pack_manager - Specific device info overrides family/subfamily info
sarahmarshy Jul 7, 2016
3847aaa
arm_pack_manager - Add alias file
theotherjimmy Jul 8, 2016
b9cadfb
arm_pack_manager - Remove extra print; make url joining work on windows
theotherjimmy Aug 29, 2016
bb18547
arm_pack_manager - Retrieve debug adapter. Strip URLS
sarahmarshy Aug 31, 2016
072128b
Integrate arm_pack_manager with exporters
theotherjimmy Sep 12, 2016
a9d1dd0
Build tests clean and logging revision
sarahmarshy Sep 13, 2016
fa13cd2
Iar nucleo template referenced correctly
sarahmarshy Sep 13, 2016
66b347c
Add arm_pack_manager's requirements
theotherjimmy Sep 13, 2016
09c5be5
Buid logs print with no new lines
sarahmarshy Sep 13, 2016
8ca7ff2
.lst file goes to hidden .build for uvision5
sarahmarshy Sep 21, 2016
9a02bfb
Additional device names. mbed_targets.md update
sarahmarshy Sep 21, 2016
ce1939b
Remove : from vendor info in cmsis pdsc
sarahmarshy Sep 21, 2016
b074ee1
IAR debugging and docstrings
sarahmarshy Sep 21, 2016
ab050a2
Cpu type set in uvision template
sarahmarshy Sep 21, 2016
fa14857
Uvision5 => Uvision or Uvision5
sarahmarshy Sep 23, 2016
4bc70c0
Remove static destruction flag
sarahmarshy Sep 23, 2016
9bec418
Uvision FPU setting added to template
sarahmarshy Sep 23, 2016
b861c36
Removed IAR export support for invalid IAR targets.
sarahmarshy Sep 23, 2016
b1c8aac
Updated device name for nucleo_f746zg and disco_f746ng
sarahmarshy Sep 26, 2016
2a907d2
Fix Uvision CPU type error for DP and FPU targets.
sarahmarshy Sep 26, 2016
fd86fef
[uvision] Flash DLL string/debug
sarahmarshy Sep 30, 2016
51b13c3
-Oh flag removed from IAR. Optimization set in GUI.
sarahmarshy Oct 4, 2016
e8b3428
Minor formatting changes
sarahmarshy Oct 5, 2016
2a8c9ef
More formatting changes in targets.json
sarahmarshy Oct 5, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions docs/mbed_targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ mbed uses JSON as a description language for its build targets. The JSON descrip
"function": "TEENSY3_1Code.binary_hook",
"toolchains": ["ARM_STD", "ARM_MICRO", "GCC_ARM"]
},
"progen": {"target": "teensy-31"},
"device_name": "MK20DX256xxx7",
"detect_code": ["0230"]
```

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

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.

## progen
## device_name

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:
This property is used to pass necessary data for exporting the mbed code to various 3rd party tools and IDEs.

```
"progen": {
"target": "lpc11u35_401",
"uvision": {
"template": ["uvision_microlib.uvproj.tmpl"]
}
```
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.
`tools/export/iar/iar_definitions.json` utilizes this device name to store information necessary to set the target in an IAR project.

The `target` property of `progen` specifies the target name that must be used for the exporter (if different than the mbed target name).
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`.
6 changes: 4 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ PySerial>=2.7
PrettyTable>=0.7.2
Jinja2>=2.7.3
IntelHex>=1.3
project-generator==0.9.10
project_generator_definitions>=0.2.26,<0.3.0
junit-xml
pyYAML
requests
mbed-ls>=0.2.13
mbed-host-tests>=1.1.2
mbed-greentea>=0.2.24
pyxdg>=0.25
pycurl>=4
beautifulsoup4>=4
fuzzywuzzy>=0.11
571 changes: 241 additions & 330 deletions targets/targets.json

Large diffs are not rendered by default.

Loading