Repostiory containing DAPLink source code with Reset Pin workaround for HANI_IOT board.
Upstream: https://github.com/ARMmbed/DAPLink
source/family/onsemi/ncs36510/flash_blob.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 | /* Flash OS Routines (Automagically Generated) |
Pawel Zarembski |
0:01f31e923fe2 | 2 | * Copyright (c) 2009-2019 ARM Limited |
Pawel Zarembski |
0:01f31e923fe2 | 3 | * |
Pawel Zarembski |
0:01f31e923fe2 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
Pawel Zarembski |
0:01f31e923fe2 | 5 | * you may not use this file except in compliance with the License. |
Pawel Zarembski |
0:01f31e923fe2 | 6 | * You may obtain a copy of the License at |
Pawel Zarembski |
0:01f31e923fe2 | 7 | * |
Pawel Zarembski |
0:01f31e923fe2 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
Pawel Zarembski |
0:01f31e923fe2 | 9 | * |
Pawel Zarembski |
0:01f31e923fe2 | 10 | * Unless required by applicable law or agreed to in writing, software |
Pawel Zarembski |
0:01f31e923fe2 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
Pawel Zarembski |
0:01f31e923fe2 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
Pawel Zarembski |
0:01f31e923fe2 | 13 | * See the License for the specific language governing permissions and |
Pawel Zarembski |
0:01f31e923fe2 | 14 | * limitations under the License. |
Pawel Zarembski |
0:01f31e923fe2 | 15 | */ |
Pawel Zarembski |
0:01f31e923fe2 | 16 | |
Pawel Zarembski |
0:01f31e923fe2 | 17 | static const uint32_t ncs36510_flash_prog_blob[] = { |
Pawel Zarembski |
0:01f31e923fe2 | 18 | 0xE00ABE00, 0x062D780D, 0x24084068, 0xD3000040, 0x1E644058, 0x1C49D1FA, 0x2A001E52, 0x4770D1F2, |
Pawel Zarembski |
0:01f31e923fe2 | 19 | 0x4770ba40, 0x4770bac0, 0x4770ba40, 0x4770bac0, 0x49876842, 0x68016111, 0xf4116840, 0x49851f80, |
Pawel Zarembski |
0:01f31e923fe2 | 20 | 0x6181bf14, 0x47706141, 0x68406801, 0x1f80f411, 0x6801d004, 0x0f02f011, 0x4770d1fb, 0xf0116801, |
Pawel Zarembski |
0:01f31e923fe2 | 21 | 0xd1fb0f01, 0x68014770, 0xf4116840, 0x68411f80, 0xf041bf14, 0xf0410101, 0x60410102, 0x68014770, |
Pawel Zarembski |
0:01f31e923fe2 | 22 | 0xf4116840, 0x68411f80, 0xf021bf14, 0xf0210101, 0x60410102, 0x68434770, 0x611a4a6d, 0x68436802, |
Pawel Zarembski |
0:01f31e923fe2 | 23 | 0x1f80f412, 0xbf144a6b, 0x615a619a, 0x60d16842, 0x21016842, 0xe7c76091, 0xf4116801, 0x68411f80, |
Pawel Zarembski |
0:01f31e923fe2 | 24 | 0xf44fbf14, 0xf44f1281, 0x60ca5200, 0x49606842, 0x68016111, 0xf4116842, 0x495e1f80, 0x6191bf14, |
Pawel Zarembski |
0:01f31e923fe2 | 25 | 0x21026151, 0x60916842, 0x4770e7ae, 0x1e5b6808, 0xf810d305, 0xf802cb01, 0x1e5bcb01, 0x6008d2f9, |
Pawel Zarembski |
0:01f31e923fe2 | 26 | 0x47702001, 0x4604b510, 0x46116808, 0x5f00f5b0, 0x020af3c0, 0xb132d20b, 0x020af3c0, 0x6200f5c2, |
Pawel Zarembski |
0:01f31e923fe2 | 27 | 0xd205429a, 0xf5b3e00a, 0xd8076f00, 0xb13ae00b, 0x020af3c0, 0x6200f5c2, 0xd204429a, 0xbd102000, |
Pawel Zarembski |
0:01f31e923fe2 | 28 | 0x6f00f5b3, 0x6862d8fa, 0xc004f8d2, 0x0c40f04c, 0xc004f8c2, 0xc004f8d4, 0xf8cc4a3d, 0x68222010, |
Pawel Zarembski |
0:01f31e923fe2 | 29 | 0xc004f8d4, 0x1f80f412, 0xbf144a3a, 0x2018f8cc, 0x2014f8cc, 0xf000461a, 0x4620f8f7, 0xff64f7ff, |
Pawel Zarembski |
0:01f31e923fe2 | 30 | 0xbd102001, 0x4d32b530, 0x46844c32, 0xd2562906, 0xf001e8df, 0x421f0355, 0x68015334, 0x1f80f411, |
Pawel Zarembski |
0:01f31e923fe2 | 31 | 0xf44fbf14, 0xf44f1181, 0x68425100, 0x684160d1, 0x6801610d, 0x1f80f411, 0xbf146841, 0x614c618c, |
Pawel Zarembski |
0:01f31e923fe2 | 32 | 0x68422102, 0xf7ff6091, 0x4660ff3f, 0xff3cf7ff, 0x6811e035, 0x61156842, 0xf4126802, 0x68421f80, |
Pawel Zarembski |
0:01f31e923fe2 | 33 | 0x6194bf14, 0x68426154, 0x684260d1, 0x60912101, 0xff2af7ff, 0xf7ff4660, 0xe020ff27, 0x0000f8dc, |
Pawel Zarembski |
0:01f31e923fe2 | 34 | 0x1f80f410, 0x0004f8dc, 0xbf146841, 0x0101f041, 0x0102f041, 0xe0126041, 0x0000f8dc, 0x1f80f410, |
Pawel Zarembski |
0:01f31e923fe2 | 35 | 0x0004f8dc, 0xbf146841, 0x0101f021, 0x0102f021, 0x46606041, 0xff08f7ff, 0xf7ffe001, 0x2001ff05, |
Pawel Zarembski |
0:01f31e923fe2 | 36 | 0x69c1bd30, 0x0f01f011, 0x69c0bf18, 0x00004770, 0xbb781ae9, 0xb56d9099, 0xb5104838, 0xf4216901, |
Pawel Zarembski |
0:01f31e923fe2 | 37 | 0x61010100, 0xf0216901, 0x61014180, 0x49354834, 0xf04f6001, 0x211f20e0, 0x1180f8c0, 0x1280f8c0, |
Pawel Zarembski |
0:01f31e923fe2 | 38 | 0xf04f4931, 0x60086020, 0x22004830, 0x44782103, 0xff78f7ff, 0xbd102000, 0x47702000, 0x47702000, |
Pawel Zarembski |
0:01f31e923fe2 | 39 | 0xb510482b, 0xf7ff4478, 0x482aff07, 0xf7ff4478, 0x2000ff03, 0xb501bd10, 0xf5b09800, 0xbf3c5f00, |
Pawel Zarembski |
0:01f31e923fe2 | 40 | 0xbd082001, 0x5100f5a0, 0x2fa0f5b1, 0x4822d204, 0x2102466a, 0xe0084478, 0x1081f5a0, 0x2fa0f5b0, |
Pawel Zarembski |
0:01f31e923fe2 | 41 | 0x481ed205, 0x2102466a, 0xf7ff4478, 0x2000ff4b, 0xb507bd08, 0xf5b09800, 0xd3165f00, 0x5c00f5a0, |
Pawel Zarembski |
0:01f31e923fe2 | 42 | 0x2fa0f5bc, 0x4816d204, 0x4669460b, 0xe0084478, 0x1081f5a0, 0x2fa0f5b0, 0x4812d20a, 0x4669460b, |
Pawel Zarembski |
0:01f31e923fe2 | 43 | 0xf7ff4478, 0x2801feef, 0xb003d002, 0xbd002001, 0x2000b003, 0x2000bd00, 0x00004770, 0x4001b000, |
Pawel Zarembski |
0:01f31e923fe2 | 44 | 0x4001e000, 0x2082353f, 0xe000ed04, 0x00000106, 0x000000e4, 0x000000e8, 0x000000b4, 0x000000ac, |
Pawel Zarembski |
0:01f31e923fe2 | 45 | 0x0000007c, 0x00000074, 0x0301ea40, 0xd003079b, 0xc908e009, 0xc0081f12, 0xd2fa2a04, 0xf811e003, |
Pawel Zarembski |
0:01f31e923fe2 | 46 | 0xf8003b01, 0x1e523b01, 0x4770d2f9, 0x00000000, 0x40017000, 0x00000008, 0x00100000, 0x40017000, |
Pawel Zarembski |
0:01f31e923fe2 | 47 | 0x00000008, 0x00000000, 0x00000000, 0x00000000, 0x00000000 |
Pawel Zarembski |
0:01f31e923fe2 | 48 | }; |
Pawel Zarembski |
0:01f31e923fe2 | 49 | |
Pawel Zarembski |
0:01f31e923fe2 | 50 | /** |
Pawel Zarembski |
0:01f31e923fe2 | 51 | * List of start and size for each size of flash sector |
Pawel Zarembski |
0:01f31e923fe2 | 52 | * The size will apply to all sectors between the listed address and the next address |
Pawel Zarembski |
0:01f31e923fe2 | 53 | * in the list. |
Pawel Zarembski |
0:01f31e923fe2 | 54 | * The last pair in the list will have sectors starting at that address and ending |
Pawel Zarembski |
0:01f31e923fe2 | 55 | * at address start + size. |
Pawel Zarembski |
0:01f31e923fe2 | 56 | */ |
Pawel Zarembski |
0:01f31e923fe2 | 57 | static const sector_info_t sectors_info[] = { |
Pawel Zarembski |
0:01f31e923fe2 | 58 | {0x00002000, 0x800}, |
Pawel Zarembski |
0:01f31e923fe2 | 59 | }; |
Pawel Zarembski |
0:01f31e923fe2 | 60 | |
Pawel Zarembski |
0:01f31e923fe2 | 61 | static const program_target_t flash = { |
Pawel Zarembski |
0:01f31e923fe2 | 62 | 0x3fff4259, // Init |
Pawel Zarembski |
0:01f31e923fe2 | 63 | 0x3fff4299, // UnInit |
Pawel Zarembski |
0:01f31e923fe2 | 64 | 0x3fff42a1, // EraseChip |
Pawel Zarembski |
0:01f31e923fe2 | 65 | 0x3fff42b7, // EraseSector |
Pawel Zarembski |
0:01f31e923fe2 | 66 | 0x3fff42f3, // ProgramPage |
Pawel Zarembski |
0:01f31e923fe2 | 67 | 0x0, // Verify |
Pawel Zarembski |
0:01f31e923fe2 | 68 | |
Pawel Zarembski |
0:01f31e923fe2 | 69 | // BKPT : start of blob + 1 |
Pawel Zarembski |
0:01f31e923fe2 | 70 | // RSB : blob start + header + rw data offset |
Pawel Zarembski |
0:01f31e923fe2 | 71 | // RSP : stack pointer |
Pawel Zarembski |
0:01f31e923fe2 | 72 | { |
Pawel Zarembski |
0:01f31e923fe2 | 73 | 0x3fff4001, |
Pawel Zarembski |
0:01f31e923fe2 | 74 | 0x3fff43a4, |
Pawel Zarembski |
0:01f31e923fe2 | 75 | 0x3fff4800 |
Pawel Zarembski |
0:01f31e923fe2 | 76 | }, |
Pawel Zarembski |
0:01f31e923fe2 | 77 | |
Pawel Zarembski |
0:01f31e923fe2 | 78 | 0x3fff4000 + 0x00000A00, // mem buffer location |
Pawel Zarembski |
0:01f31e923fe2 | 79 | 0x3fff4000, // location to write prog_blob in target RAM |
Pawel Zarembski |
0:01f31e923fe2 | 80 | sizeof(ncs36510_flash_prog_blob), // prog_blob size |
Pawel Zarembski |
0:01f31e923fe2 | 81 | ncs36510_flash_prog_blob, // address of prog_blob |
Pawel Zarembski |
0:01f31e923fe2 | 82 | 0x00000200 // ram_to_flash_bytes_to_be_written |
Pawel Zarembski |
0:01f31e923fe2 | 83 | }; |