Hello,
So I've been using the following examples:
https://www.renesas.cn/cn/zh/document/apn/booting-encrypted-image-using-mcuboot-and-qspi-application-project
https://www.renesas.com/us/en/document/apn/ra6-basic-secure-bootloader-using-mcuboot-and-internal-code-flash
to make a MCUBoot application. Everything compiles and runs fine until I try to include the boot_set_confirmed function. If I include a call to this function in my application code then I get a bunch of linker errors all related to gp_mcuboot_xspi_instance being undefined:
In my application configuration I have the MCUboot Image Utilities stack.
I have imported this following project as well and have gotten it to compile just fine after updating it to FSP 5.4, and I based my project off of it so I'm not sure what I'm doing wrong
https://en.na4.teamsupport.com/knowledgeBase/20773940
Thanks in advance for any help.
Hey Nick,
The first app note you mentioned is for internal flash boot, and the second one is for external flash memory boot. These are different application notes, so could you please clarify what exactly you're trying to achieve? This will help me assist you more effectively.
Regards,
GN_
Hi,
I'm trying to implement the external qspi flash boot project.
I should also mention that in the Bootloader project if I try to add the MCUBoot Logging stack and enable any sort of logging at all there are also linker errors about undefined references to functions like "_close_r" and etc... So I'm not sure if there's some project configuration that's messed up on my end or what.
Apologies for the delayed response. I've been working on it. Could you share your code so I can debug it more effectively?
To impliment qspi flash boot project your using wrong stack you should use this stack attached in the image
Regards
Gaurav N
As I understand it, that is the stack for the bootloader program. Which I have set up and working. And it boots my user application just fine. However, I'd like the application to "confirm" that the image is good. Then are you supposed to use the MCUBoot Image Utilities stack in the user application in order to call boot_set_confirmed and the like?
Yes, in your case, after the bootloader has successfully booted the user application, the application should confirm that the image is good. This is typically done using the MCUBoot Image Utilities stack in the application. The function boot_set_confirmed() is used to mark the image as confirmed, ensuring that the bootloader doesn't roll back to a previous version during the next boot.
boot_set_confirmed()
GN_Renesas
The problem is though, while using the MCUBoot Image Utilities stack in the main application, if I try to call boot_set confirmed in the main application then I get the aforementioned loader issues. All these loader errors show up:
If I don't call boot_set_confirmed then I don't get the loader errors.
Hii Nick,
You need to call only one function quick setup the boot_set_confirmed function will be automatically called
Nick, did you solve this yet? I faced something similar and here's what I did>
Do a global search for (in you case) gp_mcuboot_xspi_instance, but for me it was gp_mcuboot_qspi_instance.
In my bootloader project, I found it here, in Hal data. It looks like an alias (so the name of the qspi can be anything) and the application can have access to it (though it is not used by the confirmation)
Then, in my application, I instanced a QSPI and named it this alias name.
Also, use --pad in your boot loader. Assuming you want fallback (in case the ap does not confirm) do not call boot_set_pending in the boot loader. I found that it created a situation where ie would swap every time it was reset, whether the ap had confirmed itself or not.
Hope this helps.
Dale.