Skip to content

Commit 647daee

Browse files
authored
Update flash algo for LPC55S69 (#926)
1 parent df8e414 commit 647daee

File tree

1 file changed

+83
-63
lines changed

1 file changed

+83
-63
lines changed
Lines changed: 83 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
/* Flash OS Routines (Automagically Generated)
2-
* Copyright (c) 2009-2019 ARM Limited
1+
/* Flash algorithm for LPC55xx IAP 608kB Flash
2+
*
3+
* DAPLink Interface Firmware
4+
* Copyright (c) 2009-2022 Arm Limited, All Rights Reserved
5+
* SPDX-License-Identifier: Apache-2.0
36
*
47
* Licensed under the Apache License, Version 2.0 (the "License");
58
* you may not use this file except in compliance with the License.
@@ -14,53 +17,65 @@
1417
* limitations under the License.
1518
*/
1619

17-
static const uint32_t lpc55S69_flash_prog_blob[] = {
18-
0xE00ABE00, 0x062D780D, 0x24084068, 0xD3000040, 0x1E644058, 0x1C49D1FA, 0x2A001E52, 0x4770D1F2,
19-
0x20c8b580, 0x0002f2c4, 0x60012120, 0x6080f64f, 0x4100f240, 0x70fff6cf, 0x0100f2c4, 0x500a2200,
20-
0x6084f64f, 0x70fff6cf, 0x6808500a, 0x6300f04f, 0x30f8f440, 0xf64f6008, 0xf6cf5048, 0x500b70ff,
21-
0x6028f64f, 0x70fff6cf, 0xf243500b, 0xf2c40010, 0x68030001, 0x4380f443, 0xf8416003, 0xf04f2c80,
22-
0x21024080, 0xf2406001, 0xf2c0000c, 0x44480000, 0xf862f000, 0xbf182800, 0xbd802001, 0x47702000,
23-
0xf240b510, 0xf2c0040c, 0xf2460400, 0xeb09636c, 0xf6c60004, 0x21003365, 0x2218f44f, 0xf86cf000,
24-
0xbf182800, 0xeb09bd10, 0x21000004, 0x2218f44f, 0x4010e8bd, 0xb8b0f000, 0xf240b5b0, 0xf2c0050c,
25-
0xeb090500, 0x690a0105, 0xf2464604, 0xf6c6636c, 0x46083365, 0xf0004621, 0x2800f84f, 0xbdb0bf18,
26-
0x0005eb09, 0x46216902, 0x40b0e8bd, 0xb894f000, 0xb085b5f0, 0x070cf240, 0x4606460d, 0x0700f2c0,
27-
0x0007eb09, 0x462b4631, 0xf0004614, 0xb108f85d, 0xbdf0b005, 0xf10da804, 0x90000c0c, 0x0007eb09,
28-
0x462a4631, 0xf8cd4623, 0xf000c004, 0xb005f88b, 0x0000bdf0, 0xe7fdbe00, 0x1100f241, 0x3100f2c1,
29-
0x29006809, 0x680ad00a, 0x0308f240, 0x2207f3c2, 0x0300f2c0, 0x2003f849, 0x47086849, 0x309ef240,
30-
0x0000f2c0, 0x31abf240, 0x0100f2c0, 0x44794478, 0xf7ff2276, 0xbf00ffdf, 0x0c08f240, 0x0c00f2c0,
31-
0xc00cf859, 0x0f00f1bc, 0xf241d00b, 0xf2c11c00, 0xf8dc3c00, 0xf1bcc000, 0xd0070f00, 0xc008f8dc,
32-
0xf2444760, 0xf2c11c3b, 0x47603c00, 0x304ef240, 0x0000f2c0, 0x315bf240, 0x0100f2c0, 0x44794478,
33-
0xf7ff2286, 0xbf00ffb7, 0x0c08f240, 0x0c00f2c0, 0xc00cf859, 0x0f00f1bc, 0xf241d00b, 0xf2c11c00,
34-
0xf8dc3c00, 0xf1bcc000, 0xd0070f00, 0xc00cf8dc, 0xf2444760, 0xf2c11c9d, 0x47603c00, 0x20fef240,
35-
0x0000f2c0, 0x310bf240, 0x0100f2c0, 0x44794478, 0xf7ff2296, 0xbf00ff8f, 0x1300f241, 0x3300f2c1,
36-
0x2b00681b, 0x691bd001, 0xf2404718, 0xf2c020d0, 0xf2400000, 0xf2c021dd, 0x44780100, 0x229e4479,
37-
0xff78f7ff, 0x0c08f240, 0x0c00f2c0, 0xc00cf859, 0x0f00f1bc, 0xf241d00b, 0xf2c11c00, 0xf8dc3c00,
38-
0xf1bcc000, 0xd0070f00, 0xc014f8dc, 0xf2444760, 0xf2c12c7d, 0x47603c00, 0x2082f240, 0x0000f2c0,
39-
0x218ff240, 0x0100f2c0, 0x44794478, 0xf7ff22b2, 0xbf00ff51, 0x1300f241, 0x3300f2c1, 0x2b00681b,
40-
0x699bd001, 0xf2404718, 0xf2c02054, 0xf2400000, 0xf2c02161, 0x44780100, 0x22bb4479, 0xff3af7ff,
41-
0x1100f241, 0x3100f2c1, 0x29006809, 0x69c9d001, 0xf2404708, 0xf2c02028, 0xf2400000, 0xf2c02135,
42-
0x44780100, 0x22c54479, 0xff24f7ff, 0x1100f241, 0x3100f2c1, 0x29006809, 0x6a09d001, 0xf2404708,
43-
0xf2c010fc, 0xf2400000, 0xf2c02109, 0x44780100, 0x22cc4479, 0xff0ef7ff, 0x1100f241, 0x3100f2c1,
44-
0x29006809, 0xf644d004, 0xf2c11151, 0x47083100, 0x10caf240, 0x0000f2c0, 0x11d7f240, 0x0100f2c0,
45-
0x44794478, 0xf7ff22d2, 0xbf00fef5, 0x230bf644, 0x3300f2c1, 0xbf004718, 0x1c00f241, 0x3c00f2c1,
46-
0xc000f8dc, 0x0f00f1bc, 0xf8dcd002, 0x4760c040, 0x108af240, 0x0000f2c0, 0x1197f240, 0x0100f2c0,
47-
0x44794478, 0xf7ff22e0, 0xbf00fed5, 0x21fff644, 0x3100f2c1, 0xbf004708, 0x313df644, 0x3100f2c1,
48-
0xbf004708, 0x1200f241, 0x3200f2c1, 0x2a006812, 0xf644d004, 0xf2c1328b, 0x47103200, 0x103ef240,
49-
0x0000f2c0, 0x114bf240, 0x0100f2c0, 0x44794478, 0xf7ff22f5, 0xbf00feaf, 0x1300f241, 0x3300f2c1,
50-
0x2b00681b, 0x6a5bd001, 0xf2404718, 0xf2c01010, 0xf2400000, 0xf2c0111d, 0x44780100, 0x22fc4479,
51-
0xfe98f7ff, 0x62a7f644, 0x3200f2c1, 0xbf004710, 0x1c00f241, 0x3c00f2c1, 0xc000f8dc, 0x0f00f1bc,
52-
0xf8dcd002, 0x4760c02c, 0x00d2f240, 0x0000f2c0, 0x01dff240, 0x0100f2c0, 0x44794478, 0x7284f44f,
53-
0xfe78f7ff, 0x1200f241, 0x3200f2c1, 0x2a006812, 0x6b12d001, 0xf2404710, 0xf2c000a4, 0xf2400000,
54-
0xf2c001b1, 0x44780100, 0xf2404479, 0xf7ff120f, 0xbf00fe61, 0x1200f241, 0x3200f2c1, 0x2a006812,
55-
0x6b52d001, 0xf2404710, 0xf2c00074, 0xf2400000, 0xf2c00181, 0x44780100, 0xf44f4479, 0xf7ff728b,
56-
0xbf00fe49, 0x1300f241, 0x3300f2c1, 0x2b00681b, 0x6b9bd001, 0xf2404718, 0xf2c00044, 0xf2400000,
57-
0xf2c00151, 0x44780100, 0xf2404479, 0xf7ff121d, 0xbf00fe31, 0x6c15f644, 0x3c00f2c1, 0xbf004760,
58-
0x1200f241, 0x3200f2c1, 0x2a006812, 0x6a92d001, 0xf2404710, 0xf2c00008, 0xf2400000, 0xf2c00115,
59-
0x44780100, 0xf44f4479, 0xf7ff7295, 0x4c46fe13, 0x5f485341, 0x5f495041, 0x45455254, 0x2f2e2e00,
60-
0x2e2f2e2e, 0x6f732f2e, 0x65637275, 0x70786e2f, 0x63706c2f, 0x36533535, 0x73662f39, 0x61695f6c,
61-
0x00632e70, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
20+
// Generated from 'LPC55XX_640.FLM' (LPC55xx IAP 608kB Flash)
21+
// Originating from 'NXP.LPC55S69_DFP.13.1.0.pack'
22+
// digest = c672c27550f789743829bb8832245f8c6f0c8ea81b9291b53827849eeabbe52c, file size = 22316
23+
// algo version = 0x101, algo size = 1696 (0x6a0)
24+
static const uint32_t LPC55XX_640_flash_prog_blob[] = {
25+
0xe7fdbe00,
26+
0xf240b580, 0xf2c00004, 0xf6420000, 0xf84961e0, 0xf2401000, 0xf2c52000, 0x21000000, 0x1080f8c0,
27+
0x1084f8c0, 0x1180f8c0, 0x71fbf647, 0xf6406001, 0x21ff6004, 0x0000f2c5, 0x01def2cc, 0xf04f6001,
28+
0x210240a0, 0xf2407001, 0xf2c00010, 0x44480000, 0xf874f000, 0xbf182800, 0xbd802001, 0x47702000,
29+
0xf240b580, 0xf2c00010, 0xf2460000, 0x4448636c, 0xf6c62100, 0xf44f3365, 0xf0002218, 0x2800f87f,
30+
0x2001bf18, 0xbf00bd80, 0xf020b580, 0xf2404170, 0xf2c00010, 0xf2460000, 0x4448636c, 0x3365f6c6,
31+
0x4200f44f, 0xf86af000, 0xbf182800, 0xbd802001, 0x4614b570, 0x0441460d, 0x4670f020, 0xf240d10d,
32+
0xf2c00010, 0xf2460000, 0x4448636c, 0xf6c64631, 0xf44f3365, 0xf0004200, 0xf240f851, 0xf2c00010,
33+
0xf5b50000, 0xbf987f00, 0x7500f44f, 0x46314448, 0x462b4622, 0xf86af000, 0xbf182800, 0xbd702001,
34+
0x460cb5b0, 0xf0204605, 0x46114070, 0xf0004622, 0x2800fa01, 0x4425bf08, 0xbdb04628, 0x460ab580,
35+
0x4170f020, 0x0010f240, 0x0000f2c0, 0xf0004448, 0x2800f875, 0x2001bf18, 0x0000bd80, 0x02f4f241,
36+
0x3200f2c1, 0x290068d1, 0x2360d00a, 0x78926283, 0xf2406849, 0xf2c0030c, 0xf8490300, 0x47082003,
37+
0x40baf240, 0x0000f2c0, 0x41c7f240, 0x0100f2c0, 0x44794478, 0xf0002284, 0xbf00f98d, 0x0c0cf240,
38+
0x0c00f2c0, 0xc00cf859, 0x0f02f1bc, 0xf244d104, 0xf2c11c3b, 0x47603c00, 0x1c00f241, 0x3c00f2c1,
39+
0xc000f8dc, 0x0f00f1bc, 0xf8dcd002, 0x4760c008, 0x406af240, 0x0000f2c0, 0x4177f240, 0x0100f2c0,
40+
0x44794478, 0xf0002295, 0xbf00f965, 0x0c0cf240, 0x0c00f2c0, 0xc00cf859, 0x0f02f1bc, 0xf244d104,
41+
0xf2c11c9d, 0x47603c00, 0x1c00f241, 0x3c00f2c1, 0xc000f8dc, 0x0f00f1bc, 0xf8dcd002, 0x4760c00c,
42+
0x401af240, 0x0000f2c0, 0x4127f240, 0x0100f2c0, 0x44794478, 0xf00022a5, 0xbf00f93d, 0x1300f241,
43+
0x3300f2c1, 0x2b00681b, 0x691bd001, 0xf2404718, 0xf2c030ec, 0xf2400000, 0xf2c031f9, 0x44780100,
44+
0x22ad4479, 0xf926f000, 0x0c0cf240, 0x0c00f2c0, 0xc00cf859, 0x0f02f1bc, 0xf244d104, 0xf2c12c7d,
45+
0x47603c00, 0x1c00f241, 0x3c00f2c1, 0xc000f8dc, 0x0f00f1bc, 0xf8dcd002, 0x4760c014, 0x309ef240,
46+
0x0000f2c0, 0x31abf240, 0x0100f2c0, 0x44794478, 0xf00022c2, 0xbf00f8ff, 0x1300f241, 0x3300f2c1,
47+
0x2b00681b, 0x699bd001, 0xf2404718, 0xf2c03070, 0xf2400000, 0xf2c0317d, 0x44780100, 0x22cb4479,
48+
0xf8e8f000, 0x1100f241, 0x3100f2c1, 0x29006809, 0x6a89d001, 0xf2404708, 0xf2c03044, 0xf2400000,
49+
0xf2c03151, 0x44780100, 0x22d54479, 0xf8d2f000, 0x1100f241, 0x3100f2c1, 0x29006809, 0x6ac9d001,
50+
0xf2404708, 0xf2c03018, 0xf2400000, 0xf2c03125, 0x44780100, 0x22dc4479, 0xf8bcf000, 0x1300f241,
51+
0x3300f2c1, 0x2b00681b, 0x6b1bd001, 0xf2404718, 0xf2c020ec, 0xf2400000, 0xf2c021f9, 0x44780100,
52+
0x22e34479, 0xf8a6f000, 0x1200f241, 0x3200f2c1, 0x2a006812, 0x6b52d001, 0xf2404710, 0xf2c020c0,
53+
0xf2400000, 0xf2c021cd, 0x44780100, 0x22ea4479, 0xf890f000, 0x1c00f241, 0x3c00f2c1, 0xc000f8dc,
54+
0x0f00f1bc, 0xf8dcd002, 0x4760c038, 0x208ef240, 0x0000f2c0, 0x219bf240, 0x0100f2c0, 0x44794478,
55+
0xf00022f1, 0xbf00f877, 0x1200f241, 0x3200f2c1, 0x2a006812, 0x6bd2d001, 0xf2404710, 0xf2c02060,
56+
0xf2400000, 0xf2c0216d, 0x44780100, 0x22f84479, 0xf860f000, 0x1200f241, 0x3200f2c1, 0x2a006812,
57+
0x6c12d001, 0xf2404710, 0xf2c02034, 0xf2400000, 0xf2c02141, 0x44780100, 0x22ff4479, 0xf84af000,
58+
0x1300f241, 0x3300f2c1, 0x2b00681b, 0x6c5bd001, 0xf2404718, 0xf2c02008, 0xf2400000, 0xf2c02115,
59+
0x44780100, 0xf44f4479, 0xf0007283, 0xbf00f833, 0x1300f241, 0x3300f2c1, 0x2b00681b, 0x6c9bd001,
60+
0xf2404718, 0xf2c010d8, 0xf2400000, 0xf2c011e5, 0x44780100, 0xf2404479, 0xf000120d, 0xbf00f81b,
61+
0x1c00f241, 0x3c00f2c1, 0xc000f8dc, 0x0f00f1bc, 0xf8dcd002, 0x4760c04c, 0x10a2f240, 0x0000f2c0,
62+
0x11aff240, 0x0100f2c0, 0x44794478, 0x728af44f, 0xf800f000, 0x4605b50e, 0x460e4614, 0xf000a013,
63+
0x4628f870, 0xf86df000, 0xf000a016, 0x4630f86a, 0xf867f000, 0xf000a015, 0x2100f864, 0x100bf88d,
64+
0xf10d210a, 0xf88d000a, 0xe008100a, 0xf2f1fb94, 0x4212fb01, 0xf4f1fb94, 0xf8003230, 0x2c002d01,
65+
0xf000dcf4, 0xf000f84e, 0x0000f841, 0x202a2a2a, 0x65737361, 0x6f697472, 0x6166206e, 0x64656c69,
66+
0x0000203a, 0x6966202c, 0x0020656c, 0x696c202c, 0x0020656e, 0x0301ea40, 0x079bb510, 0x2a04d10f,
67+
0xc810d30d, 0x1f12c908, 0xd0f8429c, 0xba19ba20, 0xd9014288, 0xbd102001, 0x30fff04f, 0xb11abd10,
68+
0xd00307d3, 0xe0071c52, 0xbd102000, 0x3b01f810, 0x4b01f811, 0xd1071b1b, 0x3b01f810, 0x4b01f811,
69+
0xd1011b1b, 0xd1f11e92, 0xbd104618, 0x2000b510, 0xf81ef000, 0x8000f3af, 0x4010e8bd, 0xf0002001,
70+
0xb510b811, 0xe0024604, 0xf0001c64, 0x7820f804, 0xd1f92800, 0xb508bd10, 0xf88d4669, 0x20030000,
71+
0xbd08beab, 0x20184901, 0xe7febeab, 0x00020026, 0xf000b510, 0xe8bdf80b, 0xf0004010, 0x4770b801,
72+
0xd0012800, 0xbfeef7ff, 0x00004770, 0x2100b510, 0xf000a002, 0x2001f813, 0x0000bd10, 0x41474953,
73+
0x3a545242, 0x6e624120, 0x616d726f, 0x6574206c, 0x6e696d72, 0x6f697461, 0x0000006e, 0x4605b570,
74+
0x200a460c, 0x1c6de000, 0xffc5f7ff, 0x7828b135, 0xd1f82800, 0x1c64e002, 0xffbdf7ff, 0x7820b114,
75+
0xd1f82800, 0x4070e8bd, 0xf7ff200a, 0x4c46bfb4, 0x5f485341, 0x5f495041, 0x45455254, 0x70616900,
76+
0x73662f31, 0x61695f6c, 0x632e3170, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
6277
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
63-
0x00000000, 0x00000000, 0x00000000
78+
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
6479
};
6580

6681
// Start address of flash
@@ -69,36 +84,41 @@ static const uint32_t flash_start = 0x00000000;
6984
static const uint32_t flash_size = 0x00098000;
7085

7186
/**
72-
* List of start and size for each size of flash sector
87+
* List of start and size for each size of flash sector - even indexes are start, odd are size
7388
* The size will apply to all sectors between the listed address and the next address
7489
* in the list.
7590
* The last pair in the list will have sectors starting at that address and ending
76-
* at address start + size.
91+
* at address flash_start + flash_size.
7792
*/
7893
static const sector_info_t sectors_info[] = {
7994
{0x00000000, 0x00008000},
8095
};
8196

8297
static const program_target_t flash = {
83-
0x20000021, // Init
84-
0x2000009d, // UnInit
85-
0x200000a1, // EraseChip
86-
0x200000d9, // EraseSector
87-
0x20000111, // ProgramPage
88-
0x0, // Verify
98+
0x20000005, // Init
99+
0x20000061, // UnInit
100+
0x20000065, // EraseChip
101+
0x2000008d, // EraseSector
102+
0x200000b5, // ProgramPage
103+
0x00000000, // Verify
89104

90105
// BKPT : start of blob + 1
91106
// RSB : blob start + header + rw data offset
92107
// RSP : stack pointer
93108
{
94109
0x20000001,
95-
0x20000564,
96-
0x20000800
110+
0x20000654,
111+
0x20001000
97112
},
98113

99-
0x20000000 + 0x00000A00, // mem buffer location
100-
0x20000000, // location to write prog_blob in target RAM
101-
sizeof(lpc55S69_flash_prog_blob), // prog_blob size
102-
lpc55S69_flash_prog_blob, // address of prog_blob
103-
0x00000200 // ram_to_flash_bytes_to_be_written
114+
// mem buffer location
115+
0x20001000,
116+
// location to write prog_blob in target RAM
117+
0x20000000,
118+
// prog_blob size
119+
sizeof(LPC55XX_640_flash_prog_blob),
120+
// address of prog_blob
121+
LPC55XX_640_flash_prog_blob,
122+
// ram_to_flash_bytes_to_be_written
123+
0x00000200
104124
};

0 commit comments

Comments
 (0)