Repostiory containing DAPLink source code with Reset Pin workaround for HANI_IOT board.
Upstream: https://github.com/ARMmbed/DAPLink
source/family/arm/musca_b/target.c@0:01f31e923fe2, 2020-04-07 (annotated)
- Committer:
- Pawel Zarembski
- Date:
- Tue Apr 07 12:55:42 2020 +0200
- Revision:
- 0:01f31e923fe2
hani: DAPLink with reset workaround
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Pawel Zarembski |
0:01f31e923fe2 | 1 | |
Pawel Zarembski |
0:01f31e923fe2 | 2 | /** |
Pawel Zarembski |
0:01f31e923fe2 | 3 | * @file target.c |
Pawel Zarembski |
0:01f31e923fe2 | 4 | * @brief Target information for the Musca B qspi |
Pawel Zarembski |
0:01f31e923fe2 | 5 | * |
Pawel Zarembski |
0:01f31e923fe2 | 6 | * DAPLink Interface Firmware |
Pawel Zarembski |
0:01f31e923fe2 | 7 | * Copyright (c) 2016-2019, ARM Limited, All Rights Reserved |
Pawel Zarembski |
0:01f31e923fe2 | 8 | * SPDX-License-Identifier: Apache-2.0 |
Pawel Zarembski |
0:01f31e923fe2 | 9 | * |
Pawel Zarembski |
0:01f31e923fe2 | 10 | * Licensed under the Apache License, Version 2.0 (the "License"); you may |
Pawel Zarembski |
0:01f31e923fe2 | 11 | * not use this file except in compliance with the License. |
Pawel Zarembski |
0:01f31e923fe2 | 12 | * You may obtain a copy of the License at |
Pawel Zarembski |
0:01f31e923fe2 | 13 | * |
Pawel Zarembski |
0:01f31e923fe2 | 14 | * http://www.apache.org/licenses/LICENSE-2.0 |
Pawel Zarembski |
0:01f31e923fe2 | 15 | * |
Pawel Zarembski |
0:01f31e923fe2 | 16 | * Unless required by applicable law or agreed to in writing, software |
Pawel Zarembski |
0:01f31e923fe2 | 17 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
Pawel Zarembski |
0:01f31e923fe2 | 18 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
Pawel Zarembski |
0:01f31e923fe2 | 19 | * See the License for the specific language governing permissions and |
Pawel Zarembski |
0:01f31e923fe2 | 20 | * limitations under the License. |
Pawel Zarembski |
0:01f31e923fe2 | 21 | */ |
Pawel Zarembski |
0:01f31e923fe2 | 22 | |
Pawel Zarembski |
0:01f31e923fe2 | 23 | #include "target_config.h" |
Pawel Zarembski |
0:01f31e923fe2 | 24 | #include "region_defs.h" |
Pawel Zarembski |
0:01f31e923fe2 | 25 | |
Pawel Zarembski |
0:01f31e923fe2 | 26 | // The file flash_blob.c must only be included in target.c |
Pawel Zarembski |
0:01f31e923fe2 | 27 | #include "flash_blob.c" |
Pawel Zarembski |
0:01f31e923fe2 | 28 | |
Pawel Zarembski |
0:01f31e923fe2 | 29 | |
Pawel Zarembski |
0:01f31e923fe2 | 30 | // target information |
Pawel Zarembski |
0:01f31e923fe2 | 31 | target_cfg_t target_device = { |
Pawel Zarembski |
0:01f31e923fe2 | 32 | .sectors_info = sectors_info, |
Pawel Zarembski |
0:01f31e923fe2 | 33 | .sector_info_length = (sizeof(sectors_info))/(sizeof(sector_info_t)), |
Pawel Zarembski |
0:01f31e923fe2 | 34 | |
Pawel Zarembski |
0:01f31e923fe2 | 35 | .flash_regions[0].start = (MUSCA_B_NS_FLASH_START), |
Pawel Zarembski |
0:01f31e923fe2 | 36 | .flash_regions[0].end = (MUSCA_B_NS_FLASH_START + MUSCA_B_FLASH_SIZE), |
Pawel Zarembski |
0:01f31e923fe2 | 37 | #if (defined MUSCA_B_BOOT_QSPI_FLASH) |
Pawel Zarembski |
0:01f31e923fe2 | 38 | .flash_regions[0].flags = kRegionIsDefault, |
Pawel Zarembski |
0:01f31e923fe2 | 39 | #endif |
Pawel Zarembski |
0:01f31e923fe2 | 40 | .flash_regions[0].flash_algo = (program_target_t *) &qspi_flash, |
Pawel Zarembski |
0:01f31e923fe2 | 41 | |
Pawel Zarembski |
0:01f31e923fe2 | 42 | .flash_regions[1].start = (MUSCA_B_S_FLASH_START), |
Pawel Zarembski |
0:01f31e923fe2 | 43 | .flash_regions[1].end = (MUSCA_B_S_FLASH_START + MUSCA_B_FLASH_SIZE), |
Pawel Zarembski |
0:01f31e923fe2 | 44 | .flash_regions[1].flash_algo = (program_target_t *) &qspi_flash, |
Pawel Zarembski |
0:01f31e923fe2 | 45 | |
Pawel Zarembski |
0:01f31e923fe2 | 46 | .flash_regions[2].start = (MUSCA_B_NS_EFLASH0_START), |
Pawel Zarembski |
0:01f31e923fe2 | 47 | .flash_regions[2].end = (MUSCA_B_NS_EFLASH0_START + MUSCA_B_EFLASH0_SIZE), |
Pawel Zarembski |
0:01f31e923fe2 | 48 | .flash_regions[2].flash_algo = (program_target_t *) &eflash, |
Pawel Zarembski |
0:01f31e923fe2 | 49 | #if (defined MUSCA_B_BOOT_EFLASH0) |
Pawel Zarembski |
0:01f31e923fe2 | 50 | .flash_regions[2].flags = kRegionIsDefault, |
Pawel Zarembski |
0:01f31e923fe2 | 51 | #endif |
Pawel Zarembski |
0:01f31e923fe2 | 52 | |
Pawel Zarembski |
0:01f31e923fe2 | 53 | .flash_regions[3].start = (MUSCA_B_S_EFLASH0_START), |
Pawel Zarembski |
0:01f31e923fe2 | 54 | .flash_regions[3].end = (MUSCA_B_S_EFLASH0_START + MUSCA_B_EFLASH0_SIZE), |
Pawel Zarembski |
0:01f31e923fe2 | 55 | .flash_regions[3].flash_algo = (program_target_t *) &eflash, |
Pawel Zarembski |
0:01f31e923fe2 | 56 | |
Pawel Zarembski |
0:01f31e923fe2 | 57 | .flash_regions[4].start = (MUSCA_B_NS_EFLASH1_START), |
Pawel Zarembski |
0:01f31e923fe2 | 58 | .flash_regions[4].end = (MUSCA_B_NS_EFLASH1_START + MUSCA_B_EFLASH1_SIZE), |
Pawel Zarembski |
0:01f31e923fe2 | 59 | .flash_regions[4].flash_algo = (program_target_t *) &eflash, |
Pawel Zarembski |
0:01f31e923fe2 | 60 | #if (defined MUSCA_B_BOOT_EFLASH1) |
Pawel Zarembski |
0:01f31e923fe2 | 61 | .flash_regions[4].flags = kRegionIsDefault, |
Pawel Zarembski |
0:01f31e923fe2 | 62 | #endif |
Pawel Zarembski |
0:01f31e923fe2 | 63 | |
Pawel Zarembski |
0:01f31e923fe2 | 64 | .flash_regions[5].start = (MUSCA_B_S_EFLASH1_START), |
Pawel Zarembski |
0:01f31e923fe2 | 65 | .flash_regions[5].end = (MUSCA_B_S_EFLASH1_START + MUSCA_B_EFLASH1_SIZE), |
Pawel Zarembski |
0:01f31e923fe2 | 66 | .flash_regions[5].flash_algo = (program_target_t *) &eflash, |
Pawel Zarembski |
0:01f31e923fe2 | 67 | |
Pawel Zarembski |
0:01f31e923fe2 | 68 | .flash_regions[6].start = (MUSCA_B_NS_CODE_SRAM_START), |
Pawel Zarembski |
0:01f31e923fe2 | 69 | .flash_regions[6].end = (MUSCA_B_NS_CODE_SRAM_START + MUSCA_B_CODE_SRAM_SIZE), |
Pawel Zarembski |
0:01f31e923fe2 | 70 | #if (defined MUSCA_B_BOOT_CODE_SRAM) |
Pawel Zarembski |
0:01f31e923fe2 | 71 | .flash_regions[6].flags = kRegionIsDefault, |
Pawel Zarembski |
0:01f31e923fe2 | 72 | #endif |
Pawel Zarembski |
0:01f31e923fe2 | 73 | |
Pawel Zarembski |
0:01f31e923fe2 | 74 | .flash_regions[7].start = (MUSCA_B_S_CODE_SRAM_START), |
Pawel Zarembski |
0:01f31e923fe2 | 75 | .flash_regions[7].end = (MUSCA_B_S_CODE_SRAM_START + MUSCA_B_CODE_SRAM_SIZE), |
Pawel Zarembski |
0:01f31e923fe2 | 76 | |
Pawel Zarembski |
0:01f31e923fe2 | 77 | .ram_regions[0].start = (MUSCA_B_NS_RAM_START), |
Pawel Zarembski |
0:01f31e923fe2 | 78 | .ram_regions[0].end = (MUSCA_B_NS_RAM_START + MUSCA_B_RAM_SIZE), |
Pawel Zarembski |
0:01f31e923fe2 | 79 | .ram_regions[1].start = (MUSCA_B_S_RAM_START), |
Pawel Zarembski |
0:01f31e923fe2 | 80 | .ram_regions[1].end = (MUSCA_B_S_RAM_START + MUSCA_B_RAM_SIZE), |
Pawel Zarembski |
0:01f31e923fe2 | 81 | }; |