diff --git a/projects.yaml b/projects.yaml index 77352f849..fb12611a6 100644 --- a/projects.yaml +++ b/projects.yaml @@ -66,6 +66,10 @@ projects: - *module_if - *module_hic_kl26z - records/board/microbit.yaml + kl26z_nina_b1_if: + - *module_if + - *module_hic_kl26z + - records/board/nina_b1.yaml k20dx_frdmk20dx_if: - *module_if - *module_hic_k20dx diff --git a/records/board/nina_b1.yaml b/records/board/nina_b1.yaml new file mode 100644 index 000000000..97c387c0c --- /dev/null +++ b/records/board/nina_b1.yaml @@ -0,0 +1,11 @@ +common: + macros: + - IO_CONFIG_OVERRIDE + includes: + - source/board/override_mkl26z_reset + sources: + board: + - source/board/nina_b1.c + target: + - source/target/nordic/nrf5x/target.c + - source/target/nordic/target_reset.c diff --git a/source/board/nina_b1.c b/source/board/nina_b1.c new file mode 100644 index 000000000..a04792025 --- /dev/null +++ b/source/board/nina_b1.c @@ -0,0 +1,31 @@ +/** + * @file nina_b1.c + * @brief board ID for the u-blox NINA-B1 EVA maker board + * + * DAPLink Interface Firmware + * Copyright (c) 2009-2016, 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" + +const char *board_id = "1238"; + +void prerun_board_config(void) +{ + // NINA-B1 is based on nrf52 + extern target_cfg_t target_device_nrf52; + target_device = target_device_nrf52; +} diff --git a/source/board/override_mkl26z_reset/IO_Config_Override.h b/source/board/override_mkl26z_reset/IO_Config_Override.h new file mode 100644 index 000000000..0c62805e1 --- /dev/null +++ b/source/board/override_mkl26z_reset/IO_Config_Override.h @@ -0,0 +1,115 @@ +/** + * @file IO_Config.h + * @brief + * + * DAPLink Interface Firmware + * Copyright (c) 2009-2016, 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. + */ + +// Override all defines if IO_CONFIG_OVERRIDE is defined + +#ifndef __IO_CONFIG_OVERRIDE_H__ +#define __IO_CONFIG_OVERRIDE_H__ + +#include "MKL26Z4.h" +#include "compiler.h" +#include "daplink.h" + +// This GPIO configuration is only valid for the KL26 HIC +COMPILER_ASSERT(DAPLINK_HIC_ID == DAPLINK_HIC_ID_KL26); + + +// Debug Port I/O Pins + +// SWCLK Pin PTC5(C5) +#define PIN_SWCLK_PORT PORTC +#define PIN_SWCLK_GPIO PTC +#define PIN_SWCLK_BIT (5) +#define PIN_SWCLK (1<