This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Project does not do serial output

code.zip

Hi,

I've created a project combining gps, nvs, and mqtt based off the nrf and zephyr project samples. I've been able to go into the sample projects and add .overlay files to the project and spm sample to output to another UART, but in my combined project it will only output through the Jlink on the LTE Link Monitor and not to the UART I defined. The project loads and builds without error. I have tried with a fresh install of nRF Connect SDK and all dependencies and am on v1.0.0.

CMakeLists

cmake_minimum_required(VERSION 3.8.2)

include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
project(new_sample)

# NORDIC SDK APP START
target_sources(app PRIVATE src/main.c)

# new stuff
target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/fs/nvs C:/Users/user/Desktop/includes)

target_sources(app PRIVATE C:/Users/user/Desktop/includes/button.c)
target_sources(app PRIVATE C:/Users/user/Desktop/includes/gps_.c)
target_sources(app PRIVATE C:/Users/user/Desktop/includes/led.c)
target_sources(app PRIVATE C:/Users/user/Desktop/includes/mqtt_.c)


# NORDIC SDK APP END

prj.conf

# General config
CONFIG_ASSERT=y
CONFIG_TEST_RANDOM_GENERATOR=y

# BSD library
CONFIG_BSD_LIBRARY=y

# AT host library
CONFIG_AT_HOST_LIBRARY=y

# above is from at_client

# nvs
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y

CONFIG_NVS=y
CONFIG_LOG=y
CONFIG_LOG_DEFAULT_LEVEL=4
CONFIG_NVS_LOG_LEVEL_DBG=y
CONFIG_REBOOT=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y

# gps
CONFIG_NEWLIB_LIBC=y
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y

# uart
CONFIG_SERIAL=y
CONFIG_TRUSTED_EXECUTION_NONSECURE=y
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_UART_0_NRF_UARTE=y
CONFIG_UART_INTERRUPT_DRIVEN=y

# mqtt
CONFIG_HW_STACK_PROTECTION=y
CONFIG_IMG_MANAGER=y
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_MQTT_LIB=y
CONFIG_MQTT_LIB_TLS=y
CONFIG_FLOAT=y
CONFIG_CLIENT_ID_MAX_LEN=64

# fota
CONFIG_AWS_FOTA=y
CONFIG_NRF_DOWNLOAD_CLIENT_STACK_SIZE=4096
CONFIG_HEAP_MEM_POOL_SIZE=4096

# networking and sockets
CONFIG_STDOUT_CONSOLE=y
CONFIG_NETWORKING=y
CONFIG_NET_SOCKETS_OFFLOAD=y
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_SOCKOPT_TLS=y
CONFIG_NET_SOCKETS_POSIX_NAMES=y

# lte
CONFIG_LTE_LINK_CONTROL=y
CONFIG_LTE_AUTO_INIT_AND_CONNECT=n


nrf9160_pca10090ns.overlay

/* Needed to get NRF_UARTE2 and NRF_PWMn defined. */
&uart2 {
	status = "ok";
};

&uart0 {
	current-speed = <115200>;
	status = "ok";
	tx-pin = <11>;
	rx-pin = <12>;
	rts-pin = <13>;
	cts-pin = <14>;
};

nrf9160_pca10090.overlay in spm sample

/* Needed to get NRF_UARTE2 and NRF_PWMn defined. */
&pwm1 {
	status = "ok";
};

&pwm2 {
	status = "ok";
};

&pwm3 {
	status = "ok";
};

&uart2 {
	status = "ok";
};

&uart0 {
	current-speed = <115200>;
	status = "ok";
	tx-pin = <11>;
	rx-pin = <12>;
	rts-pin = <13>;
	cts-pin = <14>;
};

I've attached a zip of my main.c and includes. I left out the certificates.h and kconfig

Thanks

Parents Reply Children
No Data
Related