- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a C-Program that I Build using the Nios II IDE.
Lets say the program executes in external SRAM. How do I determine where in memory the program starts and ends ? I have a requirement to test this external SRAM. That is, run a memory test on the memory range that is not used for program storage. How do I determine this address range(s)? Does the compiler have this info (start/end address...) that can be used at compile time? For example, in my memory test when I specify a start and end address for the memory test can this range be provided by the compiler? (would vary depending on my program size) Thanks, JimLink Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Most of the info. you need can be found in an objdump file, which can be optionally generated by the IDE. (nios2-elf-objdump on the command line)
You do, however, have to be wary of where you've decided to place the stack, heap, and exception address. There's a pretty decent description of how memory is managed (albeit in a Linux system) here (http://www.informit.com/articles/article.asp?p=173438). In general, what you'd like to do is not really possible unless you place the stack and heap in a separate memory or are darn sure that neither your stack nor your heap will "invade" the area that you're attempting to test. Cheers, - slacker- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by slacker@May 12 2006, 11:48 AM most of the info. you need can be found in an objdump file, which can be optionally generated by the ide. (nios2-elf-objdump on the command line)
you do, however, have to be wary of where you've decided to place the stack, heap, and exception address.
there's a pretty decent description of how memory is managed (albeit in a linux system) here (http://www.informit.com/articles/article.asp?p=173438).
in general, what you'd like to do is not really possible unless you place the stack and heap in a separate memory or are darn sure that neither your stack nor your heap will "invade" the area that you're attempting to test.
cheers,
- slacker
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=15337)
--- quote end ---
--- Quote End --- Slacker, Thanks for the fast reply. Thats the info I was looking for. Jim
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