Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

Section is not within region.

Altera_Forum
Honored Contributor II
1,785 Views

Hello.  

Kind of wierd problem. As i create new new project and bsp from template ("hello world", for example), it seem to work fine. But when i include some external .h files and write some code, the error appears: 

address 0xd444 of hello_world.elf section `.bss' is not within region `onchip_ram' hello_world C/C++ Problem address 0xd444 of hello_world.elf section `.onchip_ram' is not within region `onchip_ram' hello_world C/C++ Problem  

The code is something like: 

#include <stdio.h> # include "oc_i2c_master.h" # include "alt_types.h" # include "system.h" # include "io.h" int main() { IOWR_8DIRECT(I2C_MASTER_BASE,OC_I2C_PRER_LO,99); printf("PRER=%d\n",IORD_8DIRECT(I2C_MASTER_BASE,OC_I2C_PRER_LO)); return 0; } 

The weird part is that there is no way to build this project except for the removal of it and creating new one. Neither recovering back default "Hello world" text nor cleaning project seem to help. How can i overcome this error?
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
418 Views

By the way, im using small C library without C++ support, so it have to match ram... Anyways it worked once, so its not about insufficient memory.

Altera_Forum
Honored Contributor II
418 Views

Try commenting out the printf(). 

I suspect the image is too large for the specified on-chip memory sizes. 

 

Also verify the which on-chip memory areas are assigned to code/data etc, and their base address and sizes. 

 

0xd444 sounds a bit like the size of something using printf() and the standard libraries.
Altera_Forum
Honored Contributor II
418 Views

Also check if all regions are on required RAM place.

Reply