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 flash_blob.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 * Copyright 2019, Cypress Semiconductor Corporation
Pawel Zarembski 0:01f31e923fe2 8 * or a subsidiary of Cypress Semiconductor Corporation.
Pawel Zarembski 0:01f31e923fe2 9 * SPDX-License-Identifier: Apache-2.0
Pawel Zarembski 0:01f31e923fe2 10 *
Pawel Zarembski 0:01f31e923fe2 11 * Licensed under the Apache License, Version 2.0 (the "License"); you may
Pawel Zarembski 0:01f31e923fe2 12 * not use this file except in compliance with the License.
Pawel Zarembski 0:01f31e923fe2 13 * You may obtain a copy of the License at
Pawel Zarembski 0:01f31e923fe2 14 *
Pawel Zarembski 0:01f31e923fe2 15 * http://www.apache.org/licenses/LICENSE-2.0
Pawel Zarembski 0:01f31e923fe2 16 *
Pawel Zarembski 0:01f31e923fe2 17 * Unless required by applicable law or agreed to in writing, software
Pawel Zarembski 0:01f31e923fe2 18 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
Pawel Zarembski 0:01f31e923fe2 19 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Pawel Zarembski 0:01f31e923fe2 20 * See the License for the specific language governing permissions and
Pawel Zarembski 0:01f31e923fe2 21 * limitations under the License.
Pawel Zarembski 0:01f31e923fe2 22 */
Pawel Zarembski 0:01f31e923fe2 23
Pawel Zarembski 0:01f31e923fe2 24 #ifndef FLASH_BLOB_H
Pawel Zarembski 0:01f31e923fe2 25 #define FLASH_BLOB_H
Pawel Zarembski 0:01f31e923fe2 26
Pawel Zarembski 0:01f31e923fe2 27 #include <stdint.h>
Pawel Zarembski 0:01f31e923fe2 28
Pawel Zarembski 0:01f31e923fe2 29 #ifdef __cplusplus
Pawel Zarembski 0:01f31e923fe2 30 extern "C" {
Pawel Zarembski 0:01f31e923fe2 31 #endif
Pawel Zarembski 0:01f31e923fe2 32
Pawel Zarembski 0:01f31e923fe2 33 // Flags for program_target
Pawel Zarembski 0:01f31e923fe2 34 enum {
Pawel Zarembski 0:01f31e923fe2 35 kAlgoVerifyReturnsAddress = (1u << 0u), /*!< Verify function returns address if bit set */
Pawel Zarembski 0:01f31e923fe2 36 kAlgoSingleInitType = (1u << 1u), /*!< The init function ignores the function code. */
Pawel Zarembski 0:01f31e923fe2 37 kAlgoSkipChipErase = (1u << 2u), /*!< Skip region when erase.act action triggers. */
Pawel Zarembski 0:01f31e923fe2 38 };
Pawel Zarembski 0:01f31e923fe2 39
Pawel Zarembski 0:01f31e923fe2 40 typedef struct __attribute__((__packed__)) {
Pawel Zarembski 0:01f31e923fe2 41 uint32_t breakpoint;
Pawel Zarembski 0:01f31e923fe2 42 uint32_t static_base;
Pawel Zarembski 0:01f31e923fe2 43 uint32_t stack_pointer;
Pawel Zarembski 0:01f31e923fe2 44 } program_syscall_t;
Pawel Zarembski 0:01f31e923fe2 45
Pawel Zarembski 0:01f31e923fe2 46 typedef struct __attribute__((__packed__)) {
Pawel Zarembski 0:01f31e923fe2 47 const uint32_t init;
Pawel Zarembski 0:01f31e923fe2 48 const uint32_t uninit;
Pawel Zarembski 0:01f31e923fe2 49 const uint32_t erase_chip;
Pawel Zarembski 0:01f31e923fe2 50 const uint32_t erase_sector;
Pawel Zarembski 0:01f31e923fe2 51 const uint32_t program_page;
Pawel Zarembski 0:01f31e923fe2 52 const uint32_t verify;
Pawel Zarembski 0:01f31e923fe2 53 const program_syscall_t sys_call_s;
Pawel Zarembski 0:01f31e923fe2 54 const uint32_t program_buffer;
Pawel Zarembski 0:01f31e923fe2 55 const uint32_t algo_start;
Pawel Zarembski 0:01f31e923fe2 56 const uint32_t algo_size;
Pawel Zarembski 0:01f31e923fe2 57 const uint32_t *algo_blob;
Pawel Zarembski 0:01f31e923fe2 58 const uint32_t program_buffer_size;
Pawel Zarembski 0:01f31e923fe2 59 const uint32_t algo_flags; /*!< Combination of kAlgoVerifyReturnsAddress, kAlgoSingleInitType and kAlgoSkipChipErase*/
Pawel Zarembski 0:01f31e923fe2 60 } program_target_t;
Pawel Zarembski 0:01f31e923fe2 61
Pawel Zarembski 0:01f31e923fe2 62 typedef struct __attribute__((__packed__)) {
Pawel Zarembski 0:01f31e923fe2 63 const uint32_t start;
Pawel Zarembski 0:01f31e923fe2 64 const uint32_t size;
Pawel Zarembski 0:01f31e923fe2 65 } sector_info_t;
Pawel Zarembski 0:01f31e923fe2 66
Pawel Zarembski 0:01f31e923fe2 67 #ifdef __cplusplus
Pawel Zarembski 0:01f31e923fe2 68 }
Pawel Zarembski 0:01f31e923fe2 69 #endif
Pawel Zarembski 0:01f31e923fe2 70
Pawel Zarembski 0:01f31e923fe2 71 #endif