FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
5922 Discussions

Debugging SW in DS-5 Eclipse Using DE-10 Standard board (ARM Cortex-A9 Core)

MeiB
Beginner
791 Views

Hi, Folks, 

 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? 

2. If I used the GCC compiler (DS-5 built-in) I was able to compile the project. But there is no option to select the target to load image. I'm not sure this would work. 
 
3. If I use ARM 5 compiler, I have to set up paths and symbols. But compiler/linker errors still occur,  as shown below. Who can point out what's missing? 
 

**** Build of configuration Debug for project HPS_FPGA_LED_ARM5 ****

make all 

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  )( 

LT_LWFPGASLVS_OFST + 

ED_PIO_BASE ) & ( unsigned long)( 

W_REGS_MASK ) );

                            ^

../main.c: 0 warnings, 4 errors

subdir.mk:18: recipe for target 'main.o' failed

 

 
0 Kudos
4 Replies
Isaac_V_Intel
Employee
756 Views

Hello MeiB,


Here you have a link [1], 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!


[1] https://rocketboards.org/foswiki/Documentation/SoCEDS


Best regards,

Isaac Vazquez.


0 Kudos
MeiB
Beginner
749 Views

Hi, Asaac, 

   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#lro1424314705998

     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. 

 

 

0 Kudos
Isaac_V_Intel
Employee
731 Views

Hello MeiB,


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.


Best regards,

Isaac Vazquez.


0 Kudos
Isaac_V_Intel
Employee
723 Views

Hello!


Just for give a follow up on this case, you still having the issue?


Best regards!


0 Kudos
Reply