I have an Ubuntu VM (16.04) set up to connect to DE-10 board through the JTAG interface and the mini-Uart. I was able to blast FPGA image into the board; run a lightweight Linux shell through putty. I succeeded in running the example for DE-10_Standard_GHRD and HPS_FPGA_LED by executing the binary on the lightweight Linux shell. But when I tried to use Eclipse to build the software project for a debuggable version, I ran into all kinds of issues. I'm new to this embedded design. Would appreciate any help. Thanks!
1. Can we run eclipse in debugger mode for DE-10? Right now my DE-10 has a lightweight linux system (LXDE by DE-10) installed. How is the bare metal program loaded into the linux system by the debugger? Is it through linker target image _ro address? How do I know the value of the address?
**** Build of configuration Debug for project HPS_FPGA_LED_ARM5 ****
Building file: ../main.c
Invoking: ARM C Compiler 5
armcc -Dsoc_cv_av -I/home/mei/intelFPGA_soceds/17.0/embedded/ip/altera/hps/altera_hps/hwlib/include/soc_cv_av -I/home/mei/intelFPGA_soceds/17.0/embedded/ip/altera/hps/altera_hps/hwlib/include -I/home/mei/intelFPGA_soceds/17.0/embedded/ds-5/sw/gcc/arm-linux-gnueabihf/libc/usr/include -O0 -g --md --depend_format=unix_escaped --no_depend_system_headers -c -o "main.o" "../main.c"
Warning: C9931W: Your license for feature ulteval_armcompiler will expire in 14 days
"/home/mei/intelFPGA_soceds/17.0/embedded/ds-5/sw/gcc/arm-linux-gnueabihf/libc/usr/include/bits/stat.h", line 72: Error: #70: incomplete type is not allowed
struct timespec st_atim; /* Time of last access. */
"/home/mei/intelFPGA_soceds/17.0/embedded/ds-5/sw/gcc/arm-linux-gnueabihf/libc/usr/include/bits/stat.h", line 73: Error: #70: incomplete type is not allowed
struct timespec st_mtim; /* Time of last modification. */
"/home/mei/intelFPGA_soceds/17.0/embedded/ds-5/sw/gcc/arm-linux-gnueabihf/libc/usr/include/bits/stat.h", line 74: Error: #70: incomplete type is not allowed
struct timespec st_ctim; /* Time of last status change. */
"../main.c", line 47: Error: #852: expression must be a pointer to a complete object type
h2p_lw_led_addr=virtual_base + ( ( unsigned long )(
ED_PIO_BASE ) & ( unsigned long)(
W_REGS_MASK ) );
../main.c: 0 warnings, 4 errors
subdir.mk:18: recipe for target 'main.o' failed
Here you have a link , where you can find how to install and running the tools correctly. Also how to build and load and example to the board.
Please tell me if this information works!
Thank you for the link. I've followed quite a few links and haven't been able to complete any successfully. I have a better understanding of bare metal debugging and was able to run "hello world" on DE-10 board through loading to on-chip memory following this link "Bare Metal User Guide" https://www.intel.com/content/www/us/en/programmable/documentation/lro1424280108409.html#lro14243147...
However, I wasn't able to run from SDRAM following that guide, after running the preloader. I got the exact ERROR it warns of:
If the SDRAM is not configured before you start running the project from SDRAM, the following error messages appears:
ERROR(CMD16-TAD274-NAL22): ! Failed to load "bare metal-hello-world-01.axf" ! Failed to write 4,896 bytes to address S:0x02000000 while writing block of 4,096 bytes to address S:0x02000000 ! General error on memory or register access.
Do you have any idea of what could go wrong?
Your link requests download for ARM DS version 20.0. I'm using Altera soceds v17.0. When I downloaded the software, it never asked to download ARM DS separately. As a result I had issues to run the examples in the link. I wonder if the difference in the tool versions caused all my pains.
Thanks again for your time.
Can you confirm if you follow the build U-Boot process for Cyclone V?
Can you follow these steps at the link that I gave you? Until the step "9. Serial console will display that SPL ran fine and calibrated DDR successfully"
There's no problem with the versions.