Modify the MCUboot's booting process

Hi,

I want to use the MCUboot for the DFU and I have been able to configure it and flash it on the device so far (tested that it is correctly flashed).

But I need to make some modifications to the MCUboot's booting process to match with the device's specifications, the modifications that I need to do are:

  • Set a PIN on High as soon as it is powered, the device's turn off if I don't.
  • The device runs on battery so I need to check that the charger is connected before or that it has enough battery.
  • Change the upgrade strategy from swapping the images in the memory slots to just changing the address of the image that it will boot.

I would like to know the best way to make this modifications and in the case of the third point if there is a configuration option or example.

Parents
  • Hi,

    I would like to know the best way to make this modifications and in the case of the third point if there is a configuration option or example.

    If you need to run a function at boot, then the SYS_INIT can be used. (e.g. placed at the bottom of main.c of MCUBoot, assuming it's too late for your device to do it in your own application).

    Change the upgrade strategy from swapping the images in the memory slots to just changing the address of the image that it will boot.

    I'm not seeing any such configs. You can read about the upgrade strategies e.g. here 

  • Hi, I asked the about the Direct XIP since it was related with the point

    Change the upgrade strategy from swapping the images in the memory slots to just changing the address of the image that it will boot.

    but you are right this seems to be escalated so I will move it to a different case.
    As for the other 2 points they are both solved, the verification of the PIN's level before the Application started was solved with the SYS_INIT in the board.c file and the verification that the charger is connected was solved by reading the DTR of the USB port, this last one I found it on the USB console sample.

    Thanks

    Erasmo

Reply
  • Hi, I asked the about the Direct XIP since it was related with the point

    Change the upgrade strategy from swapping the images in the memory slots to just changing the address of the image that it will boot.

    but you are right this seems to be escalated so I will move it to a different case.
    As for the other 2 points they are both solved, the verification of the PIN's level before the Application started was solved with the SYS_INIT in the board.c file and the verification that the charger is connected was solved by reading the DTR of the USB port, this last one I found it on the USB console sample.

    Thanks

    Erasmo

Children
No Data
Related