Community
cancel
Showing results for 
Search instead for 
Did you mean: 
wlin25
Beginner
911 Views

Problem of running HardwareLib example project on DE1-SoC

Hello,

 

I used Cyclone V SoCKit (DE1-SoC) and the EDS version is 18.0.

 

I tried to run the example project - Altera-SoCFPGA-HardwareLib-FPGA-CV-ARMCC.

I follow the step of Bare Metal User Guide (section: Importing, Building and Debugging in a Make-Based Example) from the intel. Please find the guide in attachment or use the link below.

 

https://www.intel.com/content/www/us/en/programmable/documentation/lro1424280108409.html#lro14243754... 

 

I build the project and run on the DE1-SoC (MSEL setting is PS mode) using DS-5 debugger, it runs but the program is hanging somewhere and non-stop running (show in picture).

The status of the debugger shows "script running" and non-stop. It only stop when I press the interrupt button. And the error below shows up:

 

ERROR(CMD361):

# in C:\DS-5 Workspace\Altera-SoCFPGA-HardwareLib-FPGA-CV-ARMCC\debug-hosted.ds:47 while executing: wait

! Wait for stopped interrupted

ERROR(CMD656): The script C:\DS-5 Workspace\Altera-SoCFPGA-HardwareLib-FPGA-CV-ARMCC\debug-hosted.ds failed to complete due to an error during execution of the script

 

The program stop in spl.c and stop in the function shows below :

 

inline void hang(void)

{

puts("### ERROR ### Please RESET the board ###\n");

for (;;)

;

}

 

The program stop at: puts("### ERROR ### Please RESET the board ###\n")

 

I tried to use the "step over source line" button to debug but it still hanging and didn't go to "for(;;)" source line.

 

I tried to use the "debug from main()" button instead of "step over source line" after the interrupt, it seems the the program has some problem so it return warnings shows below:

 

WARNING(CMD399-COR168):

! Failed to start the target

! No function named "main" could be found

WARNING(CMD407): Trying the entry point instead

 

I check the project again, and the project has a main function inside the hwlib.c file, but the program cannot see it.

The program stop at the "_start: b          reset" source line in start.S file, I press the "step over source line" button and the program go to the "bl             save_boot_params" source line, but when I press the button again, the program is hanging again.

 

Could please someone help me to figure out what's the problem and how can I solve this problem?

 

Thank you!

0 Kudos
2 Replies
YauWai_G_Intel
Employee
132 Views

From your report, it seems like the program execution was halted during the preloader (spl) and it enters the error loop. This usually could be failing to bring up the DDR memory or configuring the clock sources properly. Did you configure the board with the correct reference hardware design?

 

You can set a breakpoint in the spl code at the right spot before it enter the error dead loop, and debug step to see what is the actual failure in the preloader boot-up, which eventually caused the baremetal failed to run.​

MAyou
Beginner
132 Views

Hello

you don't need to reflash your sd card , you have just remove it and get it in again.

Reply