@@ -29,32 +29,38 @@ Mbed Cloud Client provides reference implementation for three Mbed Enabled targe
29
29
Our sample target is identified by the following:
30
30
31
31
* The name of the target for builds is ` MY_BOARD_1 ` .
32
+ * The vendor is "MY_VENDOR", the device family is "MY_FAMILY" and the device on the board is "MY_DEVICE"
32
33
* A Cortex-M4F based core.
33
- * Supports Mbed OS v5.x.
34
- * Has SERIAL interface as a bare minimum to print standard printf messages to the console, once built successfully.
35
- * Supports ARMCC and IAR compilers.
36
- * Inherits some features, such as the default toolchain and the virtual disk, from the standard ` Target ` defined in ` targets.json ` .
37
- * The public flag is set to ` true ` to indicate that this target is visible for compilation from the toolchains.
34
+ * Porting for Mbed OS v5.x, which requires support for Arm Compiler 5, GCC Arm Embedded, and IAR EWARM.
35
+ * Has a serial (UART) interface connected to the CMSIS-DAP implementation.
36
+ * Requires the macro ` CPU_DEVICE_1 ` to compile the vendor-provided HAL for the device mounted on the board.
37
+ * Requires the macro ` FAMILY_MY_FAMILY ` to compile the vendor-provided HAL for the family of the device.
38
38
39
39
All of these requirements are directly mapped to relevant tags in the ` targets.json ` entry for our target. This is shown in step 3 below.
40
40
41
41
42
42
### Add the target entry in ` targets.json `
43
- ```
44
- "MY_BOARD_1": {
45
- "inherits":["Target"],
46
- "core":"Cortex-M4F",
47
- "public": true,
48
- "extra_labels": ["MY_Vendor", "VendorMCUs", "VendorDevice1",
49
- "VendorBoard_1"],
50
- "macros": ["CPU_<Full_Name_of_CPU>"],
51
- "supported_toolchains": ["ARM", "IAR"],
52
- "device_has": ["SERIAL"],
53
- "release_versions": ["5"]
54
- },
43
+ ``` json
44
+ "MY_FAMILY" : {
45
+ "inherits" : [" Target" ],
46
+ "macros_add" : [" FAMILY_MY_FAMILY" ],
47
+ "extra_labels_add" : [" MY_VENDOR" ],
48
+ "public" : false
49
+ },
50
+ "MY_DEVICE_1" : {
51
+ "inherits" : [" MY_FAMILY" ],
52
+ "macros_add" : [" CPU_DEVICE_1" ],
53
+ "supported_toolchains" : [" GCC_ARM" , " ARM" , " IAR" ],
54
+ "device_has_add" : [" SERIAL" ],
55
+ "core" : " Cortex-M4F" ,
56
+ "release_versions" : [5 ]
57
+ }
58
+ "MY_BOARD_1" : {
59
+ "inherits" :[" MY_DEVICE_1" ]
60
+ },
55
61
```
56
62
57
- <span class =" notes " >** Note:** The ` extra_labels ` must mimic the exact directory structure used to define the new target .</span >
63
+ <span class =" notes " >** Note:** The ` extra_labels_add ` of ` MY_VENDOR ` is a stand in for the vendor, as it would not configure anything by itself .</span >
58
64
59
65
60
66
### Create the directory structure
0 commit comments