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 STM32F103RB_flash_prog_blob[] = {
00018     0xE00ABE00, 0x062D780D, 0x24084068, 0xD3000040, 0x1E644058, 0x1C49D1FA, 0x2A001E52, 0x4770D1F2,
00019     0x4603b510, 0x4c442000, 0x48446020, 0x48446060, 0x46206060, 0xf01069c0, 0xd1080f04, 0x5055f245,
00020     0x60204c40, 0x60602006, 0x70fff640, 0x200060a0, 0x4601bd10, 0x69004838, 0x0080f040, 0x61104a36,
00021     0x47702000, 0x69004834, 0x0004f040, 0x61084932, 0x69004608, 0x0040f040, 0xe0036108, 0x20aaf64a,
00022     0x60084930, 0x68c0482c, 0x0f01f010, 0x482ad1f6, 0xf0206900, 0x49280004, 0x20006108, 0x46014770,
00023     0x69004825, 0x0002f040, 0x61104a23, 0x61414610, 0xf0406900, 0x61100040, 0xf64ae003, 0x4a2120aa,
00024     0x481d6010, 0xf01068c0, 0xd1f60f01, 0x6900481a, 0x0002f020, 0x61104a18, 0x47702000, 0x4603b510,
00025     0xf0201c48, 0xe0220101, 0x69004813, 0x0001f040, 0x61204c11, 0x80188810, 0x480fbf00, 0xf01068c0,
00026     0xd1fa0f01, 0x6900480c, 0x0001f020, 0x61204c0a, 0x68c04620, 0x0f14f010, 0x4620d006, 0xf04068c0,
00027     0x60e00014, 0xbd102001, 0x1c921c9b, 0x29001e89, 0x2000d1da, 0x0000e7f7, 0x40022000, 0x45670123,
00028     0xcdef89ab, 0x40003000, 0x00000000
00029 };
00030 
00031 /**
00032 * List of start and size for each size of flash sector
00033 * The size will apply to all sectors between the listed address and the next address
00034 * in the list.
00035 * The last pair in the list will have sectors starting at that address and ending
00036 * at address start + size.
00037 */
00038 static const sector_info_t sectors_info[] = {
00039     {0x08000000, 0x400},
00040 };
00041 
00042 static const program_target_t flash = {
00043     0x20000021, // Init
00044     0x20000053, // UnInit
00045     0x20000065, // EraseChip
00046     0x2000009f, // EraseSector
00047     0x200000dd, // ProgramPage
00048     0x0,        // Verify
00049 
00050     // BKPT : start of blob + 1
00051     // RSB  : blob start + header + rw data offset
00052     // RSP  : stack pointer
00053     {
00054         0x20000001,
00055         0x20000148,
00056         0x20000800
00057     },
00058 
00059     0x20000000 + 0x00000A00,  // mem buffer location
00060     0x20000000,               // location to write prog_blob in target RAM
00061     sizeof(STM32F103RB_flash_prog_blob),   // prog_blob size
00062     STM32F103RB_flash_prog_blob,           // address of prog_blob
00063     0x00000400       // ram_to_flash_bytes_to_be_written
00064 };