- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all,
I started a couple of day ago working on the tutorial SOPC builder with VHDL. The mini code as many of you know it already is: # define Switches (volatile char *) 0x0003000# define LEDs (char *) 0x0003010 void main() { while (1) *LEDs = *Switches; } My system specification contains ON chip RAM with an initialized .hex file that I created it using SOPC builder. I did everything exactly as it shows in the walk-through but had this strange error when trying to build the nios2 project on SBT eclipse: make: *** [/home/mehdi/Documents/il2207/Lab1/onchip_memory2_0.hex] Error 2 Does anyone have any idea about this? I would appreciate your help. Thanks!Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
make is just reporting that an error occurred during compilation, the real error message is probably a bit further up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This problem is freaking me out as none of my classmates could guess where the problem is coming from. Did I mention i am using ubuntu machine with the latest version of aletra tools. I did not change anything to default entries when setting the onchip ram with SOPC. How can i trace up the original error?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Problem Solved!
It seems that there is a problem with everyone using Ubuntu newer versions. What I understood that this issue is related to the Linux shell. These two commands can make it work: sudo rm /bin/sh (to delete the old entry of linux shell) sudo ln -s /bin/bash /bin/sh (link to the actual one which is bash)- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You really don't want to do that.
You need to change the shell specified in /etc/passwd for your username. Separately it is worth sorting out whether the problem is that the script is non-portable (is using bash specific features), or whether the default /bin/sh in ubuntu is not complying to the posix rules.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Once you get that sorted out I would recommend making your code cache coherency safe. Using pointers will not bypass the data cache (if one is present) so your code will most likely keep writing the same value out to the LEDs no matter what button combination you push. The PIO comes with cache bypassing macros, you can find them in altera_avalon_pio_regs.h
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks BadOmen :-)

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page