NRF9160

There is not much docs online on how to build for the nrf91 that actually work, here are some tips the we use.

Using west to build for the nrf91

install west: https://github.com/zephyrproject-rtos/west

pip3 install west

download gcc-arm-none-eabi-7-2018-q2-update don't use newer versions


Follow these setup directions for tools: https://docs.zephyrproject.org/latest/getting_started/installation_linux.html

mainly you will need an updated version of cmake. and dtc

following directions here: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/gs_ins_windows.html the key is using west, don't use git directly

west init -m https://github.com/NordicPlayground/fw-nrfconnect-nrf
west update
pip3 install -r zephyr/scripts/requirements.txt
pip3 install -r nrf/scripts/requirements.txt

add to .bashrc

export ZEPHYR_BASE=/path/to/ncs/zephyr
export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
export GNUARMEMB_TOOLCHAIN_PATH=/path/to/gcc-arm-none-eabi-7-2018-q2-update
source /path/to/ncs/zephyr/zephyr-env.sh 

then create a build folder in the application you wish to compile

cmake -DBOARD=nrf9160_pca10090ns -GNinja ..
ninja
ninja flash

Also currently SEGGER has issues (04-24-2019), so command line is the way to go.


if you get issues like this you need to use west, wipe your git checkouts and start over. :

prj.conf:13: warning: attempt to assign the value 'y' to the undefined symbol MQTT_SOCKET_LIB
prj.conf:15: warning: attempt to assign the value '2048' to the undefined symbol MQTT_MAX_PACKET_LENGTH
prj.conf:19: warning: attempt to assign the value 'y' to the undefined symbol LTE_LINK_CONTROL
prj.conf:20: warning: attempt to assign the value 'n' to the undefined symbol LTE_AUTO_INIT_AND_CONNECT
prj.conf:23: warning: attempt to assign the value 'y' to the undefined symbol MODEM_INFO
prj.conf:26: warning: attempt to assign the value 'y' to the undefined symbol BSD_LIBRARY
prj.conf:29: warning: attempt to assign the value 'y' to the undefined symbol NRF_CLOUD
prj.conf:36: warning: attempt to assign the value 'y' to the undefined symbol DK_LIBRARY
prj.conf:37: warning: attempt to assign the value 'n' to the undefined symbol DK_LIBRARY_INVERT_LEDS
prj.conf:50: warning: attempt to assign the value '1024' to the undefined symbol GPS_SIM_THREAD_STACK_SIZE