![](/media/cache/group/arrow_temp_636x636.png.50x50_q85.png)
Repostiory containing DAPLink source code with Reset Pin workaround for HANI_IOT board.
Upstream: https://github.com/ARMmbed/DAPLink
source/family/st/stm32f746zg/flash_blob.c@0:01f31e923fe2, 2020-04-07 (annotated)
- Committer:
- Pawel Zarembski
- Date:
- Tue Apr 07 12:55:42 2020 +0200
- Revision:
- 0:01f31e923fe2
hani: DAPLink with reset workaround
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Pawel Zarembski |
0:01f31e923fe2 | 1 | /* Flash OS Routines (Automagically Generated) |
Pawel Zarembski |
0:01f31e923fe2 | 2 | * Copyright (c) 2009-2019 ARM Limited |
Pawel Zarembski |
0:01f31e923fe2 | 3 | * |
Pawel Zarembski |
0:01f31e923fe2 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
Pawel Zarembski |
0:01f31e923fe2 | 5 | * you may not use this file except in compliance with the License. |
Pawel Zarembski |
0:01f31e923fe2 | 6 | * You may obtain a copy of the License at |
Pawel Zarembski |
0:01f31e923fe2 | 7 | * |
Pawel Zarembski |
0:01f31e923fe2 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
Pawel Zarembski |
0:01f31e923fe2 | 9 | * |
Pawel Zarembski |
0:01f31e923fe2 | 10 | * Unless required by applicable law or agreed to in writing, software |
Pawel Zarembski |
0:01f31e923fe2 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
Pawel Zarembski |
0:01f31e923fe2 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
Pawel Zarembski |
0:01f31e923fe2 | 13 | * See the License for the specific language governing permissions and |
Pawel Zarembski |
0:01f31e923fe2 | 14 | * limitations under the License. |
Pawel Zarembski |
0:01f31e923fe2 | 15 | */ |
Pawel Zarembski |
0:01f31e923fe2 | 16 | |
Pawel Zarembski |
0:01f31e923fe2 | 17 | static const uint32_t STM32F746ZG_flash_prog_blob[] = { |
Pawel Zarembski |
0:01f31e923fe2 | 18 | 0xE00ABE00, 0x062D780D, 0x24084068, 0xD3000040, 0x1E644058, 0x1C49D1FA, 0x2A001E52, 0x4770D1F2, |
Pawel Zarembski |
0:01f31e923fe2 | 19 | 0x8f4ff3bf, 0x03004770, 0x28400e00, 0x0980d302, 0x47701d00, 0x477008c0, 0x49474848, 0x49486041, |
Pawel Zarembski |
0:01f31e923fe2 | 20 | 0x21006041, 0x68c16001, 0x431122f0, 0x694060c1, 0xd4060680, 0x49434844, 0x21066001, 0x49436041, |
Pawel Zarembski |
0:01f31e923fe2 | 21 | 0x20006081, 0x483d4770, 0x05426901, 0x61014311, 0x47702000, 0x4839b510, 0x24046901, 0x61014321, |
Pawel Zarembski |
0:01f31e923fe2 | 22 | 0x03a26901, 0x61014311, 0x4a374939, 0x6011e000, 0x03db68c3, 0x6901d4fb, 0x610143a1, 0xbd102000, |
Pawel Zarembski |
0:01f31e923fe2 | 23 | 0xf7ffb530, 0x492dffc0, 0x23f068ca, 0x60ca431a, 0x610c2402, 0x0700690a, 0x43020e40, 0x6908610a, |
Pawel Zarembski |
0:01f31e923fe2 | 24 | 0x431003e2, 0x482a6108, 0xe0004a27, 0x68cd6010, 0xd4fb03ed, 0x43a06908, 0x68c86108, 0x0f000600, |
Pawel Zarembski |
0:01f31e923fe2 | 25 | 0x68c8d003, 0x60c84318, 0xbd302001, 0x4c1bb5f0, 0x08891cc9, 0x008968e5, 0x431d23f0, 0x230060e5, |
Pawel Zarembski |
0:01f31e923fe2 | 26 | 0x27016123, 0x4d1a06ff, 0x6923e021, 0x43334e19, 0x03066123, 0x19f60b36, 0x60336813, 0x8f4ff3bf, |
Pawel Zarembski |
0:01f31e923fe2 | 27 | 0xe0004e11, 0x68e36035, 0xd4fb03db, 0x085b6923, 0x6123005b, 0x061b68e3, 0xd0050f1b, 0x21f068e0, |
Pawel Zarembski |
0:01f31e923fe2 | 28 | 0x60e04308, 0xbdf02001, 0x1f091d00, 0x29001d12, 0x2000d1db, 0x0000bdf0, 0x45670123, 0x40023c00, |
Pawel Zarembski |
0:01f31e923fe2 | 29 | 0xcdef89ab, 0x00005555, 0x40003000, 0x00000fff, 0x0000aaaa, 0x00000201, 0x00000000 |
Pawel Zarembski |
0:01f31e923fe2 | 30 | }; |
Pawel Zarembski |
0:01f31e923fe2 | 31 | |
Pawel Zarembski |
0:01f31e923fe2 | 32 | /** |
Pawel Zarembski |
0:01f31e923fe2 | 33 | * List of start and size for each size of flash sector |
Pawel Zarembski |
0:01f31e923fe2 | 34 | * The size will apply to all sectors between the listed address and the next address |
Pawel Zarembski |
0:01f31e923fe2 | 35 | * in the list. |
Pawel Zarembski |
0:01f31e923fe2 | 36 | * The last pair in the list will have sectors starting at that address and ending |
Pawel Zarembski |
0:01f31e923fe2 | 37 | * at address start + size. |
Pawel Zarembski |
0:01f31e923fe2 | 38 | */ |
Pawel Zarembski |
0:01f31e923fe2 | 39 | static const sector_info_t sectors_info[] = { |
Pawel Zarembski |
0:01f31e923fe2 | 40 | {0x08000000, 0x8000}, |
Pawel Zarembski |
0:01f31e923fe2 | 41 | }; |
Pawel Zarembski |
0:01f31e923fe2 | 42 | |
Pawel Zarembski |
0:01f31e923fe2 | 43 | static const program_target_t flash = { |
Pawel Zarembski |
0:01f31e923fe2 | 44 | 0x20000039, // Init |
Pawel Zarembski |
0:01f31e923fe2 | 45 | 0x20000067, // UnInit |
Pawel Zarembski |
0:01f31e923fe2 | 46 | 0x20000075, // EraseChip |
Pawel Zarembski |
0:01f31e923fe2 | 47 | 0x200000a1, // EraseSector |
Pawel Zarembski |
0:01f31e923fe2 | 48 | 0x200000ed, // ProgramPage |
Pawel Zarembski |
0:01f31e923fe2 | 49 | 0x0, // Verify |
Pawel Zarembski |
0:01f31e923fe2 | 50 | |
Pawel Zarembski |
0:01f31e923fe2 | 51 | // BKPT : start of blob + 1 |
Pawel Zarembski |
0:01f31e923fe2 | 52 | // RSB : blob start + header + rw data offset |
Pawel Zarembski |
0:01f31e923fe2 | 53 | // RSP : stack pointer |
Pawel Zarembski |
0:01f31e923fe2 | 54 | { |
Pawel Zarembski |
0:01f31e923fe2 | 55 | 0x20000001, |
Pawel Zarembski |
0:01f31e923fe2 | 56 | 0x20000178, |
Pawel Zarembski |
0:01f31e923fe2 | 57 | 0x20000800 |
Pawel Zarembski |
0:01f31e923fe2 | 58 | }, |
Pawel Zarembski |
0:01f31e923fe2 | 59 | |
Pawel Zarembski |
0:01f31e923fe2 | 60 | 0x20000000 + 0x00000A00, // mem buffer location |
Pawel Zarembski |
0:01f31e923fe2 | 61 | 0x20000000, // location to write prog_blob in target RAM |
Pawel Zarembski |
0:01f31e923fe2 | 62 | sizeof(STM32F746ZG_flash_prog_blob), // prog_blob size |
Pawel Zarembski |
0:01f31e923fe2 | 63 | STM32F746ZG_flash_prog_blob, // address of prog_blob |
Pawel Zarembski |
0:01f31e923fe2 | 64 | 0x00000400 // ram_to_flash_bytes_to_be_written |
Pawel Zarembski |
0:01f31e923fe2 | 65 | }; |