- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good afternoon,
I've been reading for a long time in this forum, and I have resolve all my problems with it, but now I have a question that I have not seen here. I'm sharing a SRAM chip with a NIOS and some specific HW, using two Avalon MM Master IP from Altera. The issue is that I want to define two separated spaces in the SRAM, one for NIOS and the other for the data that HW will use. My SRAM has base address 0x200000, and a span of 0x1fffff (2MB). I want to define a span of 0x01ffff for NIOS and the rest for the HW. I have tried to use the Address Map in the SOPC to modify it, but it's impossible. There is another possibility to define it automatically or I must do it modifing the system.h or other generated documents? Thank you for your support. Isaac CamposLink Copied
7 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have solved this type of problem by changing into system.h file and it is easier and quick solutions. Regards, Hardik Sheth- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You will need to have a look at the linker script, to be sure it won't put some code, stack or heap memory in the area you want to use for HW.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
have you any documents regarding linker scripting ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not really. I guess it should be somewhere in the gcc documentation.
But the format isn't so difficult to understand. The linker script is automatically generated, and in the IDE you can find it in your syslib -> Debug -> system_description -> generated.x You can move it elsewhere, define it as a custom linker script in the system library properties, and modify it to suit your needs. But be careful, any changes to the memory mapping in your SOPC system will not be automatically transferred to the linker script any more, you would have to change it manually.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi both,
Thank you four your reply. Then, if I'm correct, I can change the "LENGTH" parameter in my generated.x document and use it as my custom script? Then I understand that the NIOS, when compile, will take it in account and will use the area defined in the generated.x file. It's correct? Thank you for your support. Isaac Campos- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, that should do the trick.
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