|
| 1 | +/* Flash algorithm for LPC84x IAP 64kB Flash |
| 2 | + * |
| 3 | + * DAPLink Interface Firmware |
| 4 | + * Copyright (c) 2009-2026 Arm Limited, All Rights Reserved |
| 5 | + * SPDX-License-Identifier: Apache-2.0 |
| 6 | + * |
| 7 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | + * you may not use this file except in compliance with the License. |
| 9 | + * You may obtain a copy of the License at |
| 10 | + * |
| 11 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | + * |
| 13 | + * Unless required by applicable law or agreed to in writing, software |
| 14 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | + * See the License for the specific language governing permissions and |
| 17 | + * limitations under the License. |
| 18 | + */ |
| 19 | + |
| 20 | +// Generated from 'LPC84x_64.FLM' (LPC84x IAP 64kB Flash) |
| 21 | +// Originating from 'Keil.LPC800_DFP.1.10.2.pack' |
| 22 | +// digest = 7456044e6eab538adb83363713d1bf756d11efc6acce4f93e184587a8b8b97bc, file size = 12556 |
| 23 | +// algo version = 0x101, algo size = 356 (0x164) |
| 24 | +static const uint32_t LPC84x_64_flash_prog_blob[] = { |
| 25 | + 0xe7fdbe00, |
| 26 | + 0x47700a80, 0x48474948, 0x60084449, 0x22004847, 0x21016102, 0x61426141, 0x61816141, 0x20024943, |
| 27 | + 0x70083940, 0x47704610, 0x47702000, 0x4c40b5f8, 0x444c2032, 0x25004621, 0xc461263f, 0x483c3114, |
| 28 | + 0x44484f3c, 0x91003c0c, 0x696047b8, 0xd10d2800, 0xc4612034, 0x44484834, 0x60206800, 0x3c0c4834, |
| 29 | + 0x99004448, 0x696047b8, 0xd0002800, 0xbdf82001, 0x4d2fb5f8, 0x20320a84, 0xc511444d, 0x310c4629, |
| 30 | + 0x4e2c482b, 0x460f602c, 0x3d084448, 0x696847b0, 0xd10e2800, 0xc5112034, 0x602c4823, 0x68004448, |
| 31 | + 0x48236068, 0x44484639, 0x47b03d08, 0x28006968, 0x2001d000, 0xb5f8bdf8, 0x00064614, 0xcc03d10e, |
| 32 | + 0x18406862, 0x18896821, 0x68a11840, 0x68e11840, 0x69211840, 0x42401840, 0x3c086160, 0x0ab04d14, |
| 33 | + 0x2132444d, 0x60296068, 0x462960a8, 0x4f113114, 0x91004628, 0x696847b8, 0xd1112800, 0x60ac2033, |
| 34 | + 0x20ffc541, 0x60683001, 0x44484807, 0x60a86800, 0x3d084807, 0x99004448, 0x696847b8, 0xd0002800, |
| 35 | + 0xbdf82001, 0x00002ee0, 0x00000004, 0x40048040, 0x00000008, 0x0f001ff1, 0x00000000, 0x00000000, |
| 36 | + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 |
| 37 | +}; |
| 38 | + |
| 39 | +// Start address of flash |
| 40 | +static const uint32_t flash_start = 0x00000000; |
| 41 | +// Size of flash |
| 42 | +static const uint32_t flash_size = 0x00010000; |
| 43 | + |
| 44 | +/** |
| 45 | +* List of start and size for each size of flash sector - even indexes are start, odd are size |
| 46 | +* The size will apply to all sectors between the listed address and the next address |
| 47 | +* in the list. |
| 48 | +* The last pair in the list will have sectors starting at that address and ending |
| 49 | +* at address flash_start + flash_size. |
| 50 | +*/ |
| 51 | +static const sector_info_t sectors_info[] = { |
| 52 | + {0x00000000, 0x00000400}, |
| 53 | +}; |
| 54 | + |
| 55 | +static const program_target_t flash = { |
| 56 | + 0x10000009, // Init |
| 57 | + 0x1000002d, // UnInit |
| 58 | + 0x10000031, // EraseChip |
| 59 | + 0x10000075, // EraseSector |
| 60 | + 0x100000bb, // ProgramPage |
| 61 | + 0x00000000, // Verify |
| 62 | + |
| 63 | + // BKPT : start of blob + 1 |
| 64 | + // RSB : blob start + header + rw data offset |
| 65 | + // RSP : stack pointer |
| 66 | + { |
| 67 | + 0x10000001, |
| 68 | + 0x1000013c, |
| 69 | + 0x10000a00 |
| 70 | + }, |
| 71 | + |
| 72 | + // mem buffer location |
| 73 | + 0x10000a00, |
| 74 | + // location to write prog_blob in target RAM |
| 75 | + 0x10000000, |
| 76 | + // prog_blob size |
| 77 | + sizeof(LPC84x_64_flash_prog_blob), |
| 78 | + // address of prog_blob |
| 79 | + LPC84x_64_flash_prog_blob, |
| 80 | + // ram_to_flash_bytes_to_be_written |
| 81 | + 0x00000100 |
| 82 | +}; |
0 commit comments