Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
278 Views

.elf.srec not found

Jump to solution

Quartus 20.1;

Cyclone A7 device

I have created a hello world project from template and BSP project using .sopc file. After creation, project there was a problem with build

nios2-elf-g++.exe: error: missing argument to '-msys-lib='

As per one of the forum queries, this was corrected by changing 

APP_LDFLAGS += -msys-lib=$(call adjust-path-mixed,$(SYS_LIB)) 

to 

APP_LDFLAGS += -msys-lib=hal_bsp

After this modification, build was successful.

When I run/debug the project after setting configurations, following error message is shown

wslpath: /mnt/e/DNRSimulation/Altera_L2_Q20/Altera_L2/PGAD_RX/software/DNR/DNR.elf.srec: No such file or directory
Using cable "USB-Blaster [USB-0]", device 1, instance 0x00
Processor is already paused
Starting target processor
rm: cannot remove '/mnt/e/DNRSimulation/Altera_L2_Q20/Altera_L2/PGAD_RX/software/DNR/DNR.elf.srec': No such file or directory

 

Before this error, there were many more messages in RED which vanishes before they could be captured. A brief capture of the same is attached.

 

I must mention that working with Quartus 20.1 and its NIOS2 eclipse tools has been a terrible nightmare facing issues at every stage of development, from installation of software to build and now its extended to debug/run also.

Kindly support in correcting these issues.

0 Kudos

Accepted Solutions
Highlighted
Novice
247 Views

I came across the same problem in Quartus Prime Pro 19.4, while colleagues not. The difference for me
might be I installed WSL2 but have set WSL 1 active.
Workaround: as described added in my Makefile:

# 1. During debug
# -"wslpath: /mnt/d/Project/project.elf.srec: No such file or directory"
# -"rm: cannot remove '/mnt/d/Project/project.elf.srec': No such file or directory"
# -"Reading symbols from D:\Project\project.elf...(no debugging symbols found)...done."
# 2. During build after debug was failed
# -"nios2-elf-objdump.exe --disassemble --syms --all-header --source project.elf >project.objdump"
# -"nios2-elf-objdump.exe: can't disassemble for architecture UNKNOWN!"
#
# When startin a debug session the project.elf.srec is generated this failes, and as a result the content of project.elf is overwritten with the content of this srec file
# Causing the 'no debugging symbols found'/'can't disassemble for architecture UNKNOWN!' (hence the file is essientially a srec file with an .elf extension)
# by manually making an project.elf.srec file this can be overcomed
BUILD_PRE_PROCESS := touch $(ELF).srec

View solution in original post

6 Replies
Highlighted
Employee
264 Views

Hello Vinay,


I'm going to support your issue.


Can you try to move .srec to another place that WSL is accessible? Also change the path and tell me what happen?


Best regards,

Isaac Vazquez.


0 Kudos
Highlighted
Novice
257 Views

.srec file is not found anywhere. How to move a non-existent file ?

With all the frustration, I had uninstalled Quartus20 and installed Quartus 14.1 to continue my work(Making quartus is work is not my paid job, in case intel has forgotten this).

Now just to follow your instructions and try to make it work for one last time before giving up, I have re-installed Quartus 20 following all the procedures.

There was a method which I had used to resolve a new project creation error in eclipse, which I have forgotten.

I am posting that error here. Kindly support in resolving this error first and then we can move to compilation.

In the window for creating new nios2 application and bsp from template, when all details are entered and Finish is clicked, it says 

******************************************************************************************

Failed to execute: wsl dos2unix create-this-bsp; ./create-this-bsp --cpu-name cpu_nios --no-make

********************************************************************************************

In the console following messages are seen during the above process

*******************************************************************************************************************
Executing: nios2-swexample-create.exe --describeAll (C:\intelFPGA\20.1)
<nios2-swexample name="simple_socket_server_rgmii" display_name="Simple Socket Server (RGMII)">
Simple Socket Server uses the industry standard Sockets interface to TCP/IP. This application shows how to initialize the NicheStack TCP/IP Stack and run a simple TCP server application, allowing a PC to communicate with a Nios II system via Ethernet.

This example requires the MicroC/OS-II RTOS and NicheStack TCP/IP Stack - Nios II Edition software components. It also requires several peripherals, including a lan91c111 Ethernet MAC.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.
Also refer to the Altera NicheStack tutorial, which demonstrates how to use this software design.

The BSP for this template is based on the Micrium MicroC/OS-II operating system.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="blank_project" display_name="Blank Project">
Blank Project creates an empty project to which you can add your code.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Altera HAL operating system. To use a BSP based on a different
operating system, click Next and select the BSP from the BSP projects list.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="web_server" display_name="Web Server">
Web Server demonstrates how to initialize the NicheStack and run a basic HTTP server application to serve web pages from a file system in flash memory via Ethernet. This example uses the industry standard Sockets interface to TCP/IP.

This example requires the MicroC/OS-II RTOS, NicheStack TCP/IP Stack - Nios II Edition, and Read-Only Zip File system software components. It also requires several peripherals, including a lan91c111 Ethernet MAC.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Micrium MicroC/OS-II operating system.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="memtest_small" display_name="Memory Test Small">
Memory Test allows you to test the RAM memory on your board.

Because the RAM test is destructive, do not run the RAM test on any memory being used by this program, including code, data, and exception locations.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Altera HAL operating system.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="simple_socket_server" display_name="Simple Socket Server">
Simple Socket Server uses the industry standard Sockets interface to TCP/IP. This application shows how to initialize the NicheStack TCP/IP Stack and run a simple TCP server application, allowing a PC to communicate with a Nios II system via Ethernet.

This example requires the MicroC/OS-II RTOS and NicheStack TCP/IP Stack - Nios II Edition software components. It also requires several peripherals, including a lan91c111 Ethernet MAC.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.
Also refer to the Altera NicheStack tutorial, which demonstrates how to use this software design.

The BSP for this template is based on the Micrium MicroC/OS-II operating system.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="memtest" display_name="Memory Test">
Memory Test allows you to test the RAM and flash memory on your board. The application presents a menu to choose which memory to test.

Because the RAM test is destructive, do not run the RAM test on any memory being used by this program, including code, data, and exception locations.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Altera HAL operating system.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="count_binary" display_name="Count Binary">
Count Binary exercises the push-button, LCD, LED, and seven-segment display peripherals. Count Binary displays a running count of 0x00 to 0xff on output peripherals, while responding to input on the push-buttons. This example runs with or without the MicroC/OS-II RTOS and supports hardware systems that do not include all the peripherals listed.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Altera HAL operating system. To use a BSP based on a different
operating system, click Next and select the BSP from the BSP projects list.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="hello_world_small" display_name="Hello World Small">
Hello World Small prints 'Hello from Nios II' to STDOUT. The project occupies the smallest memory footprint possible for a hello world application.

This example runs with or without the MicroC/OS-II RTOS and requires an STDOUT device in your system's hardware.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Altera HAL operating system with reduced code footprint.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="board_diag" display_name="Board Diagnostics">
Board Diagnostics tests the LCD, the LED(D0-D7), and the seven-segment display peripherals, and the JTAG UART.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Altera HAL operating system.

For information about how this software example relates to Nios II hardware design examples, refer to the Design Examples page of the Nios II documentation available with your installation at <installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="hello_alt_main" display_name="Hello Freestanding">
Hello Freestanding is functionally equivalent to Hello World, but uses alt_main() as its entry point for advanced control of program initialization.

This example runs with or without the MicroC/OS-II RTOS. It requires an STDOUT device in your system's hardware.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Altera HAL operating system.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="hello_world" display_name="Hello World">
Hello World prints 'Hello from Nios II' to STDOUT.

This example runs with or without the MicroC/OS-II RTOS and requires an STDOUT device in your system's hardware.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Altera HAL operating system.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="float2_performance" display_name="Float2 Performance">
Float2 Performance compares the performance of floating-point operations using the Floating Point Hardware 2 custom instructions vs. software emulation. After each operation is performed, a table is printed showing the performance of the custom instructions and software emulation.

This code must be compiled with GCC optimization level -O2.

The Floating Point Hardware 2 component is the 2nd generation of floating-point custom instructions for Nios II. It offers improved performance, hardware acceleration of more operations, and reduced resource usage relative to the 1st generation. Results are not fully IEEE 754 compliant due to the implementation of simplified rounding.

System Requirements
*******************
The following component must be connected to the Nios II:
- 'Floating Point Hardware 2' component
- 'Performance Counter Unit' component
- Named 'performance_counter_0'
- At least 2 sections
- Must be connected to Nios II clock
- Some character device (e.g. JTAG UART)
</nios2-swexample>

<nios2-swexample name="web_server_rgmii" display_name="Web Server (RGMII)">
Web Server demonstrates how to initialize the NicheStack and run a basic HTTP server application to serve web pages from a file system in flash memory via Ethernet. This example uses the industry standard Sockets interface to TCP/IP.

This example requires the MicroC/OS-II RTOS, NicheStack TCP/IP Stack - Nios II Edition, and Read-Only Zip File system software components. It also requires several peripherals, including a lan91c111 Ethernet MAC.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Micrium MicroC/OS-II operating system.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="float2_functionality" display_name="Float2 Functionality">
Float2 Functionality is a basic functional test of the Floating Point Hardware 2 component. The program checks the results and displays a pass/fail message.

The Floating Point Hardware 2 component is the 2nd generation of floating-point custom instructions for Nios II. It offers improved performance, hardware acceleration of more operations, and reduced resource usage relative to the 1st generation. Results are not fully IEEE 754 compliant due to the implementation of simplified rounding.

System Requirements
*******************
The following components must be connected to the Nios II:
- 'Floating Point Hardware 2' component
- Some character device (e.g. JTAG UART)
</nios2-swexample>

<nios2-swexample name="float2_gcc" display_name="Float2 GCC">
Float2 GCC Example shows how to infer the floating point operations provided by the Floating Point Hardware 2 component. A user may inspect the objdump file to see the code generated by GCC.

The Floating Point Hardware 2 component is the 2nd generation of floating-point custom instructions for Nios II. It offers improved performance, hardware acceleration of more operations, and reduced resource usage relative to the 1st generation. Results are not fully IEEE 754 compliant due to the implementation of simplified rounding.

System Requirements
*******************
The following component must be connected to the Nios II:
- 'Floating Point Hardware 2' component
</nios2-swexample>

<nios2-swexample name="hello_ucosii" display_name="Hello MicroC/OS-II">
Hello MicroC/OS-II uses the MicroC/OS-II RTOS. You can use this example as a starting point for developing Nios II MicroC/OS-II applications.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Micrium MicroC/OS-II operating system.

For information about how this software example relates to Nios II hardware design
examples, refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.

Micrium's uC/OS-II can be used free of charge for non-commercial purposes and academic projects only.
This is not open-source software.
Use of the code is subject to the terms of an end-user license agreement, please see the license files included in the BSP project.
</nios2-swexample>


Executing: nios2-swexample-create.exe --describeAll --cpu-name=cpu_nios --sopc-file=W:/DNR/PGAD_RX/PGAD_ARS_QSYS.sopcinfo (C:\intelFPGA\20.1)
<nios2-swexample name="simple_socket_server_rgmii" display_name="Simple Socket Server (RGMII)">
Simple Socket Server uses the industry standard Sockets interface to TCP/IP. This application shows how to initialize the NicheStack TCP/IP Stack and run a simple TCP server application, allowing a PC to communicate with a Nios II system via Ethernet.

This example requires the MicroC/OS-II RTOS and NicheStack TCP/IP Stack - Nios II Edition software components. It also requires several peripherals, including a lan91c111 Ethernet MAC.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.
Also refer to the Altera NicheStack tutorial, which demonstrates how to use this software design.

The BSP for this template is based on the Micrium MicroC/OS-II operating system.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="blank_project" display_name="Blank Project">
Blank Project creates an empty project to which you can add your code.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Altera HAL operating system. To use a BSP based on a different
operating system, click Next and select the BSP from the BSP projects list.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="web_server" display_name="Web Server">
Web Server demonstrates how to initialize the NicheStack and run a basic HTTP server application to serve web pages from a file system in flash memory via Ethernet. This example uses the industry standard Sockets interface to TCP/IP.

This example requires the MicroC/OS-II RTOS, NicheStack TCP/IP Stack - Nios II Edition, and Read-Only Zip File system software components. It also requires several peripherals, including a lan91c111 Ethernet MAC.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Micrium MicroC/OS-II operating system.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="memtest_small" display_name="Memory Test Small">
Memory Test allows you to test the RAM memory on your board.

Because the RAM test is destructive, do not run the RAM test on any memory being used by this program, including code, data, and exception locations.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Altera HAL operating system.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="simple_socket_server" display_name="Simple Socket Server">
Simple Socket Server uses the industry standard Sockets interface to TCP/IP. This application shows how to initialize the NicheStack TCP/IP Stack and run a simple TCP server application, allowing a PC to communicate with a Nios II system via Ethernet.

This example requires the MicroC/OS-II RTOS and NicheStack TCP/IP Stack - Nios II Edition software components. It also requires several peripherals, including a lan91c111 Ethernet MAC.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.
Also refer to the Altera NicheStack tutorial, which demonstrates how to use this software design.

The BSP for this template is based on the Micrium MicroC/OS-II operating system.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="memtest" display_name="Memory Test">
Memory Test allows you to test the RAM and flash memory on your board. The application presents a menu to choose which memory to test.

Because the RAM test is destructive, do not run the RAM test on any memory being used by this program, including code, data, and exception locations.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Altera HAL operating system.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="count_binary" display_name="Count Binary">
Count Binary exercises the push-button, LCD, LED, and seven-segment display peripherals. Count Binary displays a running count of 0x00 to 0xff on output peripherals, while responding to input on the push-buttons. This example runs with or without the MicroC/OS-II RTOS and supports hardware systems that do not include all the peripherals listed.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Altera HAL operating system. To use a BSP based on a different
operating system, click Next and select the BSP from the BSP projects list.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="hello_world_small" display_name="Hello World Small">
Hello World Small prints 'Hello from Nios II' to STDOUT. The project occupies the smallest memory footprint possible for a hello world application.

This example runs with or without the MicroC/OS-II RTOS and requires an STDOUT device in your system's hardware.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Altera HAL operating system with reduced code footprint.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="board_diag" display_name="Board Diagnostics">
Board Diagnostics tests the LCD, the LED(D0-D7), and the seven-segment display peripherals, and the JTAG UART.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Altera HAL operating system.

For information about how this software example relates to Nios II hardware design examples, refer to the Design Examples page of the Nios II documentation available with your installation at <installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="hello_alt_main" display_name="Hello Freestanding">
Hello Freestanding is functionally equivalent to Hello World, but uses alt_main() as its entry point for advanced control of program initialization.

This example runs with or without the MicroC/OS-II RTOS. It requires an STDOUT device in your system's hardware.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Altera HAL operating system.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="hello_world" display_name="Hello World">
Hello World prints 'Hello from Nios II' to STDOUT.

This example runs with or without the MicroC/OS-II RTOS and requires an STDOUT device in your system's hardware.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Altera HAL operating system.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="float2_performance" display_name="Float2 Performance">
Float2 Performance compares the performance of floating-point operations using the Floating Point Hardware 2 custom instructions vs. software emulation. After each operation is performed, a table is printed showing the performance of the custom instructions and software emulation.

This code must be compiled with GCC optimization level -O2.

The Floating Point Hardware 2 component is the 2nd generation of floating-point custom instructions for Nios II. It offers improved performance, hardware acceleration of more operations, and reduced resource usage relative to the 1st generation. Results are not fully IEEE 754 compliant due to the implementation of simplified rounding.

System Requirements
*******************
The following component must be connected to the Nios II:
- 'Floating Point Hardware 2' component
- 'Performance Counter Unit' component
- Named 'performance_counter_0'
- At least 2 sections
- Must be connected to Nios II clock
- Some character device (e.g. JTAG UART)
</nios2-swexample>

<nios2-swexample name="web_server_rgmii" display_name="Web Server (RGMII)">
Web Server demonstrates how to initialize the NicheStack and run a basic HTTP server application to serve web pages from a file system in flash memory via Ethernet. This example uses the industry standard Sockets interface to TCP/IP.

This example requires the MicroC/OS-II RTOS, NicheStack TCP/IP Stack - Nios II Edition, and Read-Only Zip File system software components. It also requires several peripherals, including a lan91c111 Ethernet MAC.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Micrium MicroC/OS-II operating system.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="float2_functionality" display_name="Float2 Functionality">
Float2 Functionality is a basic functional test of the Floating Point Hardware 2 component. The program checks the results and displays a pass/fail message.

The Floating Point Hardware 2 component is the 2nd generation of floating-point custom instructions for Nios II. It offers improved performance, hardware acceleration of more operations, and reduced resource usage relative to the 1st generation. Results are not fully IEEE 754 compliant due to the implementation of simplified rounding.

System Requirements
*******************
The following components must be connected to the Nios II:
- 'Floating Point Hardware 2' component
- Some character device (e.g. JTAG UART)
</nios2-swexample>

<nios2-swexample name="float2_gcc" display_name="Float2 GCC">
Float2 GCC Example shows how to infer the floating point operations provided by the Floating Point Hardware 2 component. A user may inspect the objdump file to see the code generated by GCC.

The Floating Point Hardware 2 component is the 2nd generation of floating-point custom instructions for Nios II. It offers improved performance, hardware acceleration of more operations, and reduced resource usage relative to the 1st generation. Results are not fully IEEE 754 compliant due to the implementation of simplified rounding.

System Requirements
*******************
The following component must be connected to the Nios II:
- 'Floating Point Hardware 2' component
</nios2-swexample>

<nios2-swexample name="hello_ucosii" display_name="Hello MicroC/OS-II">
Hello MicroC/OS-II uses the MicroC/OS-II RTOS. You can use this example as a starting point for developing Nios II MicroC/OS-II applications.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Micrium MicroC/OS-II operating system.

For information about how this software example relates to Nios II hardware design
examples, refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.

Micrium's uC/OS-II can be used free of charge for non-commercial purposes and academic projects only.
This is not open-source software.
Use of the code is subject to the terms of an end-user license agreement, please see the license files included in the BSP project.
</nios2-swexample>


Executing: nios2-swexample-create.exe --describeAll --cpu-name=cpu_nios --sopc-file=W:/DNR/PGAD_RX/PGAD_ARS_QSYS.sopcinfo (C:\intelFPGA\20.1)
<nios2-swexample name="simple_socket_server_rgmii" display_name="Simple Socket Server (RGMII)">
Simple Socket Server uses the industry standard Sockets interface to TCP/IP. This application shows how to initialize the NicheStack TCP/IP Stack and run a simple TCP server application, allowing a PC to communicate with a Nios II system via Ethernet.

This example requires the MicroC/OS-II RTOS and NicheStack TCP/IP Stack - Nios II Edition software components. It also requires several peripherals, including a lan91c111 Ethernet MAC.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.
Also refer to the Altera NicheStack tutorial, which demonstrates how to use this software design.

The BSP for this template is based on the Micrium MicroC/OS-II operating system.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="blank_project" display_name="Blank Project">
Blank Project creates an empty project to which you can add your code.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Altera HAL operating system. To use a BSP based on a different
operating system, click Next and select the BSP from the BSP projects list.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="web_server" display_name="Web Server">
Web Server demonstrates how to initialize the NicheStack and run a basic HTTP server application to serve web pages from a file system in flash memory via Ethernet. This example uses the industry standard Sockets interface to TCP/IP.

This example requires the MicroC/OS-II RTOS, NicheStack TCP/IP Stack - Nios II Edition, and Read-Only Zip File system software components. It also requires several peripherals, including a lan91c111 Ethernet MAC.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Micrium MicroC/OS-II operating system.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="memtest_small" display_name="Memory Test Small">
Memory Test allows you to test the RAM memory on your board.

Because the RAM test is destructive, do not run the RAM test on any memory being used by this program, including code, data, and exception locations.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Altera HAL operating system.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="simple_socket_server" display_name="Simple Socket Server">
Simple Socket Server uses the industry standard Sockets interface to TCP/IP. This application shows how to initialize the NicheStack TCP/IP Stack and run a simple TCP server application, allowing a PC to communicate with a Nios II system via Ethernet.

This example requires the MicroC/OS-II RTOS and NicheStack TCP/IP Stack - Nios II Edition software components. It also requires several peripherals, including a lan91c111 Ethernet MAC.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.
Also refer to the Altera NicheStack tutorial, which demonstrates how to use this software design.

The BSP for this template is based on the Micrium MicroC/OS-II operating system.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="memtest" display_name="Memory Test">
Memory Test allows you to test the RAM and flash memory on your board. The application presents a menu to choose which memory to test.

Because the RAM test is destructive, do not run the RAM test on any memory being used by this program, including code, data, and exception locations.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Altera HAL operating system.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="count_binary" display_name="Count Binary">
Count Binary exercises the push-button, LCD, LED, and seven-segment display peripherals. Count Binary displays a running count of 0x00 to 0xff on output peripherals, while responding to input on the push-buttons. This example runs with or without the MicroC/OS-II RTOS and supports hardware systems that do not include all the peripherals listed.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Altera HAL operating system. To use a BSP based on a different
operating system, click Next and select the BSP from the BSP projects list.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="hello_world_small" display_name="Hello World Small">
Hello World Small prints 'Hello from Nios II' to STDOUT. The project occupies the smallest memory footprint possible for a hello world application.

This example runs with or without the MicroC/OS-II RTOS and requires an STDOUT device in your system's hardware.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Altera HAL operating system with reduced code footprint.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="board_diag" display_name="Board Diagnostics">
Board Diagnostics tests the LCD, the LED(D0-D7), and the seven-segment display peripherals, and the JTAG UART.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Altera HAL operating system.

For information about how this software example relates to Nios II hardware design examples, refer to the Design Examples page of the Nios II documentation available with your installation at <installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="hello_alt_main" display_name="Hello Freestanding">
Hello Freestanding is functionally equivalent to Hello World, but uses alt_main() as its entry point for advanced control of program initialization.

This example runs with or without the MicroC/OS-II RTOS. It requires an STDOUT device in your system's hardware.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Altera HAL operating system.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="hello_world" display_name="Hello World">
Hello World prints 'Hello from Nios II' to STDOUT.

This example runs with or without the MicroC/OS-II RTOS and requires an STDOUT device in your system's hardware.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Altera HAL operating system.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="float2_performance" display_name="Float2 Performance">
Float2 Performance compares the performance of floating-point operations using the Floating Point Hardware 2 custom instructions vs. software emulation. After each operation is performed, a table is printed showing the performance of the custom instructions and software emulation.

This code must be compiled with GCC optimization level -O2.

The Floating Point Hardware 2 component is the 2nd generation of floating-point custom instructions for Nios II. It offers improved performance, hardware acceleration of more operations, and reduced resource usage relative to the 1st generation. Results are not fully IEEE 754 compliant due to the implementation of simplified rounding.

System Requirements
*******************
The following component must be connected to the Nios II:
- 'Floating Point Hardware 2' component
- 'Performance Counter Unit' component
- Named 'performance_counter_0'
- At least 2 sections
- Must be connected to Nios II clock
- Some character device (e.g. JTAG UART)
</nios2-swexample>

<nios2-swexample name="web_server_rgmii" display_name="Web Server (RGMII)">
Web Server demonstrates how to initialize the NicheStack and run a basic HTTP server application to serve web pages from a file system in flash memory via Ethernet. This example uses the industry standard Sockets interface to TCP/IP.

This example requires the MicroC/OS-II RTOS, NicheStack TCP/IP Stack - Nios II Edition, and Read-Only Zip File system software components. It also requires several peripherals, including a lan91c111 Ethernet MAC.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Micrium MicroC/OS-II operating system.

For information about how this software example relates to Nios II hardware design examples,
refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.
</nios2-swexample>

<nios2-swexample name="float2_functionality" display_name="Float2 Functionality">
Float2 Functionality is a basic functional test of the Floating Point Hardware 2 component. The program checks the results and displays a pass/fail message.

The Floating Point Hardware 2 component is the 2nd generation of floating-point custom instructions for Nios II. It offers improved performance, hardware acceleration of more operations, and reduced resource usage relative to the 1st generation. Results are not fully IEEE 754 compliant due to the implementation of simplified rounding.

System Requirements
*******************
The following components must be connected to the Nios II:
- 'Floating Point Hardware 2' component
- Some character device (e.g. JTAG UART)
</nios2-swexample>

<nios2-swexample name="float2_gcc" display_name="Float2 GCC">
Float2 GCC Example shows how to infer the floating point operations provided by the Floating Point Hardware 2 component. A user may inspect the objdump file to see the code generated by GCC.

The Floating Point Hardware 2 component is the 2nd generation of floating-point custom instructions for Nios II. It offers improved performance, hardware acceleration of more operations, and reduced resource usage relative to the 1st generation. Results are not fully IEEE 754 compliant due to the implementation of simplified rounding.

System Requirements
*******************
The following component must be connected to the Nios II:
- 'Floating Point Hardware 2' component
</nios2-swexample>

<nios2-swexample name="hello_ucosii" display_name="Hello MicroC/OS-II">
Hello MicroC/OS-II uses the MicroC/OS-II RTOS. You can use this example as a starting point for developing Nios II MicroC/OS-II applications.

For details, click Finish to create the project and refer to the readme.txt file in the project directory.

The BSP for this template is based on the Micrium MicroC/OS-II operating system.

For information about how this software example relates to Nios II hardware design
examples, refer to the Design Examples page of the Nios II documentation available with your installation at:
<installation_directory>/nios2eds/documents/index.htm.

Micrium's uC/OS-II can be used free of charge for non-commercial purposes and academic projects only.
This is not open-source software.
Use of the code is subject to the terms of an end-user license agreement, please see the license files included in the BSP project.
</nios2-swexample>


Executing: nios2-swexample-create.exe --sopc-file=W:/DNR/PGAD_RX/PGAD_ARS_QSYS.sopcinfo --type=hello_world --elf-name=DNR.elf --app-dir=software/DNR --bsp-dir=software/DNR_bsp (W:\DNR\PGAD_RX)
INFO: Generating: software/DNR_bsp/create-this-bsp
INFO: Generating: software/DNR/create-this-app

Executing: wsl dos2unix create-this-bsp; ./create-this-bsp --cpu-name cpu_nios --no-make (W:\DNR\PGAD_RX\software\DNR_bsp)
dos2unix: converting file create-this-bsp to Unix format...
create-this-bsp: Running "nios2-bsp hal . ../../PGAD_ARS_QSYS.sopcinfo --cpu-name cpu_nios"
nios2-bsp: Using /mnt/c/intelfpga/20.1/nios2eds/sdk2/bin/bsp-set-defaults.tcl to set system-dependent settings.
nios2-bsp: Creating new BSP because ./settings.bsp doesn't exist.
nios2-bsp: Running "nios2-bsp-create-settings --sopc ../../PGAD_ARS_QSYS.sopcinfo --type hal --settings ./settings.bsp --bsp-dir . --script /mnt/c/intelfpga/20.1/nios2eds/sdk2/bin/bsp-set-defaults.tcl --cpu-name cpu_nios"
/mnt/c/intelfpga/20.1/nios2eds/sdk2/bin/nios2-bsp: line 471: nios2-bsp-create-settings: command not found
nios2-bsp: nios2-bsp-create-settings failed
nios2-bsp hal . ../../PGAD_ARS_QSYS.sopcinfo --cpu-name cpu_nios failed

*******************************************************************************************************************

I have tried all the solutions available in the community, like run as admin and others.

Please do not provide obvious answers.

Kindly support in resolving this issue for one last time.

regards,

Vinay

0 Kudos
Highlighted
Novice
248 Views

I came across the same problem in Quartus Prime Pro 19.4, while colleagues not. The difference for me
might be I installed WSL2 but have set WSL 1 active.
Workaround: as described added in my Makefile:

# 1. During debug
# -"wslpath: /mnt/d/Project/project.elf.srec: No such file or directory"
# -"rm: cannot remove '/mnt/d/Project/project.elf.srec': No such file or directory"
# -"Reading symbols from D:\Project\project.elf...(no debugging symbols found)...done."
# 2. During build after debug was failed
# -"nios2-elf-objdump.exe --disassemble --syms --all-header --source project.elf >project.objdump"
# -"nios2-elf-objdump.exe: can't disassemble for architecture UNKNOWN!"
#
# When startin a debug session the project.elf.srec is generated this failes, and as a result the content of project.elf is overwritten with the content of this srec file
# Causing the 'no debugging symbols found'/'can't disassemble for architecture UNKNOWN!' (hence the file is essientially a srec file with an .elf extension)
# by manually making an project.elf.srec file this can be overcomed
BUILD_PRE_PROCESS := touch $(ELF).srec

View solution in original post

Highlighted
Novice
234 Views

Thank you MViss

It worked in one computer. In another computer, creating new application and template from BSP is failing.

I will create another discussion thread for that.

regards,

Vinay

0 Kudos
Highlighted
Novice
155 Views

I have a similar issue. Did you solve the problem?

My Console message:

17:49:36 **** Incremental Build of configuration Nios II for project my_nios ****
wsl make all
touch my_nios.elf.srec
Info: Building /mnt/d/work/Scale/logic-io-fpga/software/my_nios_bsp/
make --no-print-directory -C /mnt/d/work/Scale/logic-io-fpga/software/my_nios_bsp/
[BSP build complete]
Info: Creating my_nios.objdump
nios2-elf-objdump.exe --disassemble --syms --all-header --source my_nios.elf >my_nios.objdump
nios2-elf-objdump.exe: can't disassemble for architecture UNKNOWN!

make: *** [Makefile:1020: my_nios.objdump] Error 1
make: *** Deleting file 'my_nios.objdump'

0 Kudos
Highlighted
Novice
143 Views

Yes, the problem got resolved by adding BUILD_PRE_PROCESS := touch $(ELF).srec.

I don't see an application project in the console message. Try creating both new application and bsp project from template and then try to debug/execute.

Below is the console print while executing the project. After BSP build complete, you can see a ".c" file being compiled. Hope it'll help.

wsl make all
touch DNR.elf.srec
Info: Building /mnt/e/Altera_L2_Q20/Altera_L2/FPGA/software/DNR_bsp/
make --no-print-directory -C /mnt/e/Altera_L2_Q20/Altera_L2/FPGA/software/DNR_bsp/
[BSP build complete]
Info: Compiling hello_world.c to obj/default/hello_world.o
nios2-elf-gcc.exe -xc -MP -MMD -c -IE:/Altera_L2_Q20/Altera_L2/FPGA/software/DNR_bsp/HAL/inc -IE:/Altera_L2_Q20/Altera_L2/FPGA/software/DNR_bsp -IE:/Altera_L2_Q20/Altera_L2/FPGA/software/DNR_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/hello_world.o hello_world.c
Info: Linking DNR.elf
nios2-elf-g++.exe -T'E:/Altera_L2_Q20/Altera_L2/FPGA/software/DNR_bsp/linker.x' -msys-crt0='E:/Altera_L2_Q20/Altera_L2/FPGA/software/DNR_bsp/obj/HAL/src/crt0.o' -msys-lib=hal_bsp -LE:/Altera_L2_Q20/Altera_L2/FPGA/software/DNR_bsp -Wl,-Map=DNR.map -O0 -g -Wall -mno-hw-div -mhw-mul -mno-hw-mulx -mgpopt=global -o DNR.elf obj/default/hello_world.o -lm -msys-lib=m
nios2-elf-insert.exe DNR.elf --thread_model hal --cpu_name cpu_nios --qsys true --simulation_enabled false --stderr_dev none --stdin_dev none --stdout_dev none --sopc_system_name PGAD_ARS_QSYS --quartus_project_dir "E:/Altera_L2_Q20/Altera_L2/FPGA" --jdi ../..//output_files/PGAD_ARS.jdi
Picked up _JAVA_OPTIONS: -Xmx1024M
Info: (DNR.elf) 22 KBytes program size (code + initialized data).
Info: 16361 KBytes free for stack + heap.
Info: Creating DNR.objdump
nios2-elf-objdump.exe --disassemble --syms --all-header --source DNR.elf >DNR.objdump
[DNR build complete]

0 Kudos