Vybrid IAR Boot File

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Vybrid IAR Boot File

720 Views
ogj
Contributor IV

Basically this is a question on creating a binary file using the IAR IDE that can be booted from QSPI flash. I asked IAR on how to do this since the issues are on using their IDE, however they want money (purchase a support agreement and we'll talk to you) for any answers. I'm just checking to see if anyone else out there has done this.

To boot from QSPI, a "boot block" must be created containing (at a minimum) the configuration parameters (starting at location 0 in the flash), the IVT (starting at location 0x400 in the flash), and the boot_data block (starting anywhere). An app is obviously also needed. The issue comes with combining all of this together in one binary file using IAR tools. It's "easy" to generate a bare metal app into a binary file by itself. What I am trying to do is generate a single binary file that contains both the app and the "boot block" together such that the binary output can be directly loaded into flash at location 0. This would be controlled by IAR's .icf file (their version of a scatter file). The issue is that the boot block is always excluded because there is no reference to it in the application - therefore the linker considers it unused and optimizes it away.

The easy approach is to of course load the two binaries into flash separately. I am just trying to see if anyone has been able to put everything together in one file. That way I know that the app follows right after the boot stuff and the QSPI doesn't transfer any "wasted space". 

0 Kudos
2 Replies

568 Views
kef2
Senior Contributor IV

Hi,

  • The issue is that the boot block is always excluded because there is no reference to it in the application

I've never used IAR, do they still support __root keyword?:

https://stackoverflow.com/questions/32607819/how-to-stop-optimizer-discard-unused-variables

If not, try looking in your manual for something like optimizing out unused symbols.

On the other hand, vybrid sample code includes IAR projects. See vybrid_sc\build]iar\projects\hello_world. Looking in project files it seems to me that XIP target is supported in IAR project as well. Try checking how do they enforce linking of IVT etc.

Edward

0 Kudos

568 Views
ogj
Contributor IV

Thanks for the feedback. Yes the __root keyword is still supported. I’ll give it a try.

0 Kudos