Forum Discussion
Hello,
Thank you for the information in the post from above. I am having issues running the boot copier directly from EPCQ64 using the Cyclone 10LP FPGA Kit .
Following this post and attached zip folder C10LP_NIOS2.zip I have completed the following steps:
STEP 1: SET PARAMETERS WITHIN PLATFORM DESIGNER
1) Using Nios II/e
RESET VECTOR PARAMETERS:
- Reset Vector Memory : PERIPHERALS_EPCQ64.avl_mem
- Reset Vector offset : 0x 0008 0000 (.SOF Image size - 0x0003 B162)
- Reset Vector : 0x 0088 0000
EXCEPTION VECTOR PARAMETERS:
- Exception Vector Memory: PERIPHERALS_OCRAM.s1
- Exception Vector offset: 0x 0000 0020
- Exception Vector : 0x 0101 0020
2) Within the PERIPHERALS QSYS FILE:
OCRAM (On Chip RAM)
- s1 Data width : 32
- Total Memory Size : 40,500 bytes
- Initialize Memory Content - (Check marked - ENABLED - also tried with this option disabled)
Serial Flash Controller II Intel FPGA IP
- EPCQ64
STEP 2: Quartus Prime compile (re-attach SYSTEM.qip)
STEP 3: Start Eclipse IDE (setup project, import files from zip folder)
STEP 4: Start the BSP Editor
- Main Tab: hal.linker (ALL UNCHECKED)
- allow code at reset
- enable alt load
- enable alt load copy rodata
- enable alt load copy rwdata
- enable alt load copy exceptions
- Linker Script Tab
- Set all to OCRAM (.bss, .exceptions, .heap, .rodata, .rwdata, .stack, .text)
- .entry : only linker section set to EPCQ64_AVL_MEM
- CLICK GENERATE
STEP 5: Build Project ( successful compile)
STEP 6: Click Programmer, download .sof only (LED's now are illuminated on the board)
STEP 7: Run the Debug from Eclipse IDE
- LEDs are now toggling live
- NIOS II Console now showing hello world strings
- Successfully running
STEP 8: If reset pressed, SOF file erased, confirmed
STEP 9: Generate .HEX Files
- Make Target -> Build -> mem_init_generate -> Click Build (Generates the below)
- PERIPHERALS_EPCQ64.hex
- SYSTEM_PERIPHERALS_OCRAM.hex
STEP 10: Load .JIC using the Application Note (AN-736)
- TEST JIC with only .SOF and Flash loader
- Flash loader : 10CL025Y
- SOF Data Properties
- Page 0
- Select Start
- Start Address : 0x0
- SOF File Properties
- Compression checked (ENABLED)
STEP 11: Click Programmer, download .jic
STEP 12: Click on reset button on board - (LED's now are illuminated on the Cyclone 10LP Kit)
STEP 13: Run Program on Eclipse, Power Cycle, run program on Eclipse again to verify SOF is loaded properly
- program ran with no issues
----------------------------------------------------------------------------------------------------------------------------------------------------
Up to this point, the steps are clear. The next steps is where i see the issue where the code is not running upon reset. ----------------------------------------------------------------------------------------------------------------------------------------------------
For the next steps, I am executing the following steps:
STEP 14: Add hex file to JIC, under the Convert Programming Files tab
- Absolute Addressing
- Big Endian Selected
- Select file: mem_init -> PERIPHERALS_EPCQ64.hex (size 9.06KiB)
- Click Generate
- output file generated successfully
- SOF File and Flash Loader, loaded from previous step
STEP 15: Click Programmer, download new .jic (LED's now are illuminated on the Cyclone 10LP Kit)
STEP 16: Click on reset button on board - (LED's now are illuminated on the Cyclone 10LP Kit)
Note that if the code was running we should see the LEDs toggling as it is when i run the project.
LEDs are not toggling. So when I recompile, and run the debug it is now working again.
Questions:
1) From the steps above, I would assume that my .SOF and .ELF are properly being generated and running, What is unclear is why is my program not automatically loading after reset.
2) Am I missing any options within the BSP editor?
3) Is there anything missing from Platform Designer?
Thank you for your time and help in advance.
- ENGR_241 year ago
New Contributor
My apologies, the code is working now. I uncommented the printf("hello world") statement and that causes the LEDs to not toggle fully. Commenting it out fixed the issue.