- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
after a lot of time, I managed to load a simple c program into the nios2
now the problem is that when I use the NIOS IDE to load it, it just hangs(the board), and when I use the monitor program, for something to happen I have to keep switching from pause to run mode.... here is the c code: # define Switches (volatile char *) 0x0011000 # define LEDs (char *) 0x0011010 int main() { while (1) *LEDs = *Switches; return 0; } LE: ...I fixed it!...kinda i was using a NiosII/f processor. After switching to a NiosII/e, everything works fine. Why did that happen?Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How are you bypassing the d$, assuming you have some? The keyword volatile will not bypass the d$. You either have to use the IORD/IOWR macros or bypass the d$ by ORing your address value with bit 31 set high.
How do you know it's hanging? Have you tried debugging it in the IDE? UPDATE: The "e" core has no d$, so you weren't (and aren't) bypassing the $, which is what you have to do when accessing hw registers. Best of luck! - Ura- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your reply!
I think I got it now...I'll get back to you if I still have some problems. thanks again!
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