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 stm32l1xx_256_flash_prog_blob[] = {
00018     0xE00ABE00, 0x062D780D, 0x24084068, 0xD3000040, 0x1E644058, 0x1C49D1FA, 0x2A001E52, 0x4770D1F2,
00019     0xbf182a01, 0xd11e2a02, 0x680148a5, 0x6170f441, 0x48a56001, 0x600149a3, 0x600149a4, 0x0004f100,
00020     0x600149a3, 0x600149a3, 0x680048a3, 0x1f80f410, 0x48a2d109, 0x5155f245, 0xf04f6001, 0x60410106,
00021     0x71fff640, 0xf04f6081, 0x47700000, 0xbf182801, 0xd1082802, 0x6801489a, 0x0102f041, 0x68016001,
00022     0x0101f041, 0xf04f6001, 0x47700000, 0xc250f8df, 0x1000f8dc, 0x0f01f011, 0x498bd004, 0x600a4a89,
00023     0x600a4a8a, 0x1000f8dc, 0x0f02f011, 0x498dd004, 0x600a4a87, 0x600a4a87, 0x1000f8dc, 0x7100f441,
00024     0x1000f8cc, 0x1000f8dc, 0x0108f041, 0x1000f8cc, 0x60012100, 0x6801487a, 0x0f01f011, 0xf64abf1c,
00025     0x4a7e21aa, 0x6011d004, 0xf0136803, 0xd1fa0f01, 0xf4116801, 0xd0056f70, 0xf4416801, 0x60016170,
00026     0x47702001, 0x0000f8dc, 0x7000f420, 0x0000f8cc, 0x0000f8dc, 0x0008f020, 0x0000f8cc, 0x47702000,
00027     0x4df0e92d, 0x4f674c68, 0x81a0f8df, 0xa1a0f8df, 0xb1a0f8df, 0x4a624e69, 0xf04f4b69, 0x1d256100,
00028     0x0e00f04f, 0x2caaf64a, 0xf0106818, 0xbf1c0f01, 0xf8c46027, 0x68188000, 0x0f02f010, 0xf8c5bf1c,
00029     0xf8c5a000, 0x6818b000, 0x7000f440, 0x68186018, 0x0008f040, 0xf8c16018, 0x6810e000, 0x0f01f010,
00030     0xf8c6d005, 0x6810c000, 0x0f01f010, 0x6810d1f9, 0x6f70f410, 0x6810d005, 0x6070f440, 0x20016010,
00031     0x6818e008, 0x7000f420, 0x68186018, 0x0008f020, 0x20006018, 0xbf182800, 0x8df0e8bd, 0xf501484a,
00032     0x42817180, 0x2000d3c0, 0x8df0e8bd, 0x47702001, 0x4e43b4f0, 0x31ff2380, 0xc000f8d6, 0x01fff021,
00033     0x6c80f44c, 0xc000f8c6, 0xc000f8d6, 0x0c08f04c, 0xc000f8c6, 0xf852e005, 0xf840cb04, 0x1f09cb04,
00034     0x29001f1b, 0x2b00bf18, 0xf8dfd1f5, 0xf8dcc0b4, 0x4d323000, 0x0f01f013, 0x24aaf64a, 0x602cd005,
00035     0x3000f8dc, 0x0f01f013, 0xf8dcd1f9, 0xf4133000, 0xd12e6f70, 0xf4236833, 0x60336380, 0xf0236833,
00036     0x60330308, 0xf4436833, 0x60336380, 0xf0436833, 0x60330308, 0x0380f04f, 0xf852e007, 0xf8407b04,
00037     0xf1a17b04, 0xf1a30104, 0x29000304, 0x2b00bf18, 0xf8dcd1f3, 0xf0100000, 0xd0050f01, 0xf8dc602c,
00038     0xf0100000, 0xd1f90f01, 0x0000f8dc, 0x6f70f410, 0xf8dcd009, 0xf4400000, 0xf8cc6070, 0xbcf00000,
00039     0x0001f04f, 0x68304770, 0x6080f420, 0x68306030, 0x0008f020, 0xbcf06030, 0x0000f04f, 0x00004770,
00040     0x40023c18, 0x89abcdef, 0x40023c0c, 0x02030405, 0x8c9daebf, 0x13141516, 0x40023c1c, 0x40003000,
00041     0x40023c04, 0x40023c10, 0x08040000, 0x00000000
00042 };
00043 
00044 /**
00045 * List of start and size for each size of flash sector
00046 * The size will apply to all sectors between the listed address and the next address
00047 * in the list.
00048 * The last pair in the list will have sectors starting at that address and ending
00049 * at address start + size.
00050 */
00051 static const sector_info_t sectors_info[] = {
00052     {0x08000000, 256},
00053 };
00054 
00055 static const program_target_t flash = {
00056     0x20000021, // Init
00057     0x2000006d, // UnInit
00058     0x20000121, // EraseChip
00059     0x2000008d, // EraseSector
00060     0x200001d1, // ProgramPage
00061     0x0,        // Verify
00062     
00063     // BKPT : start of blob + 1
00064     // RSB  : blob start + header + rw data offset
00065     // RSP  : stack pointer
00066     {
00067         0x20000001,
00068         0x200002ec,
00069         0x20000800
00070     },
00071 
00072     0x20000000 + 0x00000A00,  // mem buffer location
00073     0x20000000,               // location to write prog_blob in target RAM
00074     sizeof(stm32l1xx_256_flash_prog_blob),   // prog_blob size
00075     stm32l1xx_256_flash_prog_blob,           // address of prog_blob
00076     0x00000100       // ram_to_flash_bytes_to_be_written
00077 };