You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The target family api is located in `source/target/target_family.h` and target_reset file can customize the function apis according to the family specification. Family id is a combination of vendor id and an incrementing id. There are predefined family id stubs that can be used for generic reset types; kStub_HWReset_FamilyID, kStub_SWVectReset_FamilyID and kStub_SWSysReset_FamilyID.
71
+
The target family api is located in `source/target/target_family.h` and target_reset file can customize the function apis according to the family specification. Family id is a combination of vendor id and an incrementing id. There are predefined family id stubs that can be used for generic reset types; `kStub_HWReset_FamilyID`, `kStub_SWVectReset_FamilyID`, and `kStub_SWSysReset_FamilyID`.
71
72
72
-
```c
73
-
/**
74
-
* @file target_family.h
75
-
* @brief
76
-
*
77
-
* DAPLink Interface Firmware
78
-
* Copyright (c) 2018-2019, ARM Limited, All Rights Reserved
79
-
* SPDX-License-Identifier: Apache-2.0
80
-
*
81
-
* Licensed under the Apache License, Version 2.0 (the "License"); you may
82
-
* not use this file except in compliance with the License.
83
-
* You may obtain a copy of the License at
84
-
*
85
-
* http://www.apache.org/licenses/LICENSE-2.0
86
-
*
87
-
* Unless required by applicable law or agreed to in writing, software
88
-
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
89
-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
90
-
* See the License for the specific language governing permissions and
A flash algorithm blob is needed to program the target MCUs internal (or external) flash memory. This blob contains position independent functions for erasing, reading and writing to the flash controller. Flash algorithm blobs are created from the [FlashAlgo project.](https://github.com/mbedmicro/FlashAlgo) An example blob is shown below and would be added to `source/family/<mfg>/<targetname>/flash_blob.c`
73
+
A flash algorithm blob is needed to program the target MCUs internal (or external) flash memory. This blob contains position independent functions for erasing, reading and writing to the flash controller. Flash algorithm blobs are created from the [FlashAlgo project.](https://github.com/pyocd/FlashAlgo). An example blob is shown below and would be added to `source/family/<mfg>/<targetname>/flash_blob.c`
170
74
171
75
```c
172
76
/**
@@ -193,28 +97,7 @@ A flash algorithm blob is needed to program the target MCUs internal (or externa
Complete target configuration api is located in `source/target/target_config.h`
297
-
```c
298
-
enum _region_flags {
299
-
kRegionIsDefault = (1 << 0), //out of bounds regions will use the same flash algo if this is set
300
-
kRegionIsSecure = (1 << 1)
301
-
};
302
180
181
+
Complete target configuration api is located in `source/target/target_config.h`
303
182
304
-
typedefstruct region_info {
305
-
uint32_t start;
306
-
uint32_t end;
307
-
uint32_t flags;
308
-
uint8_t alias_index; /*!<use with flags; will point to a different index if there is an alias region */
309
-
program_target_t *flash_algo; /*!< A pointer to the flash algorithm structure */
310
-
} region_info_t;
311
-
312
-
/**
313
-
@struct target_cfg_t
314
-
@brief The firmware configuration struct has unique about the chip its running on.
315
-
*/
316
-
typedefstruct target_cfg {
317
-
uint32_t version; /*!< Target configuration version */
318
-
const sector_info_t* sectors_info; /*!< Sector start and length list */
319
-
int sector_info_length; /*!< Sector start and length list total */
320
-
region_info_t flash_regions[MAX_EXTRA_FLASH_REGION]; /*!< Flash regions */
321
-
region_info_t ram_regions[MAX_EXTRA_RAM_REGION]; /*!< RAM regions */
322
-
uint8_t erase_reset; /*!< Reset after performing an erase */
323
-
const char *rt_board_id; /*!< If assigned, this is a flexible board ID */
324
-
uint16_t rt_family_id; /*!< If assigned, this is a flexible board ID */
325
-
} target_cfg_t;
326
-
```
327
183
At this point these target specific files could be added to a board build and developed.
328
184
329
185
# Supported Target Families
330
-
A HIC can target all supported families available and a post build script can modify a board's family id to point to the correct family. See [Porting board guide](PORT_BOARD.md)
186
+
A HIC can target all supported families available and a post build script can modify a board's family id to point to the correct family. See [Porting board guide](PORT_BOARD.md)
0 commit comments