Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
9 years ago

Unable to build "*.elf" file in NIOS II Eclipse.

Hi All,

I am novice in NIOS II Eclipse environment.

To learn I am using the existing project and after compiling the nios project in Quartus.

In order to generate the "*.elf" file, I created new project by pointing to "*nios_cpu.sopcinfo" file and added existing source file to the project.

To build the project I am clicking on "build all" but NIOS II Eclipse environment is throwing error (Attached snapshot).

console message

info: linking test2.elf

nios2-elf-g++ -t'../test2_bsp//linker.x' -msys-crt0='../test2_bsp//obj/hal/src/crt0.o' -msys-lib=hal_bsp -l../test2_bsp/ -wl,-map=test2.map -o0 -g -wall -mno-hw-div -mhw-mul -mno-hw-mulx -o test2.elf obj/default/dbc5cefa7_appl.o obj/default/aoeappl.o obj/default/bootmode.o obj/default/coeappl.o obj/default/db_nioshw.o obj/default/ecataoe.o obj/default/ecatappl.o obj/default/ecatcoe.o obj/default/ecatfoe.o obj/default/ecatslv.o obj/default/foeappl.o obj/default/mailbox.o obj/default/objdef.o obj/default/sdoserv.o -lm

c:/altera/14.1/nios2eds/bin/gnu/h-x86_64-mingw32/bin/../lib/gcc/nios2-elf/4.8.3/../../../../../h-x86_64-mingw32/nios2-elf/bin/ld.exe: test2.elf section `.text' will not fit in region `onchip_memory'

c:/altera/14.1/nios2eds/bin/gnu/h-x86_64-mingw32/bin/../lib/gcc/nios2-elf/4.8.3/../../../../../h-x86_64-mingw32/nios2-elf/bin/ld.exe: region `onchip_memory' overflowed by 93988 bytes

collect2.exe: error: ld returned 1 exit status

make: *** [test2.elf] error 1

Please help me to resolve the issue.

Waiting for your valuable reply.

thanks in advance. for your valuable time

NRM.

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    It means exactly what the error message says. Your program is too big to fit into the on-chip memory. Either shrink your program code or enlarge the on-chip memory (if possible).

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi Galfonz

    Thank you very much for your valuable input.

    I am able to solve the issue by increasing on chip memory.

    Thanks

    Neel.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    It means exactly what the error message says. Your program is too big to fit into the on-chip memory. Either shrink your program code or enlarge the on-chip memory (if possible).

    --- Quote End ---

    dear Sir, what we can do if both are not possible 1) to shrink my code 2)enlarge the on-chip memory.