Forum Discussion

ETang2's avatar
ETang2
Icon for Occasional Contributor rankOccasional Contributor
1 month ago
Solved

SDRAM NIOSV ash-riscv-gdb-server error

Hi, i did a simple sdram +niosv projet following 

DE10-Lite and sdram controller ip | Altera Community but wen i programed the de10-lite board and use the ashling vscode extension but when i try to launch the debug i obtain an error : 

 

ash-riscv-gdb-server: Ashling GDB Server for RISC-V (ash-riscv-gdb-server).

 

ash-riscv-gdb-server: v25.2.1, 09-May-2025, (c)Ashling Microsystems Ltd 2024.

 

ash-riscv-gdb-server:

 

ash-riscv-gdb-server: Initializing connection ...

 

=thread-group-added,id="i1"

 

GNU gdb (GDB) 13.2

 

Copyright (C) 2023 Free Software Foundation, Inc.

 

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

 

This is free software: you are free to change and redistribute it.

 

There is NO WARRANTY, to the extent permitted by law.

 

Type "show copying" and "show warranty" for details.

 

This GDB was configured as "--host=x86_64-w64-mingw32 --target=riscv32-unknown-elf".

 

Type "show configuration" for configuration details.

 

For bug reporting instructions, please see:

 

<https://www.gnu.org/software/gdb/bugs/>.

 

Find the GDB manual and other documentation resources online at:

 

<http://www.gnu.org/software/gdb/documentation/>.

 

 

 

For help, type "help".

 

Type "apropos word" to search for commands related to "word".

 

Warning: Debuggee TargetArchitecture not detected, assuming x86_64.

 

=cmd-param-changed,param="pagination",value="off"

 

ash-riscv-gdb-server: Cannot set the JTAG frequency, continuing with auto adjust mode

 

ash-riscv-gdb-server: Failed to get JTAG frequency from the debug probe

 

ash-riscv-gdb-server: Connected to target device with IDCODE 0x31050dd using USB-Blaster-2 (1) via JTAG at 0.00MHz.

 

ash-riscv-gdb-server: Info : Active Harts Detected : 1

 

ash-riscv-gdb-server: Info : Core[0] Hart[0] halted

 

ash-riscv-gdb-server: Info : [0] System architecture : RV32

 

ash-riscv-gdb-server: Info : [0] Debug version : v1.00

 

ash-riscv-gdb-server: Info : [0] Number of hardware breakpoints available : 1

 

ash-riscv-gdb-server: Info : [0] Number of program buffers: 8

 

ash-riscv-gdb-server: Info : [0] Number of data registers: 2

 

ash-riscv-gdb-server: Info : [0] Memory access -> Program buffer

 

ash-riscv-gdb-server: Info : [0] Memory access -> Abstract access memory

 

ash-riscv-gdb-server: Info : [0] CSR & FP Register access -> Abstract commands

 

ash-riscv-gdb-server:

 

ash-riscv-gdb-server: Waiting for debugger connection on port 47595.

 

ash-riscv-gdb-server: Press 'Q' to Quit.

 

ash-riscv-gdb-server: Got a debugger connection from 127.0.0.1 on port 47595.

 

 

 

Program received signal SIGINT, Interrupt.

 

0x04000004 in ?? ()

  • Hi ETang2 

     

    You could solve this error b increasing the OCRAM size in the Quartus project.

    Once you do this you would need to regenerate the BSP again.

5 Replies

  • ETang2's avatar
    ETang2
    Icon for Occasional Contributor rankOccasional Contributor

    I restart all and i obtain this : 

    ash-riscv-gdb-server: Ashling GDB Server for RISC-V (ash-riscv-gdb-server).

    ash-riscv-gdb-server: v25.2.1, 09-May-2025, (c)Ashling Microsystems Ltd 2024.

    ash-riscv-gdb-server:

    ash-riscv-gdb-server: Initializing connection ...

    ash-riscv-gdb-server: Cannot set the JTAG frequency, continuing with auto adjust mode

    ash-riscv-gdb-server: Failed to get JTAG frequency from the debug probe

    ash-riscv-gdb-server: Connected to target device with IDCODE 0x31050dd using USB-Blaster-2 (1) via JTAG at 0.00MHz.

    ash-riscv-gdb-server: Info : Active Harts Detected : 1

    ash-riscv-gdb-server: Info : Core[0] Hart[0] halted

    ash-riscv-gdb-server: Info : [0] System architecture : RV32

    ash-riscv-gdb-server: Info : [0] Debug version : v1.00

    ash-riscv-gdb-server: Info : [0] Number of hardware breakpoints available : 1

    ash-riscv-gdb-server: Info : [0] Number of program buffers: 8

    ash-riscv-gdb-server: Info : [0] Number of data registers: 2

    ash-riscv-gdb-server: Info : [0] Memory access -> Program buffer

    ash-riscv-gdb-server: Info : [0] Memory access -> Abstract access memory

    ash-riscv-gdb-server: Info : [0] CSR & FP Register access -> Abstract commands

    ash-riscv-gdb-server:

    ash-riscv-gdb-server: Waiting for debugger connection on port 47595.

    ash-riscv-gdb-server: Press 'Q' to Quit.

    =thread-group-added,id="i1"

    GNU gdb (GDB) 13.2

    Copyright (C) 2023 Free Software Foundation, Inc.

    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

    This is free software: you are free to change and redistribute it.

    There is NO WARRANTY, to the extent permitted by law.

    Type "show copying" and "show warranty" for details.

    This GDB was configured as "--host=x86_64-w64-mingw32 --target=riscv32-unknown-elf".

    Type "show configuration" for configuration details.

    For bug reporting instructions, please see:

    <https://www.gnu.org/software/gdb/bugs/>.

    Find the GDB manual and other documentation resources online at:

    <http://www.gnu.org/software/gdb/documentation/>.

     

    For help, type "help".

    Type "apropos word" to search for commands related to "word".

    Warning: Debuggee TargetArchitecture not detected, assuming x86_64.

    =cmd-param-changed,param="pagination",value="off"

    ash-riscv-gdb-server: Got a debugger connection from 127.0.0.1 on port 47595.

     

    Program received signal SIGINT, Interrupt.

    __reset () at C:/Users/tanguy-e/Downloads/test/software/hal_bsp/HAL/src\crt0.S:104

    104 tail _start

    I can't access a view of the address map but find enclosed the other elements.

    • tehjingy_Altera's avatar
      tehjingy_Altera
      Icon for Regular Contributor rankRegular Contributor

      Hi 

       

      Would like to confirm with you are you trying out the boot method of OCRAM?

      https://docs.altera.com/r/docs/726952/25.3/nios-v-embedded-processor-design-handbook/nios-v-processor-booting-from-on-chip-memory-ocram

      From the view of your objdump, it seems like you did not select the OCRAM for all the fields in the linker in the BSP Editor.

      https://docs.altera.com/r/docs/726952/25.3/nios-v-embedded-processor-design-handbook/software-design-flow?tocId=LNK8n8wvHPseNjT2CnUU5A

       

      If you are selecting the OCRAM boot method, which boot method are you trying out?

       

      Regards

      tehjingy

      • ETang2's avatar
        ETang2
        Icon for Occasional Contributor rankOccasional Contributor

        Hi, i confirm i'm trying to boot from OCRAM. I did the modification indicated and now i obtain a compilation error : 

        [proc] Exécution de la commande : C:\altera_standard\25.1std\riscfree\build_tools\cmake\bin\cmake.exe --version

        [proc] Exécution de la commande : C:\altera_standard\25.1std\riscfree\build_tools\cmake\bin\cmake.exe -E capabilities

        [kit] Chargement réussi de 2 kits à partir de C:\Users\tanguy-e\AppData\Local\CMakeTools\cmake-tools-kits.json

        [variant] Chargement effectué du nouvel ensemble de variantes

        [main] Configuration du projet : app

        [proc] Exécution de la commande : C:\altera_standard\25.1std\riscfree\build_tools\cmake\bin\cmake.exe -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=C:\altera_standard\25.1std\riscfree\toolchain\riscv32-unknown-elf\bin\riscv32-unknown-elf-gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=C:\altera_standard\25.1std\riscfree\toolchain\riscv32-unknown-elf\bin\riscv32-unknown-elf-g++.exe -DCMAKE_ASM_COMPILER:FILEPATH=C:\altera_standard\25.1std\riscfree\toolchain\riscv32-unknown-elf\bin\riscv32-unknown-elf-gcc.exe --no-warn-unused-cli -S C:/Users/tanguy-e/Downloads/test/software/app -B c:/Users/tanguy-e/Downloads/test/software/app/build -G "Unix Makefiles"

        [cmake] Not searching for unused variables given on the command line.

        [cmake] -- The C compiler identification is GNU 13.2.0

        [cmake] -- The CXX compiler identification is GNU 13.2.0

        [cmake] -- Detecting C compiler ABI info

        [cmake] -- Detecting C compiler ABI info - done

        [cmake] -- Check for working C compiler: C:/altera_standard/25.1std/riscfree/toolchain/riscv32-unknown-elf/bin/riscv32-unknown-elf-gcc.exe - skipped

        [cmake] -- Detecting C compile features

        [cmake] -- Detecting C compile features - done

        [cmake] -- Detecting CXX compiler ABI info

        [cmake] -- Detecting CXX compiler ABI info - done

        [cmake] -- Check for working CXX compiler: C:/altera_standard/25.1std/riscfree/toolchain/riscv32-unknown-elf/bin/riscv32-unknown-elf-g++.exe - skipped

        [cmake] -- Detecting CXX compile features

        [cmake] -- Detecting CXX compile features - done

        [cmake] -- The ASM compiler identification is GNU

        [cmake] -- Found assembler: C:/altera_standard/25.1std/riscfree/toolchain/riscv32-unknown-elf/bin/riscv32-unknown-elf-gcc.exe

        [cmake] -- Configuring done (5.5s)

        [cmake] -- Generating done (0.2s)

        [cmake] -- Build files have been written to: C:/Users/tanguy-e/Downloads/test/software/app/build

        [main] Génération du dossier : c:/Users/tanguy-e/Downloads/test/software/app/build

        [build] Démarrage de la build

        [proc] Exécution de la commande : chcp

        [proc] Exécution de la commande : C:\altera_standard\25.1std\riscfree\build_tools\cmake\bin\cmake.exe --build c:/Users/tanguy-e/Downloads/test/software/app/build --config Debug --target all -j 8 --

        [build] [  1%] Building ASM object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_ecc_exception_entry.S.obj

        [build] [  2%] Building ASM object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_log_macro.S.obj

        [build] [  3%] Building ASM object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_mcount.S.obj

        [build] [  4%] Building ASM object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_vic_vector_table.S.obj

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

        [build] [  6%] Building ASM object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/machine_trap.S.obj

        [build] [  8%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_busy_sleep.c.obj

        [build] [  8%] Building ASM object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/crt0.S.obj

        [build] [  9%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_close.c.obj

        [build] [ 10%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_dcache_flush_all.c.obj

        [build] [ 11%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_dcache_flush_no_writeback.c.obj

        [build] [ 13%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_dev.c.obj

        [build] [ 13%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_dcache_flush.c.obj

        [build] [ 14%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_dev_llist_insert.c.obj

        [build] [ 15%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_dma_rxchan_open.c.obj

        [build] [ 16%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_dma_txchan_open.c.obj

        [build] [ 17%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_do_ctors.c.obj

        [build] [ 18%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_ecc_error_inject.c.obj

        [build] [ 19%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_do_dtors.c.obj

        [build] [ 20%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_ecc_exception.c.obj

        [build] [ 22%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_errno.c.obj

        [build] [ 21%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_env_lock.c.obj

        [build] [ 23%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_environ.c.obj

        [build] [ 24%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_execve.c.obj

        [build] [ 25%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_exit.c.obj

        [build] [ 26%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_fd_lock.c.obj

        [build] [ 27%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_fcntl.c.obj

        [build] [ 28%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_fd_unlock.c.obj

        [build] [ 29%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_find_dev.c.obj

        [build] [ 30%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_flash_dev.c.obj

        [build] [ 31%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_find_file.c.obj

        [build] [ 32%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_fork.c.obj

        [build] [ 33%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_fs_reg.c.obj

        [build] [ 34%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_fstat.c.obj

        [build] [ 35%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_get_fd.c.obj

        [build] [ 36%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_getchar.c.obj

        [build] [ 37%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_getpid.c.obj

        [build] [ 38%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_gettod.c.obj

        [build] [ 39%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_gmon.c.obj

        [build] [ 40%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_icache_flush.c.obj

        [build] [ 41%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_icache_flush_all.c.obj

        [build] [ 42%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_iic.c.obj

        [build] [ 43%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_iic_isr_register.c.obj

        [build] [ 44%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_instruction_exception_register.c.obj

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

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

        [build] [ 46%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_irq_handler.c.obj

        [build] [ 47%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_isatty.c.obj

        [build] [ 48%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_kill.c.obj

        [build] [ 49%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_link.c.obj

        [build] [ 50%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_load.c.obj

        [build] [ 51%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_log_printf.c.obj

        [build] [ 52%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_lseek.c.obj

        [build] [ 53%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_main.c.obj

        [build] [ 54%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_malloc_lock.c.obj

        [build] [ 55%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_open.c.obj

        [build] [ 56%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_printf.c.obj

        [build] [ 57%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_putstr.c.obj

        [build] [ 58%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_putchar.c.obj

        [build] [ 59%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_putcharbuf.c.obj

        [build] [ 60%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_read.c.obj

        [build] [ 61%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_remap_cached.c.obj

        [build] [ 62%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_release_fd.c.obj

        [build] [ 63%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_remap_uncached.c.obj

        [build] [ 64%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_rename.c.obj

        [build] [ 66%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_sbrk.c.obj

        [build] [ 65%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_settod.c.obj

        [build] [ 67%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_stat.c.obj

        [build] [ 68%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_tick.c.obj

        [build] [ 70%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_times.c.obj

        [build] [ 70%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_tls.c.obj

        [build] [ 71%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_uncached_free.c.obj

        [build] [ 72%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_uncached_malloc.c.obj

        [build] [ 73%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_unlink.c.obj

        [build] [ 74%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_usleep.c.obj

        [build] [ 75%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_vic_isr_wrapper.c.obj

        [build] [ 76%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_wait.c.obj

        [build] [ 77%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/intel_fpga_api_cmn_dfl.c.obj

        [build] [ 78%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_write.c.obj

        [build] [ 79%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/intel_fpga_api_cmn_inf.c.obj

        [build] [ 80%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/intel_fpga_api_cmn_msg.c.obj

        [build] [ 81%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/intel_fpga_api_niosv.c.obj

        [build] [ 82%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/intel_fpga_platform_api_niosv.c.obj

        [build] [ 83%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/intel_niosv_irq.c.obj

        [build] [ 84%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/HAL/src/mtimer.c.obj

        [build] [ 85%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/alt_sys_init.c.obj

        [build] [ 86%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/drivers/src/altera_avalon_jtag_uart_fd.c.obj

        [build] [ 87%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/drivers/src/altera_avalon_jtag_uart_init.c.obj

        [build] [ 88%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/drivers/src/altera_avalon_jtag_uart_ioctl.c.obj

        [build] [ 89%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/drivers/src/altera_avalon_jtag_uart_read.c.obj

        [build] [ 90%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/drivers/src/altera_avalon_jtag_uart_write.c.obj

        [build] [ 91%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/drivers/src/altera_avalon_sysid_qsys.c.obj

        [build] [ 92%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/drivers/src/altera_avalon_timer_sc.c.obj

        [build] [ 94%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/drivers/src/altera_avalon_timer_ts.c.obj

        [build] [ 94%] Building C object hal_bsp/CMakeFiles/hal2_bsp.dir/drivers/src/altera_avalon_timer_vars.c.obj

        [build] [ 95%] Linking C static library libhal2_bsp.a

        [build] [ 95%] Built target hal2_bsp

        [build] [ 95%] Building C object CMakeFiles/app.elf.dir/hello_world.c.obj

        [build] [ 96%] Linking C executable app.elf

        [build] C:/altera_standard/25.1std/riscfree/toolchain/riscv32-unknown-elf/bin/../lib/gcc/riscv32-unknown-elf/13.2.0/../../../../riscv32-unknown-elf/bin/ld.exe: address 0x4019500 of app.elf section `.bss' is not within region `onchip_memory2'

        [build] C:/altera_standard/25.1std/riscfree/toolchain/riscv32-unknown-elf/bin/../lib/gcc/riscv32-unknown-elf/13.2.0/../../../../riscv32-unknown-elf/bin/ld.exe: address 0x4019500 of app.elf section `.bss' is not within region `onchip_memory2'

        [build] collect2.exe: error: ld returned 1 exit status

        [build] make[2]: *** [CMakeFiles/app.elf.dir/build.make:101: app.elf] Error 1

        [build] make[1]: *** [CMakeFiles/Makefile2:118: CMakeFiles/app.elf.dir/all] Error 2

        [build] make: *** [Makefile:91: all] Error 2

        [proc] La commande « C:\altera_standard\25.1std\riscfree\build_tools\cmake\bin\cmake.exe --build c:/Users/tanguy-e/Downloads/test/software/app/build --config Debug --target all -j 8 -- » s’est arrêtée avec le code 2.

        [driver] Build terminée : 00:00:12.693

        [build] La build s'est achevée avec le code de sortie 2

  • tehjingy_Altera's avatar
    tehjingy_Altera
    Icon for Regular Contributor rankRegular Contributor

    Hi 

     

    From the error log, it seems like the code that you have built have been flashed successfully into the device and it runs till the address 0x04000004 where it could not detect any code.

     

    Could you share with us your objdump file of the application and a view of the address map and your NiosV parameters in the platform designer?

     

    Regards

    tehjingy