You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2022/08/31 10:14:19 UTC

[mynewt-core] branch master updated (f80cde637 -> 5725a7b6e)

This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


    from f80cde637 sys/shell: Add "/compat reset_cause" command
     new 85e775ffa Add nordic_pca10121 BSP
     new 72e5f8f7a bsp/nordic_pca10121: Update bsp
     new ad8f8ddf4 bsp/nordic_pca10121/net: Update bsp
     new 5725a7b6e hw/bsp/nordic_pca10121: Update RAT exclude file

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .rat-excludes                                      |  1 +
 .../boot-nrf5340.ld                                |  0
 .../{nordic_pca10095 => nordic_pca10121}/bsp.yml   | 13 +++---
 .../debug.sh}                                      |  0
 .../download.sh}                                   |  0
 .../include/bsp/bsp.h                              | 48 ++++++++++++----------
 .../net}/boot-nrf5340_net.ld                       |  0
 .../net}/bsp.yml                                   |  9 ++--
 .../net/debug.sh}                                  |  0
 .../net/download.sh}                               |  0
 .../net}/include/bsp/bsp.h                         | 48 ++++++++++++----------
 .../net/no_boot.ld}                                |  0
 .../net}/nrf5340_net.ld                            |  0
 .../net}/pkg.yml                                   |  6 +--
 .../net}/src/hal_bsp.c                             |  0
 .../net}/syscfg.yml                                | 13 ++++--
 .../no_boot.ld}                                    |  0
 .../nrf5340.ld                                     |  0
 .../{nordic_pca10095 => nordic_pca10121}/pkg.yml   |  6 +--
 .../src/hal_bsp.c                                  |  0
 .../syscfg.yml                                     | 13 ++++--
 21 files changed, 89 insertions(+), 68 deletions(-)
 copy hw/bsp/{nordic_pca10095 => nordic_pca10121}/boot-nrf5340.ld (100%)
 copy hw/bsp/{nordic_pca10095 => nordic_pca10121}/bsp.yml (82%)
 copy hw/bsp/{nordic_pca10095/nordic_pca10095_debug.sh => nordic_pca10121/debug.sh} (100%)
 mode change 100755 => 100644
 copy hw/bsp/{nordic_pca10095/nordic_pca10095_download.sh => nordic_pca10121/download.sh} (100%)
 mode change 100755 => 100644
 copy hw/bsp/{nordic_pca10095 => nordic_pca10121}/include/bsp/bsp.h (69%)
 copy hw/bsp/{nordic_pca10095_net => nordic_pca10121/net}/boot-nrf5340_net.ld (100%)
 copy hw/bsp/{nordic_pca10095_net => nordic_pca10121/net}/bsp.yml (85%)
 copy hw/bsp/{nordic_pca10095_net/nordic_pca10095_net_debug.sh => nordic_pca10121/net/debug.sh} (100%)
 mode change 100755 => 100644
 copy hw/bsp/{nordic_pca10095_net/nordic_pca10095_net_download.sh => nordic_pca10121/net/download.sh} (100%)
 mode change 100755 => 100644
 copy hw/bsp/{nordic_pca10095_net => nordic_pca10121/net}/include/bsp/bsp.h (69%)
 copy hw/bsp/{nordic_pca10095_net/nordic_pca10095_net_no_boot.ld => nordic_pca10121/net/no_boot.ld} (100%)
 copy hw/bsp/{nordic_pca10095_net => nordic_pca10121/net}/nrf5340_net.ld (100%)
 copy hw/bsp/{nordic_pca10095_net => nordic_pca10121/net}/pkg.yml (89%)
 copy hw/bsp/{nordic_pca10095_net => nordic_pca10121/net}/src/hal_bsp.c (100%)
 copy hw/bsp/{nordic_pca10095_net => nordic_pca10121/net}/syscfg.yml (92%)
 copy hw/bsp/{nordic_pca10095/nordic_pca10095_no_boot.ld => nordic_pca10121/no_boot.ld} (100%)
 copy hw/bsp/{nordic_pca10095 => nordic_pca10121}/nrf5340.ld (100%)
 copy hw/bsp/{nordic_pca10095 => nordic_pca10121}/pkg.yml (91%)
 copy hw/bsp/{nordic_pca10095 => nordic_pca10121}/src/hal_bsp.c (100%)
 copy hw/bsp/{nordic_pca10095 => nordic_pca10121}/syscfg.yml (94%)


[mynewt-core] 03/04: bsp/nordic_pca10121/net: Update bsp

Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit ad8f8ddf45f7fa5eb895f463de07e54849fcbccb
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Tue Aug 23 10:05:09 2022 +0200

    bsp/nordic_pca10121/net: Update bsp
    
    changes to files, names and pins
---
 hw/bsp/nordic_pca10121/include/bsp/bsp.h           |  2 +-
 hw/bsp/nordic_pca10121/net/bsp.yml                 |  9 ++--
 .../net/{nordic_pca10095_net_debug.sh => debug.sh} |  0
 ...nordic_pca10095_net_download.sh => download.sh} |  0
 hw/bsp/nordic_pca10121/net/include/bsp/bsp.h       | 48 ++++++++++++----------
 .../{nordic_pca10095_net_no_boot.ld => no_boot.ld} |  0
 hw/bsp/nordic_pca10121/net/pkg.yml                 |  6 +--
 hw/bsp/nordic_pca10121/net/syscfg.yml              | 13 ++++--
 8 files changed, 44 insertions(+), 34 deletions(-)

diff --git a/hw/bsp/nordic_pca10121/include/bsp/bsp.h b/hw/bsp/nordic_pca10121/include/bsp/bsp.h
index 47ae71b75..2530211cf 100644
--- a/hw/bsp/nordic_pca10121/include/bsp/bsp.h
+++ b/hw/bsp/nordic_pca10121/include/bsp/bsp.h
@@ -58,7 +58,7 @@ extern uint8_t _ram_start;
 
 /* Arduino pins */
 #define ARDUINO_PIN_D0      41
-#define ARDUINO_PIN_D1      42
+#define ARDUINO_PIN_D1      40
 #define ARDUINO_PIN_D2      31
 #define ARDUINO_PIN_D3      32
 #define ARDUINO_PIN_D4      33
diff --git a/hw/bsp/nordic_pca10121/net/bsp.yml b/hw/bsp/nordic_pca10121/net/bsp.yml
index e7bc6d320..6eb4d88cc 100644
--- a/hw/bsp/nordic_pca10121/net/bsp.yml
+++ b/hw/bsp/nordic_pca10121/net/bsp.yml
@@ -17,8 +17,8 @@
 # under the License.
 #
 
-bsp.name: "nRF5340 PDK (Net Core)"
-bsp.url: https://www.nordicsemi.com/Software-and-tools/Development-Kits/nRF5340-PDK
+bsp.name: "nRF5340 Audio DK (Net Core)"
+bsp.url: https://www.nordicsemi.com/Products/Development-hardware/nRF5340-Audio-DK
 bsp.maker: "Nordic Semiconductor"
 bsp.arch: cortex_m33
 bsp.compiler: "@apache-mynewt-core/compiler/arm-none-eabi-m33"
@@ -28,9 +28,8 @@ bsp.linkerscript:
 bsp.linkerscript.BOOT_LOADER.OVERWRITE:
     - "hw/bsp/nordic_pca10095_net/boot-nrf5340_net.ld"
     - "@apache-mynewt-core/hw/mcu/nordic/nrf5340_net/nrf5340_net.ld"
-bsp.part2linkerscript: "hw/bsp/nordic_pca10095_net/split-nordic_pca10095_net.ld"
-bsp.downloadscript: "hw/bsp/nordic_pca10095_net/nordic_pca10095_net_download.sh"
-bsp.debugscript: "hw/bsp/nordic_pca10095_net/nordic_pca10095_net_debug.sh"
+bsp.downloadscript: "hw/bsp/nordic_pca10121/net/download.sh"
+bsp.debugscript: "hw/bsp/nordic_pca10121/net/debug.sh"
 
 bsp.flash_map:
     areas:
diff --git a/hw/bsp/nordic_pca10121/net/nordic_pca10095_net_debug.sh b/hw/bsp/nordic_pca10121/net/debug.sh
similarity index 100%
rename from hw/bsp/nordic_pca10121/net/nordic_pca10095_net_debug.sh
rename to hw/bsp/nordic_pca10121/net/debug.sh
diff --git a/hw/bsp/nordic_pca10121/net/nordic_pca10095_net_download.sh b/hw/bsp/nordic_pca10121/net/download.sh
similarity index 100%
rename from hw/bsp/nordic_pca10121/net/nordic_pca10095_net_download.sh
rename to hw/bsp/nordic_pca10121/net/download.sh
diff --git a/hw/bsp/nordic_pca10121/net/include/bsp/bsp.h b/hw/bsp/nordic_pca10121/net/include/bsp/bsp.h
index caff50db5..4fb1bca07 100644
--- a/hw/bsp/nordic_pca10121/net/include/bsp/bsp.h
+++ b/hw/bsp/nordic_pca10121/net/include/bsp/bsp.h
@@ -38,33 +38,39 @@ extern uint8_t _ram_start;
 #define RAM_SIZE        0x10000
 
 /* LED pins */
-#define LED_1           (28)
-#define LED_2           (29)
-#define LED_3           (30)
-#define LED_4           (31)
-#define LED_BLINK_PIN   (LED_2)
+#define LED_1               31
+#define LED_2               32
+#define LED_3               33
+#define RGB_LED_1_RED       7
+#define RGB_LED_1_GREEN     25
+#define RGB_LED_1_BLUE      26
+#define RGB_LED_2_RED       28
+#define RGB_LED_2_GREEN     29
+#define RGB_LED_2_BLUE      30
+#define LED_BLINK_PIN       (LED_1)
 
 /* Buttons */
-#define BUTTON_1        (23)
-#define BUTTON_2        (24)
-#define BUTTON_3        (8)
-#define BUTTON_4        (9)
+#define BUTTON_1            2
+#define BUTTON_2            3
+#define BUTTON_3            4
+#define BUTTON_4            6
+#define BUTTON_5            5
 
 /* Arduino pins */
-#define ARDUINO_PIN_D0      32
-#define ARDUINO_PIN_D1      33
-#define ARDUINO_PIN_D2      36
-#define ARDUINO_PIN_D3      37
-#define ARDUINO_PIN_D4      38
-#define ARDUINO_PIN_D5      39
-#define ARDUINO_PIN_D6      40
-#define ARDUINO_PIN_D7      41
+#define ARDUINO_PIN_D0      41
+#define ARDUINO_PIN_D1      42
+#define ARDUINO_PIN_D2      31
+#define ARDUINO_PIN_D3      32
+#define ARDUINO_PIN_D4      33
+#define ARDUINO_PIN_D5      46
+#define ARDUINO_PIN_D6      39
+#define ARDUINO_PIN_D7      43
 #define ARDUINO_PIN_D8      42
-#define ARDUINO_PIN_D9      43
+#define ARDUINO_PIN_D9      45
 #define ARDUINO_PIN_D10     44
-#define ARDUINO_PIN_D11     45
-#define ARDUINO_PIN_D12     46
-#define ARDUINO_PIN_D13     47
+#define ARDUINO_PIN_D11     9
+#define ARDUINO_PIN_D12     10
+#define ARDUINO_PIN_D13     8
 #define ARDUINO_PIN_A0      4
 #define ARDUINO_PIN_A1      5
 #define ARDUINO_PIN_A2      6
diff --git a/hw/bsp/nordic_pca10121/net/nordic_pca10095_net_no_boot.ld b/hw/bsp/nordic_pca10121/net/no_boot.ld
similarity index 100%
rename from hw/bsp/nordic_pca10121/net/nordic_pca10095_net_no_boot.ld
rename to hw/bsp/nordic_pca10121/net/no_boot.ld
diff --git a/hw/bsp/nordic_pca10121/net/pkg.yml b/hw/bsp/nordic_pca10121/net/pkg.yml
index 110e69477..df4d0aedb 100644
--- a/hw/bsp/nordic_pca10121/net/pkg.yml
+++ b/hw/bsp/nordic_pca10121/net/pkg.yml
@@ -17,15 +17,15 @@
 # under the License.
 #
 
-pkg.name: hw/bsp/nordic_pca10095_net
+pkg.name: hw/bsp/nordic_pca10121/net
 pkg.type: bsp
-pkg.description: BSP definition for the Nordic PCA10095 (nRF5340 DK) - Net Core
+pkg.description: BSP definition for the Nordic PCA10121 (nRF5340 Audio DK) - Net Core
 pkg.author: "Apache Mynewt <de...@mynewt.apache.org>"
 pkg.homepage: "http://mynewt.apache.org/"
 pkg.keywords:
     - nrf5340
     - nordic
-    - pca10095
+    - pca10121
 
 pkg.cflags:
     - '-DNRF5340_XXAA_NETWORK'
diff --git a/hw/bsp/nordic_pca10121/net/syscfg.yml b/hw/bsp/nordic_pca10121/net/syscfg.yml
index f8916672f..fbbe6bf1b 100644
--- a/hw/bsp/nordic_pca10121/net/syscfg.yml
+++ b/hw/bsp/nordic_pca10121/net/syscfg.yml
@@ -32,10 +32,15 @@ syscfg.defs:
 
 syscfg.vals:
     # Set default pins for peripherals
-    UART_0_PIN_TX: 20
-    UART_0_PIN_RX: 22
-    UART_0_PIN_RTS: 19
-    UART_0_PIN_CTS: 21
+    UART_0_PIN_TX: 37
+    UART_0_PIN_RX: 36
+    UART_0_PIN_RTS: 39
+    UART_0_PIN_CTS: 38
+
+    UART_1_PIN_TX: 41
+    UART_1_PIN_RX: 40
+    UART_1_PIN_RTS: 43
+    UART_1_PIN_CTS: 42
 
     SPI_0_MASTER_PIN_SCK: 45
     SPI_0_MASTER_PIN_MOSI: 46


[mynewt-core] 04/04: hw/bsp/nordic_pca10121: Update RAT exclude file

Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 5725a7b6e170439ff73ca599da241fe7332257c4
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Mon Aug 29 13:19:41 2022 +0200

    hw/bsp/nordic_pca10121: Update RAT exclude file
---
 .rat-excludes | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.rat-excludes b/.rat-excludes
index f2f7da104..0c6d57c33 100644
--- a/.rat-excludes
+++ b/.rat-excludes
@@ -140,6 +140,7 @@ nordic_pca10059_no_boot.ld
 split-nordic_pca10059.ld
 split-ublox_bmd_345.ld
 ublox_bmd_345_no_boot.ld
+no_boot.ld
 
 # STM32 HAL - BSD License
 stm32_driver_mod_i2c_v1.c


[mynewt-core] 01/04: Add nordic_pca10121 BSP

Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 85e775ffa760d5ce75cb4c8dbafaa083459485df
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Tue Aug 23 08:02:42 2022 +0200

    Add nordic_pca10121 BSP
    
    This is copy of nordic_pca10095 and nordic_pca10095_net
    No changes to files yet
---
 hw/bsp/nordic_pca10121/boot-nrf5340.ld             |  26 +++
 hw/bsp/nordic_pca10121/bsp.yml                     |  70 ++++++++
 hw/bsp/nordic_pca10121/include/bsp/bsp.h           |  89 ++++++++++
 hw/bsp/nordic_pca10121/net/boot-nrf5340_net.ld     |  27 +++
 hw/bsp/nordic_pca10121/net/bsp.yml                 |  71 ++++++++
 hw/bsp/nordic_pca10121/net/include/bsp/bsp.h       |  89 ++++++++++
 .../net/nordic_pca10095_net_debug.sh               |  40 +++++
 .../net/nordic_pca10095_net_download.sh            |  40 +++++
 .../net/nordic_pca10095_net_no_boot.ld             | 194 +++++++++++++++++++++
 hw/bsp/nordic_pca10121/net/nrf5340_net.ld          |  27 +++
 hw/bsp/nordic_pca10121/net/pkg.yml                 |  37 ++++
 hw/bsp/nordic_pca10121/net/src/hal_bsp.c           | 108 ++++++++++++
 hw/bsp/nordic_pca10121/net/syscfg.yml              |  75 ++++++++
 hw/bsp/nordic_pca10121/nordic_pca10095_debug.sh    |  37 ++++
 hw/bsp/nordic_pca10121/nordic_pca10095_download.sh |  40 +++++
 hw/bsp/nordic_pca10121/nordic_pca10095_no_boot.ld  | 194 +++++++++++++++++++++
 hw/bsp/nordic_pca10121/nrf5340.ld                  |  26 +++
 hw/bsp/nordic_pca10121/pkg.yml                     |  45 +++++
 hw/bsp/nordic_pca10121/src/hal_bsp.c               | 106 +++++++++++
 hw/bsp/nordic_pca10121/syscfg.yml                  | 115 ++++++++++++
 20 files changed, 1456 insertions(+)

diff --git a/hw/bsp/nordic_pca10121/boot-nrf5340.ld b/hw/bsp/nordic_pca10121/boot-nrf5340.ld
new file mode 100644
index 000000000..1d6051463
--- /dev/null
+++ b/hw/bsp/nordic_pca10121/boot-nrf5340.ld
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+MEMORY
+{
+  FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x8000
+  RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x80000
+}
+
+/* The bootloader does not contain an image header */
+_imghdr_size = 0x0;
diff --git a/hw/bsp/nordic_pca10121/bsp.yml b/hw/bsp/nordic_pca10121/bsp.yml
new file mode 100644
index 000000000..be1b9faf3
--- /dev/null
+++ b/hw/bsp/nordic_pca10121/bsp.yml
@@ -0,0 +1,70 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+#
+
+bsp.name: "nRF5340 PDK"
+bsp.url: https://www.nordicsemi.com/Software-and-tools/Development-Kits/nRF5340-PDK
+bsp.maker: "Nordic Semiconductor"
+bsp.arch: cortex_m33
+bsp.compiler: "@apache-mynewt-core/compiler/arm-none-eabi-m33"
+bsp.linkerscript:
+    - "hw/bsp/nordic_pca10095/nrf5340.ld"
+    - "@apache-mynewt-core/hw/mcu/nordic/nrf5340/nrf5340.ld"
+bsp.linkerscript.BOOT_LOADER.OVERWRITE:
+    - "hw/bsp/nordic_pca10095/boot-nrf5340.ld"
+    - "@apache-mynewt-core/hw/mcu/nordic/nrf5340/nrf5340.ld"
+bsp.part2linkerscript: "hw/bsp/nordic_pca10095/split-nordic_pca10095.ld"
+bsp.downloadscript: "hw/bsp/nordic_pca10095/nordic_pca10095_download.sh"
+bsp.debugscript: "hw/bsp/nordic_pca10095/nordic_pca10095_debug.sh"
+
+bsp.flash_map:
+    areas:
+        # System areas.
+        FLASH_AREA_BOOTLOADER:
+            device: 0
+            offset: 0x00000000
+            size: 32kB
+        FLASH_AREA_IMAGE_0:
+            device: 0
+            offset: 0x0000c000
+            size: 472kB
+        FLASH_AREA_IMAGE_1:
+            device: 0
+            offset: 0x00082000
+            size: 472kB
+        FLASH_AREA_IMAGE_SCRATCH:
+            device: 0
+            offset: 0x000f8000
+            size: 16kB
+
+        # User areas.
+        FLASH_AREA_REBOOT_LOG:
+            user_id: 0
+            device: 0
+            offset: 0x00008000
+            size: 16kB
+        FLASH_AREA_NFFS:
+            user_id: 1
+            device: 0
+            offset: 0x000fc000
+            size: 16kB
+        FLASH_AREA_NET_COREDUMP:
+            user_id: 2
+            device: 2
+            offset: 0x01028000
+            size: 68kB
diff --git a/hw/bsp/nordic_pca10121/include/bsp/bsp.h b/hw/bsp/nordic_pca10121/include/bsp/bsp.h
new file mode 100644
index 000000000..ee66354b8
--- /dev/null
+++ b/hw/bsp/nordic_pca10121/include/bsp/bsp.h
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+#ifndef _BSP_H_
+#define _BSP_H_
+
+#include <inttypes.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Define special stackos sections */
+#define sec_data_core   __attribute__((section(".data.core")))
+#define sec_bss_core    __attribute__((section(".bss.core")))
+#define sec_bss_nz_core __attribute__((section(".bss.core.nz")))
+
+/* More convenient section placement macros. */
+#define bssnz_t         sec_bss_nz_core
+
+extern uint8_t _ram_start;
+#define RAM_SIZE        0x80000
+
+/* LED pins */
+#define LED_1           (28)
+#define LED_2           (29)
+#define LED_3           (30)
+#define LED_4           (31)
+#define LED_BLINK_PIN   (LED_1)
+
+/* Buttons */
+#define BUTTON_1        (23)
+#define BUTTON_2        (24)
+#define BUTTON_3        (8)
+#define BUTTON_4        (9)
+
+/* Arduino pins */
+#define ARDUINO_PIN_D0      32
+#define ARDUINO_PIN_D1      33
+#define ARDUINO_PIN_D2      36
+#define ARDUINO_PIN_D3      37
+#define ARDUINO_PIN_D4      38
+#define ARDUINO_PIN_D5      39
+#define ARDUINO_PIN_D6      40
+#define ARDUINO_PIN_D7      41
+#define ARDUINO_PIN_D8      42
+#define ARDUINO_PIN_D9      43
+#define ARDUINO_PIN_D10     44
+#define ARDUINO_PIN_D11     45
+#define ARDUINO_PIN_D12     46
+#define ARDUINO_PIN_D13     47
+#define ARDUINO_PIN_A0      4
+#define ARDUINO_PIN_A1      5
+#define ARDUINO_PIN_A2      6
+#define ARDUINO_PIN_A3      7
+#define ARDUINO_PIN_A4      25
+#define ARDUINO_PIN_A5      26
+
+#define ARDUINO_PIN_RX      ARDUINO_PIN_D0
+#define ARDUINO_PIN_TX      ARDUINO_PIN_D1
+
+#define ARDUINO_PIN_SCL     35
+#define ARDUINO_PIN_SDA     34
+
+#define ARDUINO_PIN_SCK     ARDUINO_PIN_D13
+#define ARDUINO_PIN_MOSI    ARDUINO_PIN_D11
+#define ARDUINO_PIN_MISO    ARDUINO_PIN_D12
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _BSP_H_ */
diff --git a/hw/bsp/nordic_pca10121/net/boot-nrf5340_net.ld b/hw/bsp/nordic_pca10121/net/boot-nrf5340_net.ld
new file mode 100644
index 000000000..8a2a152fc
--- /dev/null
+++ b/hw/bsp/nordic_pca10121/net/boot-nrf5340_net.ld
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+MEMORY
+{
+  FLASH (rx) : ORIGIN = 0x01000000, LENGTH = 0x4000
+  RAM (rwx) : ORIGIN = 0x21000000, LENGTH = 0x10000
+  IPC (rw)  : ORIGIN = 0x20000400, LENGTH = 0x400
+}
+
+/* The bootloader does not contain an image header */
+_imghdr_size = 0x0;
diff --git a/hw/bsp/nordic_pca10121/net/bsp.yml b/hw/bsp/nordic_pca10121/net/bsp.yml
new file mode 100644
index 000000000..e7bc6d320
--- /dev/null
+++ b/hw/bsp/nordic_pca10121/net/bsp.yml
@@ -0,0 +1,71 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+#
+
+bsp.name: "nRF5340 PDK (Net Core)"
+bsp.url: https://www.nordicsemi.com/Software-and-tools/Development-Kits/nRF5340-PDK
+bsp.maker: "Nordic Semiconductor"
+bsp.arch: cortex_m33
+bsp.compiler: "@apache-mynewt-core/compiler/arm-none-eabi-m33"
+bsp.linkerscript:
+    - "hw/bsp/nordic_pca10095_net/nrf5340_net.ld"
+    - "@apache-mynewt-core/hw/mcu/nordic/nrf5340_net/nrf5340_net.ld"
+bsp.linkerscript.BOOT_LOADER.OVERWRITE:
+    - "hw/bsp/nordic_pca10095_net/boot-nrf5340_net.ld"
+    - "@apache-mynewt-core/hw/mcu/nordic/nrf5340_net/nrf5340_net.ld"
+bsp.part2linkerscript: "hw/bsp/nordic_pca10095_net/split-nordic_pca10095_net.ld"
+bsp.downloadscript: "hw/bsp/nordic_pca10095_net/nordic_pca10095_net_download.sh"
+bsp.debugscript: "hw/bsp/nordic_pca10095_net/nordic_pca10095_net_debug.sh"
+
+bsp.flash_map:
+    areas:
+        # System areas.
+        FLASH_AREA_BOOTLOADER:
+            device: 0
+            offset: 0x01000000
+            size: 16kB
+        FLASH_AREA_IMAGE_0:
+            device: 0
+            offset: 0x01008000
+            size: 128kB
+        FLASH_AREA_COREDUMP:
+            user_id: 2
+            device: 0
+            offset: 0x01028000
+            size: 68kB
+        # This maps to app flash and uses vflash
+        FLASH_AREA_IMAGE_1:
+            device: 1
+            offset: 0x00000000
+            size: 128kB
+        FLASH_AREA_IMAGE_SCRATCH:
+            device: 0
+            offset: 0x0103a000
+            size: 8kB
+
+        # User areas.
+        FLASH_AREA_REBOOT_LOG:
+            user_id: 0
+            device: 0
+            offset: 0x01004000
+            size: 16kB
+        FLASH_AREA_NFFS:
+            user_id: 1
+            device: 0
+            offset: 0x010fc000
+            size: 16kB
diff --git a/hw/bsp/nordic_pca10121/net/include/bsp/bsp.h b/hw/bsp/nordic_pca10121/net/include/bsp/bsp.h
new file mode 100644
index 000000000..caff50db5
--- /dev/null
+++ b/hw/bsp/nordic_pca10121/net/include/bsp/bsp.h
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+#ifndef _BSP_H_
+#define _BSP_H_
+
+#include <inttypes.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Define special stackos sections */
+#define sec_data_core   __attribute__((section(".data.core")))
+#define sec_bss_core    __attribute__((section(".bss.core")))
+#define sec_bss_nz_core __attribute__((section(".bss.core.nz")))
+
+/* More convenient section placement macros. */
+#define bssnz_t         sec_bss_nz_core
+
+extern uint8_t _ram_start;
+#define RAM_SIZE        0x10000
+
+/* LED pins */
+#define LED_1           (28)
+#define LED_2           (29)
+#define LED_3           (30)
+#define LED_4           (31)
+#define LED_BLINK_PIN   (LED_2)
+
+/* Buttons */
+#define BUTTON_1        (23)
+#define BUTTON_2        (24)
+#define BUTTON_3        (8)
+#define BUTTON_4        (9)
+
+/* Arduino pins */
+#define ARDUINO_PIN_D0      32
+#define ARDUINO_PIN_D1      33
+#define ARDUINO_PIN_D2      36
+#define ARDUINO_PIN_D3      37
+#define ARDUINO_PIN_D4      38
+#define ARDUINO_PIN_D5      39
+#define ARDUINO_PIN_D6      40
+#define ARDUINO_PIN_D7      41
+#define ARDUINO_PIN_D8      42
+#define ARDUINO_PIN_D9      43
+#define ARDUINO_PIN_D10     44
+#define ARDUINO_PIN_D11     45
+#define ARDUINO_PIN_D12     46
+#define ARDUINO_PIN_D13     47
+#define ARDUINO_PIN_A0      4
+#define ARDUINO_PIN_A1      5
+#define ARDUINO_PIN_A2      6
+#define ARDUINO_PIN_A3      7
+#define ARDUINO_PIN_A4      25
+#define ARDUINO_PIN_A5      26
+
+#define ARDUINO_PIN_RX      ARDUINO_PIN_D0
+#define ARDUINO_PIN_TX      ARDUINO_PIN_D1
+
+#define ARDUINO_PIN_SCL     35
+#define ARDUINO_PIN_SDA     34
+
+#define ARDUINO_PIN_SCK     ARDUINO_PIN_D13
+#define ARDUINO_PIN_MOSI    ARDUINO_PIN_D11
+#define ARDUINO_PIN_MISO    ARDUINO_PIN_D12
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _BSP_H_ */
diff --git a/hw/bsp/nordic_pca10121/net/nordic_pca10095_net_debug.sh b/hw/bsp/nordic_pca10121/net/nordic_pca10095_net_debug.sh
new file mode 100644
index 000000000..beb47e058
--- /dev/null
+++ b/hw/bsp/nordic_pca10121/net/nordic_pca10095_net_debug.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+#
+
+# Called with following variables set:
+#  - CORE_PATH is absolute path to @apache-mynewt-core
+#  - BSP_PATH is absolute path to hw/bsp/bsp_name
+#  - BIN_BASENAME is the path to prefix to target binary,
+#    .elf appended to name is the ELF file
+#  - FEATURES holds the target features string
+#  - EXTRA_JTAG_CMD holds extra parameters to pass to jtag software
+#  - RESET set if target should be reset when attaching
+#  - NO_GDB set if we should not start gdb to debug
+#
+
+#Use custom ports for debuging so that newt debug works on both cores
+EXTRA_JTAG_CMD="-port 3334"
+
+. $CORE_PATH/hw/scripts/jlink.sh
+
+FILE_NAME=$BIN_BASENAME.elf
+JLINK_DEV="nrf5340_xxaa_net"
+
+jlink_debug
+
diff --git a/hw/bsp/nordic_pca10121/net/nordic_pca10095_net_download.sh b/hw/bsp/nordic_pca10121/net/nordic_pca10095_net_download.sh
new file mode 100644
index 000000000..c311284a2
--- /dev/null
+++ b/hw/bsp/nordic_pca10121/net/nordic_pca10095_net_download.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+# Called with following variables set:
+#  - CORE_PATH is absolute path to @apache-mynewt-core
+#  - BSP_PATH is absolute path to hw/bsp/bsp_name
+#  - BIN_BASENAME is the path to prefix to target binary,
+#    .elf appended to name is the ELF file
+#  - IMAGE_SLOT is the image slot to download to (for non-mfg-image, non-boot)
+#  - FEATURES holds the target features string
+#  - EXTRA_JTAG_CMD holds extra parameters to pass to jtag software
+#  - MFG_IMAGE is "1" if this is a manufacturing image
+#  - FLASH_OFFSET contains the flash offset to download to
+#  - BOOT_LOADER is set if downloading a bootloader
+
+. $CORE_PATH/hw/scripts/jlink.sh
+
+if [ "$MFG_IMAGE" ]; then
+    FLASH_OFFSET=0x01000000
+fi
+
+JLINK_DEV="nrf5340_xxaa_net"
+
+common_file_to_load
+jlink_load
diff --git a/hw/bsp/nordic_pca10121/net/nordic_pca10095_net_no_boot.ld b/hw/bsp/nordic_pca10121/net/nordic_pca10095_net_no_boot.ld
new file mode 100644
index 000000000..336c688bd
--- /dev/null
+++ b/hw/bsp/nordic_pca10121/net/nordic_pca10095_net_no_boot.ld
@@ -0,0 +1,194 @@
+/* Linker script for Nordic Semiconductor nRF5 devices
+ *
+ * Version: Sourcery G++ 4.5-1
+ * Support: https://support.codesourcery.com/GNUToolchain/
+ *
+ * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions.  No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
+
+MEMORY
+{
+  FLASH (rx) : ORIGIN = 0x010000000, LENGTH = 0x40000
+  RAM (rwx) : ORIGIN = 0x21000000, LENGTH = 0x10000
+}
+
+/* Linker script to place sections and symbol values. Should be used together
+ * with other linker script that defines memory regions FLASH and RAM.
+ * It references following symbols, which must be defined in code:
+ *   Reset_Handler : Entry of reset handler
+ *
+ * It defines following symbols, which code can use without definition:
+ *   __exidx_start
+ *   __exidx_end
+ *   __etext
+ *   __data_start__
+ *   __preinit_array_start
+ *   __preinit_array_end
+ *   __init_array_start
+ *   __init_array_end
+ *   __fini_array_start
+ *   __fini_array_end
+ *   __data_end__
+ *   __bss_start__
+ *   __bss_end__
+ *   __HeapBase
+ *   __HeapLimit
+ *   __StackLimit
+ *   __StackTop
+ *   __stack
+ *   __bssnz_start__
+ *   __bssnz_end__
+ */
+ENTRY(Reset_Handler)
+
+SECTIONS
+{
+    __text = .;
+
+    .text :
+    {
+        __isr_vector_start = .;
+        KEEP(*(.isr_vector))
+        __isr_vector_end = .;
+        *(.text*)
+
+        KEEP(*(.init))
+        KEEP(*(.fini))
+
+        /* .ctors */
+        *crtbegin.o(.ctors)
+        *crtbegin?.o(.ctors)
+        *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
+        *(SORT(.ctors.*))
+        *(.ctors)
+
+        /* .dtors */
+        *crtbegin.o(.dtors)
+        *crtbegin?.o(.dtors)
+        *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
+        *(SORT(.dtors.*))
+        *(.dtors)
+
+        *(.rodata*)
+
+        *(.eh_frame*)
+        . = ALIGN(4);
+    } > FLASH
+
+
+    .ARM.extab :
+    {
+        *(.ARM.extab* .gnu.linkonce.armextab.*)
+        . = ALIGN(4);
+    } > FLASH
+
+    __exidx_start = .;
+    .ARM.exidx :
+    {
+        *(.ARM.exidx* .gnu.linkonce.armexidx.*)
+        . = ALIGN(4);
+    } > FLASH
+    __exidx_end = .;
+
+    __etext = .;
+
+    .vector_relocation :
+    {
+        . = ALIGN(4);
+        __vector_tbl_reloc__ = .;
+        . = . + (__isr_vector_end - __isr_vector_start);
+        . = ALIGN(4);
+    } > RAM
+
+    .data : AT (__etext)
+    {
+        __data_start__ = .;
+        *(vtable)
+        *(.data*)
+
+        . = ALIGN(4);
+        /* preinit data */
+        PROVIDE_HIDDEN (__preinit_array_start = .);
+        *(.preinit_array)
+        PROVIDE_HIDDEN (__preinit_array_end = .);
+
+        . = ALIGN(4);
+        /* init data */
+        PROVIDE_HIDDEN (__init_array_start = .);
+        *(SORT(.init_array.*))
+        *(.init_array)
+        PROVIDE_HIDDEN (__init_array_end = .);
+
+
+        . = ALIGN(4);
+        /* finit data */
+        PROVIDE_HIDDEN (__fini_array_start = .);
+        *(SORT(.fini_array.*))
+        *(.fini_array)
+        PROVIDE_HIDDEN (__fini_array_end = .);
+
+        *(.jcr)
+        . = ALIGN(4);
+        /* All data end */
+        __data_end__ = .;
+    } > RAM
+
+    /* Non-zeroed BSS.  This section is similar to BSS, with the following
+     * caveat:
+     *    1. It does not get zeroed at init-time.
+     */
+    .bssnz :
+    {
+        . = ALIGN(4);
+        __bssnz_start__ = .;
+        *(.bss.core.nz*)
+        . = ALIGN(4);
+        __bssnz_end__ = .;
+    } > RAM
+
+    .bss :
+    {
+        . = ALIGN(4);
+        __bss_start__ = .;
+        *(.bss*)
+        *(COMMON)
+        . = ALIGN(4);
+        __bss_end__ = .;
+    } > RAM
+
+    /* Heap starts after BSS */
+    . = ALIGN(8);
+    __HeapBase = .;
+
+    /* .stack_dummy section doesn't contains any symbols. It is only
+     * used for linker to calculate size of stack sections, and assign
+     * values to stack symbols later */
+    .stack_dummy (COPY):
+    {
+        *(.stack*)
+    } > RAM
+
+    /* Set stack top to end of RAM, and stack limit move down by
+     * size of stack_dummy section */
+    __StackTop = ORIGIN(RAM) + LENGTH(RAM);
+    __StackLimit = __StackTop - SIZEOF(.stack_dummy);
+    PROVIDE(__stack = __StackTop);
+
+    /* Top of head is the bottom of the stack */
+    __HeapLimit = __StackLimit;
+
+    /* Check if data + heap + stack exceeds RAM limit */
+    ASSERT(__HeapBase <= __HeapLimit, "region RAM overflowed with stack")
+}
+
diff --git a/hw/bsp/nordic_pca10121/net/nrf5340_net.ld b/hw/bsp/nordic_pca10121/net/nrf5340_net.ld
new file mode 100644
index 000000000..91bfe1c49
--- /dev/null
+++ b/hw/bsp/nordic_pca10121/net/nrf5340_net.ld
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+MEMORY
+{
+  FLASH (rx) : ORIGIN = 0x01008000, LENGTH = 0x30000
+  RAM (rwx) : ORIGIN = 0x21000000, LENGTH = 0x10000
+  IPC (rw)  : ORIGIN = 0x20000400, LENGTH = 0x400
+}
+
+/* This linker script is used for images and thus contains an image header */
+_imghdr_size = 0x20;
diff --git a/hw/bsp/nordic_pca10121/net/pkg.yml b/hw/bsp/nordic_pca10121/net/pkg.yml
new file mode 100644
index 000000000..110e69477
--- /dev/null
+++ b/hw/bsp/nordic_pca10121/net/pkg.yml
@@ -0,0 +1,37 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+#
+
+pkg.name: hw/bsp/nordic_pca10095_net
+pkg.type: bsp
+pkg.description: BSP definition for the Nordic PCA10095 (nRF5340 DK) - Net Core
+pkg.author: "Apache Mynewt <de...@mynewt.apache.org>"
+pkg.homepage: "http://mynewt.apache.org/"
+pkg.keywords:
+    - nrf5340
+    - nordic
+    - pca10095
+
+pkg.cflags:
+    - '-DNRF5340_XXAA_NETWORK'
+
+pkg.deps:
+    - "@apache-mynewt-core/hw/mcu/nordic/nrf5340_net"
+    - "@apache-mynewt-core/libc/baselibc"
+    - "@apache-mynewt-core/sys/flash_map"
+    - "@apache-mynewt-core/hw/drivers/flash/ipc_nrf5340_flash"
diff --git a/hw/bsp/nordic_pca10121/net/src/hal_bsp.c b/hw/bsp/nordic_pca10121/net/src/hal_bsp.c
new file mode 100644
index 000000000..d26bce94a
--- /dev/null
+++ b/hw/bsp/nordic_pca10121/net/src/hal_bsp.c
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 <stdint.h>
+#include <stddef.h>
+#include <assert.h>
+#include <os/mynewt.h>
+#include <nrfx.h>
+#include <flash_map/flash_map.h>
+#include <hal/hal_bsp.h>
+#include <hal/hal_flash.h>
+#include <hal/hal_flash_int.h>
+#include <hal/hal_system.h>
+#include <mcu/nrf5340_net_hal.h>
+#include <mcu/nrf5340_net_periph.h>
+#include <bsp/bsp.h>
+
+/*
+ * What memory to include in coredump.
+ */
+#if !MYNEWT_VAL(COREDUMP_SKIP_UNUSED_HEAP)
+static const struct hal_bsp_mem_dump dump_cfg[] = {
+    [0] = {
+        .hbmd_start = &_ram_start,
+        .hbmd_size = RAM_SIZE
+    }
+};
+#else
+static struct hal_bsp_mem_dump dump_cfg[2];
+extern uint8_t __StackLimit;
+extern uint8_t __StackTop;
+#endif
+
+const struct hal_flash *
+hal_bsp_flash_dev(uint8_t id)
+{
+    /*
+     * Internal flash mapped to id 0.
+     */
+    if (id == 0) {
+        return &nrf5340_flash_dev;
+    }
+#if MCUBOOT_MYNEWT
+    if (id == 1) {
+        return &nrf5340_net_vflash_dev.nv_flash;
+    }
+#endif
+#if MYNEWT_VAL(IPC_NRF5340_FLASH_CLIENT)
+    if (id == 2) {
+        return ipc_flash();
+    }
+#endif
+
+    return NULL;
+}
+
+const struct hal_bsp_mem_dump *
+hal_bsp_core_dump(int *area_cnt)
+{
+#if MYNEWT_VAL(COREDUMP_SKIP_UNUSED_HEAP)
+    /* Interrupt stack first */
+    dump_cfg[0].hbmd_start = &__StackLimit;
+    dump_cfg[0].hbmd_size = &__StackTop - &__StackLimit;
+    /* RAM from _ram_start to end of used heap */
+    dump_cfg[1].hbmd_start = &_ram_start;
+    dump_cfg[1].hbmd_size = (uint8_t *)_sbrk(0) - &_ram_start;
+#endif
+
+    *area_cnt = sizeof(dump_cfg) / sizeof(dump_cfg[0]);
+    return dump_cfg;
+}
+
+int
+hal_bsp_power_state(int state)
+{
+    return 0;
+}
+
+void
+hal_bsp_init(void)
+{
+    /* Make sure system clocks have started */
+    hal_system_clock_start();
+
+    /* Create all available nRF5340 Net Core peripherals */
+    nrf5340_net_periph_create();
+}
+
+void
+hal_bsp_deinit(void)
+{
+}
diff --git a/hw/bsp/nordic_pca10121/net/syscfg.yml b/hw/bsp/nordic_pca10121/net/syscfg.yml
new file mode 100644
index 000000000..f8916672f
--- /dev/null
+++ b/hw/bsp/nordic_pca10121/net/syscfg.yml
@@ -0,0 +1,75 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+#
+
+syscfg.defs:
+    BLE_TRANSPORT_NETCORE: 1
+
+    BSP_NRF5340_NET:
+        description: 'Set to indicate that BSP has NRF5340 NET'
+        value: 1
+
+    COREDUMP_SKIP_UNUSED_HEAP:
+        description: >
+            Store whole RAM in crash dump.
+            When 1 only part of heap that was used will be dumped, that
+            can reduce size of crash dump.
+        value: 0
+
+syscfg.vals:
+    # Set default pins for peripherals
+    UART_0_PIN_TX: 20
+    UART_0_PIN_RX: 22
+    UART_0_PIN_RTS: 19
+    UART_0_PIN_CTS: 21
+
+    SPI_0_MASTER_PIN_SCK: 45
+    SPI_0_MASTER_PIN_MOSI: 46
+    SPI_0_MASTER_PIN_MISO: 47
+    SPI_0_SLAVE_PIN_SCK: 45
+    SPI_0_SLAVE_PIN_MOSI: 46
+    SPI_0_SLAVE_PIN_MISO: 47
+    SPI_0_SLAVE_PIN_SS: 44
+
+    I2C_0_PIN_SCL: ARDUINO_PIN_A5
+    I2C_0_PIN_SDA: ARDUINO_PIN_A4
+
+    CONFIG_FCB_FLASH_AREA: FLASH_AREA_NFFS
+    REBOOT_LOG_FLASH_AREA: FLASH_AREA_REBOOT_LOG
+    NFFS_FLASH_AREA: FLASH_AREA_NFFS
+    COREDUMP_FLASH_AREA: FLASH_AREA_COREDUMP
+    #Net Core DCDC is enabled from application core
+    #MCU_DCDC_ENABLED: 1
+    MCU_LFCLK_SOURCE: LFXO
+    FLASH_MAP_SYSINIT_STAGE: 15
+
+    # Always use non-blocking API
+    SPI_HAL_USE_NOBLOCK: 1
+
+    # nRF5340 Network Core doesn't have floating point unit
+    HARDFLOAT: 0
+
+syscfg.vals.BLE_CONTROLLER:
+    TIMER_0: 0
+    TIMER_3: 1
+    OS_CPUTIME_FREQ: 32768
+    OS_CPUTIME_TIMER_NUM: 3
+    BLE_LL_RFMGMT_ENABLE_TIME: 1500
+    BLE_LL_CFG_FEAT_CTRL_TO_HOST_FLOW_CONTROL: 1
+
+syscfg.vals.BLE_TRANSPORT:
+    BLE_TRANSPORT_HS: nrf5340
diff --git a/hw/bsp/nordic_pca10121/nordic_pca10095_debug.sh b/hw/bsp/nordic_pca10121/nordic_pca10095_debug.sh
new file mode 100644
index 000000000..f1ec3616c
--- /dev/null
+++ b/hw/bsp/nordic_pca10121/nordic_pca10095_debug.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+#
+
+# Called with following variables set:
+#  - CORE_PATH is absolute path to @apache-mynewt-core
+#  - BSP_PATH is absolute path to hw/bsp/bsp_name
+#  - BIN_BASENAME is the path to prefix to target binary,
+#    .elf appended to name is the ELF file
+#  - FEATURES holds the target features string
+#  - EXTRA_JTAG_CMD holds extra parameters to pass to jtag software
+#  - RESET set if target should be reset when attaching
+#  - NO_GDB set if we should not start gdb to debug
+#
+
+. $CORE_PATH/hw/scripts/jlink.sh
+
+FILE_NAME=$BIN_BASENAME.elf
+JLINK_DEV="nrf5340_xxaa_app"
+
+jlink_debug
+
diff --git a/hw/bsp/nordic_pca10121/nordic_pca10095_download.sh b/hw/bsp/nordic_pca10121/nordic_pca10095_download.sh
new file mode 100644
index 000000000..c300b1f36
--- /dev/null
+++ b/hw/bsp/nordic_pca10121/nordic_pca10095_download.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+# Called with following variables set:
+#  - CORE_PATH is absolute path to @apache-mynewt-core
+#  - BSP_PATH is absolute path to hw/bsp/bsp_name
+#  - BIN_BASENAME is the path to prefix to target binary,
+#    .elf appended to name is the ELF file
+#  - IMAGE_SLOT is the image slot to download to (for non-mfg-image, non-boot)
+#  - FEATURES holds the target features string
+#  - EXTRA_JTAG_CMD holds extra parameters to pass to jtag software
+#  - MFG_IMAGE is "1" if this is a manufacturing image
+#  - FLASH_OFFSET contains the flash offset to download to
+#  - BOOT_LOADER is set if downloading a bootloader
+
+. $CORE_PATH/hw/scripts/jlink.sh
+
+if [ "$MFG_IMAGE" ]; then
+    FLASH_OFFSET=0x0
+fi
+
+JLINK_DEV="nrf5340_xxaa_app"
+
+common_file_to_load
+jlink_load
diff --git a/hw/bsp/nordic_pca10121/nordic_pca10095_no_boot.ld b/hw/bsp/nordic_pca10121/nordic_pca10095_no_boot.ld
new file mode 100644
index 000000000..41c0dd179
--- /dev/null
+++ b/hw/bsp/nordic_pca10121/nordic_pca10095_no_boot.ld
@@ -0,0 +1,194 @@
+/* Linker script for Nordic Semiconductor nRF5 devices
+ *
+ * Version: Sourcery G++ 4.5-1
+ * Support: https://support.codesourcery.com/GNUToolchain/
+ *
+ * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions.  No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
+
+MEMORY
+{
+  FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x100000
+  RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x80000
+}
+
+/* Linker script to place sections and symbol values. Should be used together
+ * with other linker script that defines memory regions FLASH and RAM.
+ * It references following symbols, which must be defined in code:
+ *   Reset_Handler : Entry of reset handler
+ *
+ * It defines following symbols, which code can use without definition:
+ *   __exidx_start
+ *   __exidx_end
+ *   __etext
+ *   __data_start__
+ *   __preinit_array_start
+ *   __preinit_array_end
+ *   __init_array_start
+ *   __init_array_end
+ *   __fini_array_start
+ *   __fini_array_end
+ *   __data_end__
+ *   __bss_start__
+ *   __bss_end__
+ *   __HeapBase
+ *   __HeapLimit
+ *   __StackLimit
+ *   __StackTop
+ *   __stack
+ *   __bssnz_start__
+ *   __bssnz_end__
+ */
+ENTRY(Reset_Handler)
+
+SECTIONS
+{
+    __text = .;
+
+    .text :
+    {
+        __isr_vector_start = .;
+        KEEP(*(.isr_vector))
+        __isr_vector_end = .;
+        *(.text*)
+
+        KEEP(*(.init))
+        KEEP(*(.fini))
+
+        /* .ctors */
+        *crtbegin.o(.ctors)
+        *crtbegin?.o(.ctors)
+        *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
+        *(SORT(.ctors.*))
+        *(.ctors)
+
+        /* .dtors */
+        *crtbegin.o(.dtors)
+        *crtbegin?.o(.dtors)
+        *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
+        *(SORT(.dtors.*))
+        *(.dtors)
+
+        *(.rodata*)
+
+        *(.eh_frame*)
+        . = ALIGN(4);
+    } > FLASH
+
+
+    .ARM.extab :
+    {
+        *(.ARM.extab* .gnu.linkonce.armextab.*)
+        . = ALIGN(4);
+    } > FLASH
+
+    __exidx_start = .;
+    .ARM.exidx :
+    {
+        *(.ARM.exidx* .gnu.linkonce.armexidx.*)
+        . = ALIGN(4);
+    } > FLASH
+    __exidx_end = .;
+
+    __etext = .;
+
+    .vector_relocation :
+    {
+        . = ALIGN(4);
+        __vector_tbl_reloc__ = .;
+        . = . + (__isr_vector_end - __isr_vector_start);
+        . = ALIGN(4);
+    } > RAM
+
+    .data : AT (__etext)
+    {
+        __data_start__ = .;
+        *(vtable)
+        *(.data*)
+
+        . = ALIGN(4);
+        /* preinit data */
+        PROVIDE_HIDDEN (__preinit_array_start = .);
+        *(.preinit_array)
+        PROVIDE_HIDDEN (__preinit_array_end = .);
+
+        . = ALIGN(4);
+        /* init data */
+        PROVIDE_HIDDEN (__init_array_start = .);
+        *(SORT(.init_array.*))
+        *(.init_array)
+        PROVIDE_HIDDEN (__init_array_end = .);
+
+
+        . = ALIGN(4);
+        /* finit data */
+        PROVIDE_HIDDEN (__fini_array_start = .);
+        *(SORT(.fini_array.*))
+        *(.fini_array)
+        PROVIDE_HIDDEN (__fini_array_end = .);
+
+        *(.jcr)
+        . = ALIGN(4);
+        /* All data end */
+        __data_end__ = .;
+    } > RAM
+
+    /* Non-zeroed BSS.  This section is similar to BSS, with the following
+     * caveat:
+     *    1. It does not get zeroed at init-time.
+     */
+    .bssnz :
+    {
+        . = ALIGN(4);
+        __bssnz_start__ = .;
+        *(.bss.core.nz*)
+        . = ALIGN(4);
+        __bssnz_end__ = .;
+    } > RAM
+
+    .bss :
+    {
+        . = ALIGN(4);
+        __bss_start__ = .;
+        *(.bss*)
+        *(COMMON)
+        . = ALIGN(4);
+        __bss_end__ = .;
+    } > RAM
+
+    /* Heap starts after BSS */
+    . = ALIGN(8);
+    __HeapBase = .;
+
+    /* .stack_dummy section doesn't contains any symbols. It is only
+     * used for linker to calculate size of stack sections, and assign
+     * values to stack symbols later */
+    .stack_dummy (COPY):
+    {
+        *(.stack*)
+    } > RAM
+
+    /* Set stack top to end of RAM, and stack limit move down by
+     * size of stack_dummy section */
+    __StackTop = ORIGIN(RAM) + LENGTH(RAM);
+    __StackLimit = __StackTop - SIZEOF(.stack_dummy);
+    PROVIDE(__stack = __StackTop);
+
+    /* Top of head is the bottom of the stack */
+    __HeapLimit = __StackLimit;
+
+    /* Check if data + heap + stack exceeds RAM limit */
+    ASSERT(__HeapBase <= __HeapLimit, "region RAM overflowed with stack")
+}
+
diff --git a/hw/bsp/nordic_pca10121/nrf5340.ld b/hw/bsp/nordic_pca10121/nrf5340.ld
new file mode 100644
index 000000000..6ee5122a5
--- /dev/null
+++ b/hw/bsp/nordic_pca10121/nrf5340.ld
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+MEMORY
+{
+  FLASH (rx) : ORIGIN = 0x0000c000, LENGTH = 0x76000
+  RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x80000
+}
+
+/* This linker script is used for images and thus contains an image header */
+_imghdr_size = 0x20;
diff --git a/hw/bsp/nordic_pca10121/pkg.yml b/hw/bsp/nordic_pca10121/pkg.yml
new file mode 100644
index 000000000..53bf2693c
--- /dev/null
+++ b/hw/bsp/nordic_pca10121/pkg.yml
@@ -0,0 +1,45 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+#
+
+pkg.name: hw/bsp/nordic_pca10095
+pkg.type: bsp
+pkg.description: BSP definition for the Nordic PCA10095 (nRF5340 DK)
+pkg.author: "Apache Mynewt <de...@mynewt.apache.org>"
+pkg.homepage: "http://mynewt.apache.org/"
+pkg.keywords:
+    - nrf5340
+    - nordic
+    - pca10121
+
+pkg.cflags:
+    - '-DNRF5340_XXAA_APPLICATION'
+
+pkg.cflags.HARDFLOAT:
+    - -mfloat-abi=hard -mfpu=fpv4-sp-d16
+
+pkg.deps:
+    - "@apache-mynewt-core/hw/mcu/nordic/nrf5340"
+    - "@apache-mynewt-core/libc/baselibc"
+    - "@apache-mynewt-core/sys/flash_map"
+
+pkg.deps.BSP_NRF5340_NET_FLASH_ENABLE:
+    - "@apache-mynewt-core/hw/drivers/flash/ipc_nrf5340_flash"
+
+pkg.deps.SOFT_PWM:
+    - "@apache-mynewt-core/hw/drivers/pwm/soft_pwm"
diff --git a/hw/bsp/nordic_pca10121/src/hal_bsp.c b/hw/bsp/nordic_pca10121/src/hal_bsp.c
new file mode 100644
index 000000000..c23347f76
--- /dev/null
+++ b/hw/bsp/nordic_pca10121/src/hal_bsp.c
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 <stdint.h>
+#include <stddef.h>
+#include <assert.h>
+#include <os/mynewt.h>
+#include <nrfx.h>
+#include <flash_map/flash_map.h>
+#include <hal/hal_bsp.h>
+#include <hal/hal_flash.h>
+#include <hal/hal_system.h>
+#include <mcu/nrf5340_hal.h>
+#include <mcu/nrf5340_periph.h>
+#include <bsp/bsp.h>
+
+/*
+ * What memory to include in coredump.
+ */
+#if !MYNEWT_VAL(COREDUMP_SKIP_UNUSED_HEAP)
+static const struct hal_bsp_mem_dump dump_cfg[] = {
+    [0] = {
+        .hbmd_start = &_ram_start,
+        .hbmd_size = RAM_SIZE
+    }
+};
+#else
+static struct hal_bsp_mem_dump dump_cfg[2];
+extern uint8_t __StackLimit;
+extern uint8_t __StackTop;
+#endif
+
+const struct hal_flash *
+hal_bsp_flash_dev(uint8_t id)
+{
+    /*
+     * Internal flash mapped to id 0.
+     */
+    if (id == 0) {
+        return &nrf5340_flash_dev;
+    }
+#if MYNEWT_VAL(QSPI_ENABLE)
+    if (id == 1) {
+        return &nrf5340_qspi_dev;
+    }
+#endif
+#if MYNEWT_VAL(IPC_NRF5340_FLASH_CLIENT)
+    if (id == 2) {
+        return ipc_flash();
+    }
+#endif
+    return NULL;
+}
+
+const struct hal_bsp_mem_dump *
+hal_bsp_core_dump(int *area_cnt)
+{
+#if MYNEWT_VAL(COREDUMP_SKIP_UNUSED_HEAP)
+    /* Interrupt stack first */
+    dump_cfg[0].hbmd_start = &__StackLimit;
+    dump_cfg[0].hbmd_size = &__StackTop - &__StackLimit;
+    /* RAM from _ram_start to end of used heap */
+    dump_cfg[1].hbmd_start = &_ram_start;
+    dump_cfg[1].hbmd_size = (uint8_t *)_sbrk(0) - &_ram_start;
+#endif
+
+    *area_cnt = sizeof(dump_cfg) / sizeof(dump_cfg[0]);
+    return dump_cfg;
+}
+
+int
+hal_bsp_power_state(int state)
+{
+    return 0;
+}
+
+void
+hal_bsp_init(void)
+{
+    /* Make sure system clocks have started */
+    hal_system_clock_start();
+
+    /* Create all available nRF5340 peripherals */
+    nrf5340_periph_create();
+}
+
+void
+hal_bsp_deinit(void)
+{
+}
diff --git a/hw/bsp/nordic_pca10121/syscfg.yml b/hw/bsp/nordic_pca10121/syscfg.yml
new file mode 100644
index 000000000..d0b287647
--- /dev/null
+++ b/hw/bsp/nordic_pca10121/syscfg.yml
@@ -0,0 +1,115 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+#
+
+syscfg.defs:
+    BSP_NRF5340:
+        description: 'Set to indicate that BSP has NRF5340'
+        value: 1
+
+    SOFT_PWM:
+        description: 'Enable soft PWM'
+        value: 0
+
+    BSP_NRF5340_NET_ENABLE:
+       description: >
+            When enabled Network Core of nRF5340 is started on init.
+       value: 0
+
+    BSP_NRF5340_NET_FLASH_ENABLE:
+        description: >
+            When enabled Application core can use Network core flash
+            with ipc flash driver.
+        value: 0
+
+    COREDUMP_SKIP_UNUSED_HEAP:
+        description: >
+            Store whole RAM in crash dump.
+            When 1 only part of heap that was used will be dumped, that
+            can reduce size of crash dump.
+        value: 0
+
+syscfg.vals:
+    # Set default pins for peripherals
+    UART_0_PIN_TX: 20
+    UART_0_PIN_RX: 22
+    UART_0_PIN_RTS: 19
+    UART_0_PIN_CTS: 21
+
+    SPI_0_MASTER_PIN_SCK: 45
+    SPI_0_MASTER_PIN_MOSI: 46
+    SPI_0_MASTER_PIN_MISO: 47
+    SPI_0_SLAVE_PIN_SCK: 45
+    SPI_0_SLAVE_PIN_MOSI: 46
+    SPI_0_SLAVE_PIN_MISO: 47
+    SPI_0_SLAVE_PIN_SS: 44
+
+    I2C_0_PIN_SCL: ARDUINO_PIN_A5
+    I2C_0_PIN_SDA: ARDUINO_PIN_A4
+
+    CONFIG_FCB_FLASH_AREA: FLASH_AREA_NFFS
+    REBOOT_LOG_FLASH_AREA: FLASH_AREA_REBOOT_LOG
+    NFFS_FLASH_AREA: FLASH_AREA_NFFS
+    COREDUMP_FLASH_AREA: FLASH_AREA_IMAGE_1
+    MCU_DCDC_ENABLED: 1
+
+    # Always use non-blocking API
+    SPI_HAL_USE_NOBLOCK: 1
+
+    QSPI_FLASH_SECTOR_SIZE: 4096
+    QSPI_FLASH_SECTOR_COUNT: 2048
+    QSPI_PIN_CS: 18
+    QSPI_PIN_SCK: 17
+    QSPI_PIN_DIO0: 13
+    QSPI_PIN_DIO1: 14
+    QSPI_PIN_DIO2: 15
+    QSPI_PIN_DIO3: 16
+    # QUAD IO Read (opcode EBh)
+    QSPI_READOC: 4
+    # QUAD IO Page prorgram (opcode 38h)
+    QSPI_WRITEOC: 3
+
+    # Set 192M to 192MHz
+    MCU_HFCLCK192_DIV: 1
+    # Set QSPI clock divider to (6 = (2 * (QSPI_SCK_FREQ + 1)) resulting in 32MHz QSPI clock
+    QSPI_SCK_FREQ: 2
+
+    QSPI_XIP_OFFSET: 0x10000000
+    FLASH_MAP_SYSINIT_STAGE: 15
+
+syscfg.vals.!BOOT_LOADER:
+    MCU_LFCLK_SOURCE: LFXO
+    MCU_LFCLK_XO_INTCAP: c9pf
+
+syscfg.vals.BLE_HOST:
+    BLE_HS_FLOW_CTRL: 1
+
+syscfg.vals.BLE_TRANSPORT:
+    BLE_TRANSPORT_LL: nrf5340
+
+syscfg.vals.BSP_NRF5340_NET_ENABLE:
+    BSP_NRF5340_NET_FLASH_ENABLE: 1
+    BLE_HCI_VS: 1
+
+syscfg.vals.BSP_NRF5340_NET_FLASH_ENABLE:
+    IPC_NRF5340_CHANNELS: 4
+
+syscfg.restrictions.BSP_NRF5340_NET_FLASH_ENABLE:
+    - 'IPC_NRF5340_CHANNELS >= 4'
+
+syscfg.restrictions:
+    - '!BSP_NRF5340_NET_FLASH_ENABLE || BSP_NRF5340_NET_ENABLE'


[mynewt-core] 02/04: bsp/nordic_pca10121: Update bsp

Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 72e5f8f7a85cdbe504cf49235bad318674d487f6
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Tue Aug 23 08:18:01 2022 +0200

    bsp/nordic_pca10121: Update bsp
    
    Changes from pca10095:
    - file names
    - pins
---
 hw/bsp/nordic_pca10121/bsp.yml                     | 13 +++---
 .../{nordic_pca10095_debug.sh => debug.sh}         |  0
 .../{nordic_pca10095_download.sh => download.sh}   |  0
 hw/bsp/nordic_pca10121/include/bsp/bsp.h           | 48 ++++++++++++----------
 .../{nordic_pca10095_no_boot.ld => no_boot.ld}     |  0
 hw/bsp/nordic_pca10121/pkg.yml                     |  4 +-
 hw/bsp/nordic_pca10121/syscfg.yml                  | 13 ++++--
 7 files changed, 44 insertions(+), 34 deletions(-)

diff --git a/hw/bsp/nordic_pca10121/bsp.yml b/hw/bsp/nordic_pca10121/bsp.yml
index be1b9faf3..148bf85b1 100644
--- a/hw/bsp/nordic_pca10121/bsp.yml
+++ b/hw/bsp/nordic_pca10121/bsp.yml
@@ -17,20 +17,19 @@
 # under the License.
 #
 
-bsp.name: "nRF5340 PDK"
-bsp.url: https://www.nordicsemi.com/Software-and-tools/Development-Kits/nRF5340-PDK
+bsp.name: "nRF5340 Audio DK"
+bsp.url: https://www.nordicsemi.com/Products/Development-hardware/nRF5340-Audio-DK
 bsp.maker: "Nordic Semiconductor"
 bsp.arch: cortex_m33
 bsp.compiler: "@apache-mynewt-core/compiler/arm-none-eabi-m33"
 bsp.linkerscript:
-    - "hw/bsp/nordic_pca10095/nrf5340.ld"
+    - "hw/bsp/nordic_pca10121/nrf5340.ld"
     - "@apache-mynewt-core/hw/mcu/nordic/nrf5340/nrf5340.ld"
 bsp.linkerscript.BOOT_LOADER.OVERWRITE:
-    - "hw/bsp/nordic_pca10095/boot-nrf5340.ld"
+    - "hw/bsp/nordic_pca10121/boot-nrf5340.ld"
     - "@apache-mynewt-core/hw/mcu/nordic/nrf5340/nrf5340.ld"
-bsp.part2linkerscript: "hw/bsp/nordic_pca10095/split-nordic_pca10095.ld"
-bsp.downloadscript: "hw/bsp/nordic_pca10095/nordic_pca10095_download.sh"
-bsp.debugscript: "hw/bsp/nordic_pca10095/nordic_pca10095_debug.sh"
+bsp.downloadscript: "hw/bsp/nordic_pca10121/download.sh"
+bsp.debugscript: "hw/bsp/nordic_pca10121/debug.sh"
 
 bsp.flash_map:
     areas:
diff --git a/hw/bsp/nordic_pca10121/nordic_pca10095_debug.sh b/hw/bsp/nordic_pca10121/debug.sh
similarity index 100%
rename from hw/bsp/nordic_pca10121/nordic_pca10095_debug.sh
rename to hw/bsp/nordic_pca10121/debug.sh
diff --git a/hw/bsp/nordic_pca10121/nordic_pca10095_download.sh b/hw/bsp/nordic_pca10121/download.sh
similarity index 100%
rename from hw/bsp/nordic_pca10121/nordic_pca10095_download.sh
rename to hw/bsp/nordic_pca10121/download.sh
diff --git a/hw/bsp/nordic_pca10121/include/bsp/bsp.h b/hw/bsp/nordic_pca10121/include/bsp/bsp.h
index ee66354b8..47ae71b75 100644
--- a/hw/bsp/nordic_pca10121/include/bsp/bsp.h
+++ b/hw/bsp/nordic_pca10121/include/bsp/bsp.h
@@ -38,33 +38,39 @@ extern uint8_t _ram_start;
 #define RAM_SIZE        0x80000
 
 /* LED pins */
-#define LED_1           (28)
-#define LED_2           (29)
-#define LED_3           (30)
-#define LED_4           (31)
-#define LED_BLINK_PIN   (LED_1)
+#define LED_1               31
+#define LED_2               32
+#define LED_3               33
+#define RGB_LED_1_RED       7
+#define RGB_LED_1_GREEN     25
+#define RGB_LED_1_BLUE      26
+#define RGB_LED_2_RED       28
+#define RGB_LED_2_GREEN     29
+#define RGB_LED_2_BLUE      30
+#define LED_BLINK_PIN       (LED_1)
 
 /* Buttons */
-#define BUTTON_1        (23)
-#define BUTTON_2        (24)
-#define BUTTON_3        (8)
-#define BUTTON_4        (9)
+#define BUTTON_1            2
+#define BUTTON_2            3
+#define BUTTON_3            4
+#define BUTTON_4            6
+#define BUTTON_5            5
 
 /* Arduino pins */
-#define ARDUINO_PIN_D0      32
-#define ARDUINO_PIN_D1      33
-#define ARDUINO_PIN_D2      36
-#define ARDUINO_PIN_D3      37
-#define ARDUINO_PIN_D4      38
-#define ARDUINO_PIN_D5      39
-#define ARDUINO_PIN_D6      40
-#define ARDUINO_PIN_D7      41
+#define ARDUINO_PIN_D0      41
+#define ARDUINO_PIN_D1      42
+#define ARDUINO_PIN_D2      31
+#define ARDUINO_PIN_D3      32
+#define ARDUINO_PIN_D4      33
+#define ARDUINO_PIN_D5      46
+#define ARDUINO_PIN_D6      39
+#define ARDUINO_PIN_D7      43
 #define ARDUINO_PIN_D8      42
-#define ARDUINO_PIN_D9      43
+#define ARDUINO_PIN_D9      45
 #define ARDUINO_PIN_D10     44
-#define ARDUINO_PIN_D11     45
-#define ARDUINO_PIN_D12     46
-#define ARDUINO_PIN_D13     47
+#define ARDUINO_PIN_D11     9
+#define ARDUINO_PIN_D12     10
+#define ARDUINO_PIN_D13     8
 #define ARDUINO_PIN_A0      4
 #define ARDUINO_PIN_A1      5
 #define ARDUINO_PIN_A2      6
diff --git a/hw/bsp/nordic_pca10121/nordic_pca10095_no_boot.ld b/hw/bsp/nordic_pca10121/no_boot.ld
similarity index 100%
rename from hw/bsp/nordic_pca10121/nordic_pca10095_no_boot.ld
rename to hw/bsp/nordic_pca10121/no_boot.ld
diff --git a/hw/bsp/nordic_pca10121/pkg.yml b/hw/bsp/nordic_pca10121/pkg.yml
index 53bf2693c..b47db39a9 100644
--- a/hw/bsp/nordic_pca10121/pkg.yml
+++ b/hw/bsp/nordic_pca10121/pkg.yml
@@ -17,9 +17,9 @@
 # under the License.
 #
 
-pkg.name: hw/bsp/nordic_pca10095
+pkg.name: hw/bsp/nordic_pca10121
 pkg.type: bsp
-pkg.description: BSP definition for the Nordic PCA10095 (nRF5340 DK)
+pkg.description: BSP definition for the Nordic PCA10121 (nRF5340 Audio DK)
 pkg.author: "Apache Mynewt <de...@mynewt.apache.org>"
 pkg.homepage: "http://mynewt.apache.org/"
 pkg.keywords:
diff --git a/hw/bsp/nordic_pca10121/syscfg.yml b/hw/bsp/nordic_pca10121/syscfg.yml
index d0b287647..ebfbb24b4 100644
--- a/hw/bsp/nordic_pca10121/syscfg.yml
+++ b/hw/bsp/nordic_pca10121/syscfg.yml
@@ -45,10 +45,15 @@ syscfg.defs:
 
 syscfg.vals:
     # Set default pins for peripherals
-    UART_0_PIN_TX: 20
-    UART_0_PIN_RX: 22
-    UART_0_PIN_RTS: 19
-    UART_0_PIN_CTS: 21
+    UART_0_PIN_TX: 37
+    UART_0_PIN_RX: 36
+    UART_0_PIN_RTS: 39
+    UART_0_PIN_CTS: 38
+
+    UART_1_PIN_TX: 41
+    UART_1_PIN_RX: 40
+    UART_1_PIN_RTS: 43
+    UART_1_PIN_CTS: 42
 
     SPI_0_MASTER_PIN_SCK: 45
     SPI_0_MASTER_PIN_MOSI: 46