-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The first release of nrf52-u2f implementation
- Loading branch information
Showing
21 changed files
with
15,272 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
99 changes: 99 additions & 0 deletions
99
boards/nrf52840-mdk-usb-dongle/armgcc/nrf52_u2f_gcc_nrf52.ld
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
/* Linker script to configure memory regions. */ | ||
|
||
SEARCH_DIR(.) | ||
GROUP(-lgcc -lc -lnosys) | ||
|
||
MEMORY | ||
{ | ||
FLASH (rx) : ORIGIN = 0x1000, LENGTH = 0xff000 | ||
RAM (rwx) : ORIGIN = 0x20000008, LENGTH = 0x3fff8 | ||
} | ||
|
||
SECTIONS | ||
{ | ||
} | ||
|
||
SECTIONS | ||
{ | ||
. = ALIGN(4); | ||
.mem_section_dummy_ram : | ||
{ | ||
} | ||
.log_dynamic_data : | ||
{ | ||
PROVIDE(__start_log_dynamic_data = .); | ||
KEEP(*(SORT(.log_dynamic_data*))) | ||
PROVIDE(__stop_log_dynamic_data = .); | ||
} > RAM | ||
.log_filter_data : | ||
{ | ||
PROVIDE(__start_log_filter_data = .); | ||
KEEP(*(SORT(.log_filter_data*))) | ||
PROVIDE(__stop_log_filter_data = .); | ||
} > RAM | ||
.cli_sorted_cmd_ptrs : | ||
{ | ||
PROVIDE(__start_cli_sorted_cmd_ptrs = .); | ||
KEEP(*(.cli_sorted_cmd_ptrs)) | ||
PROVIDE(__stop_cli_sorted_cmd_ptrs = .); | ||
} > RAM | ||
.fs_data : | ||
{ | ||
PROVIDE(__start_fs_data = .); | ||
KEEP(*(.fs_data)) | ||
PROVIDE(__stop_fs_data = .); | ||
} > RAM | ||
|
||
} INSERT AFTER .data; | ||
|
||
SECTIONS | ||
{ | ||
.mem_section_dummy_rom : | ||
{ | ||
} | ||
.crypto_data : | ||
{ | ||
PROVIDE(__start_crypto_data = .); | ||
KEEP(*(SORT(.crypto_data*))) | ||
PROVIDE(__stop_crypto_data = .); | ||
} > FLASH | ||
.nrf_queue : | ||
{ | ||
PROVIDE(__start_nrf_queue = .); | ||
KEEP(*(.nrf_queue)) | ||
PROVIDE(__stop_nrf_queue = .); | ||
} > FLASH | ||
.log_const_data : | ||
{ | ||
PROVIDE(__start_log_const_data = .); | ||
KEEP(*(SORT(.log_const_data*))) | ||
PROVIDE(__stop_log_const_data = .); | ||
} > FLASH | ||
.log_backends : | ||
{ | ||
PROVIDE(__start_log_backends = .); | ||
KEEP(*(SORT(.log_backends*))) | ||
PROVIDE(__stop_log_backends = .); | ||
} > FLASH | ||
.cli_command : | ||
{ | ||
PROVIDE(__start_cli_command = .); | ||
KEEP(*(.cli_command)) | ||
PROVIDE(__stop_cli_command = .); | ||
} > FLASH | ||
.pwr_mgmt_data : | ||
{ | ||
PROVIDE(__start_pwr_mgmt_data = .); | ||
KEEP(*(SORT(.pwr_mgmt_data*))) | ||
PROVIDE(__stop_pwr_mgmt_data = .); | ||
} > FLASH | ||
.nrf_balloc : | ||
{ | ||
PROVIDE(__start_nrf_balloc = .); | ||
KEEP(*(.nrf_balloc)) | ||
PROVIDE(__stop_nrf_balloc = .); | ||
} > FLASH | ||
|
||
} INSERT AFTER .text | ||
|
||
INCLUDE "nrf_common.ld" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
/** | ||
* Copyright (c) 2016 - 2018, Nordic Semiconductor ASA | ||
* | ||
* All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without modification, | ||
* are permitted provided that the following conditions are met: | ||
* | ||
* 1. Redistributions of source code must retain the above copyright notice, this | ||
* list of conditions and the following disclaimer. | ||
* | ||
* 2. Redistributions in binary form, except as embedded into a Nordic | ||
* Semiconductor ASA integrated circuit in a product or a software update for | ||
* such product, must reproduce the above copyright notice, this list of | ||
* conditions and the following disclaimer in the documentation and/or other | ||
* materials provided with the distribution. | ||
* | ||
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its | ||
* contributors may be used to endorse or promote products derived from this | ||
* software without specific prior written permission. | ||
* | ||
* 4. This software, with or without modification, must only be used with a | ||
* Nordic Semiconductor ASA integrated circuit. | ||
* | ||
* 5. Any software provided in binary form under this license must not be reverse | ||
* engineered, decompiled, modified and/or disassembled. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS | ||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
* OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
* DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE | ||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | ||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT | ||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
* | ||
*/ | ||
#ifndef CUSTOM_BOARD_H | ||
#define CUSTOM_BOARD_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#include "nrf_gpio.h" | ||
|
||
// LEDs definitions for nRF52840-MDK | ||
#define LEDS_NUMBER 3 | ||
|
||
#define LED_1 NRF_GPIO_PIN_MAP(0,22) | ||
#define LED_2 NRF_GPIO_PIN_MAP(0,23) | ||
#define LED_3 NRF_GPIO_PIN_MAP(0,24) | ||
#define LED_START LED_1 | ||
#define LED_STOP LED_3 | ||
|
||
#define LEDS_ACTIVE_STATE 0 | ||
|
||
#define LEDS_LIST { LED_1, LED_2, LED_3 } | ||
|
||
#define LEDS_INV_MASK LEDS_MASK | ||
|
||
#define BSP_LED_0 22 | ||
#define BSP_LED_1 23 | ||
#define BSP_LED_2 24 | ||
|
||
/* | ||
#define BUTTONS_NUMBER 1 | ||
#define BUTTON_1 NRF_GPIO_PIN_MAP(1,0) | ||
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP | ||
#define BUTTONS_ACTIVE_STATE 0 | ||
#define BUTTONS_LIST { BUTTON_1 } | ||
#define BSP_BUTTON_0 BUTTON_1 | ||
*/ | ||
|
||
#define BUTTONS_NUMBER 4 | ||
|
||
#define BUTTON_1 NRF_GPIO_PIN_MAP(0,18) | ||
#define BUTTON_2 12 | ||
#define BUTTON_3 24 | ||
#define BUTTON_4 25 | ||
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP | ||
|
||
#define BUTTONS_ACTIVE_STATE 0 | ||
|
||
#define BUTTONS_LIST { BUTTON_1, BUTTON_2, BUTTON_3, BUTTON_4 } | ||
|
||
#define BSP_BUTTON_0 BUTTON_1 | ||
#define BSP_BUTTON_1 BUTTON_2 | ||
#define BSP_BUTTON_2 BUTTON_3 | ||
#define BSP_BUTTON_3 BUTTON_4 | ||
|
||
#define LED_U2F_WINK 2 // BLUE LED | ||
|
||
#define BTN_U2F_USER 0 | ||
|
||
#define RX_PIN_NUMBER 19 | ||
#define TX_PIN_NUMBER 20 | ||
#define CTS_PIN_NUMBER 7 | ||
#define RTS_PIN_NUMBER 5 | ||
#define HWFC false | ||
|
||
#define BSP_QSPI_SCK_PIN NRF_GPIO_PIN_MAP(1,3) | ||
#define BSP_QSPI_CSN_PIN NRF_GPIO_PIN_MAP(1,6) | ||
#define BSP_QSPI_IO0_PIN NRF_GPIO_PIN_MAP(1,5) | ||
#define BSP_QSPI_IO1_PIN NRF_GPIO_PIN_MAP(1,4) | ||
#define BSP_QSPI_IO2_PIN NRF_GPIO_PIN_MAP(1,2) | ||
#define BSP_QSPI_IO3_PIN NRF_GPIO_PIN_MAP(1,1) | ||
|
||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif // CUSTOM_BOARD_H |
Oops, something went wrong.