MCUBOOT RA6E1 Memory Region Issue

Hi! I have ported the "ra6-secure-firmware-update-using-mcuboot-and-flash-dual-bank-application-project" to RA6E1 and we have USB interface soldered correctly. 

Changes : I had to change the Heap Size to 0x1800 of the Bootloader project for MbedTLS (Hardware Acceleration - PKC) . I have set UCLK to 48MHz for USB PCDC. A few other minor changes. 

I did not change the stack size for primary or secondary projects.

Re-create the Issue : 

1. Erase MCU using Renesas Device Partition Manager. 

2. Debug primary_project and using USB interface, update to 1.1

3. Now try to erase secondary image to upgrade to 1.2, but stuck on Erasing secondary slot...

Inference : When I debug, I can see the R_FLASH_HP_BlankCheck() failing after erasing secondary slot ( close to the end of SECONDARY_IMAGE_END_ADDRESS ), I was confused whether the size of the image could be causing issues, or the above mentioned changes I did.

Also, could you suggest me to look at something, that might help me be certain about the Image Sizes that I need to change once I start adding more stuff to the primary and secondary projects (currently I am using https://github.com/renesas/ra-fsp-examples/tree/master/application_projects/r11an0570/example_projects_with_bootloader)

Parents Reply
  • Hello sir,

    As far I can understand your issue is that as soon as you load the secondary application image and then you press again 2 to load again a new image through XMODEM on the MCU the erasing process, seems to get stuck? Is that correct?

    Could you please send me Flash layout in the new bootloader project you created?

    Have you also enabled the Dual Bank for RA6E1?

    And in header.h  file what are the macros that define these info as shown here in your application projects?

    The example is created such way so that:

    The flash is divided in two banks:

    And these are the addresses which are reserved for the bootloader and the primary and secondary application.

    Are you sure that you haven't enabled any block protection for code flash in the secondary application configuration.xml ?

    Check the settings under BSP Tab in BPS2:

    Or PBPS2:

    And let us know.

    Regards,

    IK

Children
No Data