Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20756 Discussions

Can't Debug Nios V on CL10 LP

pivengineer
Beginner
529 Views

Hello,

I am working on trying to implement a Nios V system on a CL10LP SOM from Aries Embedded. I have tried using the Nios V for Arria 10 tutorial as a guide in addition I examined the example with HyperRam from Aries themselves. Everything appears to build correctly and the .sof appears to program correctly, I can find no connection difference between what I have and them. The Nios V shows up on JTAG chain scans in RiscFree before I launch the debugger but it always fails saying it can't find the hart, which as far as I understand it is the running thread of the Nios V. I am running Quartus Standard Lite 23.1.

Is there a known common cause of this issue? It feels like I must have an issue with my BSP Settings and/or linker script but everything appears to match every reference I can find.

 

I really need to get this program moving and as a temporary solution I am looking at installing the 2017 toolchain so I can use the Nios II examples for the CL10 LP as the tutorials describe, at least that might get me to a functioning system so I can start working on figuring out the DMA aspect of my design. Though I anticipate this will make trying to utilize the HyperRAM more challenging as a consequence so not ideal either.

Labels (1)
0 Kudos
3 Replies
pivengineer
Beginner
488 Views

Sorry I couldn't include everything information wise yesterday, the following shows more of my project.

 

Here is my platform designer for the most stripped down test I am trying:

pivengineer_0-1712847165831.png

Nios V configuration:

pivengineer_1-1712847189805.png

OCM Configuration:

pivengineer_2-1712847206229.png

Compilation of looped "hello world" example:

Configuring in: C:\Users\mharman\Documents\QuartusProjects\nios_v_uart_no_pll\workspace\app\build\cmake.debug.win32.x86_64

cmake -G MinGW Makefiles -DCMAKE_EXPORT_COMPILE_COMMANDS=ON C:\Users\mharman\Documents\QuartusProjects\nios_v_uart_no_pll\workspace\app

-- Defaulting build type to Debug.

-- The ASM compiler identification is GNU

-- Found assembler: E:/Intel/23.1std-lite/riscfree/toolchain/riscv32-unknown-elf/bin/riscv32-unknown-elf-gcc.exe

-- The C compiler identification is GNU 12.1.0

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Check for working C compiler: E:/Intel/23.1std-lite/riscfree/toolchain/riscv32-unknown-elf/bin/riscv32-unknown-elf-gcc.exe - skipped

-- Detecting C compile features

-- Detecting C compile features - done

-- The CXX compiler identification is GNU 12.1.0

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Check for working CXX compiler: E:/Intel/23.1std-lite/riscfree/toolchain/riscv32-unknown-elf/bin/riscv32-unknown-elf-c++.exe - skipped

-- Detecting CXX compile features

-- Detecting CXX compile features - done

-- Configuring done (4.1s)

-- Generating done (0.1s)

-- Build files have been written to: C:/Users/mharman/Documents/QuartusProjects/nios_v_uart_no_pll/workspace/app/build/cmake.debug.win32.x86_64

Building in: C:\Users\mharman\Documents\QuartusProjects\nios_v_uart_no_pll\workspace\app\build\cmake.debug.win32.x86_64

cmake --build . --target all

[ 1%] Building ASM object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_log_macro.S.obj

[ 2%] Building ASM object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_mcount.S.obj

[ 3%] Building ASM object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/crt0.S.obj

[ 4%] Building ASM object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/machine_trap.S.obj

[ 5%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_alarm_start.c.obj

[ 6%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_busy_sleep.c.obj

[ 7%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_close.c.obj

[ 8%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_dcache_flush.c.obj

[ 9%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_dcache_flush_all.c.obj

[ 10%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_dcache_flush_no_writeback.c.obj

[ 12%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_dev.c.obj

[ 13%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_dev_llist_insert.c.obj

[ 14%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_dma_rxchan_open.c.obj

[ 15%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_dma_txchan_open.c.obj

[ 16%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_do_ctors.c.obj

[ 17%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_do_dtors.c.obj

[ 18%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_env_lock.c.obj

[ 19%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_environ.c.obj

[ 20%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_errno.c.obj

[ 21%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_execve.c.obj

[ 23%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_exit.c.obj

[ 24%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_fcntl.c.obj

[ 25%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_fd_lock.c.obj

[ 26%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_fd_unlock.c.obj

[ 27%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_find_dev.c.obj

[ 28%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_find_file.c.obj

[ 29%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_flash_dev.c.obj

[ 30%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_fork.c.obj

[ 31%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_fs_reg.c.obj

[ 32%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_fstat.c.obj

[ 34%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_get_fd.c.obj

[ 35%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_getchar.c.obj

[ 36%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_getpid.c.obj

[ 37%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_gettod.c.obj

[ 38%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_gmon.c.obj

[ 39%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_icache_flush.c.obj

[ 40%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_icache_flush_all.c.obj

[ 41%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_iic.c.obj

[ 42%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_iic_isr_register.c.obj

[ 43%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_instruction_exception_register.c.obj

[ 45%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_io_redirect.c.obj

[ 46%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_ioctl.c.obj

[ 47%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_irq_handler.c.obj

[ 48%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_isatty.c.obj

[ 49%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_kill.c.obj

[ 50%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_link.c.obj

[ 51%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_load.c.obj

[ 52%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_log_printf.c.obj

[ 53%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_lseek.c.obj

[ 54%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_main.c.obj

[ 56%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_malloc_lock.c.obj

[ 57%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_open.c.obj

[ 58%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_printf.c.obj

[ 59%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_putchar.c.obj

[ 60%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_putcharbuf.c.obj

[ 61%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_putstr.c.obj

[ 62%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_read.c.obj

[ 63%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_release_fd.c.obj

[ 64%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_remap_cached.c.obj

[ 65%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_remap_uncached.c.obj

[ 67%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_rename.c.obj

[ 68%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_sbrk.c.obj

[ 69%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_settod.c.obj

[ 70%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_stat.c.obj

[ 71%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_tick.c.obj

[ 72%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_times.c.obj

[ 73%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_tls.c.obj

[ 74%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_uncached_free.c.obj

[ 75%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_uncached_malloc.c.obj

[ 76%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_unlink.c.obj

[ 78%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_usleep.c.obj

[ 79%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_wait.c.obj

[ 80%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_write.c.obj

[ 81%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/intel_fpga_api_cmn_dfl.c.obj

[ 82%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/intel_fpga_api_cmn_inf.c.obj

[ 83%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/intel_fpga_api_cmn_msg.c.obj

[ 84%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/intel_fpga_api_niosv.c.obj

[ 85%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/intel_fpga_platform_api_niosv.c.obj

[ 86%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/intel_niosv_irq.c.obj

[ 87%] Building C object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/mtimer.c.obj

[ 89%] Building C object bsp/CMakeFiles/hal2_bsp.dir/alt_sys_init.c.obj

[ 90%] Building C object bsp/CMakeFiles/hal2_bsp.dir/drivers/src/altera_avalon_uart_fd.c.obj

[ 91%] Building C object bsp/CMakeFiles/hal2_bsp.dir/drivers/src/altera_avalon_uart_init.c.obj

[ 92%] Building C object bsp/CMakeFiles/hal2_bsp.dir/drivers/src/altera_avalon_uart_ioctl.c.obj

[ 93%] Building C object bsp/CMakeFiles/hal2_bsp.dir/drivers/src/altera_avalon_uart_read.c.obj

[ 94%] Building C object bsp/CMakeFiles/hal2_bsp.dir/drivers/src/altera_avalon_uart_write.c.obj

[ 95%] Linking C static library libhal2_bsp.a

[ 95%] Built target hal2_bsp

[ 96%] Building C object CMakeFiles/app.elf.dir/hello.c.obj

[ 97%] Linking C executable app.elf

[ 97%] Built target app.elf

[ 98%] Creating app.elf.objdump.

[ 98%] Built target create-objdump

[100%] Reporting memory available for stack + heap in app.elf.

app.elf

* 105.58 KB - Program size (code + initialized data).

* 25.63 KB - Free for stack + heap.

[100%] Built target niosv-stack-report

Build complete (0 errors, 0 warnings): C:\Users\mharman\Documents\QuartusProjects\nios_v_uart_no_pll\workspace\app\build\cmake.debug.win32.x86_64

RiscFree Debugger Error:

pivengineer_0-1712853514564.png

 

 

0 Kudos
anchen
Employee
402 Views

Hi,

 

What did you do when you encountered the debugger error?

Can you share below information when you try to connect the kit where the sof has been programmed sucessfully?

 

anchen_0-1713164509455.png

 

Thank you,

Ann

0 Kudos
WZ2
Employee
324 Views

Hi there,

I wanted to check if you have any further questions or concerns. If not, I will go ahead and mark this issue as resolved.

Additionally, we would greatly appreciate it if you could take a moment to fill out our survey. Your feedback is valuable to us and helps us improve our support quality.

Thank you for your time and cooperation.

Best regards,
WZ

0 Kudos
Reply