Arrow / Mbed OS DAPLink Reset
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers flash_blob.c Source File

flash_blob.c

00001 /* Flash OS Routines (Automagically Generated)
00002  * Copyright (c) 2009-2019 ARM Limited
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 static const uint32_t lpc54114_flash_prog_blob[] = {
00018     0xE00ABE00, 0x062D780D, 0x24084068, 0xD3000040, 0x1E644058, 0x1C49D1FA, 0x2A001E52, 0x4770D1F2,
00019     0x21002210, 0xf8c00690, 0x4a2c2630, 0xf0236813, 0x60134380, 0x1280f8c0, 0x1284f8c0, 0x68134a28,
00020     0x4370f423, 0xf8c06013, 0x21021380, 0x20006001, 0x20004770, 0xb5104770, 0x20002107, 0xf844f000,
00021     0xbf182800, 0x4a1fbd10, 0xe8bd2107, 0x20004010, 0xb864f000, 0x0bc4b510, 0x46084621, 0xf834f000,
00022     0xbf182800, 0x4a17bd10, 0xe8bd4621, 0x46084010, 0xb854f000, 0x4614b570, 0xd10e0005, 0x0100e9d4,
00023     0xe9d44408, 0x44111202, 0x69214408, 0x69614408, 0x69a14408, 0x42404408, 0x0be861e0, 0xf0004601,
00024     0x2800f813, 0xbd70bf18, 0x46214b06, 0xe8bd4628, 0xf44f4070, 0xf0007280, 0x0000b818, 0x40000500,
00025     0x40000400, 0x00b71b00, 0xb08bb500, 0x92002232, 0x0101e9cd, 0x46684a39, 0x4790a906, 0x28009806,
00026     0xf600bf18, 0xb00b10c4, 0xb500bd00, 0xf04fb08b, 0x92030c33, 0xc000f8cd, 0x0101e9cd, 0x707af44f,
00027     0xf0f0fbb3, 0x4a2d9004, 0xa9064668, 0x98064790, 0xbf182800, 0x10c4f600, 0xbd00b00b, 0xb08bb500,
00028     0x93002334, 0x0101e9cd, 0x707af44f, 0xf0f0fbb2, 0x4a229003, 0xa9064668, 0x98064790, 0xbf182800,
00029     0x10c4f600, 0xbd00b00b, 0xb08bb500, 0x9300233b, 0x0101e9cd, 0x707af44f, 0xf0f0fbb2, 0x4a179003,
00030     0xa9064668, 0x98064790, 0xbf182800, 0x10c4f600, 0xbd00b00b, 0xb08bb500, 0x92002235, 0x0101e9cd,
00031     0x46684a0e, 0x4790a906, 0x28009806, 0xf600bf18, 0xb00b10c4, 0xb500bd00, 0x2338b08b, 0x93009203,
00032     0x0101e9cd, 0x46684a05, 0x4790a906, 0x28009806, 0xf600bf18, 0xb00b10c4, 0x0000bd00, 0x03000205,
00033     0x00000000
00034 };
00035 
00036 /**
00037 * List of start and size for each size of flash sector
00038 * The size will apply to all sectors between the listed address and the next address
00039 * in the list.
00040 * The last pair in the list will have sectors starting at that address and ending
00041 * at address start + size.
00042 */
00043 static const sector_info_t sectors_info[] = {
00044     {0, 32768},
00045 };
00046 
00047 static const program_target_t flash = {
00048     0x20000021, // Init
00049     0x20000053, // UnInit
00050     0x20000057, // EraseChip
00051     0x20000075, // EraseSector
00052     0x20000095, // ProgramPage
00053     0x0,        // Verify
00054     
00055     // BKPT : start of blob + 1
00056     // RSB  : blob start + header + rw data offset
00057     // RSP  : stack pointer
00058     {
00059         0x20000001,
00060         0x200001e0,
00061         0x20000800
00062     },
00063 
00064     0x20000000 + 0x00000A00,  // mem buffer location
00065     0x20000000,               // location to write prog_blob in target RAM
00066     sizeof(lpc54114_flash_prog_blob),   // prog_blob size
00067     lpc54114_flash_prog_blob,           // address of prog_blob
00068     0x00000100       // ram_to_flash_bytes_to_be_written
00069 };