Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
fix: update from upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed May 16, 2023
1 parent 6f8edf6 commit 8c8bdb7
Show file tree
Hide file tree
Showing 9 changed files with 216 additions and 26 deletions.
18 changes: 18 additions & 0 deletions boards/nrf9161dk_nrf9161_ns.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#
# Copyright (c) 2023 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# This file is merged with prj.conf in the application folder, and options
# set here will take precedence if they are present in both files.

# CAF - Common Application Framework
CONFIG_GPIO=y
CONFIG_LED_GPIO=y

# Enable external flash
CONFIG_SPI=y
CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_SFDP_DEVICETREE=y
CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y
56 changes: 56 additions & 0 deletions boards/nrf9161dk_nrf9161_ns.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/ {
/delete-node/ leds;

leds0 {
compatible = "gpio-leds";
status = "okay";
label = "LED0";
led0: led_0 {
status = "okay";
gpios = <&gpio0 0 0>;
label = "Green LED 1";
};
};

leds1 {
compatible = "gpio-leds";
status = "okay";
label = "LED1";
led1: led_1 {
gpios = <&gpio0 1 0>;
label = "Green LED 2";
};
};

leds2 {
compatible = "gpio-leds";
status = "okay";
label = "LED2";
led2: led_2 {
gpios = <&gpio0 4 0>;
label = "Green LED 3";
};
};

leds3 {
compatible = "gpio-leds";
status = "okay";
label = "LED3";
led3: led_3 {
gpios = <&gpio0 5 0>;
label = "Green LED 4";
};
};

/* Configure partition manager to use gd25lb256 as the external flash */
chosen {
nordic,pm-ext-flash = &gd25lb256;
};
};

/* Enable high drive mode for the SPI3 pins to get a square signal at 8 MHz */
&spi3_default {
group1 {
nordic,drive-mode = <NRF_DRIVE_H0H1>;
};
};
4 changes: 4 additions & 0 deletions child_image/mcuboot/boards/nrf9160dk_nrf9160_0_14_0.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
};
};

&mx25r64 {
status = "okay";
};

/ {
/* Configure partition manager to use mx25r64 as the external flash */
chosen {
Expand Down
20 changes: 20 additions & 0 deletions child_image/mcuboot/boards/nrf9161dk_nrf9161.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# Copyright (c) 2023 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# MCUboot config to enable secondary slot on the external flash

CONFIG_FLASH=y
CONFIG_SPI=y
CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
CONFIG_SPI_NOR_SFDP_DEVICETREE=y

CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x13E00
CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y

CONFIG_MULTITHREADING=y
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_BOOT_MAX_IMG_SECTORS=256
23 changes: 23 additions & 0 deletions child_image/mcuboot/boards/nrf9161dk_nrf9161.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright (c) 2023 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/* Enable high drive mode for the SPI3 pins to get a square signal at 8 MHz */
&spi3_default {
group1 {
nordic,drive-mode = <NRF_DRIVE_H0H1>;
};
};

&gd25lb256 {
status = "okay";
};

/ {
/* Configure partition manager to use gd25lb256 as the external flash */
chosen {
nordic,pm-ext-flash = &gd25lb256;
};
};
69 changes: 69 additions & 0 deletions include/nrf9161dk_nrf9161_ns/led_state_def.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
* Copyright (c) 2023 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

#include <caf/led_effect.h>
#include "events/led_state_event.h"

/* This configuration file is included only once from led_state module and holds
* information about LED effects associated with Asset Tracker v2 states.
*/

/* This structure enforces the header file to be included only once in the build.
* Violating this requirement triggers a multiple definition error at link time.
*/
const struct {} led_state_def_include_once;

enum led_id {
LED_ID_1,
LED_ID_2,
LED_ID_3,
LED_ID_4,

LED_ID_COUNT,

LED_ID_CONNECTING = LED_ID_1,
LED_ID_CLOUD_CONNECTING = LED_ID_3,
LED_ID_SEARCHING = LED_ID_2,
LED_ID_PUBLISHING = LED_ID_3,
LED_ID_ASSOCIATING = LED_ID_3,
LED_ID_ASSOCIATED = LED_ID_3,
LED_ID_FOTA_1 = LED_ID_1,
LED_ID_FOTA_2 = LED_ID_2,
LED_ID_PASSIVE_MODE_1 = LED_ID_3,
LED_ID_PASSIVE_MODE_2 = LED_ID_4,
LED_ID_ACTIVE_MODE = LED_ID_4,
};

#define LED_PERIOD_NORMAL 350
#define LED_PERIOD_RAPID 100
#define LED_TICKS_DOUBLE 2
#define LED_TICKS_TRIPLE 3

static const struct led_effect asset_tracker_led_effect[] = {
[LED_STATE_LTE_CONNECTING] = LED_EFFECT_LED_BLINK(LED_PERIOD_NORMAL,
LED_COLOR(100, 100, 100)),
[LED_STATE_LOCATION_SEARCHING] = LED_EFFECT_LED_BLINK(LED_PERIOD_NORMAL,
LED_COLOR(100, 100, 100)),
[LED_STATE_CLOUD_PUBLISHING] = LED_EFFECT_LED_BLINK(LED_PERIOD_NORMAL,
LED_COLOR(100, 100, 100)),
[LED_STATE_CLOUD_CONNECTING] = LED_EFFECT_LED_CLOCK(LED_TICKS_TRIPLE,
LED_COLOR(100, 100, 100)),
[LED_STATE_CLOUD_ASSOCIATING] = LED_EFFECT_LED_CLOCK(LED_TICKS_DOUBLE,
LED_COLOR(100, 100, 100)),
[LED_STATE_CLOUD_ASSOCIATED] = LED_EFFECT_LED_ON_GO_OFF(LED_COLOR(100, 100, 100),
LED_PERIOD_NORMAL,
LED_PERIOD_RAPID),
[LED_STATE_ACTIVE_MODE] = LED_EFFECT_LED_BLINK(LED_PERIOD_NORMAL,
LED_COLOR(100, 100, 100)),
[LED_STATE_PASSIVE_MODE] = LED_EFFECT_LED_BLINK(LED_PERIOD_NORMAL,
LED_COLOR(100, 100, 100)),
[LED_STATE_ERROR_SYSTEM_FAULT] = LED_EFFECT_LED_BLINK(LED_PERIOD_NORMAL,
LED_COLOR(100, 100, 100)),
[LED_STATE_FOTA_UPDATING] = LED_EFFECT_LED_BLINK(LED_PERIOD_RAPID,
LED_COLOR(100, 100, 100)),
[LED_STATE_FOTA_UPDATE_REBOOT] = LED_EFFECT_LED_ON(LED_COLOR(100, 100, 100)),
[LED_STATE_TURN_OFF] = LED_EFFECT_LED_OFF(),
};
49 changes: 24 additions & 25 deletions sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ tests:
applications.asset_tracker_v2.nrf_cloud:
build_only: true
build_on_all: true
platform_allow: nrf9160dk_nrf9160_ns thingy91_nrf9160_ns native_posix
platform_allow: nrf9160dk_nrf9160_ns nrf9161dk_nrf9161_ns thingy91_nrf9160_ns native_posix
integration_platforms:
- nrf9160dk_nrf9160_ns
- thingy91_nrf9160_ns
Expand All @@ -13,7 +13,7 @@ tests:
applications.asset_tracker_v2.nrf_cloud-pgps:
build_only: true
build_on_all: true
platform_allow: nrf9160dk_nrf9160_ns thingy91_nrf9160_ns
platform_allow: nrf9160dk_nrf9160_ns nrf9161dk_nrf9161_ns thingy91_nrf9160_ns
integration_platforms:
- nrf9160dk_nrf9160_ns
- thingy91_nrf9160_ns
Expand All @@ -22,7 +22,7 @@ tests:
applications.asset_tracker_v2.nrf_cloud-no-agps:
build_only: true
build_on_all: true
platform_allow: nrf9160dk_nrf9160_ns thingy91_nrf9160_ns
platform_allow: nrf9160dk_nrf9160_ns nrf9161dk_nrf9161_ns thingy91_nrf9160_ns
integration_platforms:
- nrf9160dk_nrf9160_ns
- thingy91_nrf9160_ns
Expand All @@ -31,7 +31,7 @@ tests:
applications.asset_tracker_v2.aws:
build_only: true
build_on_all: true
platform_allow: nrf9160dk_nrf9160_ns thingy91_nrf9160_ns native_posix
platform_allow: nrf9160dk_nrf9160_ns nrf9161dk_nrf9161_ns thingy91_nrf9160_ns native_posix
integration_platforms:
- nrf9160dk_nrf9160_ns
- thingy91_nrf9160_ns
Expand All @@ -43,7 +43,7 @@ tests:
applications.asset_tracker_v2.aws-pgps:
build_only: true
build_on_all: true
platform_allow: nrf9160dk_nrf9160_ns thingy91_nrf9160_ns
platform_allow: nrf9160dk_nrf9160_ns nrf9161dk_nrf9161_ns thingy91_nrf9160_ns
integration_platforms:
- nrf9160dk_nrf9160_ns
- thingy91_nrf9160_ns
Expand All @@ -54,20 +54,20 @@ tests:
applications.asset_tracker_v2.aws-all:
build_only: true
build_on_all: true
platform_allow: nrf9160dk_nrf9160_ns thingy91_nrf9160_ns
platform_allow: nrf9160dk_nrf9160_ns nrf9161dk_nrf9161_ns thingy91_nrf9160_ns
integration_platforms:
- nrf9160dk_nrf9160_ns
- thingy91_nrf9160_ns
extra_configs:
- CONFIG_AWS_IOT_BROKER_HOST_NAME="example-hostname.aws.com"
- CONFIG_MEMFAULT_NCS_PROJECT_KEY="PROJECTKEY"
extra_args: >
extra_args:
OVERLAY_CONFIG="overlay-aws.conf;overlay-pgps.conf;overlay-debug.conf;overlay-memfault.conf"
tags: ci_build
applications.asset_tracker_v2.azure:
build_only: true
build_on_all: true
platform_allow: nrf9160dk_nrf9160_ns thingy91_nrf9160_ns native_posix
platform_allow: nrf9160dk_nrf9160_ns nrf9161dk_nrf9161_ns thingy91_nrf9160_ns native_posix
integration_platforms:
- nrf9160dk_nrf9160_ns
- thingy91_nrf9160_ns
Expand All @@ -80,7 +80,7 @@ tests:
applications.asset_tracker_v2.debug:
build_only: true
build_on_all: true
platform_allow: nrf9160dk_nrf9160_ns thingy91_nrf9160_ns native_posix
platform_allow: nrf9160dk_nrf9160_ns nrf9161dk_nrf9161_ns thingy91_nrf9160_ns native_posix
integration_platforms:
- nrf9160dk_nrf9160_ns
- thingy91_nrf9160_ns
Expand All @@ -90,7 +90,7 @@ tests:
applications.asset_tracker_v2.debug-memfault:
build_only: true
build_on_all: true
platform_allow: nrf9160dk_nrf9160_ns thingy91_nrf9160_ns
platform_allow: nrf9160dk_nrf9160_ns nrf9161dk_nrf9161_ns thingy91_nrf9160_ns
integration_platforms:
- nrf9160dk_nrf9160_ns
- thingy91_nrf9160_ns
Expand All @@ -101,7 +101,7 @@ tests:
applications.asset_tracker_v2.memfault:
build_only: true
build_on_all: true
platform_allow: nrf9160dk_nrf9160_ns thingy91_nrf9160_ns
platform_allow: nrf9160dk_nrf9160_ns nrf9161dk_nrf9161_ns thingy91_nrf9160_ns
integration_platforms:
- nrf9160dk_nrf9160_ns
- thingy91_nrf9160_ns
Expand All @@ -112,7 +112,7 @@ tests:
applications.asset_tracker_v2.low-power:
build_only: true
build_on_all: true
platform_allow: nrf9160dk_nrf9160_ns thingy91_nrf9160_ns
platform_allow: nrf9160dk_nrf9160_ns nrf9161dk_nrf9161_ns thingy91_nrf9160_ns
integration_platforms:
- nrf9160dk_nrf9160_ns
- thingy91_nrf9160_ns
Expand All @@ -129,7 +129,7 @@ tests:
applications.asset_tracker_v2.lwm2m.low-power:
build_only: true
build_on_all: true
platform_allow: nrf9160dk_nrf9160_ns thingy91_nrf9160_ns
platform_allow: nrf9160dk_nrf9160_ns nrf9161dk_nrf9161_ns thingy91_nrf9160_ns
integration_platforms:
- nrf9160dk_nrf9160_ns
- thingy91_nrf9160_ns
Expand All @@ -138,7 +138,7 @@ tests:
applications.asset_tracker_v2.lwm2m.debug:
build_only: true
build_on_all: true
platform_allow: nrf9160dk_nrf9160_ns thingy91_nrf9160_ns
platform_allow: nrf9160dk_nrf9160_ns nrf9161dk_nrf9161_ns thingy91_nrf9160_ns
integration_platforms:
- nrf9160dk_nrf9160_ns
- thingy91_nrf9160_ns
Expand All @@ -147,7 +147,7 @@ tests:
applications.asset_tracker_v2.lwm2m.debug-modem_trace:
build_only: true
build_on_all: true
platform_allow: nrf9160dk_nrf9160_ns thingy91_nrf9160_ns
platform_allow: nrf9160dk_nrf9160_ns nrf9161dk_nrf9161_ns thingy91_nrf9160_ns
integration_platforms:
- nrf9160dk_nrf9160_ns
- thingy91_nrf9160_ns
Expand All @@ -158,7 +158,7 @@ tests:
applications.asset_tracker_v2.lwm2m.memfault:
build_only: true
build_on_all: true
platform_allow: nrf9160dk_nrf9160_ns thingy91_nrf9160_ns
platform_allow: nrf9160dk_nrf9160_ns nrf9161dk_nrf9161_ns thingy91_nrf9160_ns
integration_platforms:
- nrf9160dk_nrf9160_ns
- thingy91_nrf9160_ns
Expand All @@ -169,7 +169,7 @@ tests:
applications.asset_tracker_v2.memfault-low-power:
build_only: true
build_on_all: true
platform_allow: nrf9160dk_nrf9160_ns thingy91_nrf9160_ns
platform_allow: nrf9160dk_nrf9160_ns nrf9161dk_nrf9161_ns thingy91_nrf9160_ns
integration_platforms:
- nrf9160dk_nrf9160_ns
- thingy91_nrf9160_ns
Expand All @@ -181,17 +181,16 @@ tests:
build_only: true
integration_platforms:
- nrf9160dk_nrf9160_ns
platform_allow: nrf9160dk_nrf9160_ns
extra_args: >
SHIELD=nrf7002_ek OVERLAY_CONFIG=overlay-nrf7002ek-wifi-scan-only.conf
DTC_OVERLAY_FILE="nrf9160dk_with_nrf7002ek.overlay"
platform_allow: nrf9160dk_nrf9160_ns nrf9161dk_nrf9161_ns
extra_args: SHIELD=nrf7002ek_nrf7002 OVERLAY_CONFIG=overlay-nrf7002ek-wifi-scan-only.conf
DTC_OVERLAY_FILE="nrf9160dk_with_nrf7002ek.overlay"
tags: ci_build
applications.asset_tracker_v2.nrf7002ek_wifi-debug:
build_only: true
integration_platforms:
- nrf9160dk_nrf9160_ns
platform_allow: nrf9160dk_nrf9160_ns
extra_args: >
SHIELD=nrf7002_ek OVERLAY_CONFIG="overlay-nrf7002ek-wifi-scan-only.conf;overlay-debug.conf"
DTC_OVERLAY_FILE="nrf9160dk_with_nrf7002ek.overlay"
platform_allow: nrf9160dk_nrf9160_ns nrf9161dk_nrf9161_ns
extra_args: SHIELD=nrf7002ek_nrf7002
OVERLAY_CONFIG="overlay-nrf7002ek-wifi-scan-only.conf;overlay-debug.conf"
DTC_OVERLAY_FILE="nrf9160dk_with_nrf7002ek.overlay"
tags: ci_build
1 change: 1 addition & 0 deletions src/cloud/Kconfig.lwm2m_integration
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ endif # LWM2M_INTEGRATION_PROVISION_CREDENTIALS
config LWM2M_IPSO_PUSH_BUTTON_INSTANCE_COUNT
int "Number of push button object instances"
default 2 if BOARD_NRF9160DK_NRF9160_NS
default 2 if BOARD_NRF9161DK_NRF9161_NS
default 1

# Make AVsystem the default lwM2M server.
Expand Down
2 changes: 1 addition & 1 deletion src/modules/ui_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ static void button_handler(uint32_t button_states, uint32_t has_changed)
APP_EVENT_SUBMIT(ui_module_event);
}

#if defined(CONFIG_BOARD_NRF9160DK_NRF9160_NS)
#if defined(CONFIG_BOARD_NRF9160DK_NRF9160_NS) || defined(CONFIG_BOARD_NRF9161DK_NRF9161_NS)
if (has_changed & button_states & DK_BTN2_MSK) {

struct ui_module_event *ui_module_event = new_ui_module_event();
Expand Down

0 comments on commit 8c8bdb7

Please sign in to comment.