Hi,
We have several boards on hand which fall into two categories:
Category A: Our application has been programmed with JTAG in the past
Category B: Out application has never been programmed with JTAG onto the boards.
Category A boards are all labeled version 1.2.0, Out of the Category B boards some are 1.2.0 and some are labeled 1.4.0
From the boards that have been flashed with JTAG (Category A) in the past, the following process works:
1) Flashing our application app_signed.hex via USB MCUBoot process and NRF programmer.
2) FOTA Update based on http_application_update sample.
3) After FOTA update, the newly downloaded application boots and runs permanently on the board.
From the boards that have never been flashed with JTAG, the step 3 fails. The board reverts the the original app flashed with MCUBoot. There is no indication that the newly flashed application even attempts to boot. It just rolls back to whatever was flashed with MCUBoot.
If we flash our application onto the Category B board, the board can go through steps 1, 2 and 3 without a problem.
We have also tried using the original http_application_update (with only modified URL) and observed the same behavior. The newly flashed application never boots.
We are aware that we need to confirm the boot_write_img_confirmed(), and that part works well on Category A boards.
The one thing that we concluded is that the JTAG flashing procedure of merged.hex flashes the MCU Boot portion of the board and now MCUBoot becomes "compatible".
The questions that I have are:
1) Does the described process require MCUBoot update?
2) If the process require MCUBoot update, can MCUBoot be flashed via the "MCUBoot" process or does it require JTAG?
3) If not, could you please point me to the document that explains the issue that we have ran into?
I apologize if this has been documented but I did not find any information that explains the issue that we am seeing.
I' pasting the prj.conf if it is of any use, but I am pretty confident that the same process fails without our application and just with http_application_update.
Thanks,
Nikola
# sys_rboot after OTA
CONFIG_REBOOT=y
# Sensors
CONFIG_ADXL362_TRIGGER_GLOBAL_THREAD=y
CONFIG_ADXL362_ABS_REF_MODE=1
CONFIG_ADXL362_ACTIVITY_THRESHOLD=200
CONFIG_ADXL362_INACTIVITY_THRESHOLD=200
CONFIG_ADXL362_INTERRUPT_MODE=1
# Library for buttons and LEDs
CONFIG_DK_LIBRARY=y
CONFIG_DK_LIBRARY_INVERT_LEDS=n
# Networking
CONFIG_NETWORKING=y
CONFIG_NET_NATIVE=n
CONFIG_NET_SOCKETS_OFFLOAD=y
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_POSIX_NAMES=y
# BSD library
CONFIG_BSD_LIBRARY=y
CONFIG_BSD_LIBRARY_SYS_INIT=y
CONFIG_BSD_LIBRARY_TRACE_ENABLED=n
# BSD library
CONFIG_BSD_LIBRARY=y
CONFIG_MODEM_KEY_MGMT=y
# LTE link control
CONFIG_LTE_LINK_CONTROL=y
CONFIG_LTE_AUTO_INIT_AND_CONNECT=n
# AT Host
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_AT_HOST_LIBRARY=y
# CONFIG_CJSON_LIB=n
CONFIG_NEWLIB_LIBC=y
# Added by W-ADS
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y
# MQTT
CONFIG_MQTT_LIB=y
CONFIG_MQTT_LIB_TLS=y
# FOTA requirements BEGIN
# ======================
# Image manager
CONFIG_IMG_MANAGER=y
CONFIG_FLASH=y
CONFIG_IMG_ERASE_PROGRESSIVELY=y
# FOTA library
CONFIG_FOTA_DOWNLOAD=y
# Download client
CONFIG_DOWNLOAD_CLIENT=y
CONFIG_DOWNLOAD_CLIENT_TLS=y
CONFIG_DOWNLOAD_CLIENT_SOCK_TIMEOUT_MS=10000
CONFIG_DOWNLOAD_CLIENT_MAX_TLS_FRAGMENT_SIZE=1024
# add debugging to fota log
CONFIG_LOG=y
CONFIG_LOG_IMMEDIATE=y
CONFIG_DOWNLOAD_CLIENT_LOG_LEVEL_DBG=y
# DFU Target
CONFIG_DFU_TARGET=y
# Application Upgrade support
CONFIG_BOOTLOADER_MCUBOOT=y
# ======================
# FOTA requirements END
# Main thread
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_HEAP_MEM_POOL_SIZE=4096