Additional device names. mbed_targets.md update

pull/2708/head
Sarah Marsh 2016-09-21 14:36:21 -05:00
parent 8ca7ff2f5b
commit 9a02bfb7a3
3 changed files with 14 additions and 21 deletions

View File

@ -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"]
```
@ -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`.

View File

@ -716,10 +716,10 @@
"extra_labels": ["STM", "STM32F3", "STM32F303ZE"],
"supported_toolchains": ["ARM", "uARM", "IAR", "GCC_ARM"],
"inherits": ["Target"],
"progen": {"target": "nucleo-f303ze"},
"detect_code": ["0747"],
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
"release_versions": ["2", "5"]
"release_versions": ["2", "5"],
"device_name": "STM32F303RE"
},
"NUCLEO_F334R8": {
"supported_form_factors": ["ARDUINO", "MORPHO"],
@ -1081,11 +1081,11 @@
"extra_labels": ["STM", "STM32F7", "STM32F769", "STM32F769NI"],
"supported_toolchains": ["ARM", "GCC_ARM", "IAR"],
"default_toolchain": "ARM",
"progen": {"target": "disco-f769ni"},
"detect_code": ["0817"],
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "I2C", "I2CSLAVE", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
"features": ["LWIP"],
"release_versions": ["2"]
"release_versions": ["2"],
"device_name": "STM32F769NI"
},
"DISCO_L476VG": {
"inherits": ["Target"],
@ -1552,7 +1552,6 @@
},
"MTM_MTCONNECT04S": {
"inherits": ["MCU_NRF51_32K"],
"progen": {"target": "mtm-mtconnect04s"},
"release_versions": ["2"],
"device_name": "nRF51822_xxAA"
},
@ -1971,15 +1970,16 @@
"inherits": ["MCU_NRF52"],
"macros_add": ["BOARD_PCA10040", "NRF52_PAN_12", "NRF52_PAN_15", "NRF52_PAN_58", "NRF52_PAN_55", "NRF52_PAN_54", "NRF52_PAN_31", "NRF52_PAN_30", "NRF52_PAN_51", "NRF52_PAN_36", "NRF52_PAN_53", "S132", "CONFIG_GPIO_AS_PINRESET", "BLE_STACK_SUPPORT_REQD", "SWI_DISABLE0", "NRF52_PAN_20", "NRF52_PAN_64", "NRF52_PAN_62", "NRF52_PAN_63"],
"device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH", "SPISLAVE"],
"release_versions": ["2", "5"]
"release_versions": ["2", "5"],
"device_name": "nRF52832_xxAA"
},
"DELTA_DFBM_NQ620": {
"supported_form_factors": ["ARDUINO"],
"inherits": ["MCU_NRF52"],
"progen": {"target": "dfbm-nq620"},
"macros_add": ["BOARD_PCA10040", "NRF52_PAN_12", "NRF52_PAN_15", "NRF52_PAN_58", "NRF52_PAN_55", "NRF52_PAN_54", "NRF52_PAN_31", "NRF52_PAN_30", "NRF52_PAN_51", "NRF52_PAN_36", "NRF52_PAN_53", "S132", "CONFIG_GPIO_AS_PINRESET", "BLE_STACK_SUPPORT_REQD", "SWI_DISABLE0", "NRF52_PAN_20", "NRF52_PAN_64", "NRF52_PAN_62", "NRF52_PAN_63"],
"device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH", "SPISLAVE"],
"release_versions": ["2", "5"]
"release_versions": ["2", "5"],
"device_name": "nRF52832_xxAA"
},
"BLUEPILL_F103C8": {
"core": "Cortex-M3",

View File

@ -213,7 +213,7 @@
<AdsLsxf>1</AdsLsxf>
<RvctClst>0</RvctClst>
<GenPPlst>0</GenPPlst>
<AdsCpuType>"Cortex-M4"</AdsCpuType>
<AdsCpuType></AdsCpuType>
<RvctDeviceName></RvctDeviceName>
<mOS>0</mOS>
<uocRom>0</uocRom>