i have look for many DFU examples in NCS1.5.0 , but samples are Abstract ，and can not to start . a ble test app in phone have a menu that can send file to nrf5340 through ble , when ble of nrf5340 receive this file ,file can as a new image.
Follow the steps in this answer: https://devzone.nordicsemi.com/f/nordic-q-a/69368/nrf5340-fota-system-reset-after-pairing/286031#286031
I assume you have the nRF5340 DK and not the nRF5340 PDK. In that case use nrf5340dk_nrf5340_cpuapp instead of nrf5340pdk_nrf5340_cpuapp.
Simon ,thank you .
the way you have tested of DFU maybe only load the image of \ncs\v1.4.0\zephyr\samples\subsys\mgmt\mcumgr\smp_sv to the nrf5340dk board . when you want to run your own project ,you must first download the smp_sv image to nrf5340dk board ,later palce your own project image in a phone using this method to loaddown to nrf5340dk board .
but a project always need to revise . improve ,debug , when debugging ,i should directly download new image to nrf5340dk using debug tool , rather than place new image in a phone .to use the method you have told to load in nrf5340dk board.
how to creat a project that not only can update image using a phone app through bluetooth as you have told , but also can update image through debug tools like PCA10095 ?
zhouhaifang said: how to creat a project that not only can update image using a phone app through bluetooth as you have told , but also can update image through debug tools like PCA10095 ?
If you're struggling with programming the chip, you may have to recover it first, check out Readback protection for instructions how to do it.
If you are programming a BLE application, you need to program the network core manually first, check out 2.2 nRF5340 DK-->2.2.1 Build a BLE example for instructions how to do this
You can flash the image using the debugger/programmer in many different ways:
zhouhaifang said:Simon ,thank you .
I have already knew how to flash nrf5340dk ,but how to DFU nrf5340dk is not know .i can not build the example in v1.5.0\zephyr\samples\subsys\mgmt\mcumgr\smp_svr using BLe to upgrade image must enable CONFIG_MCUMGR_SMP_BT and include bluetooth.c in src folder ,but bulid ,these are many errors.
You don't need to include bluetooth.h or enable CONFIG_MCUMGR_SMP_BT explicitly. Just add the line '- -DOVERLAY_CONFIG=overlay-bt.conf' when building with west, which should include the file overlay-bt.conf and set CONFIG_MCUMGR_SMP_BT.
Please follow these steps: https://devzone.nordicsemi.com/f/nordic-q-a/69368/nrf5340-fota-system-reset-after-pairing/286031#286031
west build -b nrf5340dk_nrf5340_cpuapp -p -- -DOVERLAY_CONFIG=overlay-bt.conf && cd build && west flash
west build -b nrf5340dk_nrf5340_cpuapp -p