Repostiory containing DAPLink source code with Reset Pin workaround for HANI_IOT board.
Upstream: https://github.com/ARMmbed/DAPLink
source/family/realtek/rtl8195am/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 rtl8195am_flash_prog_blob[] = { |
Pawel Zarembski |
0:01f31e923fe2 | 18 | 0xE00ABE00, 0x062D780D, 0x24084068, 0xD3000040, 0x1E644058, 0x1C49D1FA, 0x2A001E52, 0x4770D1F2, |
Pawel Zarembski |
0:01f31e923fe2 | 19 | 0x01f8e92d, 0x8400f8df, 0x46172200, 0x0604f1a8, 0x4cff4dfe, 0x0c04f108, 0x5330f247, 0xf8cc2000, |
Pawel Zarembski |
0:01f31e923fe2 | 20 | 0x20010000, 0x0000f8c8, 0x21002005, 0x1000f8cc, 0xf4216831, 0xf4412170, 0x60317140, 0x20017020, |
Pawel Zarembski |
0:01f31e923fe2 | 21 | 0x0000f8cc, 0x97002000, 0x1c406829, 0x0101f001, 0x42989100, 0x2900d801, 0x7820d1f6, 0xf8cc2100, |
Pawel Zarembski |
0:01f31e923fe2 | 22 | 0xf0101000, 0xd0060f01, 0x42931c52, 0xe8bdd8d6, 0x200001f8, 0xe8bd4770, 0x200101f8, 0xe92d4770, |
Pawel Zarembski |
0:01f31e923fe2 | 23 | 0xb0814df7, 0xffbcf7ff, 0x20004ee2, 0xf1a66030, 0x20010b04, 0x0000f8cb, 0x21002005, 0xf1ab6031, |
Pawel Zarembski |
0:01f31e923fe2 | 24 | 0x468a0704, 0xf4216839, 0xf4412170, 0x60397140, 0x835cf8df, 0x0000f888, 0x60302001, 0x20004cd3, |
Pawel Zarembski |
0:01f31e923fe2 | 25 | 0x5530f247, 0xa000f8cd, 0x1c406821, 0x0101f001, 0x42a89100, 0x2900d801, 0xf898d1f6, 0x21000000, |
Pawel Zarembski |
0:01f31e923fe2 | 26 | 0xf0106031, 0xd1420f02, 0x21002006, 0x4aca6031, 0x60112101, 0xf4216839, 0xf4217140, 0x60392170, |
Pawel Zarembski |
0:01f31e923fe2 | 27 | 0x0000f888, 0x60302001, 0xf8cd2000, 0x6821a000, 0xf0011c40, 0x91000101, 0xd80142a8, 0xd1f62900, |
Pawel Zarembski |
0:01f31e923fe2 | 28 | 0xff6ef7ff, 0x60302000, 0xf8cb2001, 0x20050000, 0x60312100, 0xf4216839, 0xf4412170, 0x60397140, |
Pawel Zarembski |
0:01f31e923fe2 | 29 | 0x0000f888, 0x60302001, 0xf8cd2000, 0x6821a000, 0xf0011c40, 0x91000101, 0xd80142a8, 0xd1f62900, |
Pawel Zarembski |
0:01f31e923fe2 | 30 | 0x0000f898, 0x60312100, 0x0f02f010, 0xe9ddd0bc, 0x23000102, 0x60339a01, 0xc29cf8df, 0xf8cc2301, |
Pawel Zarembski |
0:01f31e923fe2 | 31 | 0x683b3000, 0x7340f423, 0x2370f423, 0xf888603b, 0x22002000, 0xd9062800, 0xf8885c8b, 0x1c523000, |
Pawel Zarembski |
0:01f31e923fe2 | 32 | 0x4290b2d2, 0x2001d8f8, 0x20006030, 0xa000f8cd, 0x1c406821, 0x0101f001, 0x42a89100, 0x2900d801, |
Pawel Zarembski |
0:01f31e923fe2 | 33 | 0xf7ffd1f6, 0x2000ff1d, 0x20016030, 0x0000f8cb, 0x21002005, 0x68396031, 0x2170f421, 0x7140f441, |
Pawel Zarembski |
0:01f31e923fe2 | 34 | 0xf8886039, 0x20010000, 0x20006030, 0xa000f8cd, 0x1c406821, 0x0101f001, 0x42a89100, 0x2900d801, |
Pawel Zarembski |
0:01f31e923fe2 | 35 | 0xf898d1f6, 0x21000000, 0xf0106031, 0xd1da0f02, 0xe8bdb004, 0x4a818df0, 0x2000b081, 0x91006811, |
Pawel Zarembski |
0:01f31e923fe2 | 36 | 0xd0042921, 0x60112121, 0x28141c40, 0x487cdbf6, 0xf0416801, 0x60010101, 0x680b497a, 0x0310f043, |
Pawel Zarembski |
0:01f31e923fe2 | 37 | 0x4979600b, 0xf443680b, 0x600b7380, 0xf443680b, 0x600b7300, 0x68194b75, 0x0120f041, 0x68016019, |
Pawel Zarembski |
0:01f31e923fe2 | 38 | 0x0106f021, 0x68106001, 0x1002f3c0, 0xbf282803, 0x4a6f2003, 0xf1a2444a, 0xf8120c04, 0xeb021020, |
Pawel Zarembski |
0:01f31e923fe2 | 39 | 0xf88c0080, 0x78421000, 0x2001f88c, 0xf88c7880, 0x48680002, 0xf0106800, 0xd0160f01, 0x68004866, |
Pawel Zarembski |
0:01f31e923fe2 | 40 | 0x0f20f010, 0x4865d011, 0xf0136803, 0xd00c7f80, 0xf3c06800, 0xf0004007, 0xeb03031f, 0xf88c0343, |
Pawel Zarembski |
0:01f31e923fe2 | 41 | 0xeb023002, 0xf88c1050, 0x23010001, 0xf88c4a51, 0x20003003, 0x485a6010, 0x1f006001, 0x49596003, |
Pawel Zarembski |
0:01f31e923fe2 | 42 | 0x90006808, 0x3001f89c, 0x000ff36f, 0x60084318, 0x68084955, 0xf89c9000, 0xf0203002, 0x431800ff, |
Pawel Zarembski |
0:01f31e923fe2 | 43 | 0x20046008, 0x60081f11, 0x1f0b2000, 0xf4216819, 0x9100117c, 0x60106019, 0x21384a4c, 0x4a4c6011, |
Pawel Zarembski |
0:01f31e923fe2 | 44 | 0x601121eb, 0x68114a4b, 0x71fff421, 0xb0016011, 0x20004770, 0x22004770, 0x0382eb00, 0x43d0f1a3, |
Pawel Zarembski |
0:01f31e923fe2 | 45 | 0xf841681b, 0x1c523022, 0x6f80f5b2, 0xf44fd3f4, 0x47705080, 0x45f8e92d, 0xf8df2400, 0x460e80b0, |
Pawel Zarembski |
0:01f31e923fe2 | 46 | 0x46a24607, 0x5530f247, 0x0084eb07, 0x40d0f1a0, 0x1024f856, 0x22006001, 0xa000f8cd, 0x0000f8d8, |
Pawel Zarembski |
0:01f31e923fe2 | 47 | 0xf0001c52, 0x90000001, 0xd80142aa, 0xd1f52800, 0xfe36f7ff, 0xf5b41c64, 0xd3e56f80, 0x5080f44f, |
Pawel Zarembski |
0:01f31e923fe2 | 48 | 0x85f8e8bd, 0x39080b01, 0xbf9c2902, 0x47702000, 0xf1a0b508, 0x0c0140d0, 0x1000f88d, 0xf88d0a01, |
Pawel Zarembski |
0:01f31e923fe2 | 49 | 0xf88d1001, 0x466a0002, 0x20202103, 0xfe57f7ff, 0xbd082000, 0x2700b5f8, 0x7000f88d, 0x7001f88d, |
Pawel Zarembski |
0:01f31e923fe2 | 50 | 0x4d1e4e1d, 0xf88d4c1e, 0x466a7002, 0x20202103, 0xfe45f7ff, 0xf88d2004, 0xf88d0000, 0xf88d7001, |
Pawel Zarembski |
0:01f31e923fe2 | 51 | 0x466a7002, 0xe02d2103, 0x40006004, 0x40006028, 0x40006060, 0x40006008, 0x40006118, 0x40000014, |
Pawel Zarembski |
0:01f31e923fe2 | 52 | 0x400002c0, 0x40000210, 0x40000230, 0x40000320, 0x00000008, 0x400001f4, 0x400000e0, 0x40000038, |
Pawel Zarembski |
0:01f31e923fe2 | 53 | 0x40006014, 0x4000611c, 0x40000300, 0x40006104, 0x400060f0, 0x40006120, 0x1fff8000, 0x1fff9000, |
Pawel Zarembski |
0:01f31e923fe2 | 54 | 0x1fffa000, 0xf7ff2020, 0xf44ffe0a, 0x46324300, 0xeb032000, 0xf1a10180, 0x680941d0, 0x1020f842, |
Pawel Zarembski |
0:01f31e923fe2 | 55 | 0xf5b01c40, 0xd3f46f80, 0x4310f44f, 0x2000462a, 0x0180eb03, 0x41d0f1a1, 0xf8426809, 0x1c401020, |
Pawel Zarembski |
0:01f31e923fe2 | 56 | 0x6f80f5b0, 0xf44fd3f4, 0x46214320, 0xeb032000, 0xf1a20280, 0x681242d0, 0x2020f841, 0xf5b01c40, |
Pawel Zarembski |
0:01f31e923fe2 | 57 | 0xd3f46f80, 0x46112200, 0xf7ff20c7, 0x4631fdd8, 0x4000f44f, 0xff3ef7ff, 0xf44f4629, 0xf7ff4010, |
Pawel Zarembski |
0:01f31e923fe2 | 58 | 0x4621ff39, 0x4020f44f, 0xff34f7ff, 0xbdf82000, 0x4ff8e92d, 0x000e4615, 0xf04f4607, 0xd01c0400, |
Pawel Zarembski |
0:01f31e923fe2 | 59 | 0x8078f8df, 0xf24746a3, 0x19385a30, 0x40d0f1a0, 0x60016829, 0xf8cd2000, 0xf8d8b000, 0x1c401000, |
Pawel Zarembski |
0:01f31e923fe2 | 60 | 0x0101f001, 0x45509100, 0x2900d801, 0xf7ffd1f5, 0x1d24fd67, 0x42b41d2d, 0x2000d3e7, 0x8ff8e8bd, |
Pawel Zarembski |
0:01f31e923fe2 | 61 | 0xf5a0b410, 0xf5b34300, 0xd9145f40, 0xebb32300, 0xd2100f91, 0x0c83eb00, 0x4cd0f1ac, 0xc000f8dc, |
Pawel Zarembski |
0:01f31e923fe2 | 62 | 0x4023f852, 0xd00245a4, 0x2001bc10, 0x1c5b4770, 0x0f91ebb3, 0xbc10d3ee, 0x47702000, 0x40006028, |
Pawel Zarembski |
0:01f31e923fe2 | 63 | 0x00000000, 0x00000000, 0x005e0101, 0x00000101, 0x00230201, 0x00050501 |
Pawel Zarembski |
0:01f31e923fe2 | 64 | }; |
Pawel Zarembski |
0:01f31e923fe2 | 65 | |
Pawel Zarembski |
0:01f31e923fe2 | 66 | /** |
Pawel Zarembski |
0:01f31e923fe2 | 67 | * List of start and size for each size of flash sector |
Pawel Zarembski |
0:01f31e923fe2 | 68 | * The size will apply to all sectors between the listed address and the next address |
Pawel Zarembski |
0:01f31e923fe2 | 69 | * in the list. |
Pawel Zarembski |
0:01f31e923fe2 | 70 | * The last pair in the list will have sectors starting at that address and ending |
Pawel Zarembski |
0:01f31e923fe2 | 71 | * at address start + size. |
Pawel Zarembski |
0:01f31e923fe2 | 72 | */ |
Pawel Zarembski |
0:01f31e923fe2 | 73 | static const sector_info_t sectors_info[] = { |
Pawel Zarembski |
0:01f31e923fe2 | 74 | {0, KB(4)}, |
Pawel Zarembski |
0:01f31e923fe2 | 75 | }; |
Pawel Zarembski |
0:01f31e923fe2 | 76 | |
Pawel Zarembski |
0:01f31e923fe2 | 77 | static const program_target_t flash = { |
Pawel Zarembski |
0:01f31e923fe2 | 78 | 0x10007237, // Init |
Pawel Zarembski |
0:01f31e923fe2 | 79 | 0x10007353, // UnInit |
Pawel Zarembski |
0:01f31e923fe2 | 80 | 0x100073f5, // EraseChip |
Pawel Zarembski |
0:01f31e923fe2 | 81 | 0x100073c5, // EraseSector |
Pawel Zarembski |
0:01f31e923fe2 | 82 | 0x10007511, // ProgramPage |
Pawel Zarembski |
0:01f31e923fe2 | 83 | |
Pawel Zarembski |
0:01f31e923fe2 | 84 | 0x10007561, // Verify |
Pawel Zarembski |
0:01f31e923fe2 | 85 | |
Pawel Zarembski |
0:01f31e923fe2 | 86 | // BKPT : start of blob + 1 |
Pawel Zarembski |
0:01f31e923fe2 | 87 | // RSB : blob start + header + rw data offset |
Pawel Zarembski |
0:01f31e923fe2 | 88 | // RSP : stack pointer |
Pawel Zarembski |
0:01f31e923fe2 | 89 | { |
Pawel Zarembski |
0:01f31e923fe2 | 90 | 0x10007001, |
Pawel Zarembski |
0:01f31e923fe2 | 91 | 0x100075a0, |
Pawel Zarembski |
0:01f31e923fe2 | 92 | 0x10007800 |
Pawel Zarembski |
0:01f31e923fe2 | 93 | }, |
Pawel Zarembski |
0:01f31e923fe2 | 94 | |
Pawel Zarembski |
0:01f31e923fe2 | 95 | 0x10007000 + 0x00000A00, // mem buffer location |
Pawel Zarembski |
0:01f31e923fe2 | 96 | 0x10007000, // location to write prog_blob in target RAM |
Pawel Zarembski |
0:01f31e923fe2 | 97 | sizeof(rtl8195am_flash_prog_blob), // prog_blob size |
Pawel Zarembski |
0:01f31e923fe2 | 98 | rtl8195am_flash_prog_blob, // address of prog_blob |
Pawel Zarembski |
0:01f31e923fe2 | 99 | 0x00000400 // ram_to_flash_bytes_to_be_written |
Pawel Zarembski |
0:01f31e923fe2 | 100 | }; |