Repostiory containing DAPLink source code with Reset Pin workaround for HANI_IOT board.

Upstream: https://github.com/ARMmbed/DAPLink

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?

UserRevisionLine numberNew contents of line
Pawel Zarembski 0:01f31e923fe2 1 /**
Pawel Zarembski 0:01f31e923fe2 2 * @file target.c
Pawel Zarembski 0:01f31e923fe2 3 * @brief Target information for the rapid-iot
Pawel Zarembski 0:01f31e923fe2 4 *
Pawel Zarembski 0:01f31e923fe2 5 * DAPLink Interface Firmware
Pawel Zarembski 0:01f31e923fe2 6 * Copyright (c) 2009-2019, ARM Limited, All Rights Reserved
Pawel Zarembski 0:01f31e923fe2 7 * SPDX-License-Identifier: Apache-2.0
Pawel Zarembski 0:01f31e923fe2 8 *
Pawel Zarembski 0:01f31e923fe2 9 * Licensed under the Apache License, Version 2.0 (the "License"); you may
Pawel Zarembski 0:01f31e923fe2 10 * not use this file except in compliance with the License.
Pawel Zarembski 0:01f31e923fe2 11 * You may obtain a copy of the License at
Pawel Zarembski 0:01f31e923fe2 12 *
Pawel Zarembski 0:01f31e923fe2 13 * http://www.apache.org/licenses/LICENSE-2.0
Pawel Zarembski 0:01f31e923fe2 14 *
Pawel Zarembski 0:01f31e923fe2 15 * Unless required by applicable law or agreed to in writing, software
Pawel Zarembski 0:01f31e923fe2 16 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
Pawel Zarembski 0:01f31e923fe2 17 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Pawel Zarembski 0:01f31e923fe2 18 * See the License for the specific language governing permissions and
Pawel Zarembski 0:01f31e923fe2 19 * limitations under the License.
Pawel Zarembski 0:01f31e923fe2 20 */
Pawel Zarembski 0:01f31e923fe2 21
Pawel Zarembski 0:01f31e923fe2 22 #include "target_config.h"
Pawel Zarembski 0:01f31e923fe2 23
Pawel Zarembski 0:01f31e923fe2 24 // The file flash_blob.c must only be included in target.c
Pawel Zarembski 0:01f31e923fe2 25 #include "flash_blob_k64.c"
Pawel Zarembski 0:01f31e923fe2 26 #include "flash_blob_kw40.c"
Pawel Zarembski 0:01f31e923fe2 27 #include "flash_blob_kw41.c"
Pawel Zarembski 0:01f31e923fe2 28
Pawel Zarembski 0:01f31e923fe2 29 // default target information is k64f
Pawel Zarembski 0:01f31e923fe2 30 target_cfg_t target_device = {
Pawel Zarembski 0:01f31e923fe2 31 .sectors_info = sectors_info_k64,
Pawel Zarembski 0:01f31e923fe2 32 .sector_info_length = (sizeof(sectors_info_k64))/(sizeof(sector_info_t)),
Pawel Zarembski 0:01f31e923fe2 33 #ifdef BOARD_RAPID_IOT
Pawel Zarembski 0:01f31e923fe2 34 .flash_regions[0].start = 0x00014000,
Pawel Zarembski 0:01f31e923fe2 35 #else
Pawel Zarembski 0:01f31e923fe2 36 .flash_regions[0].start = 0x00000000,
Pawel Zarembski 0:01f31e923fe2 37 #endif
Pawel Zarembski 0:01f31e923fe2 38 .flash_regions[0].end = MB(1),
Pawel Zarembski 0:01f31e923fe2 39 .flash_regions[0].flags = kRegionIsDefault,
Pawel Zarembski 0:01f31e923fe2 40 .flash_regions[0].flash_algo = (program_target_t *) &flash_k64,
Pawel Zarembski 0:01f31e923fe2 41 .ram_regions[0].start = 0x20000000,
Pawel Zarembski 0:01f31e923fe2 42 .ram_regions[0].end = 0x20030000,
Pawel Zarembski 0:01f31e923fe2 43 };
Pawel Zarembski 0:01f31e923fe2 44
Pawel Zarembski 0:01f31e923fe2 45 target_cfg_t target_device_kw40 = {
Pawel Zarembski 0:01f31e923fe2 46 .sectors_info = sectors_info_kw40,
Pawel Zarembski 0:01f31e923fe2 47 .sector_info_length = (sizeof(sectors_info_kw40))/(sizeof(sector_info_t)),
Pawel Zarembski 0:01f31e923fe2 48 .flash_regions[0].start = 0,
Pawel Zarembski 0:01f31e923fe2 49 .flash_regions[0].end = KB(160),
Pawel Zarembski 0:01f31e923fe2 50 .flash_regions[0].flags = kRegionIsDefault,
Pawel Zarembski 0:01f31e923fe2 51 .flash_regions[0].flash_algo = (program_target_t *) &flash_kw40,
Pawel Zarembski 0:01f31e923fe2 52 .ram_regions[0].start = 0x1FFFF000,
Pawel Zarembski 0:01f31e923fe2 53 .ram_regions[0].end = 0x20004000,
Pawel Zarembski 0:01f31e923fe2 54 };
Pawel Zarembski 0:01f31e923fe2 55
Pawel Zarembski 0:01f31e923fe2 56 target_cfg_t target_device_kw41 = {
Pawel Zarembski 0:01f31e923fe2 57 .sectors_info = sectors_info_kw41,
Pawel Zarembski 0:01f31e923fe2 58 .sector_info_length = (sizeof(sectors_info_kw41))/(sizeof(sector_info_t)),
Pawel Zarembski 0:01f31e923fe2 59 .flash_regions[0].start = 0x4000,
Pawel Zarembski 0:01f31e923fe2 60 .flash_regions[0].end = KB(512),
Pawel Zarembski 0:01f31e923fe2 61 .flash_regions[0].flags = kRegionIsDefault,
Pawel Zarembski 0:01f31e923fe2 62 .flash_regions[0].flash_algo = (program_target_t *) &flash_kw41,
Pawel Zarembski 0:01f31e923fe2 63 .ram_regions[0].start = 0x1FFF8000,
Pawel Zarembski 0:01f31e923fe2 64 .ram_regions[0].end = 0x20018000,
Pawel Zarembski 0:01f31e923fe2 65 };