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++
12652 Discusiones

Quartus 19.1 NIOS II ED error: Makefile:1012: recipe for target '***.elf' failed

Waveform
Novato
5.566 Vistas

Hello!

I try to port on Quartus 19.1 working NIOS II project, which was early built on Quartus II 18.1.

After installing all the necessaries (Eclipse and WSL , Ubuntu 18.04 and with all packages and updates), creating new bsp and application project, I get the following error, when i try to build all:

wsl make all
Info: Building /mnt/d/Work_FPGA/AXI_DIO64/axie_system_controller_V0/Software/hal_bsp/
make --no-print-directory -C /mnt/d/Work_FPGA/AXI_DIO64/axie_system_controller_V0/Software/hal_bsp/
[BSP build complete]
Info: Compiling src/Main.c to obj/default/src/Main.o
nios2-elf-gcc.exe -xc -MP -MMD -c -ID:/Work_FPGA/AXI_DIO64/axie_system_controller_V0/Software/hal_bsp/HAL/inc -ID:/Work_FPGA/AXI_DIO64/axie_system_controller_V0/Software/hal_bsp/ -ID:/Work_FPGA/AXI_DIO64/axie_system_controller_V0/Software/hal_bsp/drivers/inc -pipe -D__hal__ -DALT_NO_INSTRUCTION_EMULATION -DALT_SINGLE_THREADED -O0 -g -Wall -mno-hw-div -mhw-mul -mno-hw-mulx -mgpopt=global -o obj/default/src/Main.o src/Main.c
Info: Compiling src/ad9576.c to obj/default/src/ad9576.o
nios2-elf-gcc.exe -xc -MP -MMD -c -ID:/Work_FPGA/AXI_DIO64/axie_system_controller_V0/Software/hal_bsp/HAL/inc -ID:/Work_FPGA/AXI_DIO64/axie_system_controller_V0/Software/hal_bsp/ -ID:/Work_FPGA/AXI_DIO64/axie_system_controller_V0/Software/hal_bsp/drivers/inc -pipe -D__hal__ -DALT_NO_INSTRUCTION_EMULATION -DALT_SINGLE_THREADED -O0 -g -Wall -mno-hw-div -mhw-mul -mno-hw-mulx -mgpopt=global -o obj/default/src/ad9576.o src/ad9576.c
Info: Compiling src/dac7568.c to obj/default/src/dac7568.o
nios2-elf-gcc.exe -xc -MP -MMD -c -ID:/Work_FPGA/AXI_DIO64/axie_system_controller_V0/Software/hal_bsp/HAL/inc -ID:/Work_FPGA/AXI_DIO64/axie_system_controller_V0/Software/hal_bsp/ -ID:/Work_FPGA/AXI_DIO64/axie_system_controller_V0/Software/hal_bsp/drivers/inc -pipe -D__hal__ -DALT_NO_INSTRUCTION_EMULATION -DALT_SINGLE_THREADED -O0 -g -Wall -mno-hw-div -mhw-mul -mno-hw-mulx -mgpopt=global -o obj/default/src/dac7568.o src/dac7568.c
Info: Compiling src/stmpe1600.c to obj/default/src/stmpe1600.o
nios2-elf-gcc.exe -xc -MP -MMD -c -ID:/Work_FPGA/AXI_DIO64/axie_system_controller_V0/Software/hal_bsp/HAL/inc -ID:/Work_FPGA/AXI_DIO64/axie_system_controller_V0/Software/hal_bsp/ -ID:/Work_FPGA/AXI_DIO64/axie_system_controller_V0/Software/hal_bsp/drivers/inc -pipe -D__hal__ -DALT_NO_INSTRUCTION_EMULATION -DALT_SINGLE_THREADED -O0 -g -Wall -mno-hw-div -mhw-mul -mno-hw-mulx -mgpopt=global -o obj/default/src/stmpe1600.o src/stmpe1600.c
Info: Linking qsys-app.elf
nios2-elf-g++.exe -T'D:/Work_FPGA/AXI_DIO64/axie_system_controller_V0/Software/hal_bsp/linker.x' -msys-crt0='D:/Work_FPGA/AXI_DIO64/axie_system_controller_V0/Software/hal_bsp/obj/HAL/src/crt0.o' -msys-lib=hal_bsp -LD:/Work_FPGA/AXI_DIO64/axie_system_controller_V0/Software/hal_bsp/ -Wl,-Map=qsys-app.map -O0 -g -Wall -mno-hw-div -mhw-mul -mno-hw-mulx -mgpopt=global -o qsys-app.elf obj/default/src/Main.o obj/default/src/ad9576.o obj/default/src/dac7568.o obj/default/src/stmpe1600.o -lm -msys-lib=m
nios2-elf-insert.exe qsys-app.elf --thread_model hal --cpu_name nios2_gen2_0 --qsys true --simulation_enabled false --id 305419896 --sidp 0x400 --timestamp 1594123377 --stderr_dev jtag_uart_0 --stdin_dev jtag_uart_0 --stdout_dev jtag_uart_0 --sopc_system_name qsys_system --jdi /mnt/d/Work_FPGA/AXI_DIO64/axie_system_controller_V0/Software/hal_bsp/../../axie_system_controller.jdi
InvocationTargetException: null
Makefile:1012: recipe for target 'qsys-app.elf' failed
make: *** [qsys-app.elf] Error 1
make: *** Deleting file 'qsys-app.elf'

What may be cause of this error and how it could be fixed?

0 kudos
1 Solución
Waveform
Novato
5.414 Vistas

Hi!

The problem is solved, due to help of russian Intel distributor's engineering support. Thanks to Roman!
He pointed me to two things:
- need of dividing workspace project and source software directories. It must be different directories inside common project directory.
- use "New' - "NIOS II Application and Bsp from template" for generaion of new project structure. When I was generating new BSP, I used "New" - "NIOS II Board support package" and got such strange error:

Executing: wsl;nios2-bsp hal . ../../qsys_system.sopcinfo
--cpu-name nios2_gen2_0
(D:\Temp\axie_system_controller_restored\software\qsys_bsp)
/bin/bash: -c: line 0: syntax error near unexpected token `;'
/bin/bash: -c: line 0: `;nios2-bsp hal .
../../qsys_system.sopcinfo --cpu-name nios2_gen2_0'


Those advices helps me to build my project succesfuly in Quartus Prime Standart 19.1.

Ver la solución en mensaje original publicado

6 Respuestas
IntelSupport
Administrador
5.498 Vistas

Hello!


I'm going to help you during this issue that you are having.


The message means that your code is too large to fit into memory. The default size for on-chip memory is very small. Most of the tutorials have you use a larger on-chip memory size. Look at the on-chip memory module in QSYS. I should have a size large enough to fit your program. If it doesn't, pick a larger size (8K or 16K for example). Don't forget to re-generate the code in QSYS and re-compile in Quartus.


Try clicking on the auto-assign base address in the Qsys tool before generating the component.


If the issue persist, you need to add bytes to your memory size and auto-assign base address.


Let me know if you have any problem.


Best regards.

IsaacVazquez.


Waveform
Novato
5.493 Vistas

Hello!
I use generic parallel flash memory for storing and booting nios program code. It connects to NIOS on system planer thru Generic Tri-State Controller and Tristate Condute Bridge as recomended in Embedded Design Handbook. Flash memory has the volume of 64MB, more than enough for any kind of code. OnChip RAM I use only for exception vector and it has capacity of 32 KB. I extended it to 64KB, but no use.
NIOS CPU is runing on MAX10 device.
Only thing I want to mention is that, this project nice works and compiles on Quartus Prime Standart 18.1.

My Regards, Andrey

Isaac_V_Intel
Empleados
5.454 Vistas

Hi,


I see, your project works with Quartus 18.1 because Eclipse and Quartus are at the same package. From 19.1 Quartus and Eclipse are separated.


I saw a KDB to work around your possible issue, can you try this? [1]


If this does not work with your issue, can you share with me, which steps did you follow to do the 'make all' exactly? So, I can know more about it and do more debug into this.


[1] https://www.intel.com/content/altera-www/global/en_us/index/support/support-resources/knowledge-base/tools/2019/why-does-nios-build-flow-produce-incorrect--elf-file-size-on-win.html 


Thanks.

Best regards.


Waveform
Novato
5.432 Vistas

Hi! Thank you for support in my question.


I tried to run in wsl command prompt such command, as was recommended in support article:
make SOPCINFO_FILE=/mnt/d/Temp/axie_system_controller/qsys-system.sopcinfo --no-print-directory -C /mnt/d/Temp/axie_system_controller/Software/hal_bsp/
And I got the message: [BSP build complete]
So, it doesn' change the futher situation. After that, I got the same error.
Also, I added in the application make file such string:
SOPC_FILE := ../../qsys_system.sopcinfo
, and it doesn't helped me too.

I suppose, that the problem is in next tool:
nios2-elf-g++.exe -T'D:/Temp/axie_system_controller/Software/hal_bsp/linker.x' -msys-crt0='D:/Temp/axie_system_controller/Software/hal_bsp/obj/HAL/src/crt0.o' -msys-lib=hal_bsp -LD:/Temp/axie_system_controller/Software/hal_bsp/ -Wl,-Map=qsys-app.map -O0 -g -Wall -mno-hw-div -mhw-mul -mno-hw-mulx -mgpopt=global -o qsys-app.elf obj/default/src/Main.o obj/default/src/ad9576.o obj/default/src/dac7568.o obj/default/src/stmpe1600.o -lm -msys-lib=m

, which must generate the .elf file, but it doesn't do it.

My be I should try the last version of Quartus Prime standart 20.1?

Best regards, Andrey

Waveform
Novato
5.415 Vistas

Hi!

The problem is solved, due to help of russian Intel distributor's engineering support. Thanks to Roman!
He pointed me to two things:
- need of dividing workspace project and source software directories. It must be different directories inside common project directory.
- use "New' - "NIOS II Application and Bsp from template" for generaion of new project structure. When I was generating new BSP, I used "New" - "NIOS II Board support package" and got such strange error:

Executing: wsl;nios2-bsp hal . ../../qsys_system.sopcinfo
--cpu-name nios2_gen2_0
(D:\Temp\axie_system_controller_restored\software\qsys_bsp)
/bin/bash: -c: line 0: syntax error near unexpected token `;'
/bin/bash: -c: line 0: `;nios2-bsp hal .
../../qsys_system.sopcinfo --cpu-name nios2_gen2_0'


Those advices helps me to build my project succesfuly in Quartus Prime Standart 19.1.

WShep1
Nuevo Colaborador II
5.329 Vistas

I have just migrated from 18.1 to 20.1 Lite.  I am working on a W10 machine and have installed WSL, Ubuntu, etc.  NIOS II SBT is running and I was able to create a new project from template as instructed.  I created a project using the "Small Hello World" template.  The application and bsp projects were created.  Cleaning and building the bsp project works well as does clean the application project.  However, when I try to build the application project, I get the following error -

10:03:31 **** Build of configuration Nios II for project test_20_1_7 ****
wsl make all
wslpath: hal_bsp: No such file or directory
Info: Building /mnt/c/a_Nightowl/wds2hdmi/rtl/qsys/software/test_20_1_7_bsp/
make --no-print-directory -C /mnt/c/a_Nightowl/wds2hdmi/rtl/qsys/software/test_20_1_7_bsp/
[BSP build complete]
Info: Compiling hello_world_small.c to obj/default/hello_world_small.o
nios2-elf-gcc.exe -xc -MP -MMD -c -IC:/a_Nightowl/wds2hdmi/rtl/qsys/software/test_20_1_7_bsp/HAL/inc -IC:/a_Nightowl/wds2hdmi/rtl/qsys/software/test_20_1_7_bsp -IC:/a_Nightowl/wds2hdmi/rtl/qsys/software/test_20_1_7_bsp/drivers/inc -pipe -D__hal__ -DALT_NO_C_PLUS_PLUS -DALT_NO_CLEAN_EXIT -D'exit(a)=_exit(a)' -DALT_NO_EXIT -DALT_USE_DIRECT_DRIVERS -DALT_NO_INSTRUCTION_EMULATION -DALT_USE_SMALL_DRIVERS -DSMALL_C_LIB -DALT_SINGLE_THREADED -Os -g -Wall -mno-hw-div -mno-hw-mul -mno-hw-mulx -mgpopt=global -o obj/default/hello_world_small.o hello_world_small.c
Info: Linking test_20_1_7.elf
nios2-elf-g++.exe -T'C:/a_Nightowl/wds2hdmi/rtl/qsys/software/test_20_1_7_bsp/linker.x' -msys-crt0='C:/a_Nightowl/wds2hdmi/rtl/qsys/software/test_20_1_7_bsp/obj/HAL/src/crt0.o' -msys-lib= -LC:/a_Nightowl/wds2hdmi/rtl/qsys/software/test_20_1_7_bsp -msmallc -Wl,-Map=test_20_1_7.map -Os -g -Wall -mno-hw-div -mno-hw-mul -mno-hw-mulx -mgpopt=global -o test_20_1_7.elf obj/default/hello_world_small.o -lm -msys-lib=m
nios2-elf-g++.exe: error: missing argument to '-msys-lib='
make: *** [test_20_1_7.elf] Error 1
Makefile:1010: recipe for target 'test_20_1_7.elf' failed

10:03:34 Build Finished (took 2s.438ms)

 

I have no idea what this error means.  Can any one help me?

Responder