Forum Discussion
NIOS 2 for QSPI boot
Hello,
We are trying to boot NIOS 2 processor from QSPI(EPCQ64ASI16N) on customized cyclone V board(HPS is not usable). As of now we are trying to perform a memory test on Nios2 processor, facing issues while testing qspi memory.
Below is the memory test log,
<----> Nios II Memory Test. <---->
This software example tests the memory in your system to assure it
is working properly. This test is destructive to the contents of
the memory it tests. Assure the memory being tested does not contain
the executable or data sections of this code or the exception address
of the system.
Press enter to continue or 'q' to quit.
Base address to start memory test: (i.e. 0x800000)
>0x800020
0x800020
End Address:
>0xFFFFFE
0xFFFFFE
Testing RAM from 0x800000 to 0xFFFFFE
-Data bus test failed at bit 0x1
Press enter to continue or 'q' to quit.
Base address to start memory test: (i.e. 0x800000)
>0x1040020
0x1040020
End Address:
>0x1060F73
0x1060F73
Testing RAM from 0x1040020 to 0x1060F73
-Data bus test passed
-Address bus test passed
-Byte and half-word access test passed
-Testing each bit in memory device.
Also find the linker script below,
#ifndef __LINKER_H_
#define __LINKER_H_
/*
* BSP controls alt_load() behavior in crt0.
*/
#define ALT_LOAD_EXPLICITLY_CONTROLLED
/*
* Base address and span (size in bytes) of each linker region
*/
#define EPCQ_CONTROLLER2_0_AVL_MEM_REGION_BASE 0x1800000
#define EPCQ_CONTROLLER2_0_AVL_MEM_REGION_SPAN 8388608
#define ONCHIP_MEMORY2_0_REGION_BASE 0x2040020
#define ONCHIP_MEMORY2_0_REGION_SPAN 135092
#define RESET_REGION_BASE 0x2040000
#define RESET_REGION_SPAN 32
/*
* Devices associated with code sections
*/
#define ALT_EXCEPTIONS_DEVICE ONCHIP_MEMORY2_0
#define ALT_RESET_DEVICE ONCHIP_MEMORY2_0
#define ALT_RODATA_DEVICE ONCHIP_MEMORY2_0
#define ALT_RWDATA_DEVICE ONCHIP_MEMORY2_0
#define ALT_TEXT_DEVICE ONCHIP_MEMORY2_0
/*
* Initialization code at the reset address is allowed (e.g. no external bootloader).
*/
#define ALT_ALLOW_CODE_AT_RESET
/*
* The alt_load() facility is called from crt0 to copy sections into RAM.
*/
#define ALT_LOAD_COPY_RWDATA
#endif /* __LINKER_H_ */
Thanks,
snehal_p
6 Replies
- BoonBengT_Altera
Moderator
Hi @snehal_p,
Greetings, as we do not receive any further clarification/updates on the matter, hence would assume challenge are overcome.
Please login to ‘ https://supporttickets.intel.com/s/?language=en_US’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions. For new queries, please feel free to open a new thread and we will be right with you. Pleasure having you here.
Best Wishes
BB
- BoonBengT_Altera
Moderator
Hi @snehal_p,
Greetings, just checking in to see if there is any further doubts in regards to this matter.
Hope your doubts have been clarified.
Best Wishes
BB
- BoonBengT_Altera
Moderator
Hi @snehal_p,
Can you share what are the error message of the failure in programming the qspi using programmer?
Also what are the steps or command used?
Note: As for the steps and sample code it can be found in the following link which is a good references:
Best Wishes
BB
- BoonBengT_Altera
Moderator
Hi @snehal_p,
Greetings, just checking in to see if there is any further doubts in regards to this matter.
Hope your doubts have been clarified.
Best Wishes
BB
- BoonBengT_Altera
Moderator
Hi @snehal_p,
Thank you for posting in Intel community forum, hope all is well and apologies for the delayed in response.
Just a note, unfortunately for Nios II product it has been deprecated and would advise to move NiosV instead. More details can be found in the link below:
However we would still try our best to get into the challenges you mention on NiosII.
First note is that QSPI flash are not the same with RAM, hence cannot be tested with RAM memory test. Instead using the Intel’s flash programmer tools (nios2-flash-programmer) to verify read/write, or execute in place to run code directly in QSPI.
Also verify the QSPI controller instantiation in platform designer and correct based address (0x1800000) which matches the memory map in linker scripts. Last but not least you can verified the read/write by flashing the Nios ii firmware into the EPCQ. (i.e., using the nios2-flash-programmer command)
Best Wishes
BB
- snehal_p
Contributor
Hello BB,
We verified the QSPI controller instantiation in platform designer and correct based address (0x1800000) matches the memory map in linker scripts.
We tried to program qspi using programmer but it fails.
Can you please share steps to verify the read/write by flashing the Nios ii firmware into the EPCQ.
Thanks,
snehal_p