Altera_Forum
Honored Contributor
14 years agoSection is not within region.
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?