- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'd like to carve out a section in sdram normally used for the heap and reserve it.
The sdram sits at 0- 0x01800000, and I want my user logic to have sole write access to 0-0x1000. So to keep it simple, I assign only the heap to the sdram, and slightly modify the ide generated, "generated.x".. but is it enough to change just the following: from: PROVIDE( __alt_heap_start = end ); PROVIDE( __alt_heap_limit = 0x01800000 ); to: PROVIDE( __alt_heap_start = end ); PROVIDE( __alt_heap_limit = 0x017FF000 ); My logic outside of the nios could then write to the memory at 0-0x1000, but the nios will only be able read (never write) to that area. There's so much more in the generated.x file that I'm not sure if anything else needs to change... I read the bootlader normally changes whenever you modify the linker script but I don't think that applies in this case, right?Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think the change you suggest will reserve the top of sdram - not the bottom.
If the heap start is at 'end', this will normally be the address following the code and static data. So the '0' address actually contains something else (probably code). It might be easier to use a chunk of high sdram for the fixed address buffer. Alternatively, if you only have a small program, write an ldscript that assigns all the sections to appropraite memory areas. If you don't use any stdio functions, you may not even need a heap!
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