Hi,
I understand there have been a few changes in the nRF Connect SDK with regards to Secure Boot and SPM.
I've been stuck for many hours trying to understand why I'm stuck in a boot loop in the secure partition, and never reach application code.
My files appear as follows:
CMakeLists.txt
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
# SPDX-License-Identifier: Apache 2.0
cmake_minimum_required(VERSION 3.13.1)
# Define non-secure nRF9160_DK board
set(BOARD "nrf9160_pca10090ns")
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
project(nrf9160_adc_demo)
FILE(GLOB app_sources src/*.c)
target_sources(app PRIVATE ${app_sources})
nrf9160_pca10090.overlay
Fullscreen
1
2
3
4
5
6
7
8
&led0 {
gpios = <&gpio0 12 GPIO_INT_ACTIVE_LOW>;
status = "enabled";
};
&adc {
status = "okay";
};
nrf9160_pca10090ns.overlay
Fullscreen
1
nrf9160_pca10090
prj.conf
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
CONFIG_BSD_LIBRARY=y
CONFIG_GPIO=y
CONFIG_SERIAL=y
CONFIG_STDOUT_CONSOLE=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_NETWORKING=y
CONFIG_NET_BUF_USER_DATA_SIZE=1
CONFIG_NET_SOCKETS_OFFLOAD=y
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_POSIX_NAMES=y
CONFIG_NET_RAW_MODE=y
CONFIG_TRUSTED_EXECUTION_NONSECURE=y
CONFIG_LOG=n
CONFIG_LOG_DEFAULT_LEVEL=4
CONFIG_HEAP_MEM_POOL_SIZE=1024
# LTE link control
CONFIG_LTE_LINK_CONTROL=n
CONFIG_ADC=y
CONFIG_ADC_0=y
CONFIG_ADC_NRFX_SAADC=y
main.c
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
* Copyright (c) 2012-2014 Wind River Systems, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <nrf9160.h>
#include <zephyr.h>
#include <device.h>
#include <sensor.h>
#include <stdio.h>
#include <gpio.h>
#include <misc/util.h>
#include <misc/printk.h>
#include <console.h>
#include <stdlib.h>
#include <string.h>
#include <uart.h>
#include <adc.h>
To ensure things aren't going stale, I'm doing an rm -rf build/* before each cmake -GNinja ..
On the tty, I'm just getting text from the Secure environment where it is initializing the peripherals, but it seems to be corrupted (as if two processes are asynchronously writing over each other) and it just spins forever.
Any help would be appreciated.
Regards,
Ben