Intel® SoC FPGA Embedded Development Suite
Support for SoC FPGA Software Development, SoC FPGA HPS Architecture, HPS SoC Boot and Configuration, Operating Systems
445 Discussions

What am I missing? - Bare metal development hwlibs not compiling

ACarp2
Beginner
1,723 Views

Hello,

I am trying to create a project and compile with the hwlibs for bare metal development. I am working on a Cyclone V development board in DS-5 & I cannot compile the hwlibs because I get a lot of errors about many many things undefined. Examples are UART_MAX_LEN, off_t, and log_buf. It seems like there is a large file or set of files I am missing full of #defines for this specific chip. Can anyone help me, or does my question make sense?

0 Kudos
6 Replies
Fawaz_Al-Jubori
Employee
1,007 Views
Hello, I would like to know which Baremetal lib are you using? also I need to know which quartus version did you use? By defining the Quartus version, I can use the same DS-5 version and replicate the issue. Thanks
0 Kudos
ACarp2
Beginner
1,007 Views

I am not sure which Baremetal lib I am using. I Am just trying to find one that works. I did not use quartus in this process, as I am just trying to work with the hps for now. However, I am using DS-5 and Quartus 15.1.

0 Kudos
Fawaz_Al-Jubori
Employee
1,007 Views
0 Kudos
AJama4
Beginner
1,007 Views

I am facing the same issue, I have used Quartus 18.1 and EDS SoC 16.0 to build a bare-metal project. It gives following error while compiling :

11:13:06 **** Incremental Build of configuration Debug for project DE1_SoC_demo_hps_baremetal ****

make all 

Building file: ../src/utils/alt_retarget_gnu.c

Invoking: GCC C Compiler

arm-altera-eabi-gcc -Dsoc_cv_av -I"C:\altera\16.0\embedded\ip\altera\hps\altera_hps\hwlib\include" -I"C:\altera\16.0\embedded\ip\altera\hps\altera_hps\hwlib\include\soc_cv_av" -O0 -g -Wall -MMD -MP -MF"src/utils/alt_retarget_gnu.d" -MT"src/utils/alt_retarget_gnu.d" -c -o "src/utils/alt_retarget_gnu.o" "../src/utils/alt_retarget_gnu.c"

../src/utils/alt_retarget_gnu.c: In function '_write':

../src/utils/alt_retarget_gnu.c:88:20: error: 'UART_MAX_LEN' undeclared (first use in this function)

   if (max_len > (UART_MAX_LEN-1))

          ^

../src/utils/alt_retarget_gnu.c:88:20: note: each undeclared identifier is reported only once for each function it appears in

../src/utils/alt_retarget_gnu.c:93:14: error: 'log_buf' undeclared (first use in this function)

   snprintf(log_buf, max_len, ptr);    

       ^

../src/utils/alt_retarget_gnu.c:95:5: warning: implicit declaration of function 'alt_log_printf' [-Wimplicit-function-declaration]

   alt_log_printf(log_buf);

   ^

make: *** [src/utils/alt_retarget_gnu.o] Error 1

src/utils/subdir.mk:24: recipe for target 'src/utils/alt_retarget_gnu.o' failed

 

11:13:08 Build Finished (took 1s.810ms)

 

0 Kudos
MHawk6
Beginner
1,007 Views

I am also having this same issue. Can support please advise a solution?

0 Kudos
MscMechatronics
972 Views

I'm also facing this very same problem. Would be much appreciated if anyone could provide help.

Kind Regards from Sweden

0 Kudos
Reply