Enabling MCUBOOT does not run application

I am trying to add BLE OTA to our project for our custom NRF52833 board. We are using nrfconnect together with visual studio code and are using the most recent toolchain (nrf Connect SDK v2.1.1) we are using a j-link Segger to flash and debug our applications.

I am following the tutorial Add DFU support to your application - Software - nRF Connect SDK guides - Nordic DevZone (nordicsemi.com) and the code compiles but nothing happens when I flash it to the target. I tried lots of things, but I do not seem to get any further.

Hence, I decided to get back to the basics. So I set-up the hello-world sample for our board with the following configuration prf.conf:

CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y

CONFIG_USE_SEGGER_RTT=y
CONFIG_SERIAL=n
CONFIG_CONSOLE=y
CONFIG_STDOUT_CONSOLE=y
CONFIG_RTT_CONSOLE=y

CONFIG_GPIO=y

This displays the hello world message and also an LED is switched on. Now, when I enable the MCUboot in the conf file: 

CONFIG_BOOTLOADER_MCUBOOT=y
the code compiles and flashes successfully, I can reset it, I can connect the Segger using j-link rtt viewer but I do not see the print statement or any feedback from the chip, nor is the LED is turned on. 
So either, I am missing a step / insight here, or there is something not working as expected. 
Am I correct to assume that enabling the bootloader should run the application in the same way as when it is disabled? Or is just enabling MCUBoot not enough to get the system to working? Hopefully someone can help me getting this right / clarifying this.
My second goal is to get the BLE OTA (or should I say FOTA) functionality working. For this I followed the tutorial but also set-up a sample based on the peripheral_hr sample (which feels a bit more simple / clear to me. Again, I can get that sample to work but as soon as I enable the MCUBOOT and OTA functionality, the code compiles fine and also flashes fine but the application does not return anything. 
To keep things simple, perhaps it is best to clarify/solve the hello world issue first before going into the BLE OTA part.
Many thanks!
 

Parents
  • Dear Vidar, 

    Thanks for the quick response. Yes you are correct about not having a crystal. 

    I added the child_image folder and the mcuboot.conf with 

    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y inside

    That indeed works! I also tried with the BLE set up and that is also working, very nice! Many thanks!
    As a side note, I actually tried this before but I also read somewhere you need to tell cmakelists to use this conf file
    set(mcuboot_CONF_FILE ${CMAKE_CURRENT_SOURCE_DIR}/child_image/mcuboot.conf)
    the combination of those does not work. 
    One detail I am still curious about is that in the examples people share I can see output from the MCU bootloader but I do not get this, I only see the output from the app. (I tried to add the segger set up to the mcuboot.conf file but that does not help. 
Reply
  • Dear Vidar, 

    Thanks for the quick response. Yes you are correct about not having a crystal. 

    I added the child_image folder and the mcuboot.conf with 

    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y inside

    That indeed works! I also tried with the BLE set up and that is also working, very nice! Many thanks!
    As a side note, I actually tried this before but I also read somewhere you need to tell cmakelists to use this conf file
    set(mcuboot_CONF_FILE ${CMAKE_CURRENT_SOURCE_DIR}/child_image/mcuboot.conf)
    the combination of those does not work. 
    One detail I am still curious about is that in the examples people share I can see output from the MCU bootloader but I do not get this, I only see the output from the app. (I tried to add the segger set up to the mcuboot.conf file but that does not help. 
Children
No Data
Related