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 #define KB(size) ((size) * 1024)
Pawel Zarembski 0:01f31e923fe2 26
Pawel Zarembski 0:01f31e923fe2 27 /* Device sizes */
Pawel Zarembski 0:01f31e923fe2 28
Pawel Zarembski 0:01f31e923fe2 29 #define DAPLINK_ROM_START 0x00000000
Pawel Zarembski 0:01f31e923fe2 30 #define DAPLINK_ROM_SIZE KB(256)
Pawel Zarembski 0:01f31e923fe2 31
Pawel Zarembski 0:01f31e923fe2 32 #define DAPLINK_RAM_START 0x20000000
Pawel Zarembski 0:01f31e923fe2 33 #define DAPLINK_RAM_SIZE KB(160)
Pawel Zarembski 0:01f31e923fe2 34
Pawel Zarembski 0:01f31e923fe2 35 /* ROM sizes */
Pawel Zarembski 0:01f31e923fe2 36
Pawel Zarembski 0:01f31e923fe2 37 #define DAPLINK_ROM_BL_START 0x00000000
Pawel Zarembski 0:01f31e923fe2 38 #define DAPLINK_ROM_BL_SIZE KB(48)
Pawel Zarembski 0:01f31e923fe2 39
Pawel Zarembski 0:01f31e923fe2 40 #define DAPLINK_ROM_CONFIG_ADMIN_START 0x0000C000
Pawel Zarembski 0:01f31e923fe2 41 #define DAPLINK_ROM_CONFIG_ADMIN_SIZE KB(0)
Pawel Zarembski 0:01f31e923fe2 42
Pawel Zarembski 0:01f31e923fe2 43 #define DAPLINK_ROM_IF_START 0x0000C000
Pawel Zarembski 0:01f31e923fe2 44 #define DAPLINK_ROM_IF_SIZE KB(204)
Pawel Zarembski 0:01f31e923fe2 45
Pawel Zarembski 0:01f31e923fe2 46 #define DAPLINK_ROM_CONFIG_USER_START 0x0003F000
Pawel Zarembski 0:01f31e923fe2 47 #define DAPLINK_ROM_CONFIG_USER_SIZE KB(4)
Pawel Zarembski 0:01f31e923fe2 48
Pawel Zarembski 0:01f31e923fe2 49 /* RAM sizes */
Pawel Zarembski 0:01f31e923fe2 50
Pawel Zarembski 0:01f31e923fe2 51 #define DAPLINK_RAM_APP_START 0x20000000
Pawel Zarembski 0:01f31e923fe2 52 #define DAPLINK_RAM_APP_SIZE KB(156)
Pawel Zarembski 0:01f31e923fe2 53
Pawel Zarembski 0:01f31e923fe2 54 #define DAPLINK_RAM_SHARED_START 0x20027000
Pawel Zarembski 0:01f31e923fe2 55 #define DAPLINK_RAM_SHARED_SIZE KB(4)
Pawel Zarembski 0:01f31e923fe2 56
Pawel Zarembski 0:01f31e923fe2 57 /* Flash Programming Info */
Pawel Zarembski 0:01f31e923fe2 58
Pawel Zarembski 0:01f31e923fe2 59 #define DAPLINK_SECTOR_SIZE KB(4)
Pawel Zarembski 0:01f31e923fe2 60 #define DAPLINK_MIN_WRITE_SIZE (256)
Pawel Zarembski 0:01f31e923fe2 61
Pawel Zarembski 0:01f31e923fe2 62 /* Current build */
Pawel Zarembski 0:01f31e923fe2 63
Pawel Zarembski 0:01f31e923fe2 64 #if defined(DAPLINK_BL)
Pawel Zarembski 0:01f31e923fe2 65
Pawel Zarembski 0:01f31e923fe2 66 #define DAPLINK_ROM_APP_START DAPLINK_ROM_BL_START
Pawel Zarembski 0:01f31e923fe2 67 #define DAPLINK_ROM_APP_SIZE DAPLINK_ROM_BL_SIZE
Pawel Zarembski 0:01f31e923fe2 68 #define DAPLINK_ROM_UPDATE_START DAPLINK_ROM_IF_START
Pawel Zarembski 0:01f31e923fe2 69 #define DAPLINK_ROM_UPDATE_SIZE DAPLINK_ROM_IF_SIZE
Pawel Zarembski 0:01f31e923fe2 70
Pawel Zarembski 0:01f31e923fe2 71 #elif defined(DAPLINK_IF)
Pawel Zarembski 0:01f31e923fe2 72
Pawel Zarembski 0:01f31e923fe2 73 #define DAPLINK_ROM_APP_START DAPLINK_ROM_IF_START
Pawel Zarembski 0:01f31e923fe2 74 #define DAPLINK_ROM_APP_SIZE DAPLINK_ROM_IF_SIZE
Pawel Zarembski 0:01f31e923fe2 75 #define DAPLINK_ROM_UPDATE_START DAPLINK_ROM_BL_START
Pawel Zarembski 0:01f31e923fe2 76 #define DAPLINK_ROM_UPDATE_SIZE DAPLINK_ROM_BL_SIZE
Pawel Zarembski 0:01f31e923fe2 77
Pawel Zarembski 0:01f31e923fe2 78 #else
Pawel Zarembski 0:01f31e923fe2 79
Pawel Zarembski 0:01f31e923fe2 80 #error "Build must be either bootloader or interface"
Pawel Zarembski 0:01f31e923fe2 81
Pawel Zarembski 0:01f31e923fe2 82 #endif
Pawel Zarembski 0:01f31e923fe2 83
Pawel Zarembski 0:01f31e923fe2 84 #endif