Results 1 to 7 of 7

Thread: Compilation Error

  1. #1
    Join Date
    Mar 2017
    Posts
    8
    Rep Power
    1

    Default Compilation Error

    Dear All,

    I'm trying to build a very basic system on Altera's DE2 board and following the correct procedure as specified by the provided tutorial, but for the last two days, I'm just stuck in this stupid error and I have no idea what is it, I'm making a simple 'Hello World' application using NIOS II processor in which I added on-chip memory and JTAG_UART and nothing else.. Following are the errors I'm getting while I compile the application software on Eclipse IDE;



    address 0x7f60 of hello_world.elf section `.rwdata' is not within region `onchip_memory2_0'
    address 0x9c88 of hello_world.elf section `.bss' is not within region `onchip_memory2_0'
    address 0x9c88 of hello_world.elf section `.onchip_memory2_0' is not within region `onchip_memory2_0'
    hello_world.elf section `.text' will not fit in region `onchip_memory2_0'
    make: *** [hello_world.elf] Error 1
    region `onchip_memory2_0' overflowed by 31880 bytes


    Please help me how to get rid of all these mentioned above :-(

  2. #2
    Join Date
    May 2013
    Posts
    403
    Rep Power
    1

    Default Re: Compilation Error

    Check in the BSP editor that you have set up the locations of the parts of memory in the appropriate components in your Qsys system (the linker script). You have them set up in onchip_memory2_0, but maybe you've specified a different address location in the Nios parameter editor.

  3. #3
    Join Date
    Mar 2017
    Posts
    8
    Rep Power
    1

    Default Re: Compilation Error

    Quote Originally Posted by sstrell View Post
    Check in the BSP editor that you have set up the locations of the parts of memory in the appropriate components in your Qsys system (the linker script). You have them set up in onchip_memory2_0, but maybe you've specified a different address location in the Nios parameter editor.
    c:/altera/13.0sp1/nios2eds/bin/gnu/h-i686-mingw32/bin/../lib/gcc/nios2-elf/4.1.2/../../../../nios2-elf/bin/ld.exe: hello_world.elf section `.text' will not fit in region `onchip_memory2_0'

    do you understand this line?? I have checked the Nios II BSP editor linker script section and all the memory sections are specified in the onchip_memory2_0

    Can the onchip_memory size be the reason? I have specified 4K as given in the tutorial..

  4. #4
    Join Date
    May 2013
    Posts
    403
    Rep Power
    1

    Default Re: Compilation Error

    Like I said, you also need to check the Nios II parameter editor as well to see where you put the start of memory in which Qsys component and if it's at the correct address. Maybe onchip_memory2_0 is not big enough.

  5. #5
    Join Date
    Aug 2014
    Posts
    256
    Rep Power
    1

    Default Re: Compilation Error

    Code:
    region `onchip_memory2_0' overflowed by 31880 bytes
    You've overflowed your on chip memory by 31kB. In other words your program is likely too big for the memory you are trying to store it in.

  6. #6
    Join Date
    Mar 2017
    Posts
    8
    Rep Power
    1

    Default Re: Compilation Error

    Okay here is the update.. I just increased the amount of On-Chip memory from 4096 bytes to around 20K bytes and it just solved the problem. But I was really surprised that how can a simple 'Hello Word' program occupies that much memory, may be invisible code behind the scene is the reason anyways then I started facing another issue of program downloading into the FPGA board (NIOS II IDE for Eclipse) which luckily got solved.

    So thank you sstrell and TCWORLD for your kind cooperation.

  7. #7
    Join Date
    Sep 2016
    Posts
    30
    Rep Power
    1

    Default Re: Compilation Error

    Maybe onchip_memory2_0 is not big enough.

Similar Threads

  1. Replies: 6
    Last Post: September 1st, 2014, 07:49 PM
  2. Error during compilation
    By revati.ranjan in forum Quartus II and EDA Tools Discussion
    Replies: 1
    Last Post: February 27th, 2013, 09:22 PM
  3. getting compilation error
    By arunkupradhan in forum Quartus II and EDA Tools Discussion
    Replies: 13
    Last Post: February 11th, 2013, 11:57 PM
  4. Error during compilation
    By nicolariggio in forum General Altera Discussion
    Replies: 1
    Last Post: December 16th, 2011, 11:57 AM
  5. STL compilation error
    By morten_tor in forum General Software Forum
    Replies: 7
    Last Post: December 16th, 2004, 06:39 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •