From f6382d31f8e257284da0bfd811d7e7d878f0dc72 Mon Sep 17 00:00:00 2001 From: Chris Brown Date: Mon, 5 Aug 2019 14:38:14 -0500 Subject: [PATCH 01/13] NXP: K32L Additions --- source/board/frdmk32l3a6.c | 34 ++++ source/family/freescale/k32l3a6/flash_blob.c | 134 ++++++++++++++++ source/family/freescale/k32l3a6/target.c | 37 +++++ .../freescale/target_reset_k32l_series.c | 150 ++++++++++++++++++ source/target/target_family.c | 2 + source/target/target_family.h | 1 + 6 files changed, 358 insertions(+) create mode 100644 source/board/frdmk32l3a6.c create mode 100644 source/family/freescale/k32l3a6/flash_blob.c create mode 100644 source/family/freescale/k32l3a6/target.c create mode 100644 source/family/freescale/target_reset_k32l_series.c diff --git a/source/board/frdmk32l3a6.c b/source/board/frdmk32l3a6.c new file mode 100644 index 0000000000..ad24c31ab5 --- /dev/null +++ b/source/board/frdmk32l3a6.c @@ -0,0 +1,34 @@ +/** + * @file frdmk32l3a6.c + * @brief board ID for the NXP FRDM-K32L3A6 board + * + * DAPLink Interface Firmware + * Copyright (c) 2017-2019, ARM Limited, All Rights Reserved + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "target_board.h" +#include "target_family.h" + +const board_info_t g_board_info = { + .info_version = 0x0, + .board_id = "0237", + .family_id = kNXP_KinetisK32L_FamilyID, + .flags = kEnablePageErase, + .daplink_url_name = "PRODINFOHTM", + .daplink_drive_name = "K32L3A6", + .daplink_target_url = "http://www.nxp.com/frdm-k32l3a6", + .target_cfg = &target_device, +}; diff --git a/source/family/freescale/k32l3a6/flash_blob.c b/source/family/freescale/k32l3a6/flash_blob.c new file mode 100644 index 0000000000..4047a706de --- /dev/null +++ b/source/family/freescale/k32l3a6/flash_blob.c @@ -0,0 +1,134 @@ +/* Flash OS Routines (Automagically Generated) + * Copyright (c) 2009-2019 ARM Limited + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +static const uint32_t k32w042s1m2_flash_prog_blob[] = { + 0xE00ABE00, 0x062D780D, 0x24084068, 0xD3000040, 0x1E644058, 0x1C49D1FA, 0x2A001E52, 0x4770D1F2, + 0x4838b510, 0x60414936, 0x60814937, 0x22806801, 0x22204391, 0x60014311, 0x69014834, 0x0f890589, + 0xd01c2902, 0x4a322100, 0x444a2900, 0xd0087011, 0x22036901, 0x43910212, 0x69016101, 0x0f890589, + 0x482cd1fb, 0x22016841, 0x43110792, 0x482a6041, 0xf0004448, 0x2800f855, 0x2001d000, 0x2101bd10, + 0x4823e7e1, 0x78004448, 0xd00d2800, 0x6901481f, 0x02122203, 0x31ff4391, 0x310231ff, 0x69016101, + 0x0f890589, 0xd1fa2902, 0x47702000, 0xb510481a, 0x4448491a, 0xf93af000, 0x4601bd10, 0xb5104816, + 0x22104b16, 0xf0004448, 0xbd10f8e4, 0x460cb570, 0x4606460b, 0x48104601, 0x4615b084, 0xf0004448, + 0x2800f963, 0x9001d10a, 0x21019002, 0x9100480a, 0x4622462b, 0x44484631, 0xfb0bf000, 0xbd70b004, + 0xd928c520, 0x4002a000, 0x0000ffff, 0x40020000, 0x00000004, 0x4002b000, 0x00000008, 0x6b65666b, + 0xd00a2800, 0x68c949fe, 0x290f0f09, 0x4afdd007, 0x447a0049, 0x02895a51, 0x2004e003, 0x21014770, + 0xb4300509, 0x60032300, 0x21026041, 0x02cc7201, 0x49f560c4, 0x158a7a45, 0xd00c2d01, 0x40aa7b0d, + 0x7b496142, 0x61816103, 0x06c92109, 0x62016244, 0x2000bc30, 0x7b8d4770, 0x614240aa, 0xe7f17bc9, + 0xd0022800, 0x20006101, 0x20044770, 0x48e74770, 0x49e76800, 0x42880a00, 0x48e6d101, 0x48e6e000, + 0x22016801, 0x60014311, 0x8f6ff3bf, 0x8f4ff3bf, 0xb5104770, 0xf0002101, 0xbd10fb82, 0x217048df, + 0x21807001, 0x78017001, 0xd5fc0609, 0x06817800, 0x2067d501, 0x06c14770, 0x2068d501, 0x07c04770, + 0x2069d0fc, 0x28004770, 0x2004d101, 0xb5704770, 0x4ad24604, 0x605048d2, 0x428148d2, 0x206bd001, + 0x2000e000, 0xd10c2800, 0x46202100, 0xfb57f000, 0xf7ff4620, 0x4605ffd3, 0x46202101, 0xfb4ff000, + 0xbd704628, 0xd0012800, 0xd1012a00, 0x47702004, 0x2000b410, 0x60906050, 0x611060d0, 0x61906150, + 0x621061d0, 0x23ff6250, 0x061b0248, 0x0a4018cc, 0x04892101, 0x60102308, 0xd209428c, 0x4320014c, + 0x01886010, 0x60d06111, 0x60911340, 0xe0066050, 0x05002001, 0x12006110, 0x01c06050, 0x20106090, + 0x61536190, 0x61d06213, 0x62502004, 0x2000bc10, 0xb5ff4770, 0x4615b08d, 0x460e461c, 0x980daa02, + 0xffc0f7ff, 0x9000a802, 0x4631462a, 0x980d9b08, 0xfb19f000, 0xd1082800, 0x428448a2, 0x266bd001, + 0x2600e000, 0xd0022e00, 0xb0114630, 0x9c02bdf0, 0x19659f03, 0x46391e6d, 0xf0004628, 0x2900fb37, + 0x1c40d002, 0x1e454378, 0x980d2100, 0xfae7f000, 0xd81442ac, 0x20090221, 0x06000a09, 0x488f1809, + 0x980d6041, 0xff5af7ff, 0x980d4606, 0x28006900, 0x4780d000, 0xd1022e00, 0x42ac19e4, 0x2101d9ea, + 0xf000980d, 0x4630facc, 0xbdf0b011, 0xd1012800, 0x47702004, 0x4604b570, 0x48834a80, 0x48816050, + 0xd0014281, 0xe000206b, 0x28002000, 0x2100d10c, 0xf0004620, 0x4620fab4, 0xff30f7ff, 0x21014605, + 0xf0004620, 0x4628faac, 0x2800bd70, 0x2004d101, 0xb5704770, 0x4a714604, 0x60504874, 0x42814871, + 0x206bd001, 0x2000e000, 0xd10c2800, 0x46202100, 0xfa95f000, 0xf7ff4620, 0x4605ff11, 0x46202101, + 0xfa8df000, 0xbd704628, 0xd1012a00, 0x47702004, 0xb08db5ff, 0x461e4614, 0xaa02460d, 0xf7ff980d, + 0xa802ff31, 0x46329000, 0x9b074629, 0xf000980d, 0x0007fa8a, 0x2100d132, 0x980d9d02, 0xfa6ff000, + 0xd0262e00, 0x4855cc02, 0x99076081, 0xd0022904, 0xd0072908, 0x022ae00e, 0x0a122103, 0x18510649, + 0xe0076041, 0x60c1cc02, 0x2107022a, 0x06090a12, 0x60411851, 0xf7ff980d, 0x4607fed1, 0x6900980d, + 0xd0002800, 0x2f004780, 0x9807d103, 0x1a361945, 0x2101d1d8, 0xf000980d, 0x4638fa42, 0xbdf0b011, + 0xd0012800, 0xd1012a00, 0x47702004, 0x4604b570, 0x0a010608, 0x1809483e, 0x60414838, 0x60816811, + 0x60c16851, 0x46202100, 0xfa29f000, 0xf7ff4620, 0x4605fea5, 0x46202101, 0xfa21f000, 0xbd704628, + 0xb08db5ff, 0x460c980f, 0xd02a2800, 0x980daa02, 0xfec8f7ff, 0x9000a802, 0x9b094621, 0x980d9a10, + 0xfa21f000, 0x28009000, 0x9803d11c, 0x9e029001, 0x980d2100, 0xfa03f000, 0x28009810, 0x9801d06b, + 0x900c4240, 0x4270990c, 0x42404008, 0x42b02500, 0x9901d101, 0x99101840, 0x42811989, 0x1b84d904, + 0x2004e003, 0xbdf0b011, 0x2c009c10, 0x2701d049, 0x42bc02bf, 0x4627d800, 0x980f08a9, 0x18090089, + 0x463a2009, 0xf00006c0, 0x1970fa37, 0x200b0201, 0x06000a09, 0x48091809, 0x46386041, 0xe0199909, + 0x40026040, 0x00000872, 0x40023020, 0x40001000, 0x00434d30, 0xf0003034, 0xe0080034, 0x40023000, + 0x44ffffff, 0x6b65666b, 0x49ffffff, 0x4bffffff, 0x4300ffff, 0xf9faf000, 0x48f10401, 0x48f11809, + 0x980d6081, 0xfe2af7ff, 0x980d9000, 0x28006900, 0x4780d000, 0x28009800, 0x1be4d10d, 0x2c0019ed, + 0x08a9d1b5, 0x0089980f, 0x900f1808, 0x19769810, 0x90101b40, 0x2101d196, 0xf000980d, 0x9800f990, + 0xbdf0b011, 0xd0012800, 0xd1012a00, 0x47702004, 0x4614b570, 0x4adc0609, 0x4dda0a09, 0x60691889, + 0xfdfcf7ff, 0xd1032800, 0x602168a9, 0x606168e9, 0x2800bd70, 0x2900d00e, 0x48d2d00c, 0x07827880, + 0x2a020f92, 0x0980d008, 0xd0082802, 0x70082002, 0x47702000, 0x47702004, 0x70082000, 0x2001e7f8, + 0x2800e7f5, 0x2900d001, 0x2004d101, 0xb5704770, 0x23004dc4, 0x079278aa, 0x2a020f92, 0x4ac3d026, + 0x780c606a, 0x462278cb, 0x061b784c, 0x43220224, 0x0424788c, 0x431a4322, 0x0a12ba12, 0x021278cb, + 0x60aa431a, 0x79cb790c, 0x794c4622, 0x0224061b, 0x798c4322, 0x042479c9, 0x431a4322, 0x0a12ba12, + 0x430a0212, 0xf7ff60ea, 0x4603fda9, 0xbd704618, 0xd1012800, 0x47702004, 0x04094aad, 0xb5101889, + 0x60514aa8, 0xfd9af7ff, 0xb5ffbd10, 0x4614b08d, 0x460d461e, 0x980daa02, 0xfdc4f7ff, 0x9000a802, + 0x46294622, 0x980d9b09, 0xf91df000, 0xd12e2800, 0x98049d02, 0x42699000, 0x40014240, 0x42af424f, + 0x9800d101, 0x2c00183f, 0x0230d020, 0x1b7e9001, 0xd90042a6, 0x46304626, 0xf0009909, 0x022af937, + 0x0a122101, 0x18520609, 0x604a498e, 0x04009a01, 0x30ff4310, 0x980d6088, 0xfd60f7ff, 0xd1062800, + 0x1ba49800, 0x183f19ad, 0xd1e02c00, 0xb0112000, 0x2b00bdf0, 0x2004d101, 0xb5ff4770, 0x4616b08d, + 0x460c461d, 0x9f16aa02, 0xf7ff980d, 0xa802fd7b, 0x46329000, 0x9b0b4621, 0xf000980d, 0x2800f8d4, + 0x9c02d11d, 0xd01a2e00, 0x0638497a, 0x02211847, 0x0a092001, 0x18090640, 0x60414872, 0x68296087, + 0x980d60c1, 0xfd2af7ff, 0xd00a2800, 0x29009917, 0x600cd000, 0x29009918, 0x2200d001, 0xb011600a, + 0x990bbdf0, 0x08891a76, 0x194d0089, 0x190c990b, 0xd1dc2e00, 0xbdf0b011, 0xd1012800, 0x47702004, + 0x04094a65, 0xb5101889, 0x60514a5e, 0xfd06f7ff, 0x2800bd10, 0x2a00d001, 0x2004d101, 0xb5104770, + 0x290a4614, 0x000ad222, 0x7912447a, 0x44971892, 0x0d080604, 0x1513110f, 0x68c01917, 0x6840e013, + 0x7a01e011, 0xf0006840, 0xe00cf8b1, 0xe00a7a00, 0xe0086800, 0xe0062001, 0xe0046940, 0xe0026980, + 0xe0006a00, 0x60206a40, 0xbd102000, 0xbd10206a, 0x28002300, 0x2004d101, 0xb4104770, 0xd0232906, + 0x2905dc02, 0xe01fd80d, 0xd01d2909, 0x2907dc04, 0x2908d01a, 0xe017d105, 0x2920b2d4, 0x2921d005, + 0x236ad009, 0x4618bc10, 0x2a004770, 0x2a01d001, 0x7244d105, 0x2a00e7f6, 0x2a01d004, 0xbc10d002, + 0x47702077, 0xe7ed7284, 0xe7eb2376, 0xd00e2800, 0x680a482c, 0x680a61c2, 0x429a69c3, 0x684ad105, + 0x68496182, 0x42816980, 0x2069d003, 0x20044770, 0x20004770, 0x28004770, 0x2900d008, 0x4821d006, + 0x600a69c2, 0x60486980, 0x47702000, 0x47702004, 0x47702000, 0x70012100, 0x46087041, 0x29014770, + 0x481ed110, 0x491e6800, 0x42880a00, 0x481dd101, 0x481de000, 0x22016801, 0x60014311, 0x8f6ff3bf, + 0x8f4ff3bf, 0x28004770, 0x2004d101, 0xb4104770, 0x9c011e5b, 0xd1014219, 0xd002421a, 0x2065bc10, + 0x68e04770, 0xd8074288, 0x18896923, 0x428818c0, 0xbc10d302, 0x47702000, 0x2066bc10, 0x00004770, + 0x0000ffff, 0x40023000, 0x4100ffff, 0x45ffffff, 0x4000ffff, 0x00ffffff, 0x4a00ffff, 0x40001000, + 0x00434d30, 0xf0003034, 0xe0080034, 0x460bb530, 0x20004601, 0x24012220, 0x460de009, 0x429d40d5, + 0x461dd305, 0x1b494095, 0x40954625, 0x46151940, 0x2d001e52, 0xbd30dcf1, 0x430b4603, 0xd003079b, + 0xc908e009, 0xc0081f12, 0xd2fa2a04, 0x780be003, 0x1c407003, 0x1e521c49, 0x4770d2f9, 0x40023004, + 0x4002301c, 0x40023018, 0x00100008, 0x00200018, 0x00400030, 0x00800060, 0x010000c0, 0x02000180, + 0x04000300, 0x00000600, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000 +}; + +/** +* List of start and size for each size of flash sector +* The size will apply to all sectors between the listed address and the next address +* in the list. +* The last pair in the list will have sectors starting at that address and ending +* at address start + size. +*/ +static const sector_info_t sectors_info[] = { + {0x00000000, 0x00001000}, + }; + +static const program_target_t flash = { + 0x20000021, // Init + 0x20000083, // UnInit + 0x200000ad, // EraseChip + 0x200000bb, // EraseSector + 0x200000cd, // ProgramPage + 0x0, // Verify + + // BKPT : start of blob + 1 + // RSB : blob start + header + rw data offset + // RSP : stack pointer + { + 0x20000001, + 0x200009c8, + 0x20001400 + }, + + 0x20000000 + 0x00002000, // mem buffer location + 0x20000000, // location to write prog_blob in target RAM + sizeof(k32w042s1m2_flash_prog_blob), // prog_blob size + k32w042s1m2_flash_prog_blob, // address of prog_blob + 0x00000400 // ram_to_flash_bytes_to_be_written +}; diff --git a/source/family/freescale/k32l3a6/target.c b/source/family/freescale/k32l3a6/target.c new file mode 100644 index 0000000000..7a97ebc7de --- /dev/null +++ b/source/family/freescale/k32l3a6/target.c @@ -0,0 +1,37 @@ +/** + * @file target.c + * @brief Target information for the k32w042 + * + * DAPLink Interface Firmware + * Copyright (c) 2009-2019, ARM Limited, All Rights Reserved + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "target_config.h" + +// The file flash_blob.c must only be included in target.c +#include "flash_blob.c" + +// target information +target_cfg_t target_device = { + .sectors_info = sectors_info, + .sector_info_length = (sizeof(sectors_info))/(sizeof(sector_info_t)), + .flash_regions[0].start = 0, + .flash_regions[0].end = KB(1024), + .flash_regions[0].flags = kRegionIsDefault, + .flash_regions[0].flash_algo = (program_target_t *) &flash, + .ram_regions[0].start = 0x20000000, // M4 DTCM + .ram_regions[0].end = 0x20030000, +}; diff --git a/source/family/freescale/target_reset_k32l_series.c b/source/family/freescale/target_reset_k32l_series.c new file mode 100644 index 0000000000..61544241c8 --- /dev/null +++ b/source/family/freescale/target_reset_k32l_series.c @@ -0,0 +1,150 @@ +/** + * @file target_reset_K32W_series.c + * @brief Target reset for the Kinetis K32W series + * + * DAPLink Interface Firmware + * Copyright (c) 2016-2019, ARM Limited, All Rights Reserved + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "target_reset.h" +#include "swd_host.h" +#include "info.h" +#include "target_family.h" + +#define MDM_STATUS 0x01000000 +#define MDM_CTRL 0x01000004 +#define MDM_IDR 0x010000fc +#define MDM_ID 0x001c0040 // K32 series + +#define MDM_STATUS_FLASH_MASS_ERASE_ACKNOWLEDGE (1 << 0) +#define MDM_STATUS_FLASH_READY (1 << 1) +#define MDM_STATUS_SYSTEM_SECURITY (1 << 2) +#define MDM_STATUS_MASS_ERASE_ENABLE (1 << 5) + +#define MDM_CTRL_FLASH_MASS_ERASE_IN_PROGRESS (1 << 0) +#define MDM_CTRL_SYSTEM_RESET_REQUEST (1 << 3) + +#define TIMEOUT_COUNT (1000000) + +void target_before_init_debug(void) +{ + swd_set_target_reset(1); +} + +uint8_t target_unlock_sequence(void) +{ + uint32_t val; + uint32_t timeoutCounter = 0; + + // read the device ID + if (!swd_read_ap(MDM_IDR, &val)) { + return 0; + } + + // verify the result + if (val != MDM_ID) { + return 0; + } + + // Wait until flash is ready. + do { + if (!swd_read_ap(MDM_STATUS, &val)) { + return 0; + } + + if (++timeoutCounter > TIMEOUT_COUNT) { + return 0; + } + } while (!(val & MDM_STATUS_FLASH_READY)); + + // Check if security is enabled. + if (!swd_read_ap(MDM_STATUS, &val)) { + swd_set_target_reset(0); + return 0; + } + + // flash in secured mode + if (val & MDM_STATUS_SYSTEM_SECURITY) { + // Make sure mass erase is enabled. + if (!(val & MDM_STATUS_MASS_ERASE_ENABLE)) { + return 0; + } + + // hold the device in reset + swd_set_target_reset(1); + + // Write the mass-erase enable and system reset request bits. + if (!swd_write_ap(MDM_CTRL, (MDM_CTRL_FLASH_MASS_ERASE_IN_PROGRESS | MDM_CTRL_SYSTEM_RESET_REQUEST))) { + swd_set_target_reset(0); + return 0; + } + + // Verify mass erase has started. + timeoutCounter = 0; + do { + // wait until mass erase is started + if (!swd_read_ap(MDM_STATUS, &val)) { + swd_set_target_reset(0); + return 0; + } + + if (++timeoutCounter > TIMEOUT_COUNT) { + swd_write_ap(MDM_CTRL, 0); + swd_set_target_reset(0); + return 0; + } + } while (!(val & MDM_STATUS_FLASH_MASS_ERASE_ACKNOWLEDGE)); + + // Wait until mass erase completes. + timeoutCounter = 0; + do { + // keep reading until procedure is complete + if (!swd_read_ap(MDM_CTRL, &val)) { + swd_set_target_reset(0); + return 0; + } + + if (++timeoutCounter > TIMEOUT_COUNT) { + swd_write_ap(MDM_CTRL, 0); + swd_set_target_reset(0); + return 0; + } + } while (val & MDM_CTRL_FLASH_MASS_ERASE_IN_PROGRESS); + + // Confirm the mass erase was successful. + if (!swd_read_ap(MDM_STATUS, &val)) { + swd_set_target_reset(0); + return 0; + } + + // Release the device from reset. + swd_write_ap(MDM_CTRL, 0); + swd_set_target_reset(0); + + if (val & MDM_STATUS_SYSTEM_SECURITY) { + return 0; + } + } + + return 1; +} + +const target_family_descriptor_t g_nxp_kinetis_k32l_series = { + .family_id = kNXP_KinetisK32L_FamilyID, + .default_reset_type = kHardwareReset, + .target_before_init_debug = target_before_init_debug, + .target_unlock_sequence = target_unlock_sequence, +}; diff --git a/source/target/target_family.c b/source/target/target_family.c index b1066b590d..1e24ff3502 100644 --- a/source/target/target_family.c +++ b/source/target/target_family.c @@ -50,6 +50,7 @@ __WEAK const target_family_descriptor_t g_nxp_kinetis_k32w_series = {0}; __WEAK const target_family_descriptor_t g_nxp_mimxrt = {0}; __WEAK const target_family_descriptor_t g_nxp_rapid_iot = {0}; __WEAK const target_family_descriptor_t g_nxp_lpc55xx_series = {0}; +__WEAK const target_family_descriptor_t g_nxp_kinetis_k32l_series = {0}; __WEAK const target_family_descriptor_t g_nordic_nrf51 = {0}; __WEAK const target_family_descriptor_t g_nordic_nrf52 = {0}; __WEAK const target_family_descriptor_t g_realtek_rtl8195am = {0}; @@ -80,6 +81,7 @@ const target_family_descriptor_t *g_families[] = { &g_nxp_kinetis_lseries, &g_nxp_kinetis_k32w_series, &g_nxp_lpc55xx_series, + &g_nxp_kinetis_k32l_series, &g_nxp_mimxrt, &g_nxp_rapid_iot, &g_nordic_nrf51, diff --git a/source/target/target_family.h b/source/target/target_family.h index 0f31e7e9f9..ebd34e0f0e 100644 --- a/source/target/target_family.h +++ b/source/target/target_family.h @@ -97,6 +97,7 @@ typedef enum _family_id { kNXP_RapidIot_FamilyID = CREATE_FAMILY_ID(kNXP_VendorID, 4), kNXP_KinetisK32W_FamilyID = CREATE_FAMILY_ID(kNXP_VendorID, 5), kNXP_LPC55xx_FamilyID = CREATE_FAMILY_ID(kNXP_VendorID, 6), + kNXP_KinetisK32L_FamilyID = VENDOR_TO_FAMILY(kNXP_VendorID, 7), kNordic_Nrf51_FamilyID = CREATE_FAMILY_ID(kNordic_VendorID, 1), kNordic_Nrf52_FamilyID = CREATE_FAMILY_ID(kNordic_VendorID, 2), kRealtek_Rtl8195am_FamilyID = CREATE_FAMILY_ID(kRealtek_VendorID, 1), From 8aa60876c55cac22e0495788f073e911a1017c10 Mon Sep 17 00:00:00 2001 From: Chris Reed Date: Thu, 8 Aug 2019 17:52:33 -0500 Subject: [PATCH 02/13] NXP: Added K32L3A6 project --- projects.yaml | 4 ++++ records/board/frdmk32l3a6.yaml | 7 +++++++ 2 files changed, 11 insertions(+) create mode 100644 records/board/frdmk32l3a6.yaml diff --git a/projects.yaml b/projects.yaml index 06c818f42f..9be2584f78 100644 --- a/projects.yaml +++ b/projects.yaml @@ -322,6 +322,10 @@ projects: - *module_if - *module_hic_k20dx - records/board/xDot-L151.yaml + k26f_frdmk32l3a6_if: + - *module_if + - *module_hic_k26f + - records/board/frdmk32l3a6.yaml k26f_frdmk32w042_if: - *module_if - *module_hic_k26f diff --git a/records/board/frdmk32l3a6.yaml b/records/board/frdmk32l3a6.yaml new file mode 100644 index 0000000000..d3e8ee001c --- /dev/null +++ b/records/board/frdmk32l3a6.yaml @@ -0,0 +1,7 @@ +common: + sources: + board: + - source/board/frdmk32l3a6.c + family: + - source/family/freescale/k32l3a6/target.c + - source/family/freescale/target_reset_k32l_series.c From 1591f96531cbc164152a0dfa7c8ed2c37dc5f039 Mon Sep 17 00:00:00 2001 From: Chris Reed Date: Wed, 14 Aug 2019 17:07:29 -0500 Subject: [PATCH 03/13] NXP: Merged K32W and K32L families. --- records/board/frdmk32l3a6.yaml | 2 +- records/board/frdmk32w042.yaml | 2 +- records/family/all_family.yaml | 1 + source/board/frdmk32l3a6.c | 2 +- source/board/frdmk32w042.c | 2 +- ...32w_series.c => target_reset_k32_series.c} | 4 +- .../freescale/target_reset_k32l_series.c | 150 ------------------ source/target/target_family.c | 6 +- source/target/target_family.h | 4 +- 9 files changed, 11 insertions(+), 162 deletions(-) rename source/family/freescale/{target_reset_k32w_series.c => target_reset_k32_series.c} (97%) delete mode 100644 source/family/freescale/target_reset_k32l_series.c diff --git a/records/board/frdmk32l3a6.yaml b/records/board/frdmk32l3a6.yaml index d3e8ee001c..99b3cae5f4 100644 --- a/records/board/frdmk32l3a6.yaml +++ b/records/board/frdmk32l3a6.yaml @@ -4,4 +4,4 @@ common: - source/board/frdmk32l3a6.c family: - source/family/freescale/k32l3a6/target.c - - source/family/freescale/target_reset_k32l_series.c + - source/family/freescale/target_reset_k32_series.c diff --git a/records/board/frdmk32w042.yaml b/records/board/frdmk32w042.yaml index 33bda93c16..e82491d00d 100644 --- a/records/board/frdmk32w042.yaml +++ b/records/board/frdmk32w042.yaml @@ -4,4 +4,4 @@ common: - source/board/frdmk32w042.c family: - source/family/freescale/k32w042/target.c - - source/family/freescale/target_reset_k32w_series.c + - source/family/freescale/target_reset_k32_series.c diff --git a/records/family/all_family.yaml b/records/family/all_family.yaml index 2af952c672..02930b0c64 100644 --- a/records/family/all_family.yaml +++ b/records/family/all_family.yaml @@ -5,6 +5,7 @@ common: - source/family/freescale/target_reset_Lseries.c - source/family/freescale/target_reset_mimxrt.c - source/family/freescale/target_reset_rapid_iot.c + - source/family/freescale/target_reset_k32_series.c - source/family/nordic/target_reset_nrf51.c - source/family/nordic/target_reset_nrf52.c - source/family/realtek/target_reset_realtek_rtl8195am.c diff --git a/source/board/frdmk32l3a6.c b/source/board/frdmk32l3a6.c index ad24c31ab5..ea4a3d7f85 100644 --- a/source/board/frdmk32l3a6.c +++ b/source/board/frdmk32l3a6.c @@ -25,7 +25,7 @@ const board_info_t g_board_info = { .info_version = 0x0, .board_id = "0237", - .family_id = kNXP_KinetisK32L_FamilyID, + .family_id = kNXP_KinetisK32_FamilyID, .flags = kEnablePageErase, .daplink_url_name = "PRODINFOHTM", .daplink_drive_name = "K32L3A6", diff --git a/source/board/frdmk32w042.c b/source/board/frdmk32w042.c index 54c7d8d2b2..e30a30b301 100644 --- a/source/board/frdmk32w042.c +++ b/source/board/frdmk32w042.c @@ -25,7 +25,7 @@ const board_info_t g_board_info = { .info_version = kBoardInfoVersion, .board_id = "0225", - .family_id = kNXP_KinetisK32W_FamilyID, + .family_id = kNXP_KinetisK32_FamilyID, .flags = kEnablePageErase, .daplink_url_name = "PRODINFOHTM", .daplink_drive_name = "K32W042", diff --git a/source/family/freescale/target_reset_k32w_series.c b/source/family/freescale/target_reset_k32_series.c similarity index 97% rename from source/family/freescale/target_reset_k32w_series.c rename to source/family/freescale/target_reset_k32_series.c index 1291de36b5..2eb8e0eb1b 100644 --- a/source/family/freescale/target_reset_k32w_series.c +++ b/source/family/freescale/target_reset_k32_series.c @@ -141,8 +141,8 @@ uint8_t target_unlock_sequence(void) return 1; } -const target_family_descriptor_t g_nxp_kinetis_k32w_series = { - .family_id = kNXP_KinetisK32W_FamilyID, +const target_family_descriptor_t g_nxp_kinetis_k32_series = { + .family_id = kNXP_KinetisK32_FamilyID, .default_reset_type = kHardwareReset, .target_before_init_debug = target_before_init_debug, .target_unlock_sequence = target_unlock_sequence, diff --git a/source/family/freescale/target_reset_k32l_series.c b/source/family/freescale/target_reset_k32l_series.c deleted file mode 100644 index 61544241c8..0000000000 --- a/source/family/freescale/target_reset_k32l_series.c +++ /dev/null @@ -1,150 +0,0 @@ -/** - * @file target_reset_K32W_series.c - * @brief Target reset for the Kinetis K32W series - * - * DAPLink Interface Firmware - * Copyright (c) 2016-2019, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "target_reset.h" -#include "swd_host.h" -#include "info.h" -#include "target_family.h" - -#define MDM_STATUS 0x01000000 -#define MDM_CTRL 0x01000004 -#define MDM_IDR 0x010000fc -#define MDM_ID 0x001c0040 // K32 series - -#define MDM_STATUS_FLASH_MASS_ERASE_ACKNOWLEDGE (1 << 0) -#define MDM_STATUS_FLASH_READY (1 << 1) -#define MDM_STATUS_SYSTEM_SECURITY (1 << 2) -#define MDM_STATUS_MASS_ERASE_ENABLE (1 << 5) - -#define MDM_CTRL_FLASH_MASS_ERASE_IN_PROGRESS (1 << 0) -#define MDM_CTRL_SYSTEM_RESET_REQUEST (1 << 3) - -#define TIMEOUT_COUNT (1000000) - -void target_before_init_debug(void) -{ - swd_set_target_reset(1); -} - -uint8_t target_unlock_sequence(void) -{ - uint32_t val; - uint32_t timeoutCounter = 0; - - // read the device ID - if (!swd_read_ap(MDM_IDR, &val)) { - return 0; - } - - // verify the result - if (val != MDM_ID) { - return 0; - } - - // Wait until flash is ready. - do { - if (!swd_read_ap(MDM_STATUS, &val)) { - return 0; - } - - if (++timeoutCounter > TIMEOUT_COUNT) { - return 0; - } - } while (!(val & MDM_STATUS_FLASH_READY)); - - // Check if security is enabled. - if (!swd_read_ap(MDM_STATUS, &val)) { - swd_set_target_reset(0); - return 0; - } - - // flash in secured mode - if (val & MDM_STATUS_SYSTEM_SECURITY) { - // Make sure mass erase is enabled. - if (!(val & MDM_STATUS_MASS_ERASE_ENABLE)) { - return 0; - } - - // hold the device in reset - swd_set_target_reset(1); - - // Write the mass-erase enable and system reset request bits. - if (!swd_write_ap(MDM_CTRL, (MDM_CTRL_FLASH_MASS_ERASE_IN_PROGRESS | MDM_CTRL_SYSTEM_RESET_REQUEST))) { - swd_set_target_reset(0); - return 0; - } - - // Verify mass erase has started. - timeoutCounter = 0; - do { - // wait until mass erase is started - if (!swd_read_ap(MDM_STATUS, &val)) { - swd_set_target_reset(0); - return 0; - } - - if (++timeoutCounter > TIMEOUT_COUNT) { - swd_write_ap(MDM_CTRL, 0); - swd_set_target_reset(0); - return 0; - } - } while (!(val & MDM_STATUS_FLASH_MASS_ERASE_ACKNOWLEDGE)); - - // Wait until mass erase completes. - timeoutCounter = 0; - do { - // keep reading until procedure is complete - if (!swd_read_ap(MDM_CTRL, &val)) { - swd_set_target_reset(0); - return 0; - } - - if (++timeoutCounter > TIMEOUT_COUNT) { - swd_write_ap(MDM_CTRL, 0); - swd_set_target_reset(0); - return 0; - } - } while (val & MDM_CTRL_FLASH_MASS_ERASE_IN_PROGRESS); - - // Confirm the mass erase was successful. - if (!swd_read_ap(MDM_STATUS, &val)) { - swd_set_target_reset(0); - return 0; - } - - // Release the device from reset. - swd_write_ap(MDM_CTRL, 0); - swd_set_target_reset(0); - - if (val & MDM_STATUS_SYSTEM_SECURITY) { - return 0; - } - } - - return 1; -} - -const target_family_descriptor_t g_nxp_kinetis_k32l_series = { - .family_id = kNXP_KinetisK32L_FamilyID, - .default_reset_type = kHardwareReset, - .target_before_init_debug = target_before_init_debug, - .target_unlock_sequence = target_unlock_sequence, -}; diff --git a/source/target/target_family.c b/source/target/target_family.c index 1e24ff3502..b793c6efd7 100644 --- a/source/target/target_family.c +++ b/source/target/target_family.c @@ -46,11 +46,10 @@ const target_family_descriptor_t g_sw_sysresetreq_family = { // Weak references to family definitions. __WEAK const target_family_descriptor_t g_nxp_kinetis_kseries = {0}; __WEAK const target_family_descriptor_t g_nxp_kinetis_lseries = {0}; -__WEAK const target_family_descriptor_t g_nxp_kinetis_k32w_series = {0}; +__WEAK const target_family_descriptor_t g_nxp_kinetis_k32_series = {0}; __WEAK const target_family_descriptor_t g_nxp_mimxrt = {0}; __WEAK const target_family_descriptor_t g_nxp_rapid_iot = {0}; __WEAK const target_family_descriptor_t g_nxp_lpc55xx_series = {0}; -__WEAK const target_family_descriptor_t g_nxp_kinetis_k32l_series = {0}; __WEAK const target_family_descriptor_t g_nordic_nrf51 = {0}; __WEAK const target_family_descriptor_t g_nordic_nrf52 = {0}; __WEAK const target_family_descriptor_t g_realtek_rtl8195am = {0}; @@ -79,9 +78,8 @@ const target_family_descriptor_t *g_families[] = { &g_sw_sysresetreq_family, &g_nxp_kinetis_kseries, &g_nxp_kinetis_lseries, - &g_nxp_kinetis_k32w_series, + &g_nxp_kinetis_k32_series, &g_nxp_lpc55xx_series, - &g_nxp_kinetis_k32l_series, &g_nxp_mimxrt, &g_nxp_rapid_iot, &g_nordic_nrf51, diff --git a/source/target/target_family.h b/source/target/target_family.h index ebd34e0f0e..c833372d58 100644 --- a/source/target/target_family.h +++ b/source/target/target_family.h @@ -95,9 +95,9 @@ typedef enum _family_id { kNXP_KinetisL_FamilyID = CREATE_FAMILY_ID(kNXP_VendorID, 2), kNXP_Mimxrt_FamilyID = CREATE_FAMILY_ID(kNXP_VendorID, 3), kNXP_RapidIot_FamilyID = CREATE_FAMILY_ID(kNXP_VendorID, 4), - kNXP_KinetisK32W_FamilyID = CREATE_FAMILY_ID(kNXP_VendorID, 5), + kNXP_KinetisK32_FamilyID = CREATE_FAMILY_ID(kNXP_VendorID, 5), kNXP_LPC55xx_FamilyID = CREATE_FAMILY_ID(kNXP_VendorID, 6), - kNXP_KinetisK32L_FamilyID = VENDOR_TO_FAMILY(kNXP_VendorID, 7), + kNXP_KinetisV_FamilyID = VENDOR_TO_FAMILY(kNXP_VendorID, 7), kNordic_Nrf51_FamilyID = CREATE_FAMILY_ID(kNordic_VendorID, 1), kNordic_Nrf52_FamilyID = CREATE_FAMILY_ID(kNordic_VendorID, 2), kRealtek_Rtl8195am_FamilyID = CREATE_FAMILY_ID(kRealtek_VendorID, 1), From 50545c031901085a72c2b7a939951980aab5f846 Mon Sep 17 00:00:00 2001 From: Chris Reed Date: Wed, 14 Aug 2019 17:35:22 -0500 Subject: [PATCH 04/13] NXP: Added secondary flash for K32L --- source/family/freescale/k32l3a6/flash_blob.c | 138 ++++++++++++++++++- source/family/freescale/k32l3a6/target.c | 6 +- 2 files changed, 142 insertions(+), 2 deletions(-) diff --git a/source/family/freescale/k32l3a6/flash_blob.c b/source/family/freescale/k32l3a6/flash_blob.c index 4047a706de..485f900369 100644 --- a/source/family/freescale/k32l3a6/flash_blob.c +++ b/source/family/freescale/k32l3a6/flash_blob.c @@ -98,6 +98,117 @@ static const uint32_t k32w042s1m2_flash_prog_blob[] = { 0x00000000 }; +static const uint32_t K32W0x2_P256_2KB_SEC_flash_prog_blob[] = { + 0xE00ABE00, 0x062D780D, 0x24084068, 0xD3000040, 0x1E644058, 0x1C49D1FA, 0x2A001E52, 0x4770D1F2, + 0x4605b570, 0x4616460c, 0xcc0fe002, 0x3e10c50f, 0xd2fa2e10, 0xd3022e08, 0xc503cc03, 0x2e043e08, + 0xcc01d307, 0x1f36c501, 0x7821e003, 0x1c647029, 0x1e761c6d, 0xbd70d2f9, 0x2007b510, 0x07404934, + 0x48346048, 0x21306802, 0x6002430a, 0x430a6842, 0x48316042, 0x28006840, 0x4830d01a, 0x4a306b41, + 0x63414311, 0x4b2f4830, 0x49306043, 0x4a306081, 0x48306002, 0x60816043, 0x492f6002, 0x44492001, + 0x46087248, 0xf85ef000, 0xd0002800, 0xbd102001, 0x6b41482a, 0xe7e3220a, 0x47702000, 0x4826b51c, + 0x44484927, 0xf8c7f000, 0xd1142800, 0x21004822, 0xf0004448, 0x2800fad4, 0x20ffd10d, 0x900043c0, + 0x90011200, 0x2302481c, 0x2180466a, 0xf0004448, 0x2800f9d0, 0x2001d000, 0x4601bd1c, 0xb5104816, + 0x4b172201, 0x444802d2, 0xf901f000, 0xd0002800, 0xbd102001, 0x08cb1dc9, 0x480f4601, 0x00dbb510, + 0xf0004448, 0x2800f96e, 0x2001d000, 0x0000bd10, 0x4002b000, 0x40001400, 0x40001000, 0xf0003000, + 0x00000a0a, 0xd928c520, 0x4002a000, 0x0000ffff, 0x00002920, 0x41026000, 0x00000004, 0xe0080000, + 0x6b65666b, 0x2800b5f0, 0x7a47d021, 0x4efe49fd, 0x158b447e, 0x4afd148d, 0x68c92400, 0xd0182f01, + 0x290f0f09, 0x0049d02c, 0x02895a71, 0x60416004, 0x72012102, 0x7b1160c5, 0x6143408b, 0x61047b51, + 0x21096181, 0x624506c9, 0x20006201, 0x2004bdf0, 0x0109bdf0, 0x290f0f09, 0x0049d00f, 0x02895a71, + 0x21016041, 0x60010609, 0x72012101, 0x60c102c9, 0x408b7b91, 0x7bd16143, 0x2101e7e1, 0xe7ef0489, + 0x05092101, 0x2800e7d2, 0x6101d002, 0x47702000, 0x47702004, 0xd0012800, 0xe0002000, 0x49dc2003, + 0x0100680a, 0x600a4302, 0x8f6ff3bf, 0x8f4ff3bf, 0x4302684a, 0xf3bf604a, 0xf3bf8f6f, 0x47708f4f, + 0x2101b510, 0xfc6ff000, 0x48d0bd10, 0x38202170, 0x21807001, 0x78017001, 0xd5fc0609, 0x06817800, + 0x2067d501, 0x06c14770, 0x2068d501, 0x07c04770, 0x2069d0fc, 0xb5704770, 0xd0150004, 0x48c54ac3, + 0x60503a20, 0xf0004608, 0x2800fc59, 0x2100d10b, 0xf0004620, 0x4620fc48, 0xffd7f7ff, 0x46204605, + 0xffcef7ff, 0xbd704628, 0xbd702004, 0x2800b510, 0x1e5bd006, 0xd1014219, 0xd003421a, 0xbd102065, + 0xbd102004, 0x428b6803, 0x6840d806, 0x18181889, 0xd3014288, 0xbd102000, 0xbd102066, 0x460eb570, + 0x46140005, 0x2c00d014, 0x2120d012, 0xf0004610, 0x6828fc51, 0x60261a36, 0x606068e8, 0x68687a29, + 0xfc5bf000, 0x7a6960a0, 0x29012008, 0xe005d002, 0xbd702004, 0x05c92101, 0x60211871, 0x61212110, + 0x616160e0, 0x200461a0, 0x200061e0, 0xb5ffbd70, 0x4616b089, 0x460d461c, 0x9809466a, 0xffcef7ff, + 0x46294632, 0x98099b04, 0xffb0f7ff, 0xd1302800, 0xf0004620, 0x0005fbf3, 0x9c00d12b, 0x19a69f01, + 0x46391e76, 0xf0004630, 0x2900fc28, 0x1c40d002, 0x1e464378, 0x98092100, 0xfbd5f000, 0x0221e013, + 0x0a092009, 0x18090600, 0x38204880, 0x98096041, 0xff5bf7ff, 0x98094605, 0x28006900, 0x4780d000, + 0xd1022d00, 0x42b419e4, 0x9809d9e9, 0xff48f7ff, 0xb00d4628, 0xb570bdf0, 0xd0150004, 0x48764a73, + 0x60503a20, 0xf0004608, 0x2800fbb9, 0x2100d10b, 0xf0004620, 0x4620fba8, 0xff37f7ff, 0x46204605, + 0xff2ef7ff, 0xbd704628, 0xbd702004, 0x0004b570, 0x4a66d015, 0x3a204869, 0x46086050, 0xfb9ef000, + 0xd10b2800, 0x46202100, 0xfb8df000, 0xf7ff4620, 0x4605ff1c, 0xf7ff4620, 0x4628ff13, 0x2004bd70, + 0xb5ffbd70, 0x461eb089, 0x460d0014, 0x466ad011, 0xf7ff9809, 0x4632ff53, 0x9b034629, 0xf7ff9809, + 0x0007ff35, 0x2100d1b5, 0x98099d00, 0xfb6bf000, 0x2004e028, 0x484de7ad, 0x3820cc02, 0x99036081, + 0xd0022904, 0xd0072908, 0x0229e00e, 0x0a092203, 0x18890652, 0xe0076041, 0x60c1cc02, 0x22070229, + 0x06120a09, 0x60411889, 0xf7ff9809, 0x4607fede, 0x69009809, 0xd0002800, 0x2f004780, 0x9803d104, + 0x1a361945, 0xd1d62e00, 0xf7ff9809, 0x4638fec9, 0xb570e77f, 0xd0190004, 0xd0172a00, 0x49380608, + 0x18400a00, 0x39204931, 0x68106048, 0x68506088, 0x210060c8, 0xf0004620, 0x4620fb26, 0xfeb5f7ff, + 0x46204605, 0xfeacf7ff, 0xbd704628, 0xbd702004, 0xb08bb5ff, 0x460c980d, 0xd0152800, 0x980b466a, + 0xfeecf7ff, 0x9b054621, 0x980b9a0e, 0xfecef7ff, 0x28009008, 0x9801d109, 0x9e009009, 0x980b2100, + 0xfb01f000, 0xe05e980e, 0xb00f2004, 0x9909bdf0, 0x42494270, 0x42404008, 0x42b02400, 0x9909d101, + 0x990e1840, 0x42811989, 0x1b85d901, 0x9d0ee040, 0x2701e03e, 0x42bd02bf, 0x462fd800, 0x980d08a1, + 0x18090089, 0x463a2009, 0xf7ff06c0, 0x1930fd69, 0x210b0200, 0x06090a00, 0x48041841, 0x60413820, + 0xe00f4638, 0x40026040, 0x00000ba8, 0x40023020, 0x40001400, 0x44ffffff, 0x49ffffff, 0x4bffffff, + 0x4300ffff, 0xf0009905, 0x49fffb08, 0x18410400, 0x608148fe, 0xf7ff980b, 0x9008fe48, 0x6900980b, + 0xd0002800, 0x98084780, 0xd10e2800, 0x19e41bed, 0xd1be2d00, 0x980d08a1, 0x18080089, 0x980e900d, + 0x1b001936, 0x2800900e, 0x980bd1a1, 0xfe28f7ff, 0xe79a9808, 0x4614b570, 0xd0102800, 0xd00e2c00, + 0x4aeb0609, 0x4de90a09, 0x60691889, 0xfe1df7ff, 0xd1032800, 0x602168a9, 0x606168e9, 0x2004bd70, + 0x2800bd70, 0x2900d00e, 0x48e0d00c, 0x07827880, 0x2a020f92, 0x0980d008, 0xd0072802, 0x70082002, + 0x47702000, 0x47702004, 0xe7f82000, 0xe7f62001, 0x460cb570, 0xd0200006, 0xd01e2c00, 0x20004dd3, + 0x078978a9, 0x29020f89, 0x48d2d016, 0x46206068, 0xfa92f000, 0x0a00ba00, 0x020078e1, 0x60a84308, + 0xf0001d20, 0xba00fa89, 0x79e10a00, 0x43080200, 0x463060e8, 0xfdd9f7ff, 0x2004bd70, 0xb510bd70, + 0xd0072800, 0x04094ac4, 0x4ac01889, 0xf7ff6051, 0xbd10fdcc, 0xbd102004, 0xb089b5ff, 0x460d4614, + 0x9809466a, 0xfe0af7ff, 0x46294622, 0x98099b05, 0xfdecf7ff, 0xd12f2800, 0x4629466a, 0xf7ff9809, + 0x9d00fdfd, 0x90089802, 0x42404269, 0x424f4001, 0xd10142af, 0x183f9808, 0xd01c2c00, 0x42a61b7e, + 0x4626d900, 0x99054630, 0xfa57f000, 0x22010229, 0x06120a09, 0x49a5188a, 0x9a0c604a, 0x02120400, + 0x30ff4310, 0x98096088, 0xfd8ff7ff, 0xd1032800, 0x19ad1ba4, 0x2000e7de, 0xb5ffe63b, 0x9f12b089, + 0x4616001d, 0xd010460c, 0x9809466a, 0xfdc6f7ff, 0x46214632, 0x98099b07, 0xfda8f7ff, 0xd1052800, + 0x06394a96, 0x9c00188f, 0x2004e021, 0x0221e621, 0x0a092001, 0x18090640, 0x6041488c, 0x68296087, + 0x980960c1, 0xfd61f7ff, 0xd0092800, 0x29009913, 0x600cd000, 0x29009914, 0x2200d0e8, 0xe608600a, + 0x1a769907, 0x00890889, 0x9907194d, 0x2e00190c, 0xe5fed1dd, 0x2800b510, 0x4a81d007, 0x18890409, + 0x60514a7a, 0xfd41f7ff, 0x2004bd10, 0xb5f0bd10, 0x001db0d5, 0x460c4616, 0xd0124607, 0xf7ff2308, + 0x2800fd65, 0x2f00d10e, 0x2100d00e, 0x90022040, 0x91000240, 0x00089001, 0x19a1d104, 0x2100468c, + 0x2004e00c, 0xbdf0b055, 0xe7f42104, 0x9b009a01, 0x189b434a, 0xaa03008e, 0x1c495193, 0x428a9a02, + 0x2200d2f4, 0xab444961, 0x2a08e034, 0x7f0ed204, 0x07f640d6, 0xe02b0ff6, 0x3e084616, 0xd2012e08, + 0xe0227f4f, 0x3e104616, 0xd2012e08, 0xe01c7f8f, 0x3e184616, 0xd2012e08, 0xe0167fcf, 0xd2032a28, + 0x46167e0f, 0xe0103e20, 0xd2032a30, 0x46167e4f, 0xe00a3e28, 0xd2032a38, 0x46167e8f, 0xe0043e30, + 0xd20a2a40, 0x46167ecf, 0x40f73e38, 0x0ff607fe, 0x1c52549e, 0x42969e02, 0x2100d8c7, 0x460a460e, + 0x008be012, 0x58ffaf03, 0xd80c42a7, 0x19dbaf03, 0x42a3685b, 0xab44d907, 0x1c765c5b, 0xd1002b00, + 0x9b011c52, 0x1c49191c, 0xd3ea4564, 0xd0032a00, 0xd10342b2, 0xe0022101, 0xe0002100, 0x70292102, + 0xb5ffe790, 0x001eb085, 0x460c4617, 0x2308d025, 0xf7ff9805, 0x2800fcdb, 0x9805d120, 0xd01f2800, + 0x91002100, 0x91029101, 0x91006801, 0x91016941, 0x90026980, 0x90032000, 0xd10f2800, 0x19e79801, + 0x46024240, 0x40084279, 0x18804022, 0x42402500, 0xf0009901, 0x9004f942, 0x2004e02d, 0xbdf0b009, + 0xe7e82004, 0x99019800, 0xf0001a20, 0x9905f936, 0x29017a49, 0x2820d004, 0x4914d210, 0xe0136b49, + 0xd2032808, 0x31404911, 0xe00d7909, 0x42819902, 0x490ed913, 0x79493140, 0xe0053808, 0x42819902, + 0x490ad90b, 0x38206b09, 0x40822201, 0xd000438a, 0x98011c6d, 0x42bc1904, 0x2d00d3d4, 0x9804d012, + 0xd2114285, 0xe0102002, 0x0000ffff, 0x40023000, 0x4100ffff, 0x45ffffff, 0x4000ffff, 0x00ffffff, + 0x4a00ffff, 0xe0002000, 0x70302001, 0xe7b59803, 0x4614b510, 0xd00a2800, 0xd0082c00, 0xf000000b, + 0x080af999, 0x16140d0a, 0x1e1c1a18, 0x20042220, 0x68c0bd10, 0x6840e000, 0xe0046010, 0x68407a01, + 0xf8dbf000, 0x20006020, 0x7a00bd10, 0x6800e7f4, 0x2001e7f2, 0x6940e7f0, 0x6980e7ee, 0x6a00e7ec, + 0x6a40e7ea, 0x206ae7e8, 0x4603bd10, 0x2000b510, 0xd0052b00, 0xd0222906, 0x2905dc04, 0xe01ed80f, + 0xbd102004, 0xd01a2909, 0x2907dc04, 0x2908d017, 0xe014d105, 0x2920b2d4, 0x2921d003, 0x206ad007, + 0x2a00bd10, 0x2a01d001, 0x725cd105, 0x2a00bd10, 0x2a01d003, 0x2077d001, 0x729cbd10, 0x2076bd10, + 0x2800bd10, 0x4831d00e, 0x61c2680a, 0x69c3680a, 0xd105429a, 0x6182684a, 0x69806849, 0xd0034281, + 0x47702069, 0x47702004, 0x47702000, 0xd0082800, 0xd0062900, 0x69c24825, 0x6980600a, 0x20006048, + 0x20044770, 0xb5104770, 0x49217804, 0x22102320, 0xd00a2c01, 0x439c680c, 0x7840600c, 0x68082800, + 0x4310d00b, 0x20006008, 0x7840bd10, 0xd0022800, 0x43186808, 0x2078e7f6, 0x4390bd10, 0xb510e7f2, + 0x70012100, 0x49127041, 0x23206809, 0x401c460c, 0x23012210, 0xd0012c00, 0xe0017003, 0xd0004211, + 0x20007043, 0xb500bd10, 0xd0052901, 0xd1022900, 0xf7ff2000, 0xbd00fb6f, 0xe7fa2001, 0x42884905, + 0x206bd001, 0x20004770, 0x00004770, 0x40023000, 0x40001400, 0x6b65666b, 0xc004e001, 0x29041f09, + 0x078bd2fb, 0x8002d501, 0x07c91c80, 0x7002d000, 0x29004770, 0x07c3d00b, 0x7002d002, 0x1e491c40, + 0xd3042902, 0xd5020783, 0x1c808002, 0xe7e31e89, 0xe7ee2200, 0xe7df2200, 0x78c27803, 0x78434619, + 0x021b0612, 0x78834319, 0x041b78c0, 0x43114319, 0x0a090209, 0x43080600, 0x22004770, 0x428b0903, + 0x0a03d32c, 0xd311428b, 0x469c2300, 0x4603e04e, 0xd43c430b, 0x08432200, 0xd331428b, 0x428b0903, + 0x0a03d31c, 0xd301428b, 0xe03f4694, 0x428b09c3, 0x01cbd301, 0x41521ac0, 0x428b0983, 0x018bd301, + 0x41521ac0, 0x428b0943, 0x014bd301, 0x41521ac0, 0x428b0903, 0x010bd301, 0x41521ac0, 0x428b08c3, + 0x00cbd301, 0x41521ac0, 0x428b0883, 0x008bd301, 0x41521ac0, 0x428b0843, 0x004bd301, 0x41521ac0, + 0xd2001a41, 0x41524601, 0x47704610, 0x0fcae05d, 0x4249d000, 0xd3001003, 0x40534240, 0x469c2200, + 0x428b0903, 0x0a03d32d, 0xd312428b, 0x018922fc, 0x0a03ba12, 0xd30c428b, 0x11920189, 0xd308428b, + 0x11920189, 0xd304428b, 0xd03a0189, 0xe0001192, 0x09c30989, 0xd301428b, 0x1ac001cb, 0x09834152, + 0xd301428b, 0x1ac0018b, 0x09434152, 0xd301428b, 0x1ac0014b, 0x09034152, 0xd301428b, 0x1ac0010b, + 0x08c34152, 0xd301428b, 0x1ac000cb, 0x08834152, 0xd301428b, 0x1ac0008b, 0xd2d94152, 0x428b0843, + 0x004bd301, 0x41521ac0, 0xd2001a41, 0x46634601, 0x105b4152, 0xd3014610, 0x2b004240, 0x4249d500, + 0x46634770, 0xd300105b, 0xb5014240, 0x46c02000, 0xbd0246c0, 0x4674b430, 0x78251e64, 0x42ab1c64, + 0x461dd200, 0x005b5d63, 0xbc3018e3, 0x00004718, 0x40023004, 0x4002301c, 0x40023018, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000100, 0x00000400, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 +}; + /** * List of start and size for each size of flash sector * The size will apply to all sectors between the listed address and the next address @@ -107,9 +218,10 @@ static const uint32_t k32w042s1m2_flash_prog_blob[] = { */ static const sector_info_t sectors_info[] = { {0x00000000, 0x00001000}, + {0x01000000, 0x00000800}, }; -static const program_target_t flash = { +static const program_target_t primary_flash = { 0x20000021, // Init 0x20000083, // UnInit 0x200000ad, // EraseChip @@ -132,3 +244,27 @@ static const program_target_t flash = { k32w042s1m2_flash_prog_blob, // address of prog_blob 0x00000400 // ram_to_flash_bytes_to_be_written }; + +static const program_target_t secondary_flash = { + 0x20000059, // Init + 0x200000b9, // UnInit + 0x200000bd, // EraseChip + 0x200000fb, // EraseSector + 0x20000115, // ProgramPage + 0x0, // Verify + + // BKPT : start of blob + 1 + // RSB : blob start + header + rw data offset + // RSP : stack pointer + { + 0x20000001, + 0x20000d3c, + 0x20001000 + }, + + 0x20000000 + 0x00000A00, // mem buffer location + 0x20000000, // location to write prog_blob in target RAM + sizeof(K32W0x2_P256_2KB_SEC_flash_prog_blob), // prog_blob size + K32W0x2_P256_2KB_SEC_flash_prog_blob, // address of prog_blob + 0x00000200 // ram_to_flash_bytes_to_be_written +}; diff --git a/source/family/freescale/k32l3a6/target.c b/source/family/freescale/k32l3a6/target.c index 7a97ebc7de..8458f0e70d 100644 --- a/source/family/freescale/k32l3a6/target.c +++ b/source/family/freescale/k32l3a6/target.c @@ -31,7 +31,11 @@ target_cfg_t target_device = { .flash_regions[0].start = 0, .flash_regions[0].end = KB(1024), .flash_regions[0].flags = kRegionIsDefault, - .flash_regions[0].flash_algo = (program_target_t *) &flash, + .flash_regions[0].flash_algo = (program_target_t *) &primary_flash, + .flash_regions[1].start = 0x01000000, + .flash_regions[1].end = 0x01000000 + KB(256), + .flash_regions[1].flags = 0, + .flash_regions[1].flash_algo = (program_target_t *) &secondary_flash, .ram_regions[0].start = 0x20000000, // M4 DTCM .ram_regions[0].end = 0x20030000, }; From fea51e8e5329a14d3222e79fc6e4c48e790ae583 Mon Sep 17 00:00:00 2001 From: Chris Reed Date: Wed, 14 Aug 2019 17:06:49 -0500 Subject: [PATCH 05/13] Made setting soft reset type in family descriptor optional. This was done mostly so there isn't an if/elseif without else clause. --- source/target/target_family.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/target/target_family.c b/source/target/target_family.c index b793c6efd7..861e414911 100644 --- a/source/target/target_family.c +++ b/source/target/target_family.c @@ -139,6 +139,8 @@ uint8_t target_set_state(target_state_t state) swd_set_soft_reset(g_board_info.soft_reset_type); } else if (g_target_family->soft_reset_type) { swd_set_soft_reset(g_target_family->soft_reset_type); + } else { + swd_set_soft_reset(SYSRESETREQ); } return swd_set_target_state_sw(state); } else { From 58e911740ae896612214514e2402075bac8817f0 Mon Sep 17 00:00:00 2001 From: Chris Brown Date: Fri, 24 Apr 2020 07:50:59 -0500 Subject: [PATCH 06/13] NXP: KV5x additions --- source/board/twrkv58f.c | 31 ++++ source/family/freescale/kv58f/flash_blob.c | 101 +++++++++++++ source/family/freescale/kv58f/target.c | 37 +++++ .../family/freescale/target_reset_Vseries.c | 138 ++++++++++++++++++ 4 files changed, 307 insertions(+) create mode 100644 source/board/twrkv58f.c create mode 100644 source/family/freescale/kv58f/flash_blob.c create mode 100644 source/family/freescale/kv58f/target.c create mode 100644 source/family/freescale/target_reset_Vseries.c diff --git a/source/board/twrkv58f.c b/source/board/twrkv58f.c new file mode 100644 index 0000000000..4c8da1e3d5 --- /dev/null +++ b/source/board/twrkv58f.c @@ -0,0 +1,31 @@ +/** + * @file twrkv58f.c + * @brief board ID for the NXP TWR-KV58F220M board + * + * DAPLink Interface Firmware + * Copyright (c) 2009-2019, ARM Limited, All Rights Reserved + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "target_board.h" +#include "target_family.h" + +const board_info_t g_board_info = { + .infoVersion = 0x0, + .board_id = "0240", + .family_id = kNXP_KinetisV_FamilyID, + .flags = kEnablePageErase, + .target_cfg = &target_device, +}; diff --git a/source/family/freescale/kv58f/flash_blob.c b/source/family/freescale/kv58f/flash_blob.c new file mode 100644 index 0000000000..3c17103168 --- /dev/null +++ b/source/family/freescale/kv58f/flash_blob.c @@ -0,0 +1,101 @@ +/* Flash OS Routines (Automagically Generated) + * Copyright (c) 2009-2019 ARM Limited + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +static const uint32_t mkv58f_flash_prog_blob[] = { + 0xE00ABE00, 0x062D780D, 0x24084068, 0xD3000040, 0x1E644058, 0x1C49D1FA, 0x2A001E52, 0x4770D1F2, + 0xb510483e, 0x5120f24c, 0xf64d81c1, 0x81c11128, 0xf0218801, 0x80010101, 0x78414839, 0x0160f001, + 0xbf0c2940, 0x21002101, 0x444a4a36, 0xb1397011, 0xf0217841, 0x70410160, 0xf0117841, 0xd1fb0f60, + 0x44484831, 0xf864f000, 0xbf182800, 0xbd102001, 0x4448482c, 0xb1587800, 0x78414829, 0x0160f021, + 0x0140f041, 0x78417041, 0x0160f001, 0xd1fa2940, 0x47702000, 0xb5104824, 0x44484924, 0xf891f000, + 0xbf182800, 0x2100bd10, 0xe8bd481f, 0x44484010, 0xb958f000, 0x4c1cb570, 0x444c4605, 0x4b1b4601, + 0x68e24620, 0xf8b6f000, 0xbf182800, 0x2300bd70, 0x68e24629, 0x4070e8bd, 0x44484813, 0xb94cf000, + 0x460cb570, 0x4606460b, 0x480f4601, 0x4615b084, 0xf0004448, 0x2800f8eb, 0xb004bf1c, 0x2000bd70, + 0xe9cd2101, 0x90021000, 0x462b4807, 0x46314622, 0xf0004448, 0xb004f97f, 0x0000bd70, 0x40052000, + 0x4007e000, 0x00000004, 0x00000008, 0x6b65666b, 0xbf042800, 0x47702004, 0x6cc949ea, 0x6103f3c1, + 0xbf08290f, 0x1180f44f, 0x4ae7bf1f, 0xf832447a, 0x02891011, 0xe9c02200, 0x21022100, 0x61426081, + 0x618202c9, 0x1203e9c0, 0x52a0f04f, 0x2108e9c0, 0x47702000, 0xbf0e2800, 0x61012004, 0x47702000, + 0x48da4602, 0x49d96840, 0x0070f440, 0x47706048, 0x217048d7, 0x21807001, 0x78017001, 0x0f80f011, + 0x7800d0fb, 0x0f20f010, 0x2067bf1c, 0xf0104770, 0xbf1c0f10, 0x47702068, 0x0001f010, 0x2069bf18, + 0x28004770, 0x2004bf04, 0xb5104770, 0x4ac84604, 0x403bf06f, 0x48c76050, 0xbf144281, 0x2000206b, + 0xbf182800, 0x4620bd10, 0xffd2f7ff, 0x46204603, 0xffc6f7ff, 0xbd104618, 0xbf042800, 0x47702004, + 0x60532300, 0x60d36093, 0x61536113, 0x61d36193, 0x68c16011, 0xe9d06051, 0xfbb11001, 0x6090f0f0, + 0x21102008, 0x0103e9c2, 0x1005e9c2, 0x61d02004, 0x47702000, 0x4df0e92d, 0x4615b088, 0x460c4698, + 0x466a4682, 0xffd8f7ff, 0x4621462a, 0x9b044650, 0xf931f000, 0xbf1c0007, 0xe8bdb008, 0xe9dd8df0, + 0x19604600, 0xfbb51e45, 0xfb06f0f6, 0xb1205010, 0xf0f6fbb5, 0x43701c40, 0x42ac1e45, 0xf8dfbf98, + 0xd81cb270, 0x407ff024, 0x6010f040, 0x0004f8cb, 0x45804898, 0x206bbf14, 0x28002000, 0xb008bf1c, + 0x8df0e8bd, 0xf7ff4650, 0x4607ff73, 0x0010f8da, 0xbf182800, 0xb9174780, 0x42ac4434, 0x4650d9e2, + 0xff5ef7ff, 0x4638b008, 0x8df0e8bd, 0xbf042a00, 0x47702004, 0x45f0e92d, 0x4614b089, 0x460d461e, + 0x466a4680, 0xff88f7ff, 0x46294632, 0x9b034640, 0xf8e1f000, 0xbf1c0007, 0xe8bdb009, 0x9d0085f0, + 0xbf182e00, 0xa1e8f8df, 0xf854d025, 0xf8ca0b04, 0x98030008, 0xbf042804, 0x407ff025, 0x60c0f040, + 0x2808d009, 0xf854d109, 0xf8ca0b04, 0xf025000c, 0xf040407f, 0xf8ca60e0, 0x46400004, 0xff28f7ff, + 0x1010f8d8, 0x29004607, 0x4788bf18, 0x9803b91f, 0x1a364405, 0x4640d1d9, 0xff12f7ff, 0x4638b009, + 0x85f0e8bd, 0xbf042800, 0x47702004, 0xea424a62, 0x4a5f4101, 0xe70b6051, 0x4dffe92d, 0x4614b088, + 0x460d469a, 0x9808466a, 0xff36f7ff, 0x46294622, 0x98089b05, 0xf88ff000, 0xbf1c2800, 0xe8bdb00c, + 0x466a8df0, 0x98084629, 0xff26f7ff, 0xf8dd9e00, 0x42708008, 0x0100f1c8, 0x42474008, 0xbf0842b7, + 0x2c004447, 0xf8dfbf18, 0xd01fb128, 0x42a51bbd, 0x4625bf88, 0xf0269805, 0xfbb5417f, 0xf041f0f0, + 0xf8cb7180, 0x04001004, 0x200aea40, 0x00fff040, 0x0008f8cb, 0xf7ff9808, 0x2800fecb, 0xb00cbf1c, + 0x8df0e8bd, 0x442e1b64, 0xd1df4447, 0x2000b00c, 0x8df0e8bd, 0xbf042b00, 0x47702004, 0x4dffe92d, + 0x4616b088, 0x7a14e9dd, 0x460c461d, 0xf8dd466a, 0x98088058, 0xfee0f7ff, 0x3007e9dd, 0x46214632, + 0xf839f000, 0xbf1c2800, 0xe8bdb00c, 0x9c008df0, 0xbf042e00, 0xe8bdb00c, 0xf8df8df0, 0xf06fb094, + 0xea40407f, 0xf0246707, 0xf040407f, 0xf8cb7000, 0xf8cb0004, 0x68287008, 0x000cf8cb, 0xf7ff9808, + 0xb168fe87, 0x0f00f1ba, 0xf8cabf18, 0xf1b84000, 0xbf1c0f00, 0xf8c82100, 0xb00c1000, 0x8df0e8bd, + 0x1a769907, 0x0103f021, 0x9907440d, 0xd1da440c, 0xe8bdb00c, 0x28008df0, 0x2004bf04, 0xf1a34770, + 0x42190301, 0x421abf0e, 0x47702065, 0x428b6803, 0x6840d806, 0x44184411, 0xbf244288, 0x47702000, + 0x47702066, 0x40048000, 0x000003b4, 0x4001f000, 0x40020000, 0x6b65666b, 0x4000ffff, 0x40020004, + 0x40020010, 0x00100008, 0x00200018, 0x00400030, 0x00800060, 0x010000c0, 0x02000180, 0x04000300, + 0x00000600, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 +}; + +// Start address of flash +static const uint32_t flash_start = 0x10000000; +// Size of flash +static const uint32_t flash_size = 0x00100000; + +/** +* List of start and size for each size of flash sector +* The size will apply to all sectors between the listed address and the next address +* in the list. +* The last pair in the list will have sectors starting at that address and ending +* at address start + size. +*/ +static const sector_info_t sectors_info[] = { + { 0x10000000, 0x00001000 }, +}; + +static const program_target_t flash = { + 0x00000021, // Init + 0x00000071, // UnInit + 0x00000095, // EraseChip + 0x000000b5, // EraseSector + 0x000000e1, // ProgramPage + 0x0, // Verify + + // BKPT : start of blob + 1 + // RSB : blob start + header + rw data offset + // RSP : stack pointer + { + 0x00000001, + 0x00000524, + 0x00000800 + }, + + 0x00000000 + 0x00000A00, // mem buffer location + 0x00000000, // location to write prog_blob in target RAM + sizeof(mkv58f_flash_prog_blob), // prog_blob size + mkv58f_flash_prog_blob, // address of prog_blob + 0x00000400 // ram_to_flash_bytes_to_be_written +}; diff --git a/source/family/freescale/kv58f/target.c b/source/family/freescale/kv58f/target.c new file mode 100644 index 0000000000..458943fc42 --- /dev/null +++ b/source/family/freescale/kv58f/target.c @@ -0,0 +1,37 @@ +/** + * @file target.c + * @brief Target information for the k64f + * + * DAPLink Interface Firmware + * Copyright (c) 2017-2019, ARM Limited, All Rights Reserved + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "target_config.h" + +// The file flash_blob.c must only be included in target.c +#include "flash_blob.c" + +// target information +target_cfg_t target_device = { + .sectors_info = sectors_info, + .sector_info_length = (sizeof(sectors_info))/(sizeof(sector_info_t)), + .flash_regions[0].start = 0x00000000, + .flash_regions[0].end = 0x00100000, + .flash_regions[0].flags = kRegionIsDefault, + .flash_regions[0].flash_algo = (program_target_t *) &flash, + .ram_regions[0].start = 0x1fff0000, + .ram_regions[0].end = 0x20030000, +}; diff --git a/source/family/freescale/target_reset_Vseries.c b/source/family/freescale/target_reset_Vseries.c new file mode 100644 index 0000000000..1400a45ade --- /dev/null +++ b/source/family/freescale/target_reset_Vseries.c @@ -0,0 +1,138 @@ +/** + * @file target_reset_Kseries.c + * @brief Target reset for the Kinetis K series + * + * DAPLink Interface Firmware + * Copyright (c) 2009-2019, ARM Limited, All Rights Reserved + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "target_reset.h" +#include "swd_host.h" +#include "info.h" +#include "target_family.h" + +#define MDM_STATUS 0x01000000 +#define MDM_CTRL 0x01000004 +#define MDM_IDR 0x010000fc +#define MDM_ID 0x001c0000 // K64, K22 (K series) + +static void target_before_init_debug(void) +{ + swd_set_target_reset(1); +} + +static uint8_t target_unlock_sequence(void) +{ + uint32_t val; + + // read the device ID + if (!swd_read_ap(MDM_IDR, &val)) { + return 0; + } + + // verify the result + if (val != MDM_ID) { + return 0; + } + + if (!swd_read_ap(MDM_STATUS, &val)) { + return 0; + } + + // flash in secured mode + if (val & (1 << 2)) { + // hold the device in reset + swd_set_target_reset(1); + + // write the mass-erase enable bit + if (!swd_write_ap(MDM_CTRL, 1)) { + return 0; + } + + while (1) { + // wait until mass erase is started + if (!swd_read_ap(MDM_STATUS, &val)) { + return 0; + } + + if (val & 1) { + break; + } + } + + // mass erase in progress + while (1) { + // keep reading until procedure is complete + if (!swd_read_ap(MDM_CTRL, &val)) { + return 0; + } + + if (val == 0) { + break; + } + } + } + + return 1; +} + +// Check Flash Configuration Field bytes at address 0x400-0x40f to ensure that flash security +// won't be enabled. +// +// FCF bytes: +// [0x0-0x7]=backdoor key +// [0x8-0xb]=flash protection bytes +// [0xc]=FSEC: +// [7:6]=KEYEN (2'b10 is backdoor key enabled, all others backdoor key disabled) +// [5:4]=MEEN (2'b10 mass erase disabled, all other mass erase enabled) +// [3:2]=FSLACC (2'b00 and 2'b11 factory access enabled, 2'b01 and 2'b10 factory access disabled) +// [1:0]=SEC (2'b10 flash security disabled, all other flash security enabled) +// [0xd]=FOPT +// [0xe]=EEPROM protection bytes (FlexNVM devices only) +// [0xf]=data flash protection bytes (FlexNVM devices only) +// +// This function checks that: +// - FSEC does not disable mass erase or secure the device. +// +static uint8_t security_bits_set(uint32_t addr, uint8_t *data, uint32_t size) +{ + const uint32_t fsec_addr = 0x40C; + + if ((addr <= fsec_addr) && (addr + size) > fsec_addr) { + uint8_t fsec = data[fsec_addr - addr]; + + // make sure we can unsecure the device or dont program at all + if ((fsec & 0x30) == 0x20) { + // Dont allow programming mass-erase disabled state + return 1; + } + + // Security is OK long as we can mass-erase (comment the following out to enable target security) + if ((fsec & 0x03) != 0x02) { + return 1; + } + } + + return 0; +} + +const target_family_descriptor_t g_nxp_kinetis_kseries = { + .family_id = kNXP_KinetisV_FamilyID, + .default_reset_type = kHardwareReset, + .target_before_init_debug = target_before_init_debug, + .target_unlock_sequence = target_unlock_sequence, + .security_bits_set = security_bits_set, +}; From 288550efe6bc53c7ff3f713ac3757fdaa35e2352 Mon Sep 17 00:00:00 2001 From: Chris Brown Date: Tue, 28 Apr 2020 18:21:50 -0500 Subject: [PATCH 07/13] NXP: Add TWR-KV58F --- projects.yaml | 4 + records/board/twrkv58f220m.yaml | 7 ++ records/family/nxp_kinetis_vseries.yaml | 4 + source/board/twrkv58f.c | 4 +- source/daplink/cmsis-dap/debug_cm.h | 1 + source/family/freescale/kv58f/flash_blob.c | 115 ++++++++---------- source/family/freescale/kv58f/target.c | 8 +- .../family/freescale/target_reset_Vseries.c | 11 +- source/target/target_family.c | 2 + source/target/target_family.h | 2 +- 10 files changed, 82 insertions(+), 76 deletions(-) create mode 100644 records/board/twrkv58f220m.yaml create mode 100644 records/family/nxp_kinetis_vseries.yaml diff --git a/projects.yaml b/projects.yaml index 9be2584f78..b0e630bb88 100644 --- a/projects.yaml +++ b/projects.yaml @@ -318,6 +318,10 @@ projects: - *module_if - *module_hic_k20dx - records/board/twrkl28z72m.yaml + k20dx_twrkv58f220m_if: + - *module_if + - *module_hic_k20dx + - records/board/twrkv58f220m.yaml k20dx_xdot_l151_if: - *module_if - *module_hic_k20dx diff --git a/records/board/twrkv58f220m.yaml b/records/board/twrkv58f220m.yaml new file mode 100644 index 0000000000..0c57f37b1d --- /dev/null +++ b/records/board/twrkv58f220m.yaml @@ -0,0 +1,7 @@ +common: + sources: + board: + - source/board/twrkv58f.c + family: + - source/family/freescale/kv58f/target.c + - source/family/freescale/target_reset_Vseries.c diff --git a/records/family/nxp_kinetis_vseries.yaml b/records/family/nxp_kinetis_vseries.yaml new file mode 100644 index 0000000000..1fa6084bc1 --- /dev/null +++ b/records/family/nxp_kinetis_vseries.yaml @@ -0,0 +1,4 @@ +common: + sources: + target: + - source/target/freescale/target_reset_Vseries.c diff --git a/source/board/twrkv58f.c b/source/board/twrkv58f.c index 4c8da1e3d5..37cf227918 100644 --- a/source/board/twrkv58f.c +++ b/source/board/twrkv58f.c @@ -23,8 +23,8 @@ #include "target_family.h" const board_info_t g_board_info = { - .infoVersion = 0x0, - .board_id = "0240", + .info_version = 0x0, + .board_id = "0330", .family_id = kNXP_KinetisV_FamilyID, .flags = kEnablePageErase, .target_cfg = &target_device, diff --git a/source/daplink/cmsis-dap/debug_cm.h b/source/daplink/cmsis-dap/debug_cm.h index 42a47a83ba..9fbe72b889 100644 --- a/source/daplink/cmsis-dap/debug_cm.h +++ b/source/daplink/cmsis-dap/debug_cm.h @@ -94,6 +94,7 @@ #define CSW_MSTRCORE 0x00000000 // Master Type: Core #define CSW_MSTRDBG 0x20000000 // Master Type: Debug #define CSW_RESERVED 0x01000000 // Reserved Value +#define CSW_SPROT 0x40000000 // SProt // Core Debug Register Address Offsets #define DBG_OFS 0x0DF0 // Debug Register Offset inside NVIC diff --git a/source/family/freescale/kv58f/flash_blob.c b/source/family/freescale/kv58f/flash_blob.c index 3c17103168..211a18384e 100644 --- a/source/family/freescale/kv58f/flash_blob.c +++ b/source/family/freescale/kv58f/flash_blob.c @@ -16,48 +16,44 @@ static const uint32_t mkv58f_flash_prog_blob[] = { 0xE00ABE00, 0x062D780D, 0x24084068, 0xD3000040, 0x1E644058, 0x1C49D1FA, 0x2A001E52, 0x4770D1F2, - 0xb510483e, 0x5120f24c, 0xf64d81c1, 0x81c11128, 0xf0218801, 0x80010101, 0x78414839, 0x0160f001, - 0xbf0c2940, 0x21002101, 0x444a4a36, 0xb1397011, 0xf0217841, 0x70410160, 0xf0117841, 0xd1fb0f60, - 0x44484831, 0xf864f000, 0xbf182800, 0xbd102001, 0x4448482c, 0xb1587800, 0x78414829, 0x0160f021, - 0x0140f041, 0x78417041, 0x0160f001, 0xd1fa2940, 0x47702000, 0xb5104824, 0x44484924, 0xf891f000, - 0xbf182800, 0x2100bd10, 0xe8bd481f, 0x44484010, 0xb958f000, 0x4c1cb570, 0x444c4605, 0x4b1b4601, - 0x68e24620, 0xf8b6f000, 0xbf182800, 0x2300bd70, 0x68e24629, 0x4070e8bd, 0x44484813, 0xb94cf000, - 0x460cb570, 0x4606460b, 0x480f4601, 0x4615b084, 0xf0004448, 0x2800f8eb, 0xb004bf1c, 0x2000bd70, - 0xe9cd2101, 0x90021000, 0x462b4807, 0x46314622, 0xf0004448, 0xb004f97f, 0x0000bd70, 0x40052000, - 0x4007e000, 0x00000004, 0x00000008, 0x6b65666b, 0xbf042800, 0x47702004, 0x6cc949ea, 0x6103f3c1, - 0xbf08290f, 0x1180f44f, 0x4ae7bf1f, 0xf832447a, 0x02891011, 0xe9c02200, 0x21022100, 0x61426081, - 0x618202c9, 0x1203e9c0, 0x52a0f04f, 0x2108e9c0, 0x47702000, 0xbf0e2800, 0x61012004, 0x47702000, - 0x48da4602, 0x49d96840, 0x0070f440, 0x47706048, 0x217048d7, 0x21807001, 0x78017001, 0x0f80f011, - 0x7800d0fb, 0x0f20f010, 0x2067bf1c, 0xf0104770, 0xbf1c0f10, 0x47702068, 0x0001f010, 0x2069bf18, - 0x28004770, 0x2004bf04, 0xb5104770, 0x4ac84604, 0x403bf06f, 0x48c76050, 0xbf144281, 0x2000206b, - 0xbf182800, 0x4620bd10, 0xffd2f7ff, 0x46204603, 0xffc6f7ff, 0xbd104618, 0xbf042800, 0x47702004, - 0x60532300, 0x60d36093, 0x61536113, 0x61d36193, 0x68c16011, 0xe9d06051, 0xfbb11001, 0x6090f0f0, - 0x21102008, 0x0103e9c2, 0x1005e9c2, 0x61d02004, 0x47702000, 0x4df0e92d, 0x4615b088, 0x460c4698, - 0x466a4682, 0xffd8f7ff, 0x4621462a, 0x9b044650, 0xf931f000, 0xbf1c0007, 0xe8bdb008, 0xe9dd8df0, - 0x19604600, 0xfbb51e45, 0xfb06f0f6, 0xb1205010, 0xf0f6fbb5, 0x43701c40, 0x42ac1e45, 0xf8dfbf98, - 0xd81cb270, 0x407ff024, 0x6010f040, 0x0004f8cb, 0x45804898, 0x206bbf14, 0x28002000, 0xb008bf1c, - 0x8df0e8bd, 0xf7ff4650, 0x4607ff73, 0x0010f8da, 0xbf182800, 0xb9174780, 0x42ac4434, 0x4650d9e2, - 0xff5ef7ff, 0x4638b008, 0x8df0e8bd, 0xbf042a00, 0x47702004, 0x45f0e92d, 0x4614b089, 0x460d461e, - 0x466a4680, 0xff88f7ff, 0x46294632, 0x9b034640, 0xf8e1f000, 0xbf1c0007, 0xe8bdb009, 0x9d0085f0, - 0xbf182e00, 0xa1e8f8df, 0xf854d025, 0xf8ca0b04, 0x98030008, 0xbf042804, 0x407ff025, 0x60c0f040, - 0x2808d009, 0xf854d109, 0xf8ca0b04, 0xf025000c, 0xf040407f, 0xf8ca60e0, 0x46400004, 0xff28f7ff, - 0x1010f8d8, 0x29004607, 0x4788bf18, 0x9803b91f, 0x1a364405, 0x4640d1d9, 0xff12f7ff, 0x4638b009, - 0x85f0e8bd, 0xbf042800, 0x47702004, 0xea424a62, 0x4a5f4101, 0xe70b6051, 0x4dffe92d, 0x4614b088, - 0x460d469a, 0x9808466a, 0xff36f7ff, 0x46294622, 0x98089b05, 0xf88ff000, 0xbf1c2800, 0xe8bdb00c, - 0x466a8df0, 0x98084629, 0xff26f7ff, 0xf8dd9e00, 0x42708008, 0x0100f1c8, 0x42474008, 0xbf0842b7, - 0x2c004447, 0xf8dfbf18, 0xd01fb128, 0x42a51bbd, 0x4625bf88, 0xf0269805, 0xfbb5417f, 0xf041f0f0, - 0xf8cb7180, 0x04001004, 0x200aea40, 0x00fff040, 0x0008f8cb, 0xf7ff9808, 0x2800fecb, 0xb00cbf1c, - 0x8df0e8bd, 0x442e1b64, 0xd1df4447, 0x2000b00c, 0x8df0e8bd, 0xbf042b00, 0x47702004, 0x4dffe92d, - 0x4616b088, 0x7a14e9dd, 0x460c461d, 0xf8dd466a, 0x98088058, 0xfee0f7ff, 0x3007e9dd, 0x46214632, - 0xf839f000, 0xbf1c2800, 0xe8bdb00c, 0x9c008df0, 0xbf042e00, 0xe8bdb00c, 0xf8df8df0, 0xf06fb094, - 0xea40407f, 0xf0246707, 0xf040407f, 0xf8cb7000, 0xf8cb0004, 0x68287008, 0x000cf8cb, 0xf7ff9808, - 0xb168fe87, 0x0f00f1ba, 0xf8cabf18, 0xf1b84000, 0xbf1c0f00, 0xf8c82100, 0xb00c1000, 0x8df0e8bd, - 0x1a769907, 0x0103f021, 0x9907440d, 0xd1da440c, 0xe8bdb00c, 0x28008df0, 0x2004bf04, 0xf1a34770, - 0x42190301, 0x421abf0e, 0x47702065, 0x428b6803, 0x6840d806, 0x44184411, 0xbf244288, 0x47702000, - 0x47702066, 0x40048000, 0x000003b4, 0x4001f000, 0x40020000, 0x6b65666b, 0x4000ffff, 0x40020004, - 0x40020010, 0x00100008, 0x00200018, 0x00400030, 0x00800060, 0x010000c0, 0x02000180, 0x04000300, - 0x00000600, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 + 0xb510494a, 0x60084449, 0x5120f24c, 0x81c14848, 0x1128f64d, 0x880181c1, 0x0101f021, 0x48468001, + 0x49442200, 0x60014448, 0x604102c9, 0x60811209, 0x31fff04f, 0x1205e9c0, 0x2020f880, 0xf0006241, + 0x2800f96d, 0x2001d000, 0x2000bd10, 0x4a3b4770, 0x447ab508, 0x92002300, 0x02cff3c1, 0x48364601, + 0xf0004448, 0x2800f960, 0x2001d000, 0x4933bd08, 0x44794831, 0x44483920, 0xf000b508, 0x2800f8d3, + 0x482ed10e, 0x4b2e4478, 0x447b3832, 0x482a9000, 0x492c2208, 0xf0004448, 0x2800f98f, 0x2001d000, + 0x4b26bd08, 0x4601447b, 0x3b524823, 0x5200f44f, 0xf0004448, 0xb508b8eb, 0x46131dc9, 0x0207f021, + 0x4479491e, 0x91003970, 0x481b4601, 0xf0004448, 0x2800f973, 0x2001d000, 0x481bbd08, 0xf4216801, + 0x60013100, 0x20004919, 0x47706008, 0x20004916, 0x3170b570, 0x48146008, 0xf4216801, 0x60013180, + 0x306c4811, 0xf6436800, 0x4d1074ff, 0xf3c03524, 0xf3c0314e, 0xea0403c9, 0x46181241, 0x7680ea42, + 0x1e40602e, 0x1e49d2fa, 0xbd70d2f5, 0x00000004, 0x40052000, 0x40020000, 0x00000008, 0x000000fb, + 0x000003e2, 0x10000408, 0xe000ed14, 0xe000ef50, 0x4604b570, 0x25006800, 0x061b7803, 0x2370d5fc, + 0x20007003, 0x280ce03a, 0xe8dfd236, 0x0a06f000, 0x1a16120e, 0x2a26221e, 0x6826322e, 0x71f37813, + 0x6826e02a, 0x71b37853, 0x6826e026, 0x71737893, 0x6826e022, 0x713378d3, 0x6826e01e, 0x72f37913, + 0x6826e01a, 0x72b37953, 0x6826e016, 0x72737993, 0x6826e012, 0x723379d3, 0x6826e00e, 0x73f37a13, + 0x6826e00a, 0x73b37a53, 0x6826e006, 0x73737a93, 0x6826e002, 0x73337ad3, 0xb2c01c40, 0xd9c24288, + 0x20806821, 0xe0037008, 0x1c416a60, 0x4780d000, 0x78006820, 0xd5f70600, 0x68484909, 0x2000f440, + 0x68206048, 0x06817800, 0x2504d501, 0x06c1e006, 0x2508d501, 0x07c0e002, 0x2510d000, 0xbd704628, + 0x4001f000, 0x2244b508, 0x2100460b, 0x2000f88d, 0x4798466a, 0xb538bd08, 0x078a4614, 0xf44fd002, + 0xbd387080, 0x428b6843, 0x6882d803, 0x428a441a, 0x68c3d80c, 0xd803428b, 0x441a6902, 0xd801428a, + 0xbd382002, 0xf5011ac9, 0xe0000100, 0x22081ac9, 0x2000f88d, 0xf88d0c0a, 0x0a0a2001, 0x2002f88d, + 0x1003f88d, 0x466a2103, 0xbd3847a0, 0x45f8e92d, 0x46984607, 0x20004616, 0x198a687b, 0xd803428b, + 0x441c68bc, 0xd20e4294, 0x428b68fb, 0x693cd803, 0x4294441c, 0x2002d202, 0x85f8e8bd, 0x25001acc, + 0x0400f504, 0x1acce002, 0x5500f44f, 0xf1f5fbb4, 0x4111fb05, 0xf44fb111, 0xe7ed7080, 0xf1f5fbb6, + 0x6111fb05, 0x2001b1a9, 0xf88de7e6, 0x0c20a000, 0x0001f88d, 0xf88d0a20, 0x21030002, 0x466a4643, + 0xf88d4638, 0x47984003, 0xd1d52800, 0x442c1b76, 0xf04fe001, 0x2e000a09, 0xe7cdd1e7, 0x20004601, + 0x61c86108, 0xe92d4770, 0x684641fc, 0x0482eb01, 0x428e9d08, 0x6887d803, 0x428f4437, 0x68c7d80a, + 0xd804428f, 0xc010f8d0, 0x428f4467, 0x2002d802, 0x81fce8bd, 0xd80642a6, 0x44376887, 0xd30242a7, + 0x24041b89, 0x68c6e00a, 0xd90342a6, 0x44376907, 0xd3ec42a7, 0x24041b89, 0x0100f501, 0xf6f4fbb1, + 0x1416fb04, 0xf44fb114, 0xe7e17080, 0xf88d2401, 0x0c0c4000, 0x4001f88d, 0xf88d0a0c, 0xf88d4002, + 0x0a111003, 0x1004f88d, 0xf88d2106, 0x466a2005, 0x3006f88d, 0xe7cb47a8, 0x43fee92d, 0x46074616, + 0x461c2000, 0x8028f8dd, 0x074b198a, 0xf44fd003, 0xe8bd7080, 0x077383fe, 0x2001d001, 0x687be7f9, + 0xd803428b, 0x441d68bd, 0xd20c4295, 0x428b68fb, 0x693dd803, 0x4295441d, 0x2002d201, 0x1acde7e9, + 0x0500f505, 0x1acde02e, 0x2007e02c, 0x0000f88d, 0xf88d0c28, 0x0a280001, 0x0002f88d, 0x5003f88d, + 0xf88d78e0, 0x78a00004, 0x0005f88d, 0xf88d7860, 0x78200006, 0x0007f88d, 0xf88d79e0, 0x79a00008, + 0x0009f88d, 0xf88d7960, 0x7920000a, 0x4643210b, 0x000bf88d, 0x4638466a, 0x28004798, 0x3408d1b9, + 0x3e083508, 0xd1d02e00, 0x0000e7b3, 0xfffffffe, 0xffffffff, 0xfffffffe, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000 }; // Start address of flash @@ -65,37 +61,30 @@ static const uint32_t flash_start = 0x10000000; // Size of flash static const uint32_t flash_size = 0x00100000; -/** -* List of start and size for each size of flash sector -* The size will apply to all sectors between the listed address and the next address -* in the list. -* The last pair in the list will have sectors starting at that address and ending -* at address start + size. -*/ static const sector_info_t sectors_info[] = { - { 0x10000000, 0x00001000 }, + { 0x10000000, 0x00002000 }, }; static const program_target_t flash = { - 0x00000021, // Init - 0x00000071, // UnInit - 0x00000095, // EraseChip - 0x000000b5, // EraseSector - 0x000000e1, // ProgramPage + 0x20000021, // Init + 0x2000006b, // UnInit + 0x2000008f, // EraseChip + 0x200000c3, // EraseSector + 0x200000d7, // ProgramPage 0x0, // Verify // BKPT : start of blob + 1 // RSB : blob start + header + rw data offset // RSP : stack pointer { - 0x00000001, - 0x00000524, - 0x00000800 + 0x20000001, + 0x20000498, + 0x20000700 }, - 0x00000000 + 0x00000A00, // mem buffer location - 0x00000000, // location to write prog_blob in target RAM - sizeof(mkv58f_flash_prog_blob), // prog_blob size - mkv58f_flash_prog_blob, // address of prog_blob - 0x00000400 // ram_to_flash_bytes_to_be_written + 0x20000000 + 0x00000A00, // mem buffer location + 0x20000000, // location to write prog_blob in target RAM + sizeof(mkv58f_flash_prog_blob), // prog_blob size + mkv58f_flash_prog_blob, // address of prog_blob + 0x00000200 // ram_to_flash_bytes_to_be_written }; diff --git a/source/family/freescale/kv58f/target.c b/source/family/freescale/kv58f/target.c index 458943fc42..6306b62a56 100644 --- a/source/family/freescale/kv58f/target.c +++ b/source/family/freescale/kv58f/target.c @@ -28,10 +28,10 @@ target_cfg_t target_device = { .sectors_info = sectors_info, .sector_info_length = (sizeof(sectors_info))/(sizeof(sector_info_t)), - .flash_regions[0].start = 0x00000000, - .flash_regions[0].end = 0x00100000, + .flash_regions[0].start = 0x10000000, + .flash_regions[0].end = 0x10100000, .flash_regions[0].flags = kRegionIsDefault, .flash_regions[0].flash_algo = (program_target_t *) &flash, - .ram_regions[0].start = 0x1fff0000, - .ram_regions[0].end = 0x20030000, + .ram_regions[0].start = 0x20000000, + .ram_regions[0].end = 0x2000, }; diff --git a/source/family/freescale/target_reset_Vseries.c b/source/family/freescale/target_reset_Vseries.c index 1400a45ade..85ce687573 100644 --- a/source/family/freescale/target_reset_Vseries.c +++ b/source/family/freescale/target_reset_Vseries.c @@ -1,6 +1,6 @@ /** - * @file target_reset_Kseries.c - * @brief Target reset for the Kinetis K series + * @file target_reset_Vseries.c + * @brief Target reset for the Kinetis V series * * DAPLink Interface Firmware * Copyright (c) 2009-2019, ARM Limited, All Rights Reserved @@ -19,7 +19,6 @@ * limitations under the License. */ -#include "target_reset.h" #include "swd_host.h" #include "info.h" #include "target_family.h" @@ -27,7 +26,7 @@ #define MDM_STATUS 0x01000000 #define MDM_CTRL 0x01000004 #define MDM_IDR 0x010000fc -#define MDM_ID 0x001c0000 // K64, K22 (K series) +#define MDM_ID 0x001c0030 // (V series) static void target_before_init_debug(void) { @@ -109,7 +108,7 @@ static uint8_t target_unlock_sequence(void) // static uint8_t security_bits_set(uint32_t addr, uint8_t *data, uint32_t size) { - const uint32_t fsec_addr = 0x40C; + const uint32_t fsec_addr = 0x1000040C; if ((addr <= fsec_addr) && (addr + size) > fsec_addr) { uint8_t fsec = data[fsec_addr - addr]; @@ -129,7 +128,7 @@ static uint8_t security_bits_set(uint32_t addr, uint8_t *data, uint32_t size) return 0; } -const target_family_descriptor_t g_nxp_kinetis_kseries = { +const target_family_descriptor_t g_nxp_kinetis_vseries = { .family_id = kNXP_KinetisV_FamilyID, .default_reset_type = kHardwareReset, .target_before_init_debug = target_before_init_debug, diff --git a/source/target/target_family.c b/source/target/target_family.c index 861e414911..c4fb61015d 100644 --- a/source/target/target_family.c +++ b/source/target/target_family.c @@ -46,6 +46,7 @@ const target_family_descriptor_t g_sw_sysresetreq_family = { // Weak references to family definitions. __WEAK const target_family_descriptor_t g_nxp_kinetis_kseries = {0}; __WEAK const target_family_descriptor_t g_nxp_kinetis_lseries = {0}; +__WEAK const target_family_descriptor_t g_nxp_kinetis_vseries = {0}; __WEAK const target_family_descriptor_t g_nxp_kinetis_k32_series = {0}; __WEAK const target_family_descriptor_t g_nxp_mimxrt = {0}; __WEAK const target_family_descriptor_t g_nxp_rapid_iot = {0}; @@ -78,6 +79,7 @@ const target_family_descriptor_t *g_families[] = { &g_sw_sysresetreq_family, &g_nxp_kinetis_kseries, &g_nxp_kinetis_lseries, + &g_nxp_kinetis_vseries, &g_nxp_kinetis_k32_series, &g_nxp_lpc55xx_series, &g_nxp_mimxrt, diff --git a/source/target/target_family.h b/source/target/target_family.h index c833372d58..df3e7b28d0 100644 --- a/source/target/target_family.h +++ b/source/target/target_family.h @@ -97,7 +97,7 @@ typedef enum _family_id { kNXP_RapidIot_FamilyID = CREATE_FAMILY_ID(kNXP_VendorID, 4), kNXP_KinetisK32_FamilyID = CREATE_FAMILY_ID(kNXP_VendorID, 5), kNXP_LPC55xx_FamilyID = CREATE_FAMILY_ID(kNXP_VendorID, 6), - kNXP_KinetisV_FamilyID = VENDOR_TO_FAMILY(kNXP_VendorID, 7), + kNXP_KinetisV_FamilyID = CREATE_FAMILY_ID(kNXP_VendorID, 7), kNordic_Nrf51_FamilyID = CREATE_FAMILY_ID(kNordic_VendorID, 1), kNordic_Nrf52_FamilyID = CREATE_FAMILY_ID(kNordic_VendorID, 2), kRealtek_Rtl8195am_FamilyID = CREATE_FAMILY_ID(kRealtek_VendorID, 1), From da518107edcca172b462a95d05b109cc3af96417 Mon Sep 17 00:00:00 2001 From: Mathias Brossard Date: Tue, 25 Jul 2023 19:39:09 -0500 Subject: [PATCH 08/13] NXP: Add support for flashing M0 core in K32W042 Based on commit from Chris Brown --- source/family/freescale/k32w042/flash_blob.c | 381 ++++++++++++++----- source/family/freescale/k32w042/target.c | 4 + 2 files changed, 288 insertions(+), 97 deletions(-) diff --git a/source/family/freescale/k32w042/flash_blob.c b/source/family/freescale/k32w042/flash_blob.c index 4047a706de..41132f6e35 100644 --- a/source/family/freescale/k32w042/flash_blob.c +++ b/source/family/freescale/k32w042/flash_blob.c @@ -1,5 +1,5 @@ /* Flash OS Routines (Automagically Generated) - * Copyright (c) 2009-2019 ARM Limited + * Copyright (c) 2009-2015 ARM Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,107 +14,294 @@ * limitations under the License. */ -static const uint32_t k32w042s1m2_flash_prog_blob[] = { + +// Primary Flash Blob +static const uint32_t P1024_4KB_SEC_flash_prog_blob[] = { 0xE00ABE00, 0x062D780D, 0x24084068, 0xD3000040, 0x1E644058, 0x1C49D1FA, 0x2A001E52, 0x4770D1F2, - 0x4838b510, 0x60414936, 0x60814937, 0x22806801, 0x22204391, 0x60014311, 0x69014834, 0x0f890589, - 0xd01c2902, 0x4a322100, 0x444a2900, 0xd0087011, 0x22036901, 0x43910212, 0x69016101, 0x0f890589, - 0x482cd1fb, 0x22016841, 0x43110792, 0x482a6041, 0xf0004448, 0x2800f855, 0x2001d000, 0x2101bd10, - 0x4823e7e1, 0x78004448, 0xd00d2800, 0x6901481f, 0x02122203, 0x31ff4391, 0x310231ff, 0x69016101, - 0x0f890589, 0xd1fa2902, 0x47702000, 0xb510481a, 0x4448491a, 0xf93af000, 0x4601bd10, 0xb5104816, - 0x22104b16, 0xf0004448, 0xbd10f8e4, 0x460cb570, 0x4606460b, 0x48104601, 0x4615b084, 0xf0004448, - 0x2800f963, 0x9001d10a, 0x21019002, 0x9100480a, 0x4622462b, 0x44484631, 0xfb0bf000, 0xbd70b004, - 0xd928c520, 0x4002a000, 0x0000ffff, 0x40020000, 0x00000004, 0x4002b000, 0x00000008, 0x6b65666b, - 0xd00a2800, 0x68c949fe, 0x290f0f09, 0x4afdd007, 0x447a0049, 0x02895a51, 0x2004e003, 0x21014770, - 0xb4300509, 0x60032300, 0x21026041, 0x02cc7201, 0x49f560c4, 0x158a7a45, 0xd00c2d01, 0x40aa7b0d, - 0x7b496142, 0x61816103, 0x06c92109, 0x62016244, 0x2000bc30, 0x7b8d4770, 0x614240aa, 0xe7f17bc9, - 0xd0022800, 0x20006101, 0x20044770, 0x48e74770, 0x49e76800, 0x42880a00, 0x48e6d101, 0x48e6e000, - 0x22016801, 0x60014311, 0x8f6ff3bf, 0x8f4ff3bf, 0xb5104770, 0xf0002101, 0xbd10fb82, 0x217048df, - 0x21807001, 0x78017001, 0xd5fc0609, 0x06817800, 0x2067d501, 0x06c14770, 0x2068d501, 0x07c04770, - 0x2069d0fc, 0x28004770, 0x2004d101, 0xb5704770, 0x4ad24604, 0x605048d2, 0x428148d2, 0x206bd001, - 0x2000e000, 0xd10c2800, 0x46202100, 0xfb57f000, 0xf7ff4620, 0x4605ffd3, 0x46202101, 0xfb4ff000, - 0xbd704628, 0xd0012800, 0xd1012a00, 0x47702004, 0x2000b410, 0x60906050, 0x611060d0, 0x61906150, - 0x621061d0, 0x23ff6250, 0x061b0248, 0x0a4018cc, 0x04892101, 0x60102308, 0xd209428c, 0x4320014c, - 0x01886010, 0x60d06111, 0x60911340, 0xe0066050, 0x05002001, 0x12006110, 0x01c06050, 0x20106090, - 0x61536190, 0x61d06213, 0x62502004, 0x2000bc10, 0xb5ff4770, 0x4615b08d, 0x460e461c, 0x980daa02, - 0xffc0f7ff, 0x9000a802, 0x4631462a, 0x980d9b08, 0xfb19f000, 0xd1082800, 0x428448a2, 0x266bd001, - 0x2600e000, 0xd0022e00, 0xb0114630, 0x9c02bdf0, 0x19659f03, 0x46391e6d, 0xf0004628, 0x2900fb37, - 0x1c40d002, 0x1e454378, 0x980d2100, 0xfae7f000, 0xd81442ac, 0x20090221, 0x06000a09, 0x488f1809, - 0x980d6041, 0xff5af7ff, 0x980d4606, 0x28006900, 0x4780d000, 0xd1022e00, 0x42ac19e4, 0x2101d9ea, - 0xf000980d, 0x4630facc, 0xbdf0b011, 0xd1012800, 0x47702004, 0x4604b570, 0x48834a80, 0x48816050, - 0xd0014281, 0xe000206b, 0x28002000, 0x2100d10c, 0xf0004620, 0x4620fab4, 0xff30f7ff, 0x21014605, - 0xf0004620, 0x4628faac, 0x2800bd70, 0x2004d101, 0xb5704770, 0x4a714604, 0x60504874, 0x42814871, - 0x206bd001, 0x2000e000, 0xd10c2800, 0x46202100, 0xfa95f000, 0xf7ff4620, 0x4605ff11, 0x46202101, - 0xfa8df000, 0xbd704628, 0xd1012a00, 0x47702004, 0xb08db5ff, 0x461e4614, 0xaa02460d, 0xf7ff980d, - 0xa802ff31, 0x46329000, 0x9b074629, 0xf000980d, 0x0007fa8a, 0x2100d132, 0x980d9d02, 0xfa6ff000, - 0xd0262e00, 0x4855cc02, 0x99076081, 0xd0022904, 0xd0072908, 0x022ae00e, 0x0a122103, 0x18510649, - 0xe0076041, 0x60c1cc02, 0x2107022a, 0x06090a12, 0x60411851, 0xf7ff980d, 0x4607fed1, 0x6900980d, - 0xd0002800, 0x2f004780, 0x9807d103, 0x1a361945, 0x2101d1d8, 0xf000980d, 0x4638fa42, 0xbdf0b011, - 0xd0012800, 0xd1012a00, 0x47702004, 0x4604b570, 0x0a010608, 0x1809483e, 0x60414838, 0x60816811, - 0x60c16851, 0x46202100, 0xfa29f000, 0xf7ff4620, 0x4605fea5, 0x46202101, 0xfa21f000, 0xbd704628, - 0xb08db5ff, 0x460c980f, 0xd02a2800, 0x980daa02, 0xfec8f7ff, 0x9000a802, 0x9b094621, 0x980d9a10, - 0xfa21f000, 0x28009000, 0x9803d11c, 0x9e029001, 0x980d2100, 0xfa03f000, 0x28009810, 0x9801d06b, - 0x900c4240, 0x4270990c, 0x42404008, 0x42b02500, 0x9901d101, 0x99101840, 0x42811989, 0x1b84d904, - 0x2004e003, 0xbdf0b011, 0x2c009c10, 0x2701d049, 0x42bc02bf, 0x4627d800, 0x980f08a9, 0x18090089, - 0x463a2009, 0xf00006c0, 0x1970fa37, 0x200b0201, 0x06000a09, 0x48091809, 0x46386041, 0xe0199909, - 0x40026040, 0x00000872, 0x40023020, 0x40001000, 0x00434d30, 0xf0003034, 0xe0080034, 0x40023000, - 0x44ffffff, 0x6b65666b, 0x49ffffff, 0x4bffffff, 0x4300ffff, 0xf9faf000, 0x48f10401, 0x48f11809, - 0x980d6081, 0xfe2af7ff, 0x980d9000, 0x28006900, 0x4780d000, 0x28009800, 0x1be4d10d, 0x2c0019ed, - 0x08a9d1b5, 0x0089980f, 0x900f1808, 0x19769810, 0x90101b40, 0x2101d196, 0xf000980d, 0x9800f990, - 0xbdf0b011, 0xd0012800, 0xd1012a00, 0x47702004, 0x4614b570, 0x4adc0609, 0x4dda0a09, 0x60691889, - 0xfdfcf7ff, 0xd1032800, 0x602168a9, 0x606168e9, 0x2800bd70, 0x2900d00e, 0x48d2d00c, 0x07827880, - 0x2a020f92, 0x0980d008, 0xd0082802, 0x70082002, 0x47702000, 0x47702004, 0x70082000, 0x2001e7f8, - 0x2800e7f5, 0x2900d001, 0x2004d101, 0xb5704770, 0x23004dc4, 0x079278aa, 0x2a020f92, 0x4ac3d026, - 0x780c606a, 0x462278cb, 0x061b784c, 0x43220224, 0x0424788c, 0x431a4322, 0x0a12ba12, 0x021278cb, - 0x60aa431a, 0x79cb790c, 0x794c4622, 0x0224061b, 0x798c4322, 0x042479c9, 0x431a4322, 0x0a12ba12, - 0x430a0212, 0xf7ff60ea, 0x4603fda9, 0xbd704618, 0xd1012800, 0x47702004, 0x04094aad, 0xb5101889, - 0x60514aa8, 0xfd9af7ff, 0xb5ffbd10, 0x4614b08d, 0x460d461e, 0x980daa02, 0xfdc4f7ff, 0x9000a802, - 0x46294622, 0x980d9b09, 0xf91df000, 0xd12e2800, 0x98049d02, 0x42699000, 0x40014240, 0x42af424f, - 0x9800d101, 0x2c00183f, 0x0230d020, 0x1b7e9001, 0xd90042a6, 0x46304626, 0xf0009909, 0x022af937, - 0x0a122101, 0x18520609, 0x604a498e, 0x04009a01, 0x30ff4310, 0x980d6088, 0xfd60f7ff, 0xd1062800, - 0x1ba49800, 0x183f19ad, 0xd1e02c00, 0xb0112000, 0x2b00bdf0, 0x2004d101, 0xb5ff4770, 0x4616b08d, - 0x460c461d, 0x9f16aa02, 0xf7ff980d, 0xa802fd7b, 0x46329000, 0x9b0b4621, 0xf000980d, 0x2800f8d4, - 0x9c02d11d, 0xd01a2e00, 0x0638497a, 0x02211847, 0x0a092001, 0x18090640, 0x60414872, 0x68296087, - 0x980d60c1, 0xfd2af7ff, 0xd00a2800, 0x29009917, 0x600cd000, 0x29009918, 0x2200d001, 0xb011600a, - 0x990bbdf0, 0x08891a76, 0x194d0089, 0x190c990b, 0xd1dc2e00, 0xbdf0b011, 0xd1012800, 0x47702004, - 0x04094a65, 0xb5101889, 0x60514a5e, 0xfd06f7ff, 0x2800bd10, 0x2a00d001, 0x2004d101, 0xb5104770, - 0x290a4614, 0x000ad222, 0x7912447a, 0x44971892, 0x0d080604, 0x1513110f, 0x68c01917, 0x6840e013, - 0x7a01e011, 0xf0006840, 0xe00cf8b1, 0xe00a7a00, 0xe0086800, 0xe0062001, 0xe0046940, 0xe0026980, - 0xe0006a00, 0x60206a40, 0xbd102000, 0xbd10206a, 0x28002300, 0x2004d101, 0xb4104770, 0xd0232906, - 0x2905dc02, 0xe01fd80d, 0xd01d2909, 0x2907dc04, 0x2908d01a, 0xe017d105, 0x2920b2d4, 0x2921d005, - 0x236ad009, 0x4618bc10, 0x2a004770, 0x2a01d001, 0x7244d105, 0x2a00e7f6, 0x2a01d004, 0xbc10d002, - 0x47702077, 0xe7ed7284, 0xe7eb2376, 0xd00e2800, 0x680a482c, 0x680a61c2, 0x429a69c3, 0x684ad105, - 0x68496182, 0x42816980, 0x2069d003, 0x20044770, 0x20004770, 0x28004770, 0x2900d008, 0x4821d006, - 0x600a69c2, 0x60486980, 0x47702000, 0x47702004, 0x47702000, 0x70012100, 0x46087041, 0x29014770, - 0x481ed110, 0x491e6800, 0x42880a00, 0x481dd101, 0x481de000, 0x22016801, 0x60014311, 0x8f6ff3bf, - 0x8f4ff3bf, 0x28004770, 0x2004d101, 0xb4104770, 0x9c011e5b, 0xd1014219, 0xd002421a, 0x2065bc10, - 0x68e04770, 0xd8074288, 0x18896923, 0x428818c0, 0xbc10d302, 0x47702000, 0x2066bc10, 0x00004770, - 0x0000ffff, 0x40023000, 0x4100ffff, 0x45ffffff, 0x4000ffff, 0x00ffffff, 0x4a00ffff, 0x40001000, - 0x00434d30, 0xf0003034, 0xe0080034, 0x460bb530, 0x20004601, 0x24012220, 0x460de009, 0x429d40d5, - 0x461dd305, 0x1b494095, 0x40954625, 0x46151940, 0x2d001e52, 0xbd30dcf1, 0x430b4603, 0xd003079b, - 0xc908e009, 0xc0081f12, 0xd2fa2a04, 0x780be003, 0x1c407003, 0x1e521c49, 0x4770d2f9, 0x40023004, - 0x4002301c, 0x40023018, 0x00100008, 0x00200018, 0x00400030, 0x00800060, 0x010000c0, 0x02000180, - 0x04000300, 0x00000600, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x4605b570, 0x4616460c, 0xcc0fe002, 0x3e10c50f, 0xd2fa2e10, 0xd3022e08, 0xc503cc03, 0x2e043e08, + 0xcc01d307, 0x1f36c501, 0x7821e003, 0x1c647029, 0x1e761c6d, 0xbd70d2f9, 0x2007b510, 0x07404934, + 0x48346048, 0x21306802, 0x6002430a, 0x430a6842, 0x48316042, 0x28006840, 0x4830d01a, 0x4a306b41, + 0x63414311, 0x4b2f4830, 0x49306043, 0x4a306081, 0x48306002, 0x60816043, 0x492f6002, 0x44492000, + 0x46087248, 0xf85ef000, 0xd0002800, 0xbd102001, 0x6b41482a, 0xe7e3220a, 0x47702000, 0x4826b51c, + 0x44484927, 0xf8c7f000, 0xd1142800, 0x21004822, 0xf0004448, 0x2800fad4, 0x20ffd10d, 0x900043c0, + 0x90011200, 0x2302481c, 0x2180466a, 0xf0004448, 0x2800f9d0, 0x2001d000, 0x4601bd1c, 0xb5104816, + 0x4b172201, 0x44480312, 0xf901f000, 0xd0002800, 0xbd102001, 0x08cb1dc9, 0x480f4601, 0x00dbb510, + 0xf0004448, 0x2800f96e, 0x2001d000, 0x0000bd10, 0x4002b000, 0x40001400, 0x40001000, 0xf0003000, + 0x00000a0a, 0xd928c520, 0x4002a000, 0x0000ffff, 0x00002920, 0x41026000, 0x00000004, 0xe0080000, + 0x6b65666b, 0x2800b5f0, 0x7a47d021, 0x4efe49fd, 0x158b447e, 0x4afd148d, 0x68c92400, 0xd0182f01, + 0x290f0f09, 0x0049d02c, 0x02895a71, 0x60416004, 0x72012102, 0x7b1160c5, 0x6143408b, 0x61047b51, + 0x21096181, 0x624506c9, 0x20006201, 0x2004bdf0, 0x0109bdf0, 0x290f0f09, 0x0049d00f, 0x02895a71, + 0x21016041, 0x60010609, 0x72012101, 0x60c102c9, 0x408b7b91, 0x7bd16143, 0x2101e7e1, 0xe7ef0489, + 0x05092101, 0x2800e7d2, 0x6101d002, 0x47702000, 0x47702004, 0xd0012800, 0xe0002000, 0x49dc2003, + 0x0100680a, 0x600a4302, 0x8f6ff3bf, 0x8f4ff3bf, 0x4302684a, 0xf3bf604a, 0xf3bf8f6f, 0x47708f4f, + 0x2101b510, 0xfd20f000, 0x48d0bd10, 0x38202170, 0x21807001, 0x78017001, 0xd5fc0609, 0x06817800, + 0x2067d501, 0x06c14770, 0x2068d501, 0x07c04770, 0x2069d0fc, 0xb5704770, 0xd0150004, 0x48c54ac3, + 0x60503a20, 0xf0004608, 0x2800fd0a, 0x2100d10b, 0xf0004620, 0x4620fcf9, 0xffd7f7ff, 0x46204605, + 0xffcef7ff, 0xbd704628, 0xbd702004, 0x2800b510, 0x1e5bd006, 0xd1014219, 0xd003421a, 0xbd102065, + 0xbd102004, 0x428b6803, 0x6840d806, 0x18181889, 0xd3014288, 0xbd102000, 0xbd102066, 0x460eb570, + 0x46140005, 0x2c00d014, 0x2120d012, 0xf0004610, 0x6828fd0c, 0x60261a36, 0x606068e8, 0x68687a29, + 0xfd16f000, 0x7a6960a0, 0x29012008, 0xe005d002, 0xbd702004, 0x05c92101, 0x60211871, 0x61212110, + 0x616160e0, 0x200461a0, 0x200061e0, 0xb5ffbd70, 0x4616b089, 0x460d461c, 0x9809466a, 0xffcef7ff, + 0x46294632, 0x98099b04, 0xffb0f7ff, 0xd1302800, 0xf0004620, 0x0005fca4, 0x9c00d12b, 0x19a69f01, + 0x46391e76, 0xf0004630, 0x2900fce3, 0x1c40d002, 0x1e464378, 0x98092100, 0xfc86f000, 0x0221e013, + 0x0a092009, 0x18090600, 0x38204880, 0x98096041, 0xff5bf7ff, 0x98094605, 0x28006900, 0x4780d000, + 0xd1022d00, 0x42b419e4, 0x9809d9e9, 0xff48f7ff, 0xb00d4628, 0xb570bdf0, 0xd0150004, 0x48764a73, + 0x60503a20, 0xf0004608, 0x2800fc6a, 0x2100d10b, 0xf0004620, 0x4620fc59, 0xff37f7ff, 0x46204605, + 0xff2ef7ff, 0xbd704628, 0xbd702004, 0x0004b570, 0x4a66d015, 0x3a204869, 0x46086050, 0xfc4ff000, + 0xd10b2800, 0x46202100, 0xfc3ef000, 0xf7ff4620, 0x4605ff1c, 0xf7ff4620, 0x4628ff13, 0x2004bd70, + 0xb5ffbd70, 0x461eb089, 0x460d0014, 0x466ad011, 0xf7ff9809, 0x4632ff53, 0x9b034629, 0xf7ff9809, + 0x0007ff35, 0x2100d1b5, 0x98099d00, 0xfc1cf000, 0x2004e028, 0x484de7ad, 0x3820cc02, 0x99036081, + 0xd0022904, 0xd0072908, 0x0229e00e, 0x0a092203, 0x18890652, 0xe0076041, 0x60c1cc02, 0x22070229, + 0x06120a09, 0x60411889, 0xf7ff9809, 0x4607fede, 0x69009809, 0xd0002800, 0x2f004780, 0x9803d104, + 0x1a361945, 0xd1d62e00, 0xf7ff9809, 0x4638fec9, 0xb570e77f, 0xd0190004, 0xd0172a00, 0x49380608, + 0x18400a00, 0x39204931, 0x68106048, 0x68506088, 0x210060c8, 0xf0004620, 0x4620fbd7, 0xfeb5f7ff, + 0x46204605, 0xfeacf7ff, 0xbd704628, 0xbd702004, 0xb08bb5ff, 0x460c980d, 0xd0152800, 0x980b466a, + 0xfeecf7ff, 0x9b054621, 0x980b9a0e, 0xfecef7ff, 0x28009008, 0x9801d109, 0x9e009009, 0x980b2100, + 0xfbb2f000, 0xe05e980e, 0xb00f2004, 0x9909bdf0, 0x42494270, 0x42404008, 0x42b02400, 0x9909d101, + 0x990e1840, 0x42811989, 0x1b85d901, 0x9d0ee040, 0x2701e03e, 0x42bd02bf, 0x462fd800, 0x980d08a1, + 0x18090089, 0x463a2009, 0xf7ff06c0, 0x1930fd69, 0x210b0200, 0x06090a00, 0x48041841, 0x60413820, + 0xe00f4638, 0x40026040, 0x00000d1c, 0x40023020, 0x40001400, 0x44ffffff, 0x49ffffff, 0x4bffffff, + 0x4300ffff, 0xf0009905, 0x49fffbc3, 0x18410400, 0x608148fe, 0xf7ff980b, 0x9008fe48, 0x6900980b, + 0xd0002800, 0x98084780, 0xd10e2800, 0x19e41bed, 0xd1be2d00, 0x980d08a1, 0x18080089, 0x980e900d, + 0x1b001936, 0x2800900e, 0x980bd1a1, 0xfe28f7ff, 0xe79a9808, 0x4614b570, 0xd0102800, 0xd00e2c00, + 0x4aeb0609, 0x4de90a09, 0x60691889, 0xfe1df7ff, 0xd1032800, 0x602168a9, 0x606168e9, 0x2004bd70, + 0x2800bd70, 0x2900d00e, 0x48e0d00c, 0x07827880, 0x2a020f92, 0x0980d008, 0xd0072802, 0x70082002, + 0x47702000, 0x47702004, 0xe7f82000, 0xe7f62001, 0x460cb570, 0xd0200006, 0xd01e2c00, 0x20004dd3, + 0x078978a9, 0x29020f89, 0x48d2d016, 0x46206068, 0xfb4df000, 0x0a00ba00, 0x020078e1, 0x60a84308, + 0xf0001d20, 0xba00fb44, 0x79e10a00, 0x43080200, 0x463060e8, 0xfdd9f7ff, 0x2004bd70, 0xb510bd70, + 0xd0072800, 0x04094ac4, 0x4ac01889, 0xf7ff6051, 0xbd10fdcc, 0xbd102004, 0xb089b5ff, 0x460d4614, + 0x9809466a, 0xfe0af7ff, 0x46294622, 0x98099b05, 0xfdecf7ff, 0xd12f2800, 0x4629466a, 0xf7ff9809, + 0x9d00fdfd, 0x90089802, 0x42404269, 0x424f4001, 0xd10142af, 0x183f9808, 0xd01c2c00, 0x42a61b7e, + 0x4626d900, 0x99054630, 0xfb12f000, 0x22010229, 0x06120a09, 0x49a5188a, 0x9a0c604a, 0x02120400, + 0x30ff4310, 0x98096088, 0xfd8ff7ff, 0xd1032800, 0x19ad1ba4, 0x2000e7de, 0xb5ffe63b, 0x9f12b089, + 0x4616001d, 0xd010460c, 0x9809466a, 0xfdc6f7ff, 0x46214632, 0x98099b07, 0xfda8f7ff, 0xd1052800, + 0x06394a96, 0x9c00188f, 0x2004e021, 0x0221e621, 0x0a092001, 0x18090640, 0x6041488c, 0x68296087, + 0x980960c1, 0xfd61f7ff, 0xd0092800, 0x29009913, 0x600cd000, 0x29009914, 0x2200d0e8, 0xe608600a, + 0x1a769907, 0x00890889, 0x9907194d, 0x2e00190c, 0xe5fed1dd, 0x2800b510, 0x4a81d007, 0x18890409, + 0x60514a7a, 0xfd41f7ff, 0x2004bd10, 0xb5f0bd10, 0x001db0d5, 0x460c4616, 0xd0134607, 0xf7ff2308, + 0x2800fd65, 0x2f00d10f, 0x2040d00f, 0x90022100, 0x03002005, 0x90019100, 0xd1040008, 0x468c19a1, + 0xe00c2100, 0xb0552004, 0x2104bdf0, 0x9a01e7f4, 0x434a9b00, 0x008e189b, 0x5193aa03, 0x9a021c49, + 0xd2f4428a, 0x49612200, 0xe034ab44, 0xd2042a08, 0x40d67f0e, 0x0ff607f6, 0x4616e02b, 0x2e083e08, + 0x7f4fd201, 0x4616e022, 0x2e083e10, 0x7f8fd201, 0x4616e01c, 0x2e083e18, 0x7fcfd201, 0x2a28e016, + 0x7e0fd203, 0x3e204616, 0x2a30e010, 0x7e4fd203, 0x3e284616, 0x2a38e00a, 0x7e8fd203, 0x3e304616, + 0x2a40e004, 0x7ecfd20a, 0x3e384616, 0x07fe40f7, 0x549e0ff6, 0x9e021c52, 0xd8c74296, 0x460e2100, + 0xe012460a, 0xaf03008b, 0x42a758ff, 0xaf03d80c, 0x685b19db, 0xd90742a3, 0x5c5bab44, 0x2b001c76, + 0x1c52d100, 0x191c9b01, 0x45641c49, 0x2a00d3ea, 0x42b2d003, 0x2101d103, 0x2100e002, 0x2102e000, + 0xe7907029, 0xb085b5ff, 0x4617001e, 0xd025460c, 0x98052308, 0xfcdaf7ff, 0xd1202800, 0x28009805, + 0x2100d01f, 0x91019100, 0x68019102, 0x69419100, 0x69809101, 0x20009002, 0x28009003, 0x9801d10f, + 0x424019e7, 0x42794602, 0x40224008, 0x25001880, 0x99014240, 0xf9fcf000, 0xe02d9004, 0xb0092004, + 0x2004bdf0, 0x9800e7e8, 0x1a209901, 0xf9f0f000, 0x7a499905, 0xd0042901, 0xd2102820, 0x6b494913, + 0x2808e013, 0x4911d203, 0x79093140, 0x9902e00d, 0xd9134281, 0x3140490d, 0x38087949, 0x9902e005, + 0xd90b4281, 0x6b094909, 0x22013820, 0x438a4082, 0x1c6dd000, 0x19049801, 0xd3d442bc, 0xd0132d00, + 0x42859804, 0xe00dd212, 0x0000ffff, 0x40023000, 0x4100ffff, 0x45ffffff, 0x4000ffff, 0x00ffffff, + 0x4a00ffff, 0xe0022002, 0xe0002000, 0x70302001, 0xe7b49803, 0x4614b510, 0xd00a2800, 0xd0082c00, + 0xf000000b, 0x080afa52, 0x16140d0a, 0x1e1c1a18, 0x20042220, 0x68c0bd10, 0x6840e000, 0xe0046010, + 0x68407a01, 0xf994f000, 0x20006020, 0x7a00bd10, 0x6800e7f4, 0x2001e7f2, 0x6940e7f0, 0x6980e7ee, + 0x6a00e7ec, 0x6a40e7ea, 0x206ae7e8, 0x4603bd10, 0x2000b510, 0xd0052b00, 0xd0222906, 0x2905dc04, + 0xe01ed80f, 0xbd102004, 0xd01a2909, 0x2907dc04, 0x2908d017, 0xe014d105, 0x2920b2d4, 0x2921d003, + 0x206ad007, 0x2a00bd10, 0x2a01d001, 0x725cd105, 0x2a00bd10, 0x2a01d003, 0x2077d001, 0x729cbd10, + 0x2076bd10, 0xb570bd10, 0x2800461c, 0x2c00d005, 0x070bd003, 0x2065d003, 0x2004bd70, 0x6843bd70, + 0x428b085b, 0x2301d904, 0x1acb029b, 0xd8012b0f, 0xbd702075, 0xd00c2a01, 0xd00a2a02, 0xd0082a04, + 0xd0062a08, 0xd0042a10, 0x2b002304, 0x4618d003, 0x2300bd70, 0x0209e7f9, 0x0a092323, 0x4d73065b, + 0x606918c9, 0x4a720611, 0x60a91889, 0xfbadf7ff, 0x70217aa9, 0x70617a69, 0x70a17a29, 0xb5f0bd70, + 0x4616b087, 0x4605460c, 0x210322ff, 0xf0004668, 0x466bf8d5, 0x46212208, 0xf7ff4628, 0x2800ffb4, + 0x2e01d111, 0x4669d008, 0x000b7809, 0xf9adf000, 0x40151206, 0x580a4f49, 0x78004668, 0xd0042805, + 0xd0042800, 0xb0072074, 0x2000bdf0, 0x466be7fb, 0xe0382210, 0x2201466b, 0x2304e035, 0x21a1aa01, + 0xf7ff4628, 0x2800fd47, 0x9801d11d, 0xb2872304, 0x81874668, 0x21a2aa01, 0xf7ff4628, 0x2800fd3b, + 0x4669d111, 0x81c89801, 0xaa012304, 0x462821a3, 0xfd30f7ff, 0xd1062800, 0x9901466a, 0x013982d1, + 0xd000428c, 0x28002075, 0x466bd1cd, 0xe00a2202, 0x4b406868, 0x19010840, 0x46282210, 0xfbb7f7ff, + 0x466be005, 0x46212204, 0xf7ff4628, 0x2800ff5c, 0x4669d1b9, 0x29047809, 0x2e00d19b, 0xe7b2d199, + 0xe7b02004, 0xd00e2800, 0x680a4830, 0x680a61c2, 0x429a69c3, 0x684ad105, 0x68496182, 0x42816980, + 0x2069d003, 0x20044770, 0x20004770, 0x28004770, 0x2900d008, 0x4825d006, 0x600a69c2, 0x60486980, + 0x47702000, 0x47702004, 0x7804b510, 0x23204922, 0x2c012210, 0x680cd00a, 0x600c439c, 0x28007840, + 0xd00b6808, 0x60084310, 0xbd102000, 0x28007840, 0x6808d002, 0xe7f64318, 0xbd102078, 0xe7f24390, + 0x2100b510, 0x70417001, 0x68094913, 0x460c2320, 0x2210401c, 0x2c002301, 0x7003d001, 0x4211e001, + 0x7043d000, 0xbd102000, 0x2901b500, 0x2900d005, 0x2000d102, 0xfabef7ff, 0x2001bd00, 0x4905e7fa, + 0xd0014288, 0x4770206b, 0x47702000, 0x40023000, 0x00ffffff, 0x6b65666b, 0x40001400, 0xb510b2d2, + 0x189a0213, 0x189a0413, 0xf80ef000, 0xe001bd10, 0x1f09c004, 0xd2fb2904, 0xd501078b, 0x1c808002, + 0xd00007c9, 0x47707002, 0xd00b2900, 0xd00207c3, 0x1c407002, 0x29021e49, 0x0783d304, 0x8002d502, + 0x1e891c80, 0x2200e7e3, 0x2200e7ee, 0x7803e7df, 0x461978c2, 0x06127843, 0x4319021b, 0x78c07883, + 0x4319041b, 0x02094311, 0x06000a09, 0x47704308, 0x09032200, 0xd32c428b, 0x428b0a03, 0x2300d311, + 0xe04e469c, 0x430b4603, 0x2200d43c, 0x428b0843, 0x0903d331, 0xd31c428b, 0x428b0a03, 0x4694d301, + 0x09c3e03f, 0xd301428b, 0x1ac001cb, 0x09834152, 0xd301428b, 0x1ac0018b, 0x09434152, 0xd301428b, + 0x1ac0014b, 0x09034152, 0xd301428b, 0x1ac0010b, 0x08c34152, 0xd301428b, 0x1ac000cb, 0x08834152, + 0xd301428b, 0x1ac0008b, 0x08434152, 0xd301428b, 0x1ac0004b, 0x1a414152, 0x4601d200, 0x46104152, + 0xe05d4770, 0xd0000fca, 0x10034249, 0x4240d300, 0x22004053, 0x0903469c, 0xd32d428b, 0x428b0a03, + 0x22fcd312, 0xba120189, 0x428b0a03, 0x0189d30c, 0x428b1192, 0x0189d308, 0x428b1192, 0x0189d304, + 0x1192d03a, 0x0989e000, 0x428b09c3, 0x01cbd301, 0x41521ac0, 0x428b0983, 0x018bd301, 0x41521ac0, + 0x428b0943, 0x014bd301, 0x41521ac0, 0x428b0903, 0x010bd301, 0x41521ac0, 0x428b08c3, 0x00cbd301, + 0x41521ac0, 0x428b0883, 0x008bd301, 0x41521ac0, 0x0843d2d9, 0xd301428b, 0x1ac0004b, 0x1a414152, + 0x4601d200, 0x41524663, 0x4610105b, 0x4240d301, 0xd5002b00, 0x47704249, 0x105b4663, 0x4240d300, + 0x2000b501, 0x46c046c0, 0xb430bd02, 0x1e644674, 0x1c647825, 0xd20042ab, 0x5d63461d, 0x18e3005b, + 0x4718bc30, 0x40023004, 0x4002301c, 0x40023018, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000100, 0x00000400, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000 + 0x00000000, 0x00000000 }; +// Start address of flash +static const uint32_t flash_start = 0x00000000; +// Size of flash +static const uint32_t flash_size = 0x00100000; + /** -* List of start and size for each size of flash sector +* List of start and size for each size of flash sector - even indexes are start, odd are size * The size will apply to all sectors between the listed address and the next address * in the list. * The last pair in the list will have sectors starting at that address and ending -* at address start + size. +* at address flash_start + flash_size. */ static const sector_info_t sectors_info[] = { - {0x00000000, 0x00001000}, - }; + {0x00000000, 0x00001000}, {0x01000000, 0x00000800}, +}; static const program_target_t flash = { - 0x20000021, // Init - 0x20000083, // UnInit - 0x200000ad, // EraseChip - 0x200000bb, // EraseSector - 0x200000cd, // ProgramPage + 0x20000059, // Init + 0x200000b9, // UnInit + 0x200000bd, // EraseChip + 0x200000fb, // EraseSector + 0x20000115, // ProgramPage + 0x2000001f, // Verify + + // BKPT : start of blob + 1 + // RSB : blob start + header + rw data offset + // RSP : stack pointer + { + 0x20000001, + 0x20000eb0, + 0x20001100 + }, + + 0x20000000 + 0x00000A00, // mem buffer location + 0x20000000, // location to write prog_blob in target RAM + sizeof(P1024_4KB_SEC_flash_prog_blob), // prog_blob size + P1024_4KB_SEC_flash_prog_blob, // address of prog_blob + 0x00000200 // ram_to_flash_bytes_to_be_written +}; + +// Secondary Flash Blob +uint32_t K32W0x2_P256_2KB_SEC_flash_prog_blob[] = { + 0xE00ABE00, 0x062D780D, 0x24084068, 0xD3000040, 0x1E644058, 0x1C49D1FA, 0x2A001E52, 0x4770D1F2, + 0x4605b570, 0x4616460c, 0xcc0fe002, 0x3e10c50f, 0xd2fa2e10, 0xd3022e08, 0xc503cc03, 0x2e043e08, + 0xcc01d307, 0x1f36c501, 0x7821e003, 0x1c647029, 0x1e761c6d, 0xbd70d2f9, 0x2007b510, 0x07404934, + 0x48346048, 0x21306802, 0x6002430a, 0x430a6842, 0x48316042, 0x28006840, 0x4830d01a, 0x4a306b41, + 0x63414311, 0x4b2f4830, 0x49306043, 0x4a306081, 0x48306002, 0x60816043, 0x492f6002, 0x44492001, + 0x46087248, 0xf85ef000, 0xd0002800, 0xbd102001, 0x6b41482a, 0xe7e3220a, 0x47702000, 0x4826b51c, + 0x44484927, 0xf8c7f000, 0xd1142800, 0x21004822, 0xf0004448, 0x2800fad4, 0x20ffd10d, 0x900043c0, + 0x90011200, 0x2302481c, 0x2180466a, 0xf0004448, 0x2800f9d0, 0x2001d000, 0x4601bd1c, 0xb5104816, + 0x4b172201, 0x44480312, 0xf901f000, 0xd0002800, 0xbd102001, 0x08cb1dc9, 0x480f4601, 0x00dbb510, + 0xf0004448, 0x2800f96e, 0x2001d000, 0x0000bd10, 0x4002b000, 0x40001400, 0x40001000, 0xf0003000, + 0x00000a0a, 0xd928c520, 0x4002a000, 0x0000ffff, 0x00002920, 0x41026000, 0x00000004, 0xe0080000, + 0x6b65666b, 0x2800b5f0, 0x7a47d021, 0x4efe49fd, 0x158b447e, 0x4afd148d, 0x68c92400, 0xd0182f01, + 0x290f0f09, 0x0049d02c, 0x02895a71, 0x60416004, 0x72012102, 0x7b1160c5, 0x6143408b, 0x61047b51, + 0x21096181, 0x624506c9, 0x20006201, 0x2004bdf0, 0x0109bdf0, 0x290f0f09, 0x0049d00f, 0x02895a71, + 0x21016041, 0x60010609, 0x72012101, 0x60c102c9, 0x408b7b91, 0x7bd16143, 0x2101e7e1, 0xe7ef0489, + 0x05092101, 0x2800e7d2, 0x6101d002, 0x47702000, 0x47702004, 0xd0012800, 0xe0002000, 0x49dc2003, + 0x0100680a, 0x600a4302, 0x8f6ff3bf, 0x8f4ff3bf, 0x4302684a, 0xf3bf604a, 0xf3bf8f6f, 0x47708f4f, + 0x2101b510, 0xfc6ff000, 0x48d0bd10, 0x38202170, 0x21807001, 0x78017001, 0xd5fc0609, 0x06817800, + 0x2067d501, 0x06c14770, 0x2068d501, 0x07c04770, 0x2069d0fc, 0xb5704770, 0xd0150004, 0x48c54ac3, + 0x60503a20, 0xf0004608, 0x2800fc59, 0x2100d10b, 0xf0004620, 0x4620fc48, 0xffd7f7ff, 0x46204605, + 0xffcef7ff, 0xbd704628, 0xbd702004, 0x2800b510, 0x1e5bd006, 0xd1014219, 0xd003421a, 0xbd102065, + 0xbd102004, 0x428b6803, 0x6840d806, 0x18181889, 0xd3014288, 0xbd102000, 0xbd102066, 0x460eb570, + 0x46140005, 0x2c00d014, 0x2120d012, 0xf0004610, 0x6828fc51, 0x60261a36, 0x606068e8, 0x68687a29, + 0xfc5bf000, 0x7a6960a0, 0x29012008, 0xe005d002, 0xbd702004, 0x05c92101, 0x60211871, 0x61212110, + 0x616160e0, 0x200461a0, 0x200061e0, 0xb5ffbd70, 0x4616b089, 0x460d461c, 0x9809466a, 0xffcef7ff, + 0x46294632, 0x98099b04, 0xffb0f7ff, 0xd1302800, 0xf0004620, 0x0005fbf3, 0x9c00d12b, 0x19a69f01, + 0x46391e76, 0xf0004630, 0x2900fc28, 0x1c40d002, 0x1e464378, 0x98092100, 0xfbd5f000, 0x0221e013, + 0x0a092009, 0x18090600, 0x38204880, 0x98096041, 0xff5bf7ff, 0x98094605, 0x28006900, 0x4780d000, + 0xd1022d00, 0x42b419e4, 0x9809d9e9, 0xff48f7ff, 0xb00d4628, 0xb570bdf0, 0xd0150004, 0x48764a73, + 0x60503a20, 0xf0004608, 0x2800fbb9, 0x2100d10b, 0xf0004620, 0x4620fba8, 0xff37f7ff, 0x46204605, + 0xff2ef7ff, 0xbd704628, 0xbd702004, 0x0004b570, 0x4a66d015, 0x3a204869, 0x46086050, 0xfb9ef000, + 0xd10b2800, 0x46202100, 0xfb8df000, 0xf7ff4620, 0x4605ff1c, 0xf7ff4620, 0x4628ff13, 0x2004bd70, + 0xb5ffbd70, 0x461eb089, 0x460d0014, 0x466ad011, 0xf7ff9809, 0x4632ff53, 0x9b034629, 0xf7ff9809, + 0x0007ff35, 0x2100d1b5, 0x98099d00, 0xfb6bf000, 0x2004e028, 0x484de7ad, 0x3820cc02, 0x99036081, + 0xd0022904, 0xd0072908, 0x0229e00e, 0x0a092203, 0x18890652, 0xe0076041, 0x60c1cc02, 0x22070229, + 0x06120a09, 0x60411889, 0xf7ff9809, 0x4607fede, 0x69009809, 0xd0002800, 0x2f004780, 0x9803d104, + 0x1a361945, 0xd1d62e00, 0xf7ff9809, 0x4638fec9, 0xb570e77f, 0xd0190004, 0xd0172a00, 0x49380608, + 0x18400a00, 0x39204931, 0x68106048, 0x68506088, 0x210060c8, 0xf0004620, 0x4620fb26, 0xfeb5f7ff, + 0x46204605, 0xfeacf7ff, 0xbd704628, 0xbd702004, 0xb08bb5ff, 0x460c980d, 0xd0152800, 0x980b466a, + 0xfeecf7ff, 0x9b054621, 0x980b9a0e, 0xfecef7ff, 0x28009008, 0x9801d109, 0x9e009009, 0x980b2100, + 0xfb01f000, 0xe05e980e, 0xb00f2004, 0x9909bdf0, 0x42494270, 0x42404008, 0x42b02400, 0x9909d101, + 0x990e1840, 0x42811989, 0x1b85d901, 0x9d0ee040, 0x2701e03e, 0x42bd02bf, 0x462fd800, 0x980d08a1, + 0x18090089, 0x463a2009, 0xf7ff06c0, 0x1930fd69, 0x210b0200, 0x06090a00, 0x48041841, 0x60413820, + 0xe00f4638, 0x40026040, 0x00000ba8, 0x40023020, 0x40001400, 0x44ffffff, 0x49ffffff, 0x4bffffff, + 0x4300ffff, 0xf0009905, 0x49fffb08, 0x18410400, 0x608148fe, 0xf7ff980b, 0x9008fe48, 0x6900980b, + 0xd0002800, 0x98084780, 0xd10e2800, 0x19e41bed, 0xd1be2d00, 0x980d08a1, 0x18080089, 0x980e900d, + 0x1b001936, 0x2800900e, 0x980bd1a1, 0xfe28f7ff, 0xe79a9808, 0x4614b570, 0xd0102800, 0xd00e2c00, + 0x4aeb0609, 0x4de90a09, 0x60691889, 0xfe1df7ff, 0xd1032800, 0x602168a9, 0x606168e9, 0x2004bd70, + 0x2800bd70, 0x2900d00e, 0x48e0d00c, 0x07827880, 0x2a020f92, 0x0980d008, 0xd0072802, 0x70082002, + 0x47702000, 0x47702004, 0xe7f82000, 0xe7f62001, 0x460cb570, 0xd0200006, 0xd01e2c00, 0x20004dd3, + 0x078978a9, 0x29020f89, 0x48d2d016, 0x46206068, 0xfa92f000, 0x0a00ba00, 0x020078e1, 0x60a84308, + 0xf0001d20, 0xba00fa89, 0x79e10a00, 0x43080200, 0x463060e8, 0xfdd9f7ff, 0x2004bd70, 0xb510bd70, + 0xd0072800, 0x04094ac4, 0x4ac01889, 0xf7ff6051, 0xbd10fdcc, 0xbd102004, 0xb089b5ff, 0x460d4614, + 0x9809466a, 0xfe0af7ff, 0x46294622, 0x98099b05, 0xfdecf7ff, 0xd12f2800, 0x4629466a, 0xf7ff9809, + 0x9d00fdfd, 0x90089802, 0x42404269, 0x424f4001, 0xd10142af, 0x183f9808, 0xd01c2c00, 0x42a61b7e, + 0x4626d900, 0x99054630, 0xfa57f000, 0x22010229, 0x06120a09, 0x49a5188a, 0x9a0c604a, 0x02120400, + 0x30ff4310, 0x98096088, 0xfd8ff7ff, 0xd1032800, 0x19ad1ba4, 0x2000e7de, 0xb5ffe63b, 0x9f12b089, + 0x4616001d, 0xd010460c, 0x9809466a, 0xfdc6f7ff, 0x46214632, 0x98099b07, 0xfda8f7ff, 0xd1052800, + 0x06394a96, 0x9c00188f, 0x2004e021, 0x0221e621, 0x0a092001, 0x18090640, 0x6041488c, 0x68296087, + 0x980960c1, 0xfd61f7ff, 0xd0092800, 0x29009913, 0x600cd000, 0x29009914, 0x2200d0e8, 0xe608600a, + 0x1a769907, 0x00890889, 0x9907194d, 0x2e00190c, 0xe5fed1dd, 0x2800b510, 0x4a81d007, 0x18890409, + 0x60514a7a, 0xfd41f7ff, 0x2004bd10, 0xb5f0bd10, 0x001db0d5, 0x460c4616, 0xd0124607, 0xf7ff2308, + 0x2800fd65, 0x2f00d10e, 0x2100d00e, 0x90022040, 0x91000240, 0x00089001, 0x19a1d104, 0x2100468c, + 0x2004e00c, 0xbdf0b055, 0xe7f42104, 0x9b009a01, 0x189b434a, 0xaa03008e, 0x1c495193, 0x428a9a02, + 0x2200d2f4, 0xab444961, 0x2a08e034, 0x7f0ed204, 0x07f640d6, 0xe02b0ff6, 0x3e084616, 0xd2012e08, + 0xe0227f4f, 0x3e104616, 0xd2012e08, 0xe01c7f8f, 0x3e184616, 0xd2012e08, 0xe0167fcf, 0xd2032a28, + 0x46167e0f, 0xe0103e20, 0xd2032a30, 0x46167e4f, 0xe00a3e28, 0xd2032a38, 0x46167e8f, 0xe0043e30, + 0xd20a2a40, 0x46167ecf, 0x40f73e38, 0x0ff607fe, 0x1c52549e, 0x42969e02, 0x2100d8c7, 0x460a460e, + 0x008be012, 0x58ffaf03, 0xd80c42a7, 0x19dbaf03, 0x42a3685b, 0xab44d907, 0x1c765c5b, 0xd1002b00, + 0x9b011c52, 0x1c49191c, 0xd3ea4564, 0xd0032a00, 0xd10342b2, 0xe0022101, 0xe0002100, 0x70292102, + 0xb5ffe790, 0x001eb085, 0x460c4617, 0x2308d025, 0xf7ff9805, 0x2800fcdb, 0x9805d120, 0xd01f2800, + 0x91002100, 0x91029101, 0x91006801, 0x91016941, 0x90026980, 0x90032000, 0xd10f2800, 0x19e79801, + 0x46024240, 0x40084279, 0x18804022, 0x42402500, 0xf0009901, 0x9004f942, 0x2004e02d, 0xbdf0b009, + 0xe7e82004, 0x99019800, 0xf0001a20, 0x9905f936, 0x29017a49, 0x2820d004, 0x4914d210, 0xe0136b49, + 0xd2032808, 0x31404911, 0xe00d7909, 0x42819902, 0x490ed913, 0x79493140, 0xe0053808, 0x42819902, + 0x490ad90b, 0x38206b09, 0x40822201, 0xd000438a, 0x98011c6d, 0x42bc1904, 0x2d00d3d4, 0x9804d012, + 0xd2114285, 0xe0102002, 0x0000ffff, 0x40023000, 0x4100ffff, 0x45ffffff, 0x4000ffff, 0x00ffffff, + 0x4a00ffff, 0xe0002000, 0x70302001, 0xe7b59803, 0x4614b510, 0xd00a2800, 0xd0082c00, 0xf000000b, + 0x080af999, 0x16140d0a, 0x1e1c1a18, 0x20042220, 0x68c0bd10, 0x6840e000, 0xe0046010, 0x68407a01, + 0xf8dbf000, 0x20006020, 0x7a00bd10, 0x6800e7f4, 0x2001e7f2, 0x6940e7f0, 0x6980e7ee, 0x6a00e7ec, + 0x6a40e7ea, 0x206ae7e8, 0x4603bd10, 0x2000b510, 0xd0052b00, 0xd0222906, 0x2905dc04, 0xe01ed80f, + 0xbd102004, 0xd01a2909, 0x2907dc04, 0x2908d017, 0xe014d105, 0x2920b2d4, 0x2921d003, 0x206ad007, + 0x2a00bd10, 0x2a01d001, 0x725cd105, 0x2a00bd10, 0x2a01d003, 0x2077d001, 0x729cbd10, 0x2076bd10, + 0x2800bd10, 0x4831d00e, 0x61c2680a, 0x69c3680a, 0xd105429a, 0x6182684a, 0x69806849, 0xd0034281, + 0x47702069, 0x47702004, 0x47702000, 0xd0082800, 0xd0062900, 0x69c24825, 0x6980600a, 0x20006048, + 0x20044770, 0xb5104770, 0x49217804, 0x22102320, 0xd00a2c01, 0x439c680c, 0x7840600c, 0x68082800, + 0x4310d00b, 0x20006008, 0x7840bd10, 0xd0022800, 0x43186808, 0x2078e7f6, 0x4390bd10, 0xb510e7f2, + 0x70012100, 0x49127041, 0x23206809, 0x401c460c, 0x23012210, 0xd0012c00, 0xe0017003, 0xd0004211, + 0x20007043, 0xb500bd10, 0xd0052901, 0xd1022900, 0xf7ff2000, 0xbd00fb6f, 0xe7fa2001, 0x42884905, + 0x206bd001, 0x20004770, 0x00004770, 0x40023000, 0x40001400, 0x6b65666b, 0xc004e001, 0x29041f09, + 0x078bd2fb, 0x8002d501, 0x07c91c80, 0x7002d000, 0x29004770, 0x07c3d00b, 0x7002d002, 0x1e491c40, + 0xd3042902, 0xd5020783, 0x1c808002, 0xe7e31e89, 0xe7ee2200, 0xe7df2200, 0x78c27803, 0x78434619, + 0x021b0612, 0x78834319, 0x041b78c0, 0x43114319, 0x0a090209, 0x43080600, 0x22004770, 0x428b0903, + 0x0a03d32c, 0xd311428b, 0x469c2300, 0x4603e04e, 0xd43c430b, 0x08432200, 0xd331428b, 0x428b0903, + 0x0a03d31c, 0xd301428b, 0xe03f4694, 0x428b09c3, 0x01cbd301, 0x41521ac0, 0x428b0983, 0x018bd301, + 0x41521ac0, 0x428b0943, 0x014bd301, 0x41521ac0, 0x428b0903, 0x010bd301, 0x41521ac0, 0x428b08c3, + 0x00cbd301, 0x41521ac0, 0x428b0883, 0x008bd301, 0x41521ac0, 0x428b0843, 0x004bd301, 0x41521ac0, + 0xd2001a41, 0x41524601, 0x47704610, 0x0fcae05d, 0x4249d000, 0xd3001003, 0x40534240, 0x469c2200, + 0x428b0903, 0x0a03d32d, 0xd312428b, 0x018922fc, 0x0a03ba12, 0xd30c428b, 0x11920189, 0xd308428b, + 0x11920189, 0xd304428b, 0xd03a0189, 0xe0001192, 0x09c30989, 0xd301428b, 0x1ac001cb, 0x09834152, + 0xd301428b, 0x1ac0018b, 0x09434152, 0xd301428b, 0x1ac0014b, 0x09034152, 0xd301428b, 0x1ac0010b, + 0x08c34152, 0xd301428b, 0x1ac000cb, 0x08834152, 0xd301428b, 0x1ac0008b, 0xd2d94152, 0x428b0843, + 0x004bd301, 0x41521ac0, 0xd2001a41, 0x46634601, 0x105b4152, 0xd3014610, 0x2b004240, 0x4249d500, + 0x46634770, 0xd300105b, 0xb5014240, 0x46c02000, 0xbd0246c0, 0x4674b430, 0x78251e64, 0x42ab1c64, + 0x461dd200, 0x005b5d63, 0xbc3018e3, 0x00004718, 0x40023004, 0x4002301c, 0x40023018, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000100, 0x00000400, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 +}; + +// Start address of flash +static const uint32_t flash_m0p_start = 0x01000000; +// Size of flash +static const uint32_t flash_m0p_size = 0x00040000; + +static const program_target_t m0p_flash = { + 0x20000059, // Init + 0x200000b9, // UnInit + 0x200000bd, // EraseChip + 0x200000fb, // EraseSector + 0x20000115, // ProgramPage 0x0, // Verify // BKPT : start of blob + 1 @@ -122,13 +309,13 @@ static const program_target_t flash = { // RSP : stack pointer { 0x20000001, - 0x200009c8, - 0x20001400 + 0x20000d3c, + 0x20001000 }, - 0x20000000 + 0x00002000, // mem buffer location - 0x20000000, // location to write prog_blob in target RAM - sizeof(k32w042s1m2_flash_prog_blob), // prog_blob size - k32w042s1m2_flash_prog_blob, // address of prog_blob - 0x00000400 // ram_to_flash_bytes_to_be_written + 0x20000000 + 0x00000A00, // mem buffer location + 0x20000000, // location to write prog_blob in target RAM + sizeof(K32W0x2_P256_2KB_SEC_flash_prog_blob), // prog_blob size + K32W0x2_P256_2KB_SEC_flash_prog_blob, // address of prog_blob + 0x00000200 // ram_to_flash_bytes_to_be_written }; diff --git a/source/family/freescale/k32w042/target.c b/source/family/freescale/k32w042/target.c index 9fa8171487..00d418cb86 100644 --- a/source/family/freescale/k32w042/target.c +++ b/source/family/freescale/k32w042/target.c @@ -33,6 +33,10 @@ target_cfg_t target_device = { .flash_regions[0].end = KB(1024), .flash_regions[0].flags = kRegionIsDefault, .flash_regions[0].flash_algo = (program_target_t *) &flash, + .flash_regions[1].start = flash_m0p_start, + .flash_regions[1].end = flash_m0p_start + flash_m0p_size, + .flash_regions[1].flags = 0, + .flash_regions[1].flash_algo = (program_target_t *) &m0p_flash, .ram_regions[0].start = 0x20000000, // M4 DTCM .ram_regions[0].end = 0x20030000, }; From 52a4a7afc0ebe910e0bf898f954401dec144e77b Mon Sep 17 00:00:00 2001 From: Mathias Brossard Date: Tue, 25 Jul 2023 20:13:34 -0500 Subject: [PATCH 09/13] NXP: Fix board configuration for K32L3A6, K32W042 and KV58F Add missing DAPLink and CMSIS-DAP 2.1 metadata --- source/board/frdmk32l3a6.c | 4 +++- source/board/frdmk32w042.c | 2 ++ source/board/twrkv58f.c | 7 ++++++- source/family/freescale/k32l3a6/target.c | 5 ++++- source/family/freescale/kv58f/target.c | 9 ++++++--- 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/source/board/frdmk32l3a6.c b/source/board/frdmk32l3a6.c index ea4a3d7f85..67d96ce0f0 100644 --- a/source/board/frdmk32l3a6.c +++ b/source/board/frdmk32l3a6.c @@ -23,7 +23,7 @@ #include "target_family.h" const board_info_t g_board_info = { - .info_version = 0x0, + .info_version = kBoardInfoVersion, .board_id = "0237", .family_id = kNXP_KinetisK32_FamilyID, .flags = kEnablePageErase, @@ -31,4 +31,6 @@ const board_info_t g_board_info = { .daplink_drive_name = "K32L3A6", .daplink_target_url = "http://www.nxp.com/frdm-k32l3a6", .target_cfg = &target_device, + .board_vendor = "NXP", + .board_name = "FRDM-K32L3A6", }; diff --git a/source/board/frdmk32w042.c b/source/board/frdmk32w042.c index e30a30b301..e852d6918d 100644 --- a/source/board/frdmk32w042.c +++ b/source/board/frdmk32w042.c @@ -31,4 +31,6 @@ const board_info_t g_board_info = { .daplink_drive_name = "K32W042", .daplink_target_url = "http://www.nxp.com/frdm-k32w042", .target_cfg = &target_device, + .board_vendor = "NXP", + .board_name = "FRDM-K32W042", }; diff --git a/source/board/twrkv58f.c b/source/board/twrkv58f.c index 37cf227918..e5b71b1716 100644 --- a/source/board/twrkv58f.c +++ b/source/board/twrkv58f.c @@ -23,9 +23,14 @@ #include "target_family.h" const board_info_t g_board_info = { - .info_version = 0x0, + .info_version = kBoardInfoVersion, .board_id = "0330", .family_id = kNXP_KinetisV_FamilyID, .flags = kEnablePageErase, + .daplink_url_name = "PRODINFOHTM", + .daplink_drive_name = "KV58F220M", + .daplink_target_url = "http://www.nxp.com/twr-kv58f220m", .target_cfg = &target_device, + .board_vendor = "NXP", + .board_name = "TWR-KV58F220M", }; diff --git a/source/family/freescale/k32l3a6/target.c b/source/family/freescale/k32l3a6/target.c index 8458f0e70d..d12c2d3714 100644 --- a/source/family/freescale/k32l3a6/target.c +++ b/source/family/freescale/k32l3a6/target.c @@ -1,6 +1,6 @@ /** * @file target.c - * @brief Target information for the k32w042 + * @brief Target information for the k32l3a6 * * DAPLink Interface Firmware * Copyright (c) 2009-2019, ARM Limited, All Rights Reserved @@ -26,6 +26,7 @@ // target information target_cfg_t target_device = { + .version = kTargetConfigVersion, .sectors_info = sectors_info, .sector_info_length = (sizeof(sectors_info))/(sizeof(sector_info_t)), .flash_regions[0].start = 0, @@ -38,4 +39,6 @@ target_cfg_t target_device = { .flash_regions[1].flash_algo = (program_target_t *) &secondary_flash, .ram_regions[0].start = 0x20000000, // M4 DTCM .ram_regions[0].end = 0x20030000, + .target_vendor = "NXP", + .target_part_number = "K32L3A60VPJ1A", }; diff --git a/source/family/freescale/kv58f/target.c b/source/family/freescale/kv58f/target.c index 6306b62a56..ca0541185c 100644 --- a/source/family/freescale/kv58f/target.c +++ b/source/family/freescale/kv58f/target.c @@ -1,6 +1,6 @@ /** * @file target.c - * @brief Target information for the k64f + * @brief Target information for the KV58F * * DAPLink Interface Firmware * Copyright (c) 2017-2019, ARM Limited, All Rights Reserved @@ -26,12 +26,15 @@ // target information target_cfg_t target_device = { + .version = kTargetConfigVersion, .sectors_info = sectors_info, .sector_info_length = (sizeof(sectors_info))/(sizeof(sector_info_t)), .flash_regions[0].start = 0x10000000, .flash_regions[0].end = 0x10100000, .flash_regions[0].flags = kRegionIsDefault, - .flash_regions[0].flash_algo = (program_target_t *) &flash, + .flash_regions[0].flash_algo = (program_target_t *) &flash, .ram_regions[0].start = 0x20000000, - .ram_regions[0].end = 0x2000, + .ram_regions[0].end = 0x20002000, + .target_vendor = "NXP", + .target_part_number = "MKV58F1M0VLL24", }; From 2ba8cd175543cbc624dc4bd974b2d38b8cc21525 Mon Sep 17 00:00:00 2001 From: Mathias Brossard Date: Tue, 25 Jul 2023 20:17:51 -0500 Subject: [PATCH 10/13] NXP: Make Kinetis board configurations consistent --- source/board/frdmk20dx.c | 3 +++ source/board/frdmk22f.c | 3 +++ source/board/frdmk64f.c | 3 +++ source/board/frdmk82f.c | 4 ++-- source/board/frdmke15z.c | 4 ++-- source/board/frdmkl02z.c | 3 +++ source/board/frdmkl03z.c | 5 +++++ source/board/frdmkl05z.c | 3 +++ source/board/frdmkl25z.c | 3 +++ source/board/frdmkl26z.c | 3 +++ source/board/frdmkl27z.c | 4 ++-- source/board/frdmkl28z.c | 4 ++-- source/board/frdmkl43z.c | 4 ++-- source/board/frdmkl46z.c | 3 +++ source/board/frdmkl82z.c | 4 ++-- source/board/frdmkw24d.c | 4 ++-- source/board/frdmkw41z.c | 4 ++-- source/board/k20dx_bl.c | 4 ++-- source/board/kl26z_bl.c | 4 ++-- source/board/kl27z_bl.c | 4 ++-- source/board/kl27z_microbit_bl.c | 4 ++-- source/board/twrke18f.c | 4 ++-- source/board/twrkl28z72m.c | 4 ++-- 23 files changed, 57 insertions(+), 28 deletions(-) diff --git a/source/board/frdmk20dx.c b/source/board/frdmk20dx.c index a141ebc3e1..6828d1d052 100644 --- a/source/board/frdmk20dx.c +++ b/source/board/frdmk20dx.c @@ -26,6 +26,9 @@ const board_info_t g_board_info = { .info_version = kBoardInfoVersion, .board_id = "0230", .family_id = kNXP_KinetisK_FamilyID, + .daplink_url_name = "PRODINFOHTM", + .daplink_drive_name = "K20D50M", + .daplink_target_url = "http://www.nxp.com/frdm-k20d50m", .target_cfg = &target_device, .board_vendor = "NXP", .board_name = "FRDM-K20D50M", diff --git a/source/board/frdmk22f.c b/source/board/frdmk22f.c index 58365bd3d8..bc5588c076 100644 --- a/source/board/frdmk22f.c +++ b/source/board/frdmk22f.c @@ -26,6 +26,9 @@ const board_info_t g_board_info = { .info_version = kBoardInfoVersion, .board_id = "0231", .family_id = kNXP_KinetisK_FamilyID, + .daplink_url_name = "PRODINFOHTM", + .daplink_drive_name = "FRDM-K22FD", + .daplink_target_url = "http://www.nxp.com/frdm-k22f", .target_cfg = &target_device, .board_vendor = "NXP", .board_name = "FRDM-K22F", diff --git a/source/board/frdmk64f.c b/source/board/frdmk64f.c index 151e85e524..00ab18b628 100644 --- a/source/board/frdmk64f.c +++ b/source/board/frdmk64f.c @@ -28,6 +28,9 @@ const board_info_t g_board_info = { .family_id = kNXP_KinetisK_FamilyID, .flags = kEnablePageErase, .target_cfg = &target_device, + .daplink_url_name = "PRODINFOHTM", + .daplink_drive_name = "FRDM-K64FD", + .daplink_target_url = "http://www.nxp.com/frdm-k64f", .board_vendor = "NXP", .board_name = "FRDM-K64F", }; diff --git a/source/board/frdmk82f.c b/source/board/frdmk82f.c index a241600f90..dd44ab771d 100644 --- a/source/board/frdmk82f.c +++ b/source/board/frdmk82f.c @@ -26,8 +26,8 @@ const board_info_t g_board_info = { .info_version = kBoardInfoVersion, .board_id = "0217", .family_id = kNXP_KinetisK_FamilyID, - .daplink_url_name = "PRODINFOHTM", - .daplink_drive_name = "FRDM-K82FD", + .daplink_url_name = "PRODINFOHTM", + .daplink_drive_name = "FRDM-K82FD", .daplink_target_url = "http://www.nxp.com/frdm-k82f", .target_cfg = &target_device, .board_vendor = "NXP", diff --git a/source/board/frdmke15z.c b/source/board/frdmke15z.c index c0ef4e460f..704356e38c 100644 --- a/source/board/frdmke15z.c +++ b/source/board/frdmke15z.c @@ -26,8 +26,8 @@ const board_info_t g_board_info = { .info_version = kBoardInfoVersion, .board_id = "0213", .family_id = kNXP_KinetisL_FamilyID, - .daplink_url_name = "PRODINFOHTM", - .daplink_drive_name = "FRDM-KE15ZD", + .daplink_url_name = "PRODINFOHTM", + .daplink_drive_name = "FRDM-KE15ZD", .daplink_target_url = "http://www.nxp.com/frdm-ke15z", .target_cfg = &target_device, .board_vendor = "NXP", diff --git a/source/board/frdmkl02z.c b/source/board/frdmkl02z.c index 12fd5c293b..33a5dcdf9d 100644 --- a/source/board/frdmkl02z.c +++ b/source/board/frdmkl02z.c @@ -26,6 +26,9 @@ const board_info_t g_board_info = { .info_version = kBoardInfoVersion, .board_id = "0204", .family_id = kNXP_KinetisL_FamilyID, + .daplink_url_name = "PRODINFOHTM", + .daplink_drive_name = "FRDM-KL02ZD", + .daplink_target_url = "http://www.nxp.com/frdm-kl02z", .target_cfg = &target_device, .board_vendor = "NXP", .board_name = "FRDM-KL02Z", diff --git a/source/board/frdmkl03z.c b/source/board/frdmkl03z.c index 36e12fe365..9fd8d8c9a9 100644 --- a/source/board/frdmkl03z.c +++ b/source/board/frdmkl03z.c @@ -26,5 +26,10 @@ const board_info_t g_board_info = { .info_version = kBoardInfoVersion, .board_id = "0207", .family_id = kNXP_KinetisL_FamilyID, + .daplink_url_name = "PRODINFOHTM", + .daplink_drive_name = "FRDM-KL03ZD", + .daplink_target_url = "http://www.nxp.com/frdm-kl03z", .target_cfg = &target_device, + .board_vendor = "NXP", + .board_name = "FRDM-KL03Z", }; diff --git a/source/board/frdmkl05z.c b/source/board/frdmkl05z.c index 423697b037..8b77cdc9d7 100644 --- a/source/board/frdmkl05z.c +++ b/source/board/frdmkl05z.c @@ -26,6 +26,9 @@ const board_info_t g_board_info = { .info_version = kBoardInfoVersion, .board_id = "0210", .family_id = kNXP_KinetisL_FamilyID, + .daplink_url_name = "PRODINFOHTM", + .daplink_drive_name = "FRDM-KL05ZD", + .daplink_target_url = "http://www.nxp.com/frdm-kl05z", .target_cfg = &target_device, .board_vendor = "NXP", .board_name = "FRDM-KL05Z", diff --git a/source/board/frdmkl25z.c b/source/board/frdmkl25z.c index 45ae49ee8f..a84cbf1734 100644 --- a/source/board/frdmkl25z.c +++ b/source/board/frdmkl25z.c @@ -26,6 +26,9 @@ const board_info_t g_board_info = { .info_version = kBoardInfoVersion, .board_id = "0200", .family_id = kNXP_KinetisL_FamilyID, + .daplink_url_name = "PRODINFOHTM", + .daplink_drive_name = "FRDM-KL25ZD", + .daplink_target_url = "http://www.nxp.com/frdm-kl25z", .target_cfg = &target_device, .board_vendor = "NXP", .board_name = "FRDM-KL25Z", diff --git a/source/board/frdmkl26z.c b/source/board/frdmkl26z.c index 3f5144d296..3b40f08d12 100644 --- a/source/board/frdmkl26z.c +++ b/source/board/frdmkl26z.c @@ -26,6 +26,9 @@ const board_info_t g_board_info = { .info_version = kBoardInfoVersion, .board_id = "0260", .family_id = kNXP_KinetisL_FamilyID, + .daplink_url_name = "PRODINFOHTM", + .daplink_drive_name = "FRDM-KL26ZD", + .daplink_target_url = "http://www.nxp.com/frdm-kl26z", .target_cfg = &target_device, .board_vendor = "NXP", .board_name = "FRDM-KL26Z", diff --git a/source/board/frdmkl27z.c b/source/board/frdmkl27z.c index e7039f70eb..6996254bad 100644 --- a/source/board/frdmkl27z.c +++ b/source/board/frdmkl27z.c @@ -26,8 +26,8 @@ const board_info_t g_board_info = { .info_version = kBoardInfoVersion, .board_id = "0261", .family_id = kNXP_KinetisL_FamilyID, - .daplink_url_name = "PRODINFOHTM", - .daplink_drive_name = "FRDM-KL27ZD", + .daplink_url_name = "PRODINFOHTM", + .daplink_drive_name = "FRDM-KL27ZD", .daplink_target_url = "http://www.nxp.com/frdm-kl27z", .target_cfg = &target_device, .board_vendor = "NXP", diff --git a/source/board/frdmkl28z.c b/source/board/frdmkl28z.c index df79ac2d43..071d6bf508 100644 --- a/source/board/frdmkl28z.c +++ b/source/board/frdmkl28z.c @@ -26,8 +26,8 @@ const board_info_t g_board_info = { .info_version = kBoardInfoVersion, .board_id = "0205", .family_id = kNXP_KinetisL_FamilyID, - .daplink_url_name = "PRODINFOHTM", - .daplink_drive_name = "FRDM-KL28ZD", + .daplink_url_name = "PRODINFOHTM", + .daplink_drive_name = "FRDM-KL28ZD", .daplink_target_url = "http://www.nxp.com/frdm-kl28z", .target_cfg = &target_device, .board_vendor = "NXP", diff --git a/source/board/frdmkl43z.c b/source/board/frdmkl43z.c index ca9d3d7b4e..d45aabff98 100644 --- a/source/board/frdmkl43z.c +++ b/source/board/frdmkl43z.c @@ -26,8 +26,8 @@ const board_info_t g_board_info = { .info_version = kBoardInfoVersion, .board_id = "0262", .family_id = kNXP_KinetisL_FamilyID, - .daplink_url_name = "PRODINFOHTM", - .daplink_drive_name = "FRDM-KL43ZD", + .daplink_url_name = "PRODINFOHTM", + .daplink_drive_name = "FRDM-KL43ZD", .daplink_target_url = "http://www.nxp.com/frdm-kl43z", .target_cfg = &target_device, .board_vendor = "NXP", diff --git a/source/board/frdmkl46z.c b/source/board/frdmkl46z.c index fcbbbac37a..66f0eb6f69 100644 --- a/source/board/frdmkl46z.c +++ b/source/board/frdmkl46z.c @@ -26,6 +26,9 @@ const board_info_t g_board_info = { .info_version = kBoardInfoVersion, .board_id = "0220", .family_id = kNXP_KinetisL_FamilyID, + .daplink_url_name = "PRODINFOHTM", + .daplink_drive_name = "FRDM-KL46ZD", + .daplink_target_url = "http://www.nxp.com/frdm-kl46z", .target_cfg = &target_device, .board_vendor = "NXP", .board_name = "FRDM-KL46Z", diff --git a/source/board/frdmkl82z.c b/source/board/frdmkl82z.c index cfdef4f579..a57e38c4af 100644 --- a/source/board/frdmkl82z.c +++ b/source/board/frdmkl82z.c @@ -26,8 +26,8 @@ const board_info_t g_board_info = { .info_version = kBoardInfoVersion, .board_id = "0218", .family_id = kNXP_KinetisL_FamilyID, - .daplink_url_name = "PRODINFOHTM", - .daplink_drive_name = "FRDM-KL82Z", + .daplink_url_name = "PRODINFOHTM", + .daplink_drive_name = "FRDM-KL82Z", .daplink_target_url = "http://www.nxp.com/frdm-kl82z", .target_cfg = &target_device, .board_vendor = "NXP", diff --git a/source/board/frdmkw24d.c b/source/board/frdmkw24d.c index 3f4fb24766..c0c3308343 100644 --- a/source/board/frdmkw24d.c +++ b/source/board/frdmkw24d.c @@ -26,8 +26,8 @@ const board_info_t g_board_info = { .info_version = kBoardInfoVersion, .board_id = "0250", .family_id = kNXP_KinetisK_FamilyID, - .daplink_url_name = "PRODINFOHTM", - .daplink_drive_name = "FRDM-KW24D", + .daplink_url_name = "PRODINFOHTM", + .daplink_drive_name = "FRDM-KW24D", .daplink_target_url = "http://www.nxp.com/frdm-kw24d", .target_cfg = &target_device, .board_vendor = "NXP", diff --git a/source/board/frdmkw41z.c b/source/board/frdmkw41z.c index 8321e66076..a9859e3420 100644 --- a/source/board/frdmkw41z.c +++ b/source/board/frdmkw41z.c @@ -26,8 +26,8 @@ const board_info_t g_board_info = { .info_version = kBoardInfoVersion, .board_id = "0201", .family_id = kNXP_KinetisL_FamilyID, - .daplink_url_name = "PRODINFOHTM", - .daplink_drive_name = "FRDM-KW41Z", + .daplink_url_name = "PRODINFOHTM", + .daplink_drive_name = "FRDM-KW41Z", .daplink_target_url = "http://www.nxp.com/frdm-kw41z", .target_cfg = &target_device, .board_vendor = "NXP", diff --git a/source/board/k20dx_bl.c b/source/board/k20dx_bl.c index e1be158b3a..d4f92ce474 100644 --- a/source/board/k20dx_bl.c +++ b/source/board/k20dx_bl.c @@ -59,8 +59,8 @@ const target_family_descriptor_t *g_target_family = NULL; const board_info_t g_board_info = { .info_version = kBoardInfoVersion, .board_id = "0000", - .daplink_url_name = "HELP_FAQHTM", - .daplink_drive_name = "MAINTENANCE", + .daplink_url_name = "HELP_FAQHTM", + .daplink_drive_name = "MAINTENANCE", .daplink_target_url = "https://daplink.io", .target_cfg = &target_device, }; diff --git a/source/board/kl26z_bl.c b/source/board/kl26z_bl.c index 12b9f0b42a..d5bbdeebdd 100644 --- a/source/board/kl26z_bl.c +++ b/source/board/kl26z_bl.c @@ -58,8 +58,8 @@ const target_family_descriptor_t *g_target_family = NULL; const board_info_t g_board_info = { .info_version = kBoardInfoVersion, .board_id = "0000", - .daplink_url_name = "HELP_FAQHTM", - .daplink_drive_name = "MAINTENANCE", + .daplink_url_name = "HELP_FAQHTM", + .daplink_drive_name = "MAINTENANCE", .daplink_target_url = "https://daplink.io", .target_cfg = &target_device, }; diff --git a/source/board/kl27z_bl.c b/source/board/kl27z_bl.c index 882a1a81f4..29f2522e54 100644 --- a/source/board/kl27z_bl.c +++ b/source/board/kl27z_bl.c @@ -58,8 +58,8 @@ const target_family_descriptor_t *g_target_family = NULL; const board_info_t g_board_info = { .info_version = kBoardInfoVersion, .board_id = "0000", - .daplink_url_name = "HELP_FAQHTM", - .daplink_drive_name = "MAINTENANCE", + .daplink_url_name = "HELP_FAQHTM", + .daplink_drive_name = "MAINTENANCE", .daplink_target_url = "https://daplink.io", .target_cfg = &target_device, }; diff --git a/source/board/kl27z_microbit_bl.c b/source/board/kl27z_microbit_bl.c index 75bf4c0032..15e36eb0cc 100644 --- a/source/board/kl27z_microbit_bl.c +++ b/source/board/kl27z_microbit_bl.c @@ -61,8 +61,8 @@ const target_family_descriptor_t *g_target_family = NULL; const board_info_t g_board_info = { .info_version = kBoardInfoVersion, .board_id = BOARD_ID_MB_2_DEFAULT, - .daplink_url_name = "HELP_FAQHTM", - .daplink_drive_name = "MAINTENANCE", + .daplink_url_name = "HELP_FAQHTM", + .daplink_drive_name = "MAINTENANCE", .daplink_target_url = "https://microbit.org/device/?id=@B&v=@V&bl=1", .target_cfg = &target_device, }; diff --git a/source/board/twrke18f.c b/source/board/twrke18f.c index 963437b3f3..d65a76bdb8 100644 --- a/source/board/twrke18f.c +++ b/source/board/twrke18f.c @@ -26,8 +26,8 @@ const board_info_t g_board_info = { .info_version = kBoardInfoVersion, .board_id = "0206", .family_id = kNXP_KinetisK_FamilyID, - .daplink_url_name = "PRODINFOHTM", - .daplink_drive_name = "TWR-KE18FD", + .daplink_url_name = "PRODINFOHTM", + .daplink_drive_name = "TWR-KE18FD", .daplink_target_url = "http://www.nxp.com/twr-ke18f", .target_cfg = &target_device, .board_vendor = "NXP", diff --git a/source/board/twrkl28z72m.c b/source/board/twrkl28z72m.c index 7728124e66..a9ff5b338b 100644 --- a/source/board/twrkl28z72m.c +++ b/source/board/twrkl28z72m.c @@ -26,8 +26,8 @@ const board_info_t g_board_info = { .info_version = kBoardInfoVersion, .board_id = "0203", .family_id = kNXP_KinetisL_FamilyID, - .daplink_url_name = "PRODINFOHTM", - .daplink_drive_name = "TWR-KL28ZD", + .daplink_url_name = "PRODINFOHTM", + .daplink_drive_name = "TWR-KL28ZD", .daplink_target_url = "http://www.nxp.com/twr-kl28z72m", .target_cfg = &target_device, .board_vendor = "NXP", From 6bf7990759f10d052f3b337b07273bee94f93716 Mon Sep 17 00:00:00 2001 From: Mathias Brossard Date: Tue, 25 Jul 2023 21:16:18 -0500 Subject: [PATCH 11/13] NXP: Add missing info.py entries for FRDM-K32L3A6 and TWR-KV58F --- test/info.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/info.py b/test/info.py index e9b9f33957..8b93fa61d1 100644 --- a/test/info.py +++ b/test/info.py @@ -52,6 +52,7 @@ ("k20dx_frdmkl27z_if", True, 0x8000, "bin" ), ("k20dx_frdmkl28z_if", True, 0x8000, "bin" ), ("k20dx_twrkl28z72m_if", True, 0x8000, "bin" ), + ("k20dx_twrkv58f220m_if", False, 0x8000, "bin" ), ("k20dx_frdmkl43z_if", True, 0x8000, "bin" ), ("k20dx_frdmkl46z_if", True, 0x8000, "bin" ), ("k20dx_frdmkl82z_if", True, 0x5000, "bin" ), @@ -65,6 +66,7 @@ ('k20dx_ep_agora_if', True, 0x0000, "bin" ), ('k20dx_ep_kairos_if', True, 0x0000, "bin" ), ("k26f_frdmk32w042_if", False, 0x8000, "bin" ), + ("k26f_frdmk32l3a6_if", False, 0x8000, "bin" ), ("lpc11u35_archble_if", False, 0x0000, "bin" ), ("lpc11u35_archpro_if", False, 0x0000, "bin" ), ("lpc11u35_archmax_if", False, 0x0000, "bin" ), @@ -160,6 +162,7 @@ def VENDOR_TO_FAMILY(x, y) : return (VENDOR_ID[x] <<8) | y ( 0x0230, VENDOR_TO_FAMILY('NXP', 1), 'k20dx_frdmk20dx_if', 'k20dx_bl', 'FRDM-K20D50M' ), ( 0x0231, VENDOR_TO_FAMILY('NXP', 1), 'k20dx_frdmk22f_if', 'k20dx_bl', 'FRDM-K22F' ), ( 0x0236, VENDOR_TO_FAMILY('NXP', 0), 'lpc4322_lpc55s69xpresso_if', 'lpc4322_bl', 'LPCXpresso55S69' ), + ( 0x0237, VENDOR_TO_FAMILY('NXP', 5), 'k26f_frdmk32l3a6_if', 'k26f_bl', None ), # TODO - set target to 'FRDM-K32L3A6' when mbed-os supports this ( 0x0240, VENDOR_TO_FAMILY('NXP', 1), 'k20dx_frdmk64f_if', 'k20dx_bl', 'FRDM-K64F' ), ( 0x0244, VENDOR_TO_FAMILY('NXP', 3), 'lpc4322_mimxrt1170_evk_qspi_if', 'lpc4322_bl', 'MIMXRT1170' ), ( 0x0250, VENDOR_TO_FAMILY('NXP', 1), 'k20dx_frdmkw24d_if', 'k20dx_bl', 'FRDM-KW24D512' ), @@ -167,6 +170,7 @@ def VENDOR_TO_FAMILY(x, y) : return (VENDOR_ID[x] <<8) | y ( 0x0261, VENDOR_TO_FAMILY('NXP', 2), 'k20dx_frdmkl27z_if', 'k20dx_bl', 'FRDM-KL27Z' ), ( 0x0262, VENDOR_TO_FAMILY('NXP', 2), 'k20dx_frdmkl43z_if', 'k20dx_bl', 'FRDM-KL43Z' ), ( 0x0311, VENDOR_TO_FAMILY('NXP', 1), 'k20dx_frdmk66f_if', 'k20dx_bl', 'FRDM-K66F' ), + ( 0x0330, VENDOR_TO_FAMILY('NXP', 7), 'k20dx_twrkv58f220m_if', 'k20dx_bl', None ), ( 0x0350, VENDOR_TO_FAMILY('Stub', 1), 'k20dx_xdot_l151_if', 'k20dx_bl', None ), # TODO - set target to 'MTS-xDot-L151CC' when mbed-os supports this ( 0x0360, VENDOR_TO_FAMILY('NXP', 1), 'lpc4322_hani_iot_if', 'lpc4322_bl', 'HANI-IOT' ), ( 0x0409, VENDOR_TO_FAMILY('Stub', 1), 'max32625_max32630fthr_if', 'max32625_bl', 'MAX32630' ), From 1455b60ae90639a43cdd4e41bf11e2e1aab5cf98 Mon Sep 17 00:00:00 2001 From: Mathias Brossard Date: Tue, 25 Jul 2023 21:16:38 -0500 Subject: [PATCH 12/13] NXP: Clean-up info.py --- test/info.py | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/test/info.py b/test/info.py index 8b93fa61d1..735af375cf 100644 --- a/test/info.py +++ b/test/info.py @@ -153,16 +153,16 @@ def VENDOR_TO_FAMILY(x, y) : return (VENDOR_ID[x] <<8) | y ( 0x0217, VENDOR_TO_FAMILY('NXP', 1), 'k20dx_frdmk82f_if', 'k20dx_bl', 'FRDM-K82F' ), ( 0x0218, VENDOR_TO_FAMILY('NXP', 2), 'k20dx_frdmkl82z_if', 'k20dx_bl', 'FRDM-KL82Z' ), ( 0x0220, VENDOR_TO_FAMILY('NXP', 2), 'k20dx_frdmkl46z_if', 'k20dx_bl', 'FRDM-KL46Z' ), - ( 0x0224, VENDOR_TO_FAMILY('NXP', 1), 'k20dx_frdmk28f_if', 'k20dx_bl', None ), # TODO - set target to 'FRDM-K28F' when mbed-os supports this - ( 0x0225, VENDOR_TO_FAMILY('NXP', 1), 'k26f_frdmk32w042_if', 'k26f_bl', None ), # TODO - set target to 'FRDM-K32W042' when mbed-os supports this + ( 0x0224, VENDOR_TO_FAMILY('NXP', 1), 'k20dx_frdmk28f_if', 'k20dx_bl', None ), # TODO - set target to 'FRDM-K28F' + ( 0x0225, VENDOR_TO_FAMILY('NXP', 5), 'k26f_frdmk32w042_if', 'k26f_bl', None ), # TODO - set target to 'FRDM-K32W042' ( 0x0226, VENDOR_TO_FAMILY('NXP', 3), 'k20dx_mimxrt1020_evk_qspi_if', 'k20dx_bl', 'MIMXRT1020' ), ( 0x0227, VENDOR_TO_FAMILY('NXP', 3), 'k20dx_mimxrt1050_evk_hyper_if', 'k20dx_bl', 'MIMXRT1050' ), - ( 0x0228, VENDOR_TO_FAMILY('NXP', 4), 'k20dx_rapid_iot_if', 'k20dx_bl', None ), # TODO - set target to 'Rapid-IoT' when mbed-os supports this + ( 0x0228, VENDOR_TO_FAMILY('NXP', 4), 'k20dx_rapid_iot_if', 'k20dx_bl', None ), # TODO - set target to 'Rapid-IoT' ( 0x0229, VENDOR_TO_FAMILY('NXP', 3), 'lpc4322_mimxrt1060_evk_qspi_if', 'lpc4322_bl', 'MIMXRT1060' ), ( 0x0230, VENDOR_TO_FAMILY('NXP', 1), 'k20dx_frdmk20dx_if', 'k20dx_bl', 'FRDM-K20D50M' ), ( 0x0231, VENDOR_TO_FAMILY('NXP', 1), 'k20dx_frdmk22f_if', 'k20dx_bl', 'FRDM-K22F' ), - ( 0x0236, VENDOR_TO_FAMILY('NXP', 0), 'lpc4322_lpc55s69xpresso_if', 'lpc4322_bl', 'LPCXpresso55S69' ), - ( 0x0237, VENDOR_TO_FAMILY('NXP', 5), 'k26f_frdmk32l3a6_if', 'k26f_bl', None ), # TODO - set target to 'FRDM-K32L3A6' when mbed-os supports this + ( 0x0236, VENDOR_TO_FAMILY('NXP', 6), 'lpc4322_lpc55s69xpresso_if', 'lpc4322_bl', 'LPCXpresso55S69' ), + ( 0x0237, VENDOR_TO_FAMILY('NXP', 5), 'k26f_frdmk32l3a6_if', 'k26f_bl', None ), # TODO - set target to 'FRDM-K32L3A6' ( 0x0240, VENDOR_TO_FAMILY('NXP', 1), 'k20dx_frdmk64f_if', 'k20dx_bl', 'FRDM-K64F' ), ( 0x0244, VENDOR_TO_FAMILY('NXP', 3), 'lpc4322_mimxrt1170_evk_qspi_if', 'lpc4322_bl', 'MIMXRT1170' ), ( 0x0250, VENDOR_TO_FAMILY('NXP', 1), 'k20dx_frdmkw24d_if', 'k20dx_bl', 'FRDM-KW24D512' ), @@ -171,8 +171,8 @@ def VENDOR_TO_FAMILY(x, y) : return (VENDOR_ID[x] <<8) | y ( 0x0262, VENDOR_TO_FAMILY('NXP', 2), 'k20dx_frdmkl43z_if', 'k20dx_bl', 'FRDM-KL43Z' ), ( 0x0311, VENDOR_TO_FAMILY('NXP', 1), 'k20dx_frdmk66f_if', 'k20dx_bl', 'FRDM-K66F' ), ( 0x0330, VENDOR_TO_FAMILY('NXP', 7), 'k20dx_twrkv58f220m_if', 'k20dx_bl', None ), - ( 0x0350, VENDOR_TO_FAMILY('Stub', 1), 'k20dx_xdot_l151_if', 'k20dx_bl', None ), # TODO - set target to 'MTS-xDot-L151CC' when mbed-os supports this - ( 0x0360, VENDOR_TO_FAMILY('NXP', 1), 'lpc4322_hani_iot_if', 'lpc4322_bl', 'HANI-IOT' ), + ( 0x0350, VENDOR_TO_FAMILY('Stub', 1), 'k20dx_xdot_l151_if', 'k20dx_bl', None ), # TODO - set target to 'MTS-xDot-L151CC' + ( 0x0360, VENDOR_TO_FAMILY('NXP', 6), 'lpc4322_hani_iot_if', 'lpc4322_bl', 'HANI-IOT' ), ( 0x0409, VENDOR_TO_FAMILY('Stub', 1), 'max32625_max32630fthr_if', 'max32625_bl', 'MAX32630' ), ( 0x0415, VENDOR_TO_FAMILY('Stub', 1), 'max32620_max32625mbed_if', 'max32620_bl', 'MAX32625' ), ( 0x0418, VENDOR_TO_FAMILY('Stub', 1), 'max32625_max32620fthr_if', 'max32625_bl', 'MAX32620' ), @@ -194,7 +194,7 @@ def VENDOR_TO_FAMILY(x, y) : return (VENDOR_ID[x] <<8) | y ( 0x1017, VENDOR_TO_FAMILY('Nordic', 1), 'lpc11u35_hrm1017_if', None, 'mbed-HRM1017' ), ( 0x1018, VENDOR_TO_FAMILY('Stub', 1), 'lpc11u35_ssci824_if', None, 'Switch-Science-mbed-LPC824' ), ( 0x1019, VENDOR_TO_FAMILY('Nordic', 1), 'lpc11u35_sscity_if', None, 'Switch-Science-mbed-TY51822r3' ), - ( 0x1021, VENDOR_TO_FAMILY('Nordic', 1), 'lpc11u35_ssci_chibi_if', None, None ), # TODO - set target to 'SSCI-MBIT' when mbed-os supports this + ( 0x1021, VENDOR_TO_FAMILY('Nordic', 1), 'lpc11u35_ssci_chibi_if', None, None ), # TODO - set target to 'SSCI-MBIT' ( 0x1028, VENDOR_TO_FAMILY('Nordic', 2), 'lpc11u35_pitaya_link_if', None, None ), ( 0x1050, VENDOR_TO_FAMILY('Stub', 1), 'lpc11u35_lpc812xpresso_if', None, 'NXP-LPC800-MAX' ), ( 0x1054, VENDOR_TO_FAMILY('Stub', 1), 'lpc4322_lpc54114xpresso_if', 'lpc4322_bl', 'LPCXpresso54114' ), @@ -221,18 +221,18 @@ def VENDOR_TO_FAMILY(x, y) : return (VENDOR_ID[x] <<8) | y ( 0x5006, VENDOR_TO_FAMILY('Stub', 1), 'lpc11u35_musca_a_if', None, 'ARM_MUSCA_A1' ), ( 0x5007, VENDOR_TO_FAMILY('Stub', 1), 'lpc11u35_musca_b_if', None, 'ARM_MUSCA_B1' ), ( 0x5007, VENDOR_TO_FAMILY('Stub', 1), 'lpc11u35_musca_b_eflash_if', None, 'ARM_MUSCA_B1' ), - ( 0x5500, VENDOR_TO_FAMILY('Renesas', 1), 'lpc11u35_gr_peach_if', None, None ), # TODO - Set to 'Renesas-GR-PEACH' once this target builds - ( 0x5501, VENDOR_TO_FAMILY('Renesas', 1), 'lpc11u35_gr_lychee_if', None, None ), # TODO - Set to 'Renesas-GR-LYCHEE' once this target builds - ( 0x6660, VENDOR_TO_FAMILY('Stub', 1), 'lpc11u35_nz32_sc151_if', None, None ), # TODO - set target to 'NZ32-SC151' when mbed-os supports this - ( 0x7010, VENDOR_TO_FAMILY('Toshiba', 1), 'lpc11u35_blueninja_if', None, None ), # TODO - set target to 'BlueNinja-CDP-TZ01B' when mbed-os supports this - ( 0x8080, VENDOR_TO_FAMILY('Stub', 1), 'lpc11u35_ff1705_l151_if', None, None ), # TODO - set target to 'L-TEK-FF1705' when mbed-os supports this - ( 0x8081, VENDOR_TO_FAMILY('Stub', 1), 'lpc11u35_ff_lpc546xx_if', None, None ), # TODO - set target to 'L-TEK-FF-LPC546XX' when mbed-os supports this + ( 0x5500, VENDOR_TO_FAMILY('Renesas', 1), 'lpc11u35_gr_peach_if', None, None ), # TODO - set target to 'Renesas-GR-PEACH' + ( 0x5501, VENDOR_TO_FAMILY('Renesas', 1), 'lpc11u35_gr_lychee_if', None, None ), # TODO - set target to 'Renesas-GR-LYCHEE' + ( 0x6660, VENDOR_TO_FAMILY('Stub', 1), 'lpc11u35_nz32_sc151_if', None, None ), # TODO - set target to 'NZ32-SC151' + ( 0x7010, VENDOR_TO_FAMILY('Toshiba', 1), 'lpc11u35_blueninja_if', None, None ), # TODO - set target to 'BlueNinja-CDP-TZ01B' + ( 0x8080, VENDOR_TO_FAMILY('Stub', 1), 'lpc11u35_ff1705_l151_if', None, None ), # TODO - set target to 'L-TEK-FF1705' + ( 0x8081, VENDOR_TO_FAMILY('Stub', 1), 'lpc11u35_ff_lpc546xx_if', None, None ), # TODO - set target to 'L-TEK-FF-LPC546XX' ( 0x9004, VENDOR_TO_FAMILY('Stub', 1), 'lpc11u35_archpro_if', None, 'Seeeduino-Arch-Pro' ), ( 0x9009, VENDOR_TO_FAMILY('Nordic', 1), 'lpc11u35_archble_if', None, 'Seeed-Arch-BLE' ), ( 0x9011, VENDOR_TO_FAMILY('Stub', 1), 'lpc11u35_archmax_if', None, 'Seeed-Arch-Max' ), ( 0x9012, VENDOR_TO_FAMILY('Nordic', 1), 'lpc11u35_tiny_if', None, 'Seeed-Tiny-BLE' ), ( 0x9013, VENDOR_TO_FAMILY('Nordic', 1), 'lpc11u35_archlink_if', None, 'Seeed-Arch-Link' ), - ( 0x9016, VENDOR_TO_FAMILY('Nordic', 2), 'lpc11u35_96b_nitrogen_if', None, None ), # TODO - set target to 'Seeed-96Boards-Nitrogen' when mbed-os supports this + ( 0x9016, VENDOR_TO_FAMILY('Nordic', 2), 'lpc11u35_96b_nitrogen_if', None, None ), # TODO - set target to 'Seeed-96Boards-Nitrogen' ( 0x9900, VENDOR_TO_FAMILY('Nordic', 1), 'kl26z_microbit_if', 'kl26z_bl', 'Microbit' ), ( 0x9901, VENDOR_TO_FAMILY('Nordic', 1), 'kl26z_microbit_if', 'kl26z_bl', 'Microbit' ), ( 0x9903, VENDOR_TO_FAMILY('Nordic', 2), 'kl27z_microbit_if', 'kl27z_bl', 'Microbitv2' ), @@ -352,7 +352,8 @@ def VENDOR_TO_FAMILY(x, y) : return (VENDOR_ID[x] <<8) | y 'SSCI-MBIT', 'BlueNinja', 'U-BLOX-EVK-NINA-B1', - 'REALTEK-RTL8195AM'] + 'REALTEK-RTL8195AM' +] BOARD_ID_TO_BUILD_TARGET = {config[0]: config[4] for config in SUPPORTED_CONFIGURATIONS} From f2d0507cddedd071a39f5f60e0b478cb4324b6d2 Mon Sep 17 00:00:00 2001 From: Mathias Brossard Date: Sat, 5 Aug 2023 17:46:06 -0500 Subject: [PATCH 13/13] NXP: Remove FRDM-K32W042 --- projects.yaml | 4 - records/board/frdmk32w042.yaml | 7 - source/board/frdmk32w042.c | 36 --- source/family/freescale/k32w042/flash_blob.c | 321 ------------------- source/family/freescale/k32w042/target.c | 42 --- test/info.py | 4 - 6 files changed, 414 deletions(-) delete mode 100644 records/board/frdmk32w042.yaml delete mode 100644 source/board/frdmk32w042.c delete mode 100644 source/family/freescale/k32w042/flash_blob.c delete mode 100644 source/family/freescale/k32w042/target.c diff --git a/projects.yaml b/projects.yaml index b0e630bb88..58de0b43a1 100644 --- a/projects.yaml +++ b/projects.yaml @@ -330,10 +330,6 @@ projects: - *module_if - *module_hic_k26f - records/board/frdmk32l3a6.yaml - k26f_frdmk32w042_if: - - *module_if - - *module_hic_k26f - - records/board/frdmk32w042.yaml kl26z_artemis_dk_if: - *module_if - *module_hic_kl26z diff --git a/records/board/frdmk32w042.yaml b/records/board/frdmk32w042.yaml deleted file mode 100644 index e82491d00d..0000000000 --- a/records/board/frdmk32w042.yaml +++ /dev/null @@ -1,7 +0,0 @@ -common: - sources: - board: - - source/board/frdmk32w042.c - family: - - source/family/freescale/k32w042/target.c - - source/family/freescale/target_reset_k32_series.c diff --git a/source/board/frdmk32w042.c b/source/board/frdmk32w042.c deleted file mode 100644 index e852d6918d..0000000000 --- a/source/board/frdmk32w042.c +++ /dev/null @@ -1,36 +0,0 @@ -/** - * @file frdmk32w042.c - * @brief board ID for the NXP FRDM-K32W042 board - * - * DAPLink Interface Firmware - * Copyright (c) 2017-2019, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "target_board.h" -#include "target_family.h" - -const board_info_t g_board_info = { - .info_version = kBoardInfoVersion, - .board_id = "0225", - .family_id = kNXP_KinetisK32_FamilyID, - .flags = kEnablePageErase, - .daplink_url_name = "PRODINFOHTM", - .daplink_drive_name = "K32W042", - .daplink_target_url = "http://www.nxp.com/frdm-k32w042", - .target_cfg = &target_device, - .board_vendor = "NXP", - .board_name = "FRDM-K32W042", -}; diff --git a/source/family/freescale/k32w042/flash_blob.c b/source/family/freescale/k32w042/flash_blob.c deleted file mode 100644 index 41132f6e35..0000000000 --- a/source/family/freescale/k32w042/flash_blob.c +++ /dev/null @@ -1,321 +0,0 @@ -/* Flash OS Routines (Automagically Generated) - * Copyright (c) 2009-2015 ARM Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -// Primary Flash Blob -static const uint32_t P1024_4KB_SEC_flash_prog_blob[] = { - 0xE00ABE00, 0x062D780D, 0x24084068, 0xD3000040, 0x1E644058, 0x1C49D1FA, 0x2A001E52, 0x4770D1F2, - 0x4605b570, 0x4616460c, 0xcc0fe002, 0x3e10c50f, 0xd2fa2e10, 0xd3022e08, 0xc503cc03, 0x2e043e08, - 0xcc01d307, 0x1f36c501, 0x7821e003, 0x1c647029, 0x1e761c6d, 0xbd70d2f9, 0x2007b510, 0x07404934, - 0x48346048, 0x21306802, 0x6002430a, 0x430a6842, 0x48316042, 0x28006840, 0x4830d01a, 0x4a306b41, - 0x63414311, 0x4b2f4830, 0x49306043, 0x4a306081, 0x48306002, 0x60816043, 0x492f6002, 0x44492000, - 0x46087248, 0xf85ef000, 0xd0002800, 0xbd102001, 0x6b41482a, 0xe7e3220a, 0x47702000, 0x4826b51c, - 0x44484927, 0xf8c7f000, 0xd1142800, 0x21004822, 0xf0004448, 0x2800fad4, 0x20ffd10d, 0x900043c0, - 0x90011200, 0x2302481c, 0x2180466a, 0xf0004448, 0x2800f9d0, 0x2001d000, 0x4601bd1c, 0xb5104816, - 0x4b172201, 0x44480312, 0xf901f000, 0xd0002800, 0xbd102001, 0x08cb1dc9, 0x480f4601, 0x00dbb510, - 0xf0004448, 0x2800f96e, 0x2001d000, 0x0000bd10, 0x4002b000, 0x40001400, 0x40001000, 0xf0003000, - 0x00000a0a, 0xd928c520, 0x4002a000, 0x0000ffff, 0x00002920, 0x41026000, 0x00000004, 0xe0080000, - 0x6b65666b, 0x2800b5f0, 0x7a47d021, 0x4efe49fd, 0x158b447e, 0x4afd148d, 0x68c92400, 0xd0182f01, - 0x290f0f09, 0x0049d02c, 0x02895a71, 0x60416004, 0x72012102, 0x7b1160c5, 0x6143408b, 0x61047b51, - 0x21096181, 0x624506c9, 0x20006201, 0x2004bdf0, 0x0109bdf0, 0x290f0f09, 0x0049d00f, 0x02895a71, - 0x21016041, 0x60010609, 0x72012101, 0x60c102c9, 0x408b7b91, 0x7bd16143, 0x2101e7e1, 0xe7ef0489, - 0x05092101, 0x2800e7d2, 0x6101d002, 0x47702000, 0x47702004, 0xd0012800, 0xe0002000, 0x49dc2003, - 0x0100680a, 0x600a4302, 0x8f6ff3bf, 0x8f4ff3bf, 0x4302684a, 0xf3bf604a, 0xf3bf8f6f, 0x47708f4f, - 0x2101b510, 0xfd20f000, 0x48d0bd10, 0x38202170, 0x21807001, 0x78017001, 0xd5fc0609, 0x06817800, - 0x2067d501, 0x06c14770, 0x2068d501, 0x07c04770, 0x2069d0fc, 0xb5704770, 0xd0150004, 0x48c54ac3, - 0x60503a20, 0xf0004608, 0x2800fd0a, 0x2100d10b, 0xf0004620, 0x4620fcf9, 0xffd7f7ff, 0x46204605, - 0xffcef7ff, 0xbd704628, 0xbd702004, 0x2800b510, 0x1e5bd006, 0xd1014219, 0xd003421a, 0xbd102065, - 0xbd102004, 0x428b6803, 0x6840d806, 0x18181889, 0xd3014288, 0xbd102000, 0xbd102066, 0x460eb570, - 0x46140005, 0x2c00d014, 0x2120d012, 0xf0004610, 0x6828fd0c, 0x60261a36, 0x606068e8, 0x68687a29, - 0xfd16f000, 0x7a6960a0, 0x29012008, 0xe005d002, 0xbd702004, 0x05c92101, 0x60211871, 0x61212110, - 0x616160e0, 0x200461a0, 0x200061e0, 0xb5ffbd70, 0x4616b089, 0x460d461c, 0x9809466a, 0xffcef7ff, - 0x46294632, 0x98099b04, 0xffb0f7ff, 0xd1302800, 0xf0004620, 0x0005fca4, 0x9c00d12b, 0x19a69f01, - 0x46391e76, 0xf0004630, 0x2900fce3, 0x1c40d002, 0x1e464378, 0x98092100, 0xfc86f000, 0x0221e013, - 0x0a092009, 0x18090600, 0x38204880, 0x98096041, 0xff5bf7ff, 0x98094605, 0x28006900, 0x4780d000, - 0xd1022d00, 0x42b419e4, 0x9809d9e9, 0xff48f7ff, 0xb00d4628, 0xb570bdf0, 0xd0150004, 0x48764a73, - 0x60503a20, 0xf0004608, 0x2800fc6a, 0x2100d10b, 0xf0004620, 0x4620fc59, 0xff37f7ff, 0x46204605, - 0xff2ef7ff, 0xbd704628, 0xbd702004, 0x0004b570, 0x4a66d015, 0x3a204869, 0x46086050, 0xfc4ff000, - 0xd10b2800, 0x46202100, 0xfc3ef000, 0xf7ff4620, 0x4605ff1c, 0xf7ff4620, 0x4628ff13, 0x2004bd70, - 0xb5ffbd70, 0x461eb089, 0x460d0014, 0x466ad011, 0xf7ff9809, 0x4632ff53, 0x9b034629, 0xf7ff9809, - 0x0007ff35, 0x2100d1b5, 0x98099d00, 0xfc1cf000, 0x2004e028, 0x484de7ad, 0x3820cc02, 0x99036081, - 0xd0022904, 0xd0072908, 0x0229e00e, 0x0a092203, 0x18890652, 0xe0076041, 0x60c1cc02, 0x22070229, - 0x06120a09, 0x60411889, 0xf7ff9809, 0x4607fede, 0x69009809, 0xd0002800, 0x2f004780, 0x9803d104, - 0x1a361945, 0xd1d62e00, 0xf7ff9809, 0x4638fec9, 0xb570e77f, 0xd0190004, 0xd0172a00, 0x49380608, - 0x18400a00, 0x39204931, 0x68106048, 0x68506088, 0x210060c8, 0xf0004620, 0x4620fbd7, 0xfeb5f7ff, - 0x46204605, 0xfeacf7ff, 0xbd704628, 0xbd702004, 0xb08bb5ff, 0x460c980d, 0xd0152800, 0x980b466a, - 0xfeecf7ff, 0x9b054621, 0x980b9a0e, 0xfecef7ff, 0x28009008, 0x9801d109, 0x9e009009, 0x980b2100, - 0xfbb2f000, 0xe05e980e, 0xb00f2004, 0x9909bdf0, 0x42494270, 0x42404008, 0x42b02400, 0x9909d101, - 0x990e1840, 0x42811989, 0x1b85d901, 0x9d0ee040, 0x2701e03e, 0x42bd02bf, 0x462fd800, 0x980d08a1, - 0x18090089, 0x463a2009, 0xf7ff06c0, 0x1930fd69, 0x210b0200, 0x06090a00, 0x48041841, 0x60413820, - 0xe00f4638, 0x40026040, 0x00000d1c, 0x40023020, 0x40001400, 0x44ffffff, 0x49ffffff, 0x4bffffff, - 0x4300ffff, 0xf0009905, 0x49fffbc3, 0x18410400, 0x608148fe, 0xf7ff980b, 0x9008fe48, 0x6900980b, - 0xd0002800, 0x98084780, 0xd10e2800, 0x19e41bed, 0xd1be2d00, 0x980d08a1, 0x18080089, 0x980e900d, - 0x1b001936, 0x2800900e, 0x980bd1a1, 0xfe28f7ff, 0xe79a9808, 0x4614b570, 0xd0102800, 0xd00e2c00, - 0x4aeb0609, 0x4de90a09, 0x60691889, 0xfe1df7ff, 0xd1032800, 0x602168a9, 0x606168e9, 0x2004bd70, - 0x2800bd70, 0x2900d00e, 0x48e0d00c, 0x07827880, 0x2a020f92, 0x0980d008, 0xd0072802, 0x70082002, - 0x47702000, 0x47702004, 0xe7f82000, 0xe7f62001, 0x460cb570, 0xd0200006, 0xd01e2c00, 0x20004dd3, - 0x078978a9, 0x29020f89, 0x48d2d016, 0x46206068, 0xfb4df000, 0x0a00ba00, 0x020078e1, 0x60a84308, - 0xf0001d20, 0xba00fb44, 0x79e10a00, 0x43080200, 0x463060e8, 0xfdd9f7ff, 0x2004bd70, 0xb510bd70, - 0xd0072800, 0x04094ac4, 0x4ac01889, 0xf7ff6051, 0xbd10fdcc, 0xbd102004, 0xb089b5ff, 0x460d4614, - 0x9809466a, 0xfe0af7ff, 0x46294622, 0x98099b05, 0xfdecf7ff, 0xd12f2800, 0x4629466a, 0xf7ff9809, - 0x9d00fdfd, 0x90089802, 0x42404269, 0x424f4001, 0xd10142af, 0x183f9808, 0xd01c2c00, 0x42a61b7e, - 0x4626d900, 0x99054630, 0xfb12f000, 0x22010229, 0x06120a09, 0x49a5188a, 0x9a0c604a, 0x02120400, - 0x30ff4310, 0x98096088, 0xfd8ff7ff, 0xd1032800, 0x19ad1ba4, 0x2000e7de, 0xb5ffe63b, 0x9f12b089, - 0x4616001d, 0xd010460c, 0x9809466a, 0xfdc6f7ff, 0x46214632, 0x98099b07, 0xfda8f7ff, 0xd1052800, - 0x06394a96, 0x9c00188f, 0x2004e021, 0x0221e621, 0x0a092001, 0x18090640, 0x6041488c, 0x68296087, - 0x980960c1, 0xfd61f7ff, 0xd0092800, 0x29009913, 0x600cd000, 0x29009914, 0x2200d0e8, 0xe608600a, - 0x1a769907, 0x00890889, 0x9907194d, 0x2e00190c, 0xe5fed1dd, 0x2800b510, 0x4a81d007, 0x18890409, - 0x60514a7a, 0xfd41f7ff, 0x2004bd10, 0xb5f0bd10, 0x001db0d5, 0x460c4616, 0xd0134607, 0xf7ff2308, - 0x2800fd65, 0x2f00d10f, 0x2040d00f, 0x90022100, 0x03002005, 0x90019100, 0xd1040008, 0x468c19a1, - 0xe00c2100, 0xb0552004, 0x2104bdf0, 0x9a01e7f4, 0x434a9b00, 0x008e189b, 0x5193aa03, 0x9a021c49, - 0xd2f4428a, 0x49612200, 0xe034ab44, 0xd2042a08, 0x40d67f0e, 0x0ff607f6, 0x4616e02b, 0x2e083e08, - 0x7f4fd201, 0x4616e022, 0x2e083e10, 0x7f8fd201, 0x4616e01c, 0x2e083e18, 0x7fcfd201, 0x2a28e016, - 0x7e0fd203, 0x3e204616, 0x2a30e010, 0x7e4fd203, 0x3e284616, 0x2a38e00a, 0x7e8fd203, 0x3e304616, - 0x2a40e004, 0x7ecfd20a, 0x3e384616, 0x07fe40f7, 0x549e0ff6, 0x9e021c52, 0xd8c74296, 0x460e2100, - 0xe012460a, 0xaf03008b, 0x42a758ff, 0xaf03d80c, 0x685b19db, 0xd90742a3, 0x5c5bab44, 0x2b001c76, - 0x1c52d100, 0x191c9b01, 0x45641c49, 0x2a00d3ea, 0x42b2d003, 0x2101d103, 0x2100e002, 0x2102e000, - 0xe7907029, 0xb085b5ff, 0x4617001e, 0xd025460c, 0x98052308, 0xfcdaf7ff, 0xd1202800, 0x28009805, - 0x2100d01f, 0x91019100, 0x68019102, 0x69419100, 0x69809101, 0x20009002, 0x28009003, 0x9801d10f, - 0x424019e7, 0x42794602, 0x40224008, 0x25001880, 0x99014240, 0xf9fcf000, 0xe02d9004, 0xb0092004, - 0x2004bdf0, 0x9800e7e8, 0x1a209901, 0xf9f0f000, 0x7a499905, 0xd0042901, 0xd2102820, 0x6b494913, - 0x2808e013, 0x4911d203, 0x79093140, 0x9902e00d, 0xd9134281, 0x3140490d, 0x38087949, 0x9902e005, - 0xd90b4281, 0x6b094909, 0x22013820, 0x438a4082, 0x1c6dd000, 0x19049801, 0xd3d442bc, 0xd0132d00, - 0x42859804, 0xe00dd212, 0x0000ffff, 0x40023000, 0x4100ffff, 0x45ffffff, 0x4000ffff, 0x00ffffff, - 0x4a00ffff, 0xe0022002, 0xe0002000, 0x70302001, 0xe7b49803, 0x4614b510, 0xd00a2800, 0xd0082c00, - 0xf000000b, 0x080afa52, 0x16140d0a, 0x1e1c1a18, 0x20042220, 0x68c0bd10, 0x6840e000, 0xe0046010, - 0x68407a01, 0xf994f000, 0x20006020, 0x7a00bd10, 0x6800e7f4, 0x2001e7f2, 0x6940e7f0, 0x6980e7ee, - 0x6a00e7ec, 0x6a40e7ea, 0x206ae7e8, 0x4603bd10, 0x2000b510, 0xd0052b00, 0xd0222906, 0x2905dc04, - 0xe01ed80f, 0xbd102004, 0xd01a2909, 0x2907dc04, 0x2908d017, 0xe014d105, 0x2920b2d4, 0x2921d003, - 0x206ad007, 0x2a00bd10, 0x2a01d001, 0x725cd105, 0x2a00bd10, 0x2a01d003, 0x2077d001, 0x729cbd10, - 0x2076bd10, 0xb570bd10, 0x2800461c, 0x2c00d005, 0x070bd003, 0x2065d003, 0x2004bd70, 0x6843bd70, - 0x428b085b, 0x2301d904, 0x1acb029b, 0xd8012b0f, 0xbd702075, 0xd00c2a01, 0xd00a2a02, 0xd0082a04, - 0xd0062a08, 0xd0042a10, 0x2b002304, 0x4618d003, 0x2300bd70, 0x0209e7f9, 0x0a092323, 0x4d73065b, - 0x606918c9, 0x4a720611, 0x60a91889, 0xfbadf7ff, 0x70217aa9, 0x70617a69, 0x70a17a29, 0xb5f0bd70, - 0x4616b087, 0x4605460c, 0x210322ff, 0xf0004668, 0x466bf8d5, 0x46212208, 0xf7ff4628, 0x2800ffb4, - 0x2e01d111, 0x4669d008, 0x000b7809, 0xf9adf000, 0x40151206, 0x580a4f49, 0x78004668, 0xd0042805, - 0xd0042800, 0xb0072074, 0x2000bdf0, 0x466be7fb, 0xe0382210, 0x2201466b, 0x2304e035, 0x21a1aa01, - 0xf7ff4628, 0x2800fd47, 0x9801d11d, 0xb2872304, 0x81874668, 0x21a2aa01, 0xf7ff4628, 0x2800fd3b, - 0x4669d111, 0x81c89801, 0xaa012304, 0x462821a3, 0xfd30f7ff, 0xd1062800, 0x9901466a, 0x013982d1, - 0xd000428c, 0x28002075, 0x466bd1cd, 0xe00a2202, 0x4b406868, 0x19010840, 0x46282210, 0xfbb7f7ff, - 0x466be005, 0x46212204, 0xf7ff4628, 0x2800ff5c, 0x4669d1b9, 0x29047809, 0x2e00d19b, 0xe7b2d199, - 0xe7b02004, 0xd00e2800, 0x680a4830, 0x680a61c2, 0x429a69c3, 0x684ad105, 0x68496182, 0x42816980, - 0x2069d003, 0x20044770, 0x20004770, 0x28004770, 0x2900d008, 0x4825d006, 0x600a69c2, 0x60486980, - 0x47702000, 0x47702004, 0x7804b510, 0x23204922, 0x2c012210, 0x680cd00a, 0x600c439c, 0x28007840, - 0xd00b6808, 0x60084310, 0xbd102000, 0x28007840, 0x6808d002, 0xe7f64318, 0xbd102078, 0xe7f24390, - 0x2100b510, 0x70417001, 0x68094913, 0x460c2320, 0x2210401c, 0x2c002301, 0x7003d001, 0x4211e001, - 0x7043d000, 0xbd102000, 0x2901b500, 0x2900d005, 0x2000d102, 0xfabef7ff, 0x2001bd00, 0x4905e7fa, - 0xd0014288, 0x4770206b, 0x47702000, 0x40023000, 0x00ffffff, 0x6b65666b, 0x40001400, 0xb510b2d2, - 0x189a0213, 0x189a0413, 0xf80ef000, 0xe001bd10, 0x1f09c004, 0xd2fb2904, 0xd501078b, 0x1c808002, - 0xd00007c9, 0x47707002, 0xd00b2900, 0xd00207c3, 0x1c407002, 0x29021e49, 0x0783d304, 0x8002d502, - 0x1e891c80, 0x2200e7e3, 0x2200e7ee, 0x7803e7df, 0x461978c2, 0x06127843, 0x4319021b, 0x78c07883, - 0x4319041b, 0x02094311, 0x06000a09, 0x47704308, 0x09032200, 0xd32c428b, 0x428b0a03, 0x2300d311, - 0xe04e469c, 0x430b4603, 0x2200d43c, 0x428b0843, 0x0903d331, 0xd31c428b, 0x428b0a03, 0x4694d301, - 0x09c3e03f, 0xd301428b, 0x1ac001cb, 0x09834152, 0xd301428b, 0x1ac0018b, 0x09434152, 0xd301428b, - 0x1ac0014b, 0x09034152, 0xd301428b, 0x1ac0010b, 0x08c34152, 0xd301428b, 0x1ac000cb, 0x08834152, - 0xd301428b, 0x1ac0008b, 0x08434152, 0xd301428b, 0x1ac0004b, 0x1a414152, 0x4601d200, 0x46104152, - 0xe05d4770, 0xd0000fca, 0x10034249, 0x4240d300, 0x22004053, 0x0903469c, 0xd32d428b, 0x428b0a03, - 0x22fcd312, 0xba120189, 0x428b0a03, 0x0189d30c, 0x428b1192, 0x0189d308, 0x428b1192, 0x0189d304, - 0x1192d03a, 0x0989e000, 0x428b09c3, 0x01cbd301, 0x41521ac0, 0x428b0983, 0x018bd301, 0x41521ac0, - 0x428b0943, 0x014bd301, 0x41521ac0, 0x428b0903, 0x010bd301, 0x41521ac0, 0x428b08c3, 0x00cbd301, - 0x41521ac0, 0x428b0883, 0x008bd301, 0x41521ac0, 0x0843d2d9, 0xd301428b, 0x1ac0004b, 0x1a414152, - 0x4601d200, 0x41524663, 0x4610105b, 0x4240d301, 0xd5002b00, 0x47704249, 0x105b4663, 0x4240d300, - 0x2000b501, 0x46c046c0, 0xb430bd02, 0x1e644674, 0x1c647825, 0xd20042ab, 0x5d63461d, 0x18e3005b, - 0x4718bc30, 0x40023004, 0x4002301c, 0x40023018, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000100, 0x00000400, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000 -}; - -// Start address of flash -static const uint32_t flash_start = 0x00000000; -// Size of flash -static const uint32_t flash_size = 0x00100000; - -/** -* List of start and size for each size of flash sector - even indexes are start, odd are size -* The size will apply to all sectors between the listed address and the next address -* in the list. -* The last pair in the list will have sectors starting at that address and ending -* at address flash_start + flash_size. -*/ -static const sector_info_t sectors_info[] = { - {0x00000000, 0x00001000}, {0x01000000, 0x00000800}, -}; - -static const program_target_t flash = { - 0x20000059, // Init - 0x200000b9, // UnInit - 0x200000bd, // EraseChip - 0x200000fb, // EraseSector - 0x20000115, // ProgramPage - 0x2000001f, // Verify - - // BKPT : start of blob + 1 - // RSB : blob start + header + rw data offset - // RSP : stack pointer - { - 0x20000001, - 0x20000eb0, - 0x20001100 - }, - - 0x20000000 + 0x00000A00, // mem buffer location - 0x20000000, // location to write prog_blob in target RAM - sizeof(P1024_4KB_SEC_flash_prog_blob), // prog_blob size - P1024_4KB_SEC_flash_prog_blob, // address of prog_blob - 0x00000200 // ram_to_flash_bytes_to_be_written -}; - -// Secondary Flash Blob -uint32_t K32W0x2_P256_2KB_SEC_flash_prog_blob[] = { - 0xE00ABE00, 0x062D780D, 0x24084068, 0xD3000040, 0x1E644058, 0x1C49D1FA, 0x2A001E52, 0x4770D1F2, - 0x4605b570, 0x4616460c, 0xcc0fe002, 0x3e10c50f, 0xd2fa2e10, 0xd3022e08, 0xc503cc03, 0x2e043e08, - 0xcc01d307, 0x1f36c501, 0x7821e003, 0x1c647029, 0x1e761c6d, 0xbd70d2f9, 0x2007b510, 0x07404934, - 0x48346048, 0x21306802, 0x6002430a, 0x430a6842, 0x48316042, 0x28006840, 0x4830d01a, 0x4a306b41, - 0x63414311, 0x4b2f4830, 0x49306043, 0x4a306081, 0x48306002, 0x60816043, 0x492f6002, 0x44492001, - 0x46087248, 0xf85ef000, 0xd0002800, 0xbd102001, 0x6b41482a, 0xe7e3220a, 0x47702000, 0x4826b51c, - 0x44484927, 0xf8c7f000, 0xd1142800, 0x21004822, 0xf0004448, 0x2800fad4, 0x20ffd10d, 0x900043c0, - 0x90011200, 0x2302481c, 0x2180466a, 0xf0004448, 0x2800f9d0, 0x2001d000, 0x4601bd1c, 0xb5104816, - 0x4b172201, 0x44480312, 0xf901f000, 0xd0002800, 0xbd102001, 0x08cb1dc9, 0x480f4601, 0x00dbb510, - 0xf0004448, 0x2800f96e, 0x2001d000, 0x0000bd10, 0x4002b000, 0x40001400, 0x40001000, 0xf0003000, - 0x00000a0a, 0xd928c520, 0x4002a000, 0x0000ffff, 0x00002920, 0x41026000, 0x00000004, 0xe0080000, - 0x6b65666b, 0x2800b5f0, 0x7a47d021, 0x4efe49fd, 0x158b447e, 0x4afd148d, 0x68c92400, 0xd0182f01, - 0x290f0f09, 0x0049d02c, 0x02895a71, 0x60416004, 0x72012102, 0x7b1160c5, 0x6143408b, 0x61047b51, - 0x21096181, 0x624506c9, 0x20006201, 0x2004bdf0, 0x0109bdf0, 0x290f0f09, 0x0049d00f, 0x02895a71, - 0x21016041, 0x60010609, 0x72012101, 0x60c102c9, 0x408b7b91, 0x7bd16143, 0x2101e7e1, 0xe7ef0489, - 0x05092101, 0x2800e7d2, 0x6101d002, 0x47702000, 0x47702004, 0xd0012800, 0xe0002000, 0x49dc2003, - 0x0100680a, 0x600a4302, 0x8f6ff3bf, 0x8f4ff3bf, 0x4302684a, 0xf3bf604a, 0xf3bf8f6f, 0x47708f4f, - 0x2101b510, 0xfc6ff000, 0x48d0bd10, 0x38202170, 0x21807001, 0x78017001, 0xd5fc0609, 0x06817800, - 0x2067d501, 0x06c14770, 0x2068d501, 0x07c04770, 0x2069d0fc, 0xb5704770, 0xd0150004, 0x48c54ac3, - 0x60503a20, 0xf0004608, 0x2800fc59, 0x2100d10b, 0xf0004620, 0x4620fc48, 0xffd7f7ff, 0x46204605, - 0xffcef7ff, 0xbd704628, 0xbd702004, 0x2800b510, 0x1e5bd006, 0xd1014219, 0xd003421a, 0xbd102065, - 0xbd102004, 0x428b6803, 0x6840d806, 0x18181889, 0xd3014288, 0xbd102000, 0xbd102066, 0x460eb570, - 0x46140005, 0x2c00d014, 0x2120d012, 0xf0004610, 0x6828fc51, 0x60261a36, 0x606068e8, 0x68687a29, - 0xfc5bf000, 0x7a6960a0, 0x29012008, 0xe005d002, 0xbd702004, 0x05c92101, 0x60211871, 0x61212110, - 0x616160e0, 0x200461a0, 0x200061e0, 0xb5ffbd70, 0x4616b089, 0x460d461c, 0x9809466a, 0xffcef7ff, - 0x46294632, 0x98099b04, 0xffb0f7ff, 0xd1302800, 0xf0004620, 0x0005fbf3, 0x9c00d12b, 0x19a69f01, - 0x46391e76, 0xf0004630, 0x2900fc28, 0x1c40d002, 0x1e464378, 0x98092100, 0xfbd5f000, 0x0221e013, - 0x0a092009, 0x18090600, 0x38204880, 0x98096041, 0xff5bf7ff, 0x98094605, 0x28006900, 0x4780d000, - 0xd1022d00, 0x42b419e4, 0x9809d9e9, 0xff48f7ff, 0xb00d4628, 0xb570bdf0, 0xd0150004, 0x48764a73, - 0x60503a20, 0xf0004608, 0x2800fbb9, 0x2100d10b, 0xf0004620, 0x4620fba8, 0xff37f7ff, 0x46204605, - 0xff2ef7ff, 0xbd704628, 0xbd702004, 0x0004b570, 0x4a66d015, 0x3a204869, 0x46086050, 0xfb9ef000, - 0xd10b2800, 0x46202100, 0xfb8df000, 0xf7ff4620, 0x4605ff1c, 0xf7ff4620, 0x4628ff13, 0x2004bd70, - 0xb5ffbd70, 0x461eb089, 0x460d0014, 0x466ad011, 0xf7ff9809, 0x4632ff53, 0x9b034629, 0xf7ff9809, - 0x0007ff35, 0x2100d1b5, 0x98099d00, 0xfb6bf000, 0x2004e028, 0x484de7ad, 0x3820cc02, 0x99036081, - 0xd0022904, 0xd0072908, 0x0229e00e, 0x0a092203, 0x18890652, 0xe0076041, 0x60c1cc02, 0x22070229, - 0x06120a09, 0x60411889, 0xf7ff9809, 0x4607fede, 0x69009809, 0xd0002800, 0x2f004780, 0x9803d104, - 0x1a361945, 0xd1d62e00, 0xf7ff9809, 0x4638fec9, 0xb570e77f, 0xd0190004, 0xd0172a00, 0x49380608, - 0x18400a00, 0x39204931, 0x68106048, 0x68506088, 0x210060c8, 0xf0004620, 0x4620fb26, 0xfeb5f7ff, - 0x46204605, 0xfeacf7ff, 0xbd704628, 0xbd702004, 0xb08bb5ff, 0x460c980d, 0xd0152800, 0x980b466a, - 0xfeecf7ff, 0x9b054621, 0x980b9a0e, 0xfecef7ff, 0x28009008, 0x9801d109, 0x9e009009, 0x980b2100, - 0xfb01f000, 0xe05e980e, 0xb00f2004, 0x9909bdf0, 0x42494270, 0x42404008, 0x42b02400, 0x9909d101, - 0x990e1840, 0x42811989, 0x1b85d901, 0x9d0ee040, 0x2701e03e, 0x42bd02bf, 0x462fd800, 0x980d08a1, - 0x18090089, 0x463a2009, 0xf7ff06c0, 0x1930fd69, 0x210b0200, 0x06090a00, 0x48041841, 0x60413820, - 0xe00f4638, 0x40026040, 0x00000ba8, 0x40023020, 0x40001400, 0x44ffffff, 0x49ffffff, 0x4bffffff, - 0x4300ffff, 0xf0009905, 0x49fffb08, 0x18410400, 0x608148fe, 0xf7ff980b, 0x9008fe48, 0x6900980b, - 0xd0002800, 0x98084780, 0xd10e2800, 0x19e41bed, 0xd1be2d00, 0x980d08a1, 0x18080089, 0x980e900d, - 0x1b001936, 0x2800900e, 0x980bd1a1, 0xfe28f7ff, 0xe79a9808, 0x4614b570, 0xd0102800, 0xd00e2c00, - 0x4aeb0609, 0x4de90a09, 0x60691889, 0xfe1df7ff, 0xd1032800, 0x602168a9, 0x606168e9, 0x2004bd70, - 0x2800bd70, 0x2900d00e, 0x48e0d00c, 0x07827880, 0x2a020f92, 0x0980d008, 0xd0072802, 0x70082002, - 0x47702000, 0x47702004, 0xe7f82000, 0xe7f62001, 0x460cb570, 0xd0200006, 0xd01e2c00, 0x20004dd3, - 0x078978a9, 0x29020f89, 0x48d2d016, 0x46206068, 0xfa92f000, 0x0a00ba00, 0x020078e1, 0x60a84308, - 0xf0001d20, 0xba00fa89, 0x79e10a00, 0x43080200, 0x463060e8, 0xfdd9f7ff, 0x2004bd70, 0xb510bd70, - 0xd0072800, 0x04094ac4, 0x4ac01889, 0xf7ff6051, 0xbd10fdcc, 0xbd102004, 0xb089b5ff, 0x460d4614, - 0x9809466a, 0xfe0af7ff, 0x46294622, 0x98099b05, 0xfdecf7ff, 0xd12f2800, 0x4629466a, 0xf7ff9809, - 0x9d00fdfd, 0x90089802, 0x42404269, 0x424f4001, 0xd10142af, 0x183f9808, 0xd01c2c00, 0x42a61b7e, - 0x4626d900, 0x99054630, 0xfa57f000, 0x22010229, 0x06120a09, 0x49a5188a, 0x9a0c604a, 0x02120400, - 0x30ff4310, 0x98096088, 0xfd8ff7ff, 0xd1032800, 0x19ad1ba4, 0x2000e7de, 0xb5ffe63b, 0x9f12b089, - 0x4616001d, 0xd010460c, 0x9809466a, 0xfdc6f7ff, 0x46214632, 0x98099b07, 0xfda8f7ff, 0xd1052800, - 0x06394a96, 0x9c00188f, 0x2004e021, 0x0221e621, 0x0a092001, 0x18090640, 0x6041488c, 0x68296087, - 0x980960c1, 0xfd61f7ff, 0xd0092800, 0x29009913, 0x600cd000, 0x29009914, 0x2200d0e8, 0xe608600a, - 0x1a769907, 0x00890889, 0x9907194d, 0x2e00190c, 0xe5fed1dd, 0x2800b510, 0x4a81d007, 0x18890409, - 0x60514a7a, 0xfd41f7ff, 0x2004bd10, 0xb5f0bd10, 0x001db0d5, 0x460c4616, 0xd0124607, 0xf7ff2308, - 0x2800fd65, 0x2f00d10e, 0x2100d00e, 0x90022040, 0x91000240, 0x00089001, 0x19a1d104, 0x2100468c, - 0x2004e00c, 0xbdf0b055, 0xe7f42104, 0x9b009a01, 0x189b434a, 0xaa03008e, 0x1c495193, 0x428a9a02, - 0x2200d2f4, 0xab444961, 0x2a08e034, 0x7f0ed204, 0x07f640d6, 0xe02b0ff6, 0x3e084616, 0xd2012e08, - 0xe0227f4f, 0x3e104616, 0xd2012e08, 0xe01c7f8f, 0x3e184616, 0xd2012e08, 0xe0167fcf, 0xd2032a28, - 0x46167e0f, 0xe0103e20, 0xd2032a30, 0x46167e4f, 0xe00a3e28, 0xd2032a38, 0x46167e8f, 0xe0043e30, - 0xd20a2a40, 0x46167ecf, 0x40f73e38, 0x0ff607fe, 0x1c52549e, 0x42969e02, 0x2100d8c7, 0x460a460e, - 0x008be012, 0x58ffaf03, 0xd80c42a7, 0x19dbaf03, 0x42a3685b, 0xab44d907, 0x1c765c5b, 0xd1002b00, - 0x9b011c52, 0x1c49191c, 0xd3ea4564, 0xd0032a00, 0xd10342b2, 0xe0022101, 0xe0002100, 0x70292102, - 0xb5ffe790, 0x001eb085, 0x460c4617, 0x2308d025, 0xf7ff9805, 0x2800fcdb, 0x9805d120, 0xd01f2800, - 0x91002100, 0x91029101, 0x91006801, 0x91016941, 0x90026980, 0x90032000, 0xd10f2800, 0x19e79801, - 0x46024240, 0x40084279, 0x18804022, 0x42402500, 0xf0009901, 0x9004f942, 0x2004e02d, 0xbdf0b009, - 0xe7e82004, 0x99019800, 0xf0001a20, 0x9905f936, 0x29017a49, 0x2820d004, 0x4914d210, 0xe0136b49, - 0xd2032808, 0x31404911, 0xe00d7909, 0x42819902, 0x490ed913, 0x79493140, 0xe0053808, 0x42819902, - 0x490ad90b, 0x38206b09, 0x40822201, 0xd000438a, 0x98011c6d, 0x42bc1904, 0x2d00d3d4, 0x9804d012, - 0xd2114285, 0xe0102002, 0x0000ffff, 0x40023000, 0x4100ffff, 0x45ffffff, 0x4000ffff, 0x00ffffff, - 0x4a00ffff, 0xe0002000, 0x70302001, 0xe7b59803, 0x4614b510, 0xd00a2800, 0xd0082c00, 0xf000000b, - 0x080af999, 0x16140d0a, 0x1e1c1a18, 0x20042220, 0x68c0bd10, 0x6840e000, 0xe0046010, 0x68407a01, - 0xf8dbf000, 0x20006020, 0x7a00bd10, 0x6800e7f4, 0x2001e7f2, 0x6940e7f0, 0x6980e7ee, 0x6a00e7ec, - 0x6a40e7ea, 0x206ae7e8, 0x4603bd10, 0x2000b510, 0xd0052b00, 0xd0222906, 0x2905dc04, 0xe01ed80f, - 0xbd102004, 0xd01a2909, 0x2907dc04, 0x2908d017, 0xe014d105, 0x2920b2d4, 0x2921d003, 0x206ad007, - 0x2a00bd10, 0x2a01d001, 0x725cd105, 0x2a00bd10, 0x2a01d003, 0x2077d001, 0x729cbd10, 0x2076bd10, - 0x2800bd10, 0x4831d00e, 0x61c2680a, 0x69c3680a, 0xd105429a, 0x6182684a, 0x69806849, 0xd0034281, - 0x47702069, 0x47702004, 0x47702000, 0xd0082800, 0xd0062900, 0x69c24825, 0x6980600a, 0x20006048, - 0x20044770, 0xb5104770, 0x49217804, 0x22102320, 0xd00a2c01, 0x439c680c, 0x7840600c, 0x68082800, - 0x4310d00b, 0x20006008, 0x7840bd10, 0xd0022800, 0x43186808, 0x2078e7f6, 0x4390bd10, 0xb510e7f2, - 0x70012100, 0x49127041, 0x23206809, 0x401c460c, 0x23012210, 0xd0012c00, 0xe0017003, 0xd0004211, - 0x20007043, 0xb500bd10, 0xd0052901, 0xd1022900, 0xf7ff2000, 0xbd00fb6f, 0xe7fa2001, 0x42884905, - 0x206bd001, 0x20004770, 0x00004770, 0x40023000, 0x40001400, 0x6b65666b, 0xc004e001, 0x29041f09, - 0x078bd2fb, 0x8002d501, 0x07c91c80, 0x7002d000, 0x29004770, 0x07c3d00b, 0x7002d002, 0x1e491c40, - 0xd3042902, 0xd5020783, 0x1c808002, 0xe7e31e89, 0xe7ee2200, 0xe7df2200, 0x78c27803, 0x78434619, - 0x021b0612, 0x78834319, 0x041b78c0, 0x43114319, 0x0a090209, 0x43080600, 0x22004770, 0x428b0903, - 0x0a03d32c, 0xd311428b, 0x469c2300, 0x4603e04e, 0xd43c430b, 0x08432200, 0xd331428b, 0x428b0903, - 0x0a03d31c, 0xd301428b, 0xe03f4694, 0x428b09c3, 0x01cbd301, 0x41521ac0, 0x428b0983, 0x018bd301, - 0x41521ac0, 0x428b0943, 0x014bd301, 0x41521ac0, 0x428b0903, 0x010bd301, 0x41521ac0, 0x428b08c3, - 0x00cbd301, 0x41521ac0, 0x428b0883, 0x008bd301, 0x41521ac0, 0x428b0843, 0x004bd301, 0x41521ac0, - 0xd2001a41, 0x41524601, 0x47704610, 0x0fcae05d, 0x4249d000, 0xd3001003, 0x40534240, 0x469c2200, - 0x428b0903, 0x0a03d32d, 0xd312428b, 0x018922fc, 0x0a03ba12, 0xd30c428b, 0x11920189, 0xd308428b, - 0x11920189, 0xd304428b, 0xd03a0189, 0xe0001192, 0x09c30989, 0xd301428b, 0x1ac001cb, 0x09834152, - 0xd301428b, 0x1ac0018b, 0x09434152, 0xd301428b, 0x1ac0014b, 0x09034152, 0xd301428b, 0x1ac0010b, - 0x08c34152, 0xd301428b, 0x1ac000cb, 0x08834152, 0xd301428b, 0x1ac0008b, 0xd2d94152, 0x428b0843, - 0x004bd301, 0x41521ac0, 0xd2001a41, 0x46634601, 0x105b4152, 0xd3014610, 0x2b004240, 0x4249d500, - 0x46634770, 0xd300105b, 0xb5014240, 0x46c02000, 0xbd0246c0, 0x4674b430, 0x78251e64, 0x42ab1c64, - 0x461dd200, 0x005b5d63, 0xbc3018e3, 0x00004718, 0x40023004, 0x4002301c, 0x40023018, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000100, 0x00000400, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 -}; - -// Start address of flash -static const uint32_t flash_m0p_start = 0x01000000; -// Size of flash -static const uint32_t flash_m0p_size = 0x00040000; - -static const program_target_t m0p_flash = { - 0x20000059, // Init - 0x200000b9, // UnInit - 0x200000bd, // EraseChip - 0x200000fb, // EraseSector - 0x20000115, // ProgramPage - 0x0, // Verify - - // BKPT : start of blob + 1 - // RSB : blob start + header + rw data offset - // RSP : stack pointer - { - 0x20000001, - 0x20000d3c, - 0x20001000 - }, - - 0x20000000 + 0x00000A00, // mem buffer location - 0x20000000, // location to write prog_blob in target RAM - sizeof(K32W0x2_P256_2KB_SEC_flash_prog_blob), // prog_blob size - K32W0x2_P256_2KB_SEC_flash_prog_blob, // address of prog_blob - 0x00000200 // ram_to_flash_bytes_to_be_written -}; diff --git a/source/family/freescale/k32w042/target.c b/source/family/freescale/k32w042/target.c deleted file mode 100644 index 00d418cb86..0000000000 --- a/source/family/freescale/k32w042/target.c +++ /dev/null @@ -1,42 +0,0 @@ -/** - * @file target.c - * @brief Target information for the k32w042 - * - * DAPLink Interface Firmware - * Copyright (c) 2009-2019, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "target_config.h" - -// The file flash_blob.c must only be included in target.c -#include "flash_blob.c" - -// target information -target_cfg_t target_device = { - .version = kTargetConfigVersion, - .sectors_info = sectors_info, - .sector_info_length = (sizeof(sectors_info))/(sizeof(sector_info_t)), - .flash_regions[0].start = 0, - .flash_regions[0].end = KB(1024), - .flash_regions[0].flags = kRegionIsDefault, - .flash_regions[0].flash_algo = (program_target_t *) &flash, - .flash_regions[1].start = flash_m0p_start, - .flash_regions[1].end = flash_m0p_start + flash_m0p_size, - .flash_regions[1].flags = 0, - .flash_regions[1].flash_algo = (program_target_t *) &m0p_flash, - .ram_regions[0].start = 0x20000000, // M4 DTCM - .ram_regions[0].end = 0x20030000, -}; diff --git a/test/info.py b/test/info.py index 735af375cf..ec6eb115c1 100644 --- a/test/info.py +++ b/test/info.py @@ -65,7 +65,6 @@ ("lpc4322_mimxrt1170_evk_qspi_if", False, 0x10000, "bin" ), ('k20dx_ep_agora_if', True, 0x0000, "bin" ), ('k20dx_ep_kairos_if', True, 0x0000, "bin" ), - ("k26f_frdmk32w042_if", False, 0x8000, "bin" ), ("k26f_frdmk32l3a6_if", False, 0x8000, "bin" ), ("lpc11u35_archble_if", False, 0x0000, "bin" ), ("lpc11u35_archpro_if", False, 0x0000, "bin" ), @@ -154,7 +153,6 @@ def VENDOR_TO_FAMILY(x, y) : return (VENDOR_ID[x] <<8) | y ( 0x0218, VENDOR_TO_FAMILY('NXP', 2), 'k20dx_frdmkl82z_if', 'k20dx_bl', 'FRDM-KL82Z' ), ( 0x0220, VENDOR_TO_FAMILY('NXP', 2), 'k20dx_frdmkl46z_if', 'k20dx_bl', 'FRDM-KL46Z' ), ( 0x0224, VENDOR_TO_FAMILY('NXP', 1), 'k20dx_frdmk28f_if', 'k20dx_bl', None ), # TODO - set target to 'FRDM-K28F' - ( 0x0225, VENDOR_TO_FAMILY('NXP', 5), 'k26f_frdmk32w042_if', 'k26f_bl', None ), # TODO - set target to 'FRDM-K32W042' ( 0x0226, VENDOR_TO_FAMILY('NXP', 3), 'k20dx_mimxrt1020_evk_qspi_if', 'k20dx_bl', 'MIMXRT1020' ), ( 0x0227, VENDOR_TO_FAMILY('NXP', 3), 'k20dx_mimxrt1050_evk_hyper_if', 'k20dx_bl', 'MIMXRT1050' ), ( 0x0228, VENDOR_TO_FAMILY('NXP', 4), 'k20dx_rapid_iot_if', 'k20dx_bl', None ), # TODO - set target to 'Rapid-IoT' @@ -290,7 +288,6 @@ def VENDOR_TO_FAMILY(x, y) : return (VENDOR_ID[x] <<8) | y 0x0213, # FRDM-KE15Z 0x0216, # HVP-KE18F 0x0217, # FRDM-K82F - 0x0225, # FRDM-K32W042 0x0261, # FRDM-KL27Z 0x0262, # FRDM-KL43Z 0x0218, # FRDM-KL82Z @@ -299,7 +296,6 @@ def VENDOR_TO_FAMILY(x, y) : return (VENDOR_ID[x] <<8) | y BOARD_ID_SUPPORTING_PAGE_ERASE = set([ 0x0214, # HEXIWEAR - 0x0225, # FRDM-K32W042 0x0226, # MIMXRT1020 EVK 0x0227, # MIMXRT1050 EVK 0x0228, # k20dx_rapid_iot_if