Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12629 Discussions

Cannot build smallC lib for Nios II with FPH2

minhlee
Beginner
304 Views

Hi everyone, currently I am developing mandelbrot plot using Nios II with custom hardware Floating point module FPH2 from Intel for my DE10-Nano broad. I try to build BSP library smallC for it as it is required. However, I cannot build it due to error related in Makefile:

```bash

/usr/bin/mkdir -p doc
gcc -g -g -O2 -o doc/makedoc.o -c /mnt/e/software/quartus-lite-23.1/fpga/nios2eds/bin/gnu/src/newlib-4.3.0/newlib/doc/makedoc.c
gcc -g -O2 -o doc/makedoc doc/makedoc.o
make "CC_FOR_BUILD=gcc" "CFLAGS=-g -Os -ffunction-sections -fdata-sections -mno-gpopt" "CCASFLAGS=-g -Os -ffunction-sections -fdata-sections -mno-gpopt" "CFLAGS_FOR_BUILD=-g -O2" "CFLAGS_FOR_TARGET=-g -Os -ffunction-sections -fdata-sections -mno-gpopt" "INSTALL=/usr/bin/install -c" "LDFLAGS=" "LIBCFLAGS=-g -Os -ffunction-sections -fdata-sections -mno-gpopt" "LIBCFLAGS_FOR_TARGET=-g -Os -ffunction-sections -fdata-sections -mno-gpopt" "MAKE=make" "MAKEINFO=makeinfo --split-size=5000000 " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/bash" "EXPECT=expect" "RUNTEST=runtest" "RUNTESTFLAGS=" "exec_prefix=/mnt/d/software/verilog/NIOSII_HDMI/software/mandelbrot_plot_bsp/newlib" "infodir=/mnt/d/software/verilog/NIOSII_HDMI/software/mandelbrot_plot_bsp/newlib/share/info" "libdir=/mnt/d/software/verilog/NIOSII_HDMI/software/mandelbrot_plot_bsp/newlib/lib" "prefix=/mnt/d/software/verilog/NIOSII_HDMI/software/mandelbrot_plot_bsp/newlib" "tooldir=/mnt/d/software/verilog/NIOSII_HDMI/software/mandelbrot_plot_bsp/newlib/nios2-elf" "top_toollibdir=/mnt/d/software/verilog/NIOSII_HDMI/software/mandelbrot_plot_bsp/newlib/nios2-elf/lib" "AR=/mnt/d/software/verilog/NIOSII_HDMI/software/mandelbrot_plot_bsp/newlib-build-tmp/build-newlib-stage-wrapper nios2-elf-ar.exe" "AS=/mnt/d/software/verilog/NIOSII_HDMI/software/mandelbrot_plot_bsp/newlib-build-tmp/build-newlib-stage-wrapper nios2-elf-as.exe" "CC=/mnt/d/software/verilog/NIOSII_HDMI/software/mandelbrot_plot_bsp/newlib-build-tmp/build-newlib-stage-wrapper nios2-elf-gcc.exe -B/mnt/d/software/verilog/NIOSII_HDMI/software/mandelbrot_plot_bsp/newlib-build-tmp/smallc/nios2-elf/newlib/ -isystem /mnt/d/software/verilog/NIOSII_HDMI/software/mandelbrot_plot_bsp/newlib-build-tmp/smallc/nios2-elf/newlib/targ-include -isystem /mnt/e/software/quartus-lite-23.1/fpga/nios2eds/bin/gnu/src/newlib-4.3.0/newlib/libc/include -B/mnt/d/software/verilog/NIOSII_HDMI/software/mandelbrot_plot_bsp/newlib-build-tmp/smallc/nios2-elf/libgloss/nios2 -L/mnt/d/software/verilog/NIOSII_HDMI/software/mandelbrot_plot_bsp/newlib-build-tmp/smallc/nios2-elf/libgloss/libnosys -L/mnt/e/software/quartus-lite-23.1/fpga/nios2eds/bin/gnu/src/newlib-4.3.0/libgloss/nios2 " "LD=nios2-elf-ld.exe" "LIBCFLAGS=-g -Os -ffunction-sections -fdata-sections -mno-gpopt" "NM=nios2-elf-nm.exe" "PICFLAG=" "RANLIB=/mnt/d/software/verilog/NIOSII_HDMI/software/mandelbrot_plot_bsp/newlib-build-tmp/build-newlib-stage-wrapper nios2-elf-ranlib.exe" "DESTDIR=" DO=all multi-do # make
libc/argz/.deps/libc_a-argz_add.Po:1: *** target pattern contains no '%'. Stop.
make[4]: *** [Makefile:49062: all-multi] Error 2
make[3]: *** [Makefile:5078: all] Error 2
make[2]: *** [Makefile:8502: all-target-newlib] Error 2
nios2-newlib-gen: Unable to Compile smallc newlib

```

My environment is Win 11, WSL2, Quartus Lite 23.1, What should I do to fix this error?

 

0 Kudos
5 Replies
aikeu
Employee
219 Views
0 Kudos
minhlee
Beginner
206 Views

Hi @aikeu,

I don't think there is much difference between WSL1 and WSL2. I have built the Hello World example program for Nios II, and it worked. However, when I tried to built the example program for floating point program, it gave me error. I think there is problem with the Nios II build tool for generating the correct Makefile for building the library with custom nios floating point hardware instruction.

 

0 Kudos
aikeu
Employee
188 Views

Hi minhlee,


Probably can check out this forum post as it relates to the smallc compilation error:

https://community.intel.com/t5/Intel-Quartus-Prime-Software/Nios-II-Eclipse-stuck-while-compiling-newlib-for-a-smallc-C/m-p/636552


Thanks.

Regards,

Aik Eu


0 Kudos
aikeu
Employee
110 Views

Hi minhlee,


I will close the thread if no further question.


Thanks.

Regards,

Aik Eu


0 Kudos
aikeu
Employee
93 Views

Hi minhlee,


As we do not receive any response from you on the previous question/reply/answer that we have provided. Please login to ‘https://supporttickets.intel.com/s/?language=en_US’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.



Thanks.

Regards,

Aik Eu


0 Kudos
Reply