Forum Discussion
What am I missing? - Bare metal development hwlibs not compiling
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?
6 Replies
- FawazJ_Altera
Frequent Contributor
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 - ACarp2
New Contributor
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.
- FawazJ_Altera
Frequent Contributor
Hello, You can refer to this document: https://www.intel.com/content/www/us/en/programmable/documentation/lro1424280108409.html Also, you can refer to one of these examples to test your design: https://www.intel.com/content/www/us/en/programmable/support/support-resources/design-guidance/bare-metal-developer.html Thanks - AJama4
Occasional Contributor
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)
- MHawk6
New Contributor
I am also having this same issue. Can support please advise a solution?
- MscMechatronics
New Contributor
I'm also facing this very same problem. Would be much appreciated if anyone could provide help.
Kind Regards from Sweden