|
| 1 | +/* Flash OS Routines (Automagically Generated) |
| 2 | + * Copyright (c) 2020 - 2021 NXP, All Rights Reserved |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | + |
| 17 | +static const uint32_t DAPLINK_RT1170_flash_prog_blob[] = { |
| 18 | + 0xE00ABE00, 0x062D780D, 0x24084068, 0xD3000040, 0x1E644058, 0x1C49D1FA, 0x2A001E52, 0x4770D1F2, |
| 19 | + 0x4770ba40, 0x4770ba40, 0x4770bac0, 0x4770bac0, 0x49414770, 0x4449b510, 0x460a483e, 0x493f6008, |
| 20 | + 0x44492001, 0xf894f000, 0xd1062800, 0x2001493b, 0xf0004449, 0x2800f878, 0x2001d000, 0x2000bd10, |
| 21 | + 0xb5704770, 0x460d4613, 0x4604460a, 0x46184601, 0xf8b2f000, 0xd0012800, 0xbd702000, 0xbd701960, |
| 22 | + 0x4f2db5f8, 0x4d2e2600, 0x4634444f, 0x444d1f3f, 0x492a6c6b, 0x43604618, 0x44491982, 0xf0002001, |
| 23 | + 0x1c64f86d, 0x2c806038, 0xbdf8dbf2, 0x0107b5f8, 0x093f4e23, 0x444e2400, 0x4628e00d, 0x491f4360, |
| 24 | + 0x462b19c2, 0x20014449, 0xf858f000, 0x4449491a, 0x1c641f09, 0x6c756008, 0x46292001, 0xf0000300, |
| 25 | + 0x42a0f8a8, 0x4814d8e9, 0x1f004448, 0xbdf86800, 0x0106b570, 0x09364812, 0x6c444448, 0x46214615, |
| 26 | + 0xf0004630, 0x2900f896, 0x490cd106, 0x46324623, 0x20014449, 0xf832f000, 0x462b4908, 0x44494632, |
| 27 | + 0xf0002001, 0x4904f816, 0x1f094449, 0xbd706008, 0x00004770, 0xc0000005, 0x00000008, 0x00000010, |
| 28 | + 0x00000190, 0x22214770, 0x69d20412, 0x685268d2, 0xb4304710, 0x04242421, 0x68e469e4, 0x46a468a4, |
| 29 | + 0x4760bc30, 0x04122221, 0x68d269d2, 0x471068d2, 0x041b2321, 0x68db69db, 0x47186a5b, 0x2421b430, |
| 30 | + 0x69e40424, 0x692468e4, 0xbc3046a4, 0xb5384760, 0x94009c04, 0x04242421, 0x68e469e4, 0x47a06964, |
| 31 | + 0xb430bd38, 0x04242421, 0x68e469e4, 0x46a46a24, 0x4760bc30, 0x04122221, 0x68d269d2, 0x471069d2, |
| 32 | + 0x04092121, 0x68c969c9, 0x47086989, 0x04122221, 0x68d269d2, 0x47106b92, 0xb5104603, 0x079b430b, |
| 33 | + 0x2a04d10f, 0xc808d30d, 0x1f12c910, 0xd0f842a3, 0xba21ba18, 0xd9014288, 0xbd102001, 0x43c02000, |
| 34 | + 0x2a00bd10, 0x07d3d003, 0x1c52d003, 0x2000e007, 0x7803bd10, 0x1c40780c, 0x1b1b1c49, 0x7803d107, |
| 35 | + 0x1c40780c, 0x1b1b1c49, 0x1e92d101, 0x4618d1f1, 0x2200bd10, 0x428b0903, 0x0a03d32c, 0xd311428b, |
| 36 | + 0x469c2300, 0x4603e04e, 0xd43c430b, 0x08432200, 0xd331428b, 0x428b0903, 0x0a03d31c, 0xd301428b, |
| 37 | + 0xe03f4694, 0x428b09c3, 0x01cbd301, 0x41521ac0, 0x428b0983, 0x018bd301, 0x41521ac0, 0x428b0943, |
| 38 | + 0x014bd301, 0x41521ac0, 0x428b0903, 0x010bd301, 0x41521ac0, 0x428b08c3, 0x00cbd301, 0x41521ac0, |
| 39 | + 0x428b0883, 0x008bd301, 0x41521ac0, 0x428b0843, 0x004bd301, 0x41521ac0, 0xd2001a41, 0x41524601, |
| 40 | + 0x47704610, 0x0fcae05d, 0x4249d000, 0xd3001003, 0x40534240, 0x469c2200, 0x428b0903, 0x0a03d32d, |
| 41 | + 0xd312428b, 0x018922fc, 0x0a03ba12, 0xd30c428b, 0x11920189, 0xd308428b, 0x11920189, 0xd304428b, |
| 42 | + 0xd03a0189, 0xe0001192, 0x09c30989, 0xd301428b, 0x1ac001cb, 0x09834152, 0xd301428b, 0x1ac0018b, |
| 43 | + 0x09434152, 0xd301428b, 0x1ac0014b, 0x09034152, 0xd301428b, 0x1ac0010b, 0x08c34152, 0xd301428b, |
| 44 | + 0x1ac000cb, 0x08834152, 0xd301428b, 0x1ac0008b, 0xd2d94152, 0x428b0843, 0x004bd301, 0x41521ac0, |
| 45 | + 0xd2001a41, 0x46634601, 0x105b4152, 0xd3014610, 0x2b004240, 0x4249d500, 0x46634770, 0xd300105b, |
| 46 | + 0xb5014240, 0x46c02000, 0xbd0246c0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
| 47 | + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
| 48 | + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
| 49 | + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
| 50 | + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
| 51 | + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
| 52 | + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
| 53 | + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
| 54 | + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
| 55 | + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
| 56 | + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
| 57 | + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
| 58 | + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
| 59 | + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
| 60 | + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
| 61 | + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
| 62 | + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 |
| 63 | +}; |
| 64 | + |
| 65 | +// Start address of flash |
| 66 | +static const uint32_t flash_start = 0x30000000; |
| 67 | +// Size of flash |
| 68 | +static const uint32_t flash_size = 0x00800000; |
| 69 | + |
| 70 | +/** |
| 71 | +* List of start and size for each size of flash sector - even indexes are start, odd are size |
| 72 | +* The size will apply to all sectors between the listed address and the next address |
| 73 | +* in the list. |
| 74 | +* The last pair in the list will have sectors starting at that address and ending |
| 75 | +* at address flash_start + flash_size. |
| 76 | +*/ |
| 77 | +static const sector_info_t sectors_info[] = { |
| 78 | + {0x30000000, 0x00001000}, |
| 79 | +}; |
| 80 | + |
| 81 | +static const program_target_t flash = { |
| 82 | + 0x20000033, // .init |
| 83 | + 0x2000005f, // .uninit |
| 84 | + 0x20000081, // .erase_chip |
| 85 | + 0x200000ad, // .erase_sector |
| 86 | + 0x200000f1, // .program_page |
| 87 | + 0x0, // .verify |
| 88 | + { // .sys_call_s |
| 89 | + 0x20000001, // .breakpoint : start of blob + 1 |
| 90 | + 0x2000038C, // .static_base : blob start + header + rw data offset |
| 91 | + 0x20002800 // .stack_pointer |
| 92 | + }, |
| 93 | + 0x20000000 + 0x00003000, // mem buffer location |
| 94 | + 0x20000000, // location to write prog_blob in target RAM |
| 95 | + sizeof(DAPLINK_RT1170_flash_prog_blob), // prog_blob size |
| 96 | + DAPLINK_RT1170_flash_prog_blob, // address of prog_blob |
| 97 | + 0x00000100 // .algo_flags: ram_to_flash_bytes_to_be_written |
| 98 | +}; |
0 commit comments