- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also check if all regions are on required RAM place.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page