|
| 1 | +/** |
| 2 | + * @file nrf52840_bl.c |
| 3 | + * @brief board ID and meta-data for HIC based on Nordic Semiconductor nRF52840 |
| 4 | + * |
| 5 | + * DAPLink Interface Firmware |
| 6 | + * Copyright (c) 2009-2021, Arm Limited, All Rights Reserved |
| 7 | + * SPDX-License-Identifier: Apache-2.0 |
| 8 | + * |
| 9 | + * Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 10 | + * not use this file except in compliance with the License. |
| 11 | + * You may obtain a copy of the License at |
| 12 | + * |
| 13 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 14 | + * |
| 15 | + * Unless required by applicable law or agreed to in writing, software |
| 16 | + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 17 | + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 18 | + * See the License for the specific language governing permissions and |
| 19 | + * limitations under the License. |
| 20 | + */ |
| 21 | + |
| 22 | +#include "target_config.h" |
| 23 | +#include "daplink_addr.h" |
| 24 | +#include "compiler.h" |
| 25 | +#include "target_board.h" |
| 26 | +#include "target_family.h" |
| 27 | + |
| 28 | +// Warning - changing the interface start will break backwards compatibility |
| 29 | +COMPILER_ASSERT(DAPLINK_ROM_IF_START == 0x00010000); |
| 30 | +COMPILER_ASSERT(DAPLINK_ROM_IF_SIZE == KB(188)); |
| 31 | + |
| 32 | +/** |
| 33 | +* List of start and size for each size of flash sector |
| 34 | +* The size will apply to all sectors between the listed address and the next address |
| 35 | +* in the list. |
| 36 | +* The last pair in the list will have sectors starting at that address and ending |
| 37 | +* at address start + size. |
| 38 | +*/ |
| 39 | +static const sector_info_t sectors_info[] = { |
| 40 | + {DAPLINK_ROM_IF_START, 0x1000}, |
| 41 | +}; |
| 42 | + |
| 43 | +// nrf52840 target information |
| 44 | +target_cfg_t target_device = { |
| 45 | + .sectors_info = sectors_info, |
| 46 | + .sector_info_length = (sizeof(sectors_info))/(sizeof(sector_info_t)), |
| 47 | + .flash_regions[0].start = DAPLINK_ROM_IF_START, |
| 48 | + .flash_regions[0].end = DAPLINK_ROM_IF_START + DAPLINK_ROM_IF_SIZE, |
| 49 | + .flash_regions[0].flags = kRegionIsDefault, |
| 50 | + .ram_regions[0].start = DAPLINK_RAM_START, |
| 51 | + .ram_regions[0].end = DAPLINK_RAM_START + DAPLINK_RAM_SIZE, |
| 52 | + /* .flash_algo not needed for bootloader */ |
| 53 | +}; |
| 54 | + |
| 55 | +// bootloader has no family |
| 56 | +const target_family_descriptor_t *g_target_family = NULL; |
| 57 | + |
| 58 | +const board_info_t g_board_info = { |
| 59 | + .info_version = kBoardInfoVersion, |
| 60 | + .board_id = "0000", |
| 61 | + .daplink_url_name = "HELP_FAQHTM", |
| 62 | + .daplink_drive_name = "MAINTENANCE", |
| 63 | + .daplink_target_url = "https://mbed.com/daplink", |
| 64 | + .target_cfg = &target_device, |
| 65 | +}; |
0 commit comments