Forum Discussion

bsp_user's avatar
bsp_user
Icon for Occasional Contributor rankOccasional Contributor
3 years ago

scatter file, linker script and preloader integrations for loading from qspi using Arm compiler

Hi,

I have another open post regarding building bare metal app on Ubuntu while using GCC and loading it from QSPI.

Meanwhile I try to learn and understand how to configure my image memory layout in order for it to be loaded successfully from QSPI into SDRAM on the Arria V EVB.

1. I'm using the getting started project from here:

https://www.intel.com/content/www/us/en/support/programmable/support-resources/design-guidance/bare-metal-developer.html

(Arria V , ARM CC , Windows , ARM-DS 5)

2. I wish to understand the connections and the right configuration between the preloader build , the image scatter file and the linker script.

In another words:

What I need to write and where in order for the preloader to load the image from the qspi into SDRAM and jump to the suitable address.

1. what are the relevant configurations in the preloader build (bsp-editor)

2. how I write a suitable scatter file for this cause

3. how I write a suitable linker script (I saw it in GCC based projects) for this cause.

4. what are the correct commands (addresses) when creating mkimage and flashing it for everything to work properly.

It's like I have different puzzle pieces in front of me (preloder , image compilation , linker) and I want to connect them correctly for my bare metal app to load from qspi into SDRAM

* I wish to work with ARM CC because I think it makes my program run faster in comparison for GCC build.

Thank you very much

6 Replies

  • Jeet14's avatar
    Jeet14
    Icon for Frequent Contributor rankFrequent Contributor

    Hi,


    Any update on my previous reply.


    Regards

    Jeetesh


    • bsp_user's avatar
      bsp_user
      Icon for Occasional Contributor rankOccasional Contributor

      Hi,

      Thank you very much for your replies. I apologies I didn't replied back earlier.

      I saw this guide but my problem is understanding the logic behind the instructions:

      1. Build the sample bare-metal application or simply use the provided file hello-mkimage.bin directly.

      This specific project comes with a linker script and a pre-built preloader.

      I wish to learn\understand how this script settings affect the preloader build settings and flash settings.

      I can ask specific questions if you prefer.

      Generally I wish to understand how to choose specific addresses in my linker script and how to use them in scatter file, prelodaer build and flashing. (each of these modules has its own settings and some of them should be identical in order for the bare metal app to boot from qspi into sdram). The guide doesn't elaborates on them

  • Jeet14's avatar
    Jeet14
    Icon for Frequent Contributor rankFrequent Contributor

    Hi,


    Let me know if you have any other query on this matter.


    Regards

    Jeetesh


  • bsp_user's avatar
    bsp_user
    Icon for Occasional Contributor rankOccasional Contributor

    I read this guide.

    Is there any documentation/tutorial for learning the scatter file syntax, theory, etc.. ?