Forum Discussion
Intermittent DE10-Standard error starting GDB server with quartus_hps
Hello,
We've done some further testing using openFPGALoader and OpenOCD and wondering if what we have found might be related to the above preloader issue.
1. We first used quartus_cpf to create an uncompressed .rbf from intelFPGA_lite/18.1/University_Program/Computer_Systems/DE10-Standard/DE10-Standard_Computer/verilog/DE10_Standard_Computer.sof
2. We then programmed the SRAM with: openFPGALoader -c usb-blasterII --probe-firmware/opt/intelFPGA_lite/18.1/quartus/linux64/blaster_6810.hex --index-chain 1 /home/user/fpga/DE10_Standard_Computer.rbf
3. Next we used a slightly modified version of OpenOCD's altera_fpgasoc.cfg (the jtag newtap commands needed to be reversed) to run OpenOCD using test.cfg (attached): openocd -f "/home/user/fpga/openocd_test.cfg" -d2
4. We were then able to connect to the board with 'telnet localhost 4444' and run some basic test commands (halt, checked registers, etc.)
5. We added a .tcl file (prepared by my co-worker, AI-assisted, attached) to prepare CPU 0 and load /opt/intelFPGA_lite/18.1/University_Program/Monitor_Program/arm_tools/u-boot-spl.de10-standard.srec , which transfers successfully every time we've tested:
> de10_run_preloader
de10: loading preloader u-boot-spl.de10-standard.srec into on-chip RAM
34260 bytes written at address 0xffff0000
3796 bytes written at address 0xffff85d8
downloaded 38056 bytes in 1.564903s (23.748 KiB/s)
> de10_run_preloader
de10: loading preloader u-boot-spl.de10-standard.srec into on-chip RAM
34260 bytes written at address 0xffff0000
3796 bytes written at address 0xffff85d8
downloaded 38056 bytes in 1.568080s (23.700 KiB/s)
> de10_run_preloader
de10: loading preloader u-boot-spl.de10-standard.srec into on-chip RAM
34260 bytes written at address 0xffff0000
3796 bytes written at address 0xffff85d8
downloaded 38056 bytes in 1.562973s (23.778 KiB/s)
6. We then added breakpoints and an attempt to run the preloader into the .tcl file with:
bp 0xffff14f0 4 hw
resume 0xffff0000
set rc [catch { wait_halt 15000 } err]
rbp 0xffff14f0
Attempting to run the preloader succeeds about half the time with:
> de10_run_preloader
de10: loading preloader u-boot-spl.de10-standard.srec into on-chip RAM
target halted in ARM state due to breakpoint, current mode: Supervisor
cpsr: 0x200001d3 pc: 0xffff14f0
MMU: disabled, D-Cache: disabled, I-Cache: enabled
de10: preloader finished (DDR3 initialized)
The other half of the time it fails (using the hardware HPS reset button between tests) with:
de10: loading preloader u-boot-spl.de10-standard.srec into on-chip RAM
timed out while waiting for target halted
After adding a check for how far the preloader gets on resume shows semi-consistent failure:
Failure 1 - Error: de10: preloader did not reach 0xffff14f0 (PC=0x00002fa8)
Falure 2 - Error: de10: preloader did not reach 0xffff14f0 (PC=0x00002fa4)
Failure 3 - Error: de10: preloader did not reach 0xffff14f0 (PC=0x00002fa8)
Failure 4 - Error: de10: preloader did not reach 0xffff14f0 (PC=0x00002fa8)
Let us know if we can provide any further details. thanks again
- tehjingy_Altera11 days ago
Regular Contributor
Hi
Thank you for the additional testing, that was very useful.
Your results indicate that the stock preloader downloads into on-chip RAM reliably, but could not run till DDR initialization..
On the failing board could you try capturing the HPS UART output?
Optionally could you try repeating the test with a full board power cycle instead the reset?