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 daplink_addr.h
Pawel Zarembski 0:01f31e923fe2 3 * @brief
Pawel Zarembski 0:01f31e923fe2 4 *
Pawel Zarembski 0:01f31e923fe2 5 * DAPLink Interface Firmware
Pawel Zarembski 0:01f31e923fe2 6 * Copyright (c) 2009-2016, 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 #ifndef DAPLINK_ADDR_H
Pawel Zarembski 0:01f31e923fe2 23 #define DAPLINK_ADDR_H
Pawel Zarembski 0:01f31e923fe2 24
Pawel Zarembski 0:01f31e923fe2 25 /* Device sizes */
Pawel Zarembski 0:01f31e923fe2 26
Pawel Zarembski 0:01f31e923fe2 27 #define DAPLINK_ROM_START 0x00000000
Pawel Zarembski 0:01f31e923fe2 28 #define DAPLINK_ROM_SIZE 0x00010000
Pawel Zarembski 0:01f31e923fe2 29
Pawel Zarembski 0:01f31e923fe2 30 #define DAPLINK_RAM_START 0x10000000
Pawel Zarembski 0:01f31e923fe2 31 #define DAPLINK_RAM_SIZE (0x00002000 - DAPLINK_DEV_IAP_RESERVED)
Pawel Zarembski 0:01f31e923fe2 32
Pawel Zarembski 0:01f31e923fe2 33 // region at the end of RAM1 used by IAP driver
Pawel Zarembski 0:01f31e923fe2 34 #define DAPLINK_DEV_IAP_RESERVED 0x00000020
Pawel Zarembski 0:01f31e923fe2 35
Pawel Zarembski 0:01f31e923fe2 36 /* ROM sizes */
Pawel Zarembski 0:01f31e923fe2 37
Pawel Zarembski 0:01f31e923fe2 38 #define DAPLINK_ROM_BL_START 0x00000000
Pawel Zarembski 0:01f31e923fe2 39 #define DAPLINK_ROM_BL_SIZE 0x00000000
Pawel Zarembski 0:01f31e923fe2 40
Pawel Zarembski 0:01f31e923fe2 41 #define DAPLINK_ROM_CONFIG_ADMIN_START 0x00000000
Pawel Zarembski 0:01f31e923fe2 42 #define DAPLINK_ROM_CONFIG_ADMIN_SIZE 0x00000000
Pawel Zarembski 0:01f31e923fe2 43
Pawel Zarembski 0:01f31e923fe2 44 #define DAPLINK_ROM_IF_START 0x00000000
Pawel Zarembski 0:01f31e923fe2 45 #define DAPLINK_ROM_IF_SIZE 0x0000F000
Pawel Zarembski 0:01f31e923fe2 46
Pawel Zarembski 0:01f31e923fe2 47 #define DAPLINK_ROM_CONFIG_USER_START 0x0000F000
Pawel Zarembski 0:01f31e923fe2 48 #define DAPLINK_ROM_CONFIG_USER_SIZE 0x00001000
Pawel Zarembski 0:01f31e923fe2 49
Pawel Zarembski 0:01f31e923fe2 50 /* RAM sizes */
Pawel Zarembski 0:01f31e923fe2 51
Pawel Zarembski 0:01f31e923fe2 52 #define DAPLINK_RAM_APP_START 0x10000000
Pawel Zarembski 0:01f31e923fe2 53 #define DAPLINK_RAM_APP_SIZE (0x00001F00 - DAPLINK_DEV_IAP_RESERVED)
Pawel Zarembski 0:01f31e923fe2 54
Pawel Zarembski 0:01f31e923fe2 55 #define DAPLINK_RAM_SHARED_START (0x10001F00 - DAPLINK_DEV_IAP_RESERVED)
Pawel Zarembski 0:01f31e923fe2 56 #define DAPLINK_RAM_SHARED_SIZE 0x00000100
Pawel Zarembski 0:01f31e923fe2 57
Pawel Zarembski 0:01f31e923fe2 58 #define DAPLINK_RAM_APP2_START 0x20000000
Pawel Zarembski 0:01f31e923fe2 59 #define DAPLINK_RAM_APP2_SIZE 0x00000800
Pawel Zarembski 0:01f31e923fe2 60
Pawel Zarembski 0:01f31e923fe2 61 /* Flash Programming Info */
Pawel Zarembski 0:01f31e923fe2 62
Pawel Zarembski 0:01f31e923fe2 63 #define DAPLINK_SECTOR_SIZE 0x00000100
Pawel Zarembski 0:01f31e923fe2 64 #define DAPLINK_MIN_WRITE_SIZE 0x00000100
Pawel Zarembski 0:01f31e923fe2 65
Pawel Zarembski 0:01f31e923fe2 66 /* Current build */
Pawel Zarembski 0:01f31e923fe2 67
Pawel Zarembski 0:01f31e923fe2 68 #if defined(DAPLINK_BL)
Pawel Zarembski 0:01f31e923fe2 69
Pawel Zarembski 0:01f31e923fe2 70 #define DAPLINK_ROM_APP_START DAPLINK_ROM_BL_START
Pawel Zarembski 0:01f31e923fe2 71 #define DAPLINK_ROM_APP_SIZE DAPLINK_ROM_BL_SIZE
Pawel Zarembski 0:01f31e923fe2 72 #define DAPLINK_ROM_UPDATE_START DAPLINK_ROM_IF_START
Pawel Zarembski 0:01f31e923fe2 73 #define DAPLINK_ROM_UPDATE_SIZE DAPLINK_ROM_IF_SIZE
Pawel Zarembski 0:01f31e923fe2 74
Pawel Zarembski 0:01f31e923fe2 75 #elif defined(DAPLINK_IF)
Pawel Zarembski 0:01f31e923fe2 76
Pawel Zarembski 0:01f31e923fe2 77 #define DAPLINK_ROM_APP_START DAPLINK_ROM_IF_START
Pawel Zarembski 0:01f31e923fe2 78 #define DAPLINK_ROM_APP_SIZE DAPLINK_ROM_IF_SIZE
Pawel Zarembski 0:01f31e923fe2 79 #define DAPLINK_ROM_UPDATE_START DAPLINK_ROM_BL_START
Pawel Zarembski 0:01f31e923fe2 80 #define DAPLINK_ROM_UPDATE_SIZE DAPLINK_ROM_BL_SIZE
Pawel Zarembski 0:01f31e923fe2 81
Pawel Zarembski 0:01f31e923fe2 82 #else
Pawel Zarembski 0:01f31e923fe2 83
Pawel Zarembski 0:01f31e923fe2 84 #error "Build must be either bootloader or interface"
Pawel Zarembski 0:01f31e923fe2 85
Pawel Zarembski 0:01f31e923fe2 86 #endif
Pawel Zarembski 0:01f31e923fe2 87
Pawel Zarembski 0:01f31e923fe2 88 #endif