Intel® SoC FPGA Embedded Development Suite
Support for SoC FPGA Software Development, SoC FPGA HPS Architecture, HPS SoC Boot and Configuration, Operating Systems
472 Discussions

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

bsp_user
Beginner
1,198 Views

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

 

0 Kudos
6 Replies
Jeet14
Employee
1,168 Views

Hi,


Which tool version you are using for quartus & Qsys? Also, have you refer the Booting from QSPI Flash from the below link-

https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/an/an709.pdf


Regards

Jeetesh


0 Kudos
Jeet14
Employee
1,122 Views

Hi,


Any update on my previous reply.


Regards

Jeetesh


0 Kudos
bsp_user
Beginner
1,112 Views

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

0 Kudos
Jeet14
Employee
1,099 Views

Hi,


Please follow the steps given on below link. This link will help you to create the hello world project, modify project to run from SDRAM, creating new scatter file & preloader.


https://www.intel.com/content/dam/altera-www/global/en_US/uploads/f/f5/ASDF_SoC_Hands_BareMetal_for_AlteraWiki.docx


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


Regards

Jeetesh


0 Kudos
Jeet14
Employee
1,078 Views

Hi,


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


Regards

Jeetesh


0 Kudos
bsp_user
Beginner
967 Views

I read this guide.

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

0 Kudos
Reply